Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI::Functions::Function1dForm Class Referenceabstract

#include <GIDI.hpp>

Inheritance diagram for GIDI::Functions::Function1dForm:

Public Member Functions

 Function1dForm (std::string const &a_moniker, FormType a_type, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue)
 Function1dForm (std::string const &a_moniker, FormType a_type, Axes const &a_axes, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue)
 Function1dForm (Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, FormType a_type, Suite *a_suite=nullptr)
 Function1dForm (Function1dForm const &a_form)
 ~Function1dForm ()
Function1dFormoperator= (Function1dForm const &a_rhs)
virtual double evaluate (double a_x1) const =0
virtual void mapToXsAndAdd (std::size_t a_offset, std::vector< double > const &a_Xs, std::vector< double > &a_results, double a_scaleFactor) const
virtual XYs1dasXYs1d (bool a_asLinlin, double a_accuray, double a_lowerEps, double a_upperEps) const
virtual void write (FILE *a_file, std::string const &a_format) const
void print (std::string const &a_format) const
Public Member Functions inherited from GIDI::Functions::FunctionForm
 FunctionForm (std::string const &a_moniker, FormType a_type, int a_dimension, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue)
 FunctionForm (std::string const &a_moniker, FormType a_type, int a_dimension, Axes const &a_axes, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue)
 FunctionForm (Construction::Settings const &a_construction, HAPI::Node const &a_node, SetupInfo &a_setupInfo, FormType a_type, int a_dimension, Suite *a_suite=nullptr)
 FunctionForm (FunctionForm const &a_form)
 ~FunctionForm ()
FunctionFormoperator= (FunctionForm const &a_rhs)
int dimension () const
int index () const
double outerDomainValue () const
void setOuterDomainValue (double a_outerDomainValue)
Axes const & axes () const
Axesaxes ()
ptwXY_interpolation interpolation () const
void setInterpolation (ptwXY_interpolation a_interpolation)
std::string interpolationString () const
virtual double domainMin () const =0
virtual double domainMax () const =0
virtual void toXMLList_func (GUPI::WriteInfo &a_writeInfo, std::string const &a_indent, bool a_embedded, bool a_inRegions) const
void toXMLList (GUPI::WriteInfo &a_writeInfo, std::string const &a_indent) const
Public Member Functions inherited from GIDI::Form
 Form (FormType a_type)
 Form (std::string const &a_moniker, FormType a_type, std::string const &a_label)
 Form (HAPI::Node const &a_node, SetupInfo &a_setupInfo, FormType a_type, Suite *a_suite=nullptr)
 Form (Form const &a_form)
virtual ~Form ()
Formoperator= (Form const &a_rhs)
Suiteparent () const
std::string const & label () const
void setLabel (std::string const &a_label)
virtual std::string actualMoniker () const
std::string const & keyName () const
void setKeyName (std::string const &a_keyName)
std::string const & keyValue () const
virtual void setKeyValue (std::string const &a_keyName) const
FormType type () const
Form const * sibling (std::string a_label) const
GUPI::AncestryfindInAncestry3 (LUPI_maybeUnused std::string const &a_item)
GUPI::Ancestry const * findInAncestry3 (LUPI_maybeUnused std::string const &a_item) const
std::string xlinkItemKey () const
Public Member Functions inherited from GUPI::Ancestry
 Ancestry (std::string const &a_moniker, std::string const &a_attribute="")
virtual ~Ancestry ()
Ancestryoperator= (Ancestry const &a_ancestry)
std::string const & moniker () const
void setMoniker (std::string const &a_moniker)
Ancestryancestor ()
Ancestry const * ancestor () const
void setAncestor (Ancestry *a_ancestor)
std::string attribute () const
Ancestryroot ()
Ancestry const * root () const
bool isChild (Ancestry *a_instance)
bool isParent (Ancestry *a_parent)
bool isRoot () const
AncestryfindInAncestry (std::string const &a_href)
Ancestry const * findInAncestry (std::string const &a_href) const
virtual AncestryfindInAncestry3 (std::string const &a_item)=0
virtual Ancestry const * findInAncestry3 (std::string const &a_item) const =0
virtual LUPI_HOST void serialize (LUPI::DataBuffer &a_buffer, LUPI::DataBuffer::Mode a_mode)
std::string toXLink () const
void printXML () const

Additional Inherited Members

Static Public Member Functions inherited from GUPI::Ancestry
static std::string buildXLinkItemKey (std::string const &a_name, std::string const &a_key)

Detailed Description

Base class inherited by other GIDI 1d function classes.

Definition at line 1031 of file GIDI.hpp.

Constructor & Destructor Documentation

◆ Function1dForm() [1/4]

GIDI::Functions::Function1dForm::Function1dForm ( std::string const & a_moniker,
FormType a_type,
ptwXY_interpolation a_interpolation,
int a_index,
double a_outerDomainValue )
Parameters
a_moniker[in] The moniker for this.
a_type[in] The FormType the class represents.
a_interpolation[in] The interpolation along the outer most independent axis and the dependent axis.
a_index[in] Currently not used.
a_outerDomainValue[in] If embedded in a higher dimensional function, the value of the domain of the next higher dimension.

Definition at line 348 of file GIDI_form.cc.

348 :
349 FunctionForm( a_moniker, a_type, 1, a_interpolation, a_index, a_outerDomainValue ) {
350
351}
FunctionForm(std::string const &a_moniker, FormType a_type, int a_dimension, ptwXY_interpolation a_interpolation, int a_index, double a_outerDomainValue)
Definition GIDI_form.cc:202

Referenced by GIDI::Functions::Regions1d::append(), GIDI::Functions::Branching1d::Branching1d(), GIDI::Functions::Constant1d::Constant1d(), GIDI::Functions::Constant1d::Constant1d(), GIDI::Functions::FissionEnergyRelease::delayedBetaEnergy(), GIDI::Functions::FissionEnergyRelease::delayedBetaEnergy(), GIDI::Functions::FissionEnergyRelease::delayedGammaEnergy(), GIDI::Functions::FissionEnergyRelease::delayedGammaEnergy(), GIDI::Functions::FissionEnergyRelease::delayedNeutronKE(), GIDI::Functions::FissionEnergyRelease::delayedNeutronKE(), GIDI::Functions::ResonanceBackground1d::fastRegion(), GIDI::Functions::FissionEnergyRelease::FissionEnergyRelease(), Function1dForm(), GIDI::Functions::Gridded1d::Gridded1d(), GIDI::Functions::Legendre1d::Legendre1d(), GIDI::Functions::Legendre1d::Legendre1d(), GIDI::Functions::Legendre1d::Legendre1d(), GIDI::Functions::FissionEnergyRelease::neutrinoEnergy(), GIDI::Functions::FissionEnergyRelease::neutrinoEnergy(), GIDI::Functions::FissionEnergyRelease::nonNeutrinoEnergy(), GIDI::Functions::FissionEnergyRelease::nonNeutrinoEnergy(), operator=(), GIDI::Functions::Regions1d::operator[](), GIDI::Functions::Polynomial1d::Polynomial1d(), GIDI::Functions::Polynomial1d::Polynomial1d(), GIDI::Functions::Polynomial1d::Polynomial1d(), GIDI::Functions::FissionEnergyRelease::promptGammaEnergy(), GIDI::Functions::FissionEnergyRelease::promptGammaEnergy(), GIDI::Functions::FissionEnergyRelease::promptNeutronKE(), GIDI::Functions::FissionEnergyRelease::promptNeutronKE(), GIDI::Functions::FissionEnergyRelease::promptProductKE(), GIDI::Functions::FissionEnergyRelease::promptProductKE(), GIDI::Functions::Reference1d::Reference1d(), GIDI::Functions::Regions1d::Regions1d(), GIDI::Functions::ResonanceBackground1d::resolvedRegion(), GIDI::Functions::ResonanceBackground1d::ResonanceBackground1d(), GIDI::Functions::ResonanceBackgroundRegion1d::ResonanceBackgroundRegion1d(), GIDI::Functions::ResonancesWithBackground1d::ResonancesWithBackground1d(), GIDI::Functions::ThermalNeutronScatteringLaw1d::ThermalNeutronScatteringLaw1d(), GIDI::Functions::FissionEnergyRelease::totalEnergy(), GIDI::Functions::FissionEnergyRelease::totalEnergy(), GIDI::Functions::ResonanceBackground1d::unresolvedRegion(), GIDI::Functions::Unspecified1d::Unspecified1d(), GIDI::Functions::URR_probabilityTables1d::URR_probabilityTables1d(), GIDI::Functions::Xs_pdf_cdf1d::Xs_pdf_cdf1d(), GIDI::Functions::Xs_pdf_cdf1d::Xs_pdf_cdf1d(), GIDI::Functions::Xs_pdf_cdf1d::Xs_pdf_cdf1d(), GIDI::Functions::XYs1d::XYs1d(), GIDI::Functions::XYs1d::XYs1d(), GIDI::Functions::XYs1d::XYs1d(), GIDI::Functions::XYs1d::XYs1d(), GIDI::Functions::XYs1d::XYs1d(), GIDI::Functions::XYs1d::XYs1d(), GIDI::Functions::XYs1d::XYs1d(), GIDI::Functions::Ys1d::Ys1d(), GIDI::Functions::Ys1d::Ys1d(), GIDI::Functions::Ys1d::Ys1d(), and GIDI::Functions::Ys1d::Ys1d().

◆ Function1dForm() [2/4]

GIDI::Functions::Function1dForm::Function1dForm ( std::string const & a_moniker,
FormType a_type,
Axes const & a_axes,
ptwXY_interpolation a_interpolation,
int a_index,
double a_outerDomainValue )
Parameters
a_moniker[in] The moniker for this.
a_type[in] The FormType the class represents.
a_axes[in] The axes to copy for this.
a_interpolation[in] The interpolation along the outer most independent axis and the dependent axis.
a_index[in] Currently not used.
a_outerDomainValue[in] If embedded in a higher dimensional function, the value of the domain of the next higher dimension.

Definition at line 362 of file GIDI_form.cc.

363 :
364 FunctionForm( a_moniker, a_type, 1, a_axes, a_interpolation, a_index, a_outerDomainValue ) {
365
366}

◆ Function1dForm() [3/4]

GIDI::Functions::Function1dForm::Function1dForm ( Construction::Settings const & a_construction,
HAPI::Node const & a_node,
SetupInfo & a_setupInfo,
FormType a_type,
Suite * a_suite = nullptr )
Parameters
a_construction[in] Used to pass user options to the constructor.
a_node[in] The HAPI::Node to be parsed and used to construct the FunctionForm.
a_setupInfo[in] Information create my the Protare constructor to help in parsing.
a_type[in] The FormType the class represents.
a_suite[in] The parent GIDI::Suite.

Definition at line 376 of file GIDI_form.cc.

377 :
378 FunctionForm( a_construction, a_node, a_setupInfo, a_type, 1, a_suite ) {
379
380}

◆ Function1dForm() [4/4]

GIDI::Functions::Function1dForm::Function1dForm ( Function1dForm const & a_form)
Parameters
a_form[in] The Function1dForm to copy.

Definition at line 386 of file GIDI_form.cc.

386 :
387 FunctionForm( a_form ) {
388
389}

◆ ~Function1dForm()

GIDI::Functions::Function1dForm::~Function1dForm ( )

Definition at line 394 of file GIDI_form.cc.

394 {
395
396}

Member Function Documentation

◆ asXYs1d()

XYs1d * GIDI::Functions::Function1dForm::asXYs1d ( bool a_asLinlin,
double a_accuray,
double a_lowerEps,
double a_upperEps ) const
virtual

This method writes a warning message stating that the write method has not been implemented for this.

Parameters
a_file[in] The C FILE instance to write the data to.
a_format[in] The format string passed to each region's write method. This method returns a nullptr since this methods was not implemented in the the derived class.
a_asLinlin[in] If true, the inpolatation of the returned XYs1d instance will always be lin-lin. Otherwise, the interpolation depends on the child 1d functions. This argument is not needed or used for this class.
a_accuracy[in] The accuracy use to convert the data to lin=lin interpolation if needed. This argument is not needed or used for this cl
a_lowerEps[in] The relative domain ammount to put a point below a boundary between two regions. This argument is not needed or used for
a_upperEps[in] The relative domain ammount to put a point above a boundary between two regions. This argument is not needed or used for
Returns
A pointer to an XYs1d instance that must be freed by the calling function.

Reimplemented in GIDI::Functions::Constant1d, GIDI::Functions::Legendre1d, GIDI::Functions::Polynomial1d, GIDI::Functions::Regions1d, GIDI::Functions::Xs_pdf_cdf1d, and GIDI::Functions::XYs1d.

Definition at line 447 of file GIDI_form.cc.

447 {
448
449 return( nullptr );
450}

Referenced by evaluate().

◆ evaluate()

◆ mapToXsAndAdd()

void GIDI::Functions::Function1dForm::mapToXsAndAdd ( std::size_t a_offset,
std::vector< double > const & a_Xs,
std::vector< double > & a_results,
double a_scaleFactor ) const
virtual

This method executes a throw as the sub-class did not define it. Evaluates this at the X-values in a_Xs[a_offset:] and adds the results to a_results[a_offset:].

Parameters
a_offset[in] The offset in a_Xs to start.
a_Xs[in] The list of domain values to evaluate this at.
a_results[in] The list whose values are added to by the Y-values of this.
a_scaleFactor[in] A factor applied to each evaluation before it is added to a_results.

Reimplemented in GIDI::Functions::Constant1d, GIDI::Functions::Polynomial1d, GIDI::Functions::Regions1d, and GIDI::Functions::XYs1d.

Definition at line 424 of file GIDI_form.cc.

424 {
425
426 throw Exception( "Function1dForm::mapToXsAndAdd: function " + moniker( ) + " not implemented." );
427}
std::string const & moniker() const
Definition GUPI.hpp:102

Referenced by evaluate(), MCGIDI::HeatedCrossSectionContinuousEnergy::HeatedCrossSectionContinuousEnergy(), and GIDI::Product::mapContinuousEnergyProductData().

◆ operator=()

Function1dForm & GIDI::Functions::Function1dForm::operator= ( Function1dForm const & a_rhs)

The assignment operator. This method sets the members of this to those of a_rhs except for those not set by base classes.

Parameters
a_rhs[in] Instance whose member are used to set the members of this.

Definition at line 405 of file GIDI_form.cc.

405 {
406
407 if( this != &a_rhs ) {
409 }
410
411 return( *this );
412}
FunctionForm & operator=(FunctionForm const &a_rhs)
Definition GIDI_form.cc:293

Referenced by GIDI::Functions::Xs_pdf_cdf1d::operator=(), and GIDI::Functions::XYs1d::operator=().

◆ print()

void GIDI::Functions::Function1dForm::print ( std::string const & a_format) const

Calls the write method with stdout as the file stream.

Parameters
a_format[in] The format string passed to the C printf function.

Definition at line 463 of file GIDI_form.cc.

463 {
464
465 write( stdout, a_format.c_str( ) );
466}
virtual void write(FILE *a_file, std::string const &a_format) const
Definition GIDI_form.cc:452

◆ write()

void GIDI::Functions::Function1dForm::write ( FILE * a_file,
std::string const & a_format ) const
virtual

Reimplemented in GIDI::Functions::Gridded1d, GIDI::Functions::Regions1d, GIDI::Functions::XYs1d, and GIDI::Functions::Ys1d.

Definition at line 452 of file GIDI_form.cc.

452 {
453
454 fprintf( a_file, "# Write method not implemented for %s.\n", moniker( ).c_str( ) );
455}

Referenced by evaluate(), and print().


The documentation for this class was generated from the following files: