tfel
Loading...
Searching...
No Matches
mfront::GenericParallelMaterialPropertyInterface Struct Reference

the generic-parallel interface for material properties, built on the generic interface: the code evaluating a material property at a point is written by GenericMaterialPropertyInterfaceBase (see writePointEvaluation) in a function object. The generated function of batches gives this function object to the runtime of the interface (see MFront/GenericParallelMaterialProperty/Evaluate.hxx), with the primitive of the backend (see MFront/GenericParallel/Batch.hxx). More...

#include </home/runner/work/tfel/tfel/mfront/include/MFront/GenericParallelMaterialPropertyInterface.hxx>

Inheritance diagram for mfront::GenericParallelMaterialPropertyInterface:
mfront::GenericMaterialPropertyInterfaceBase mfront::AbstractMaterialPropertyInterface

Public Member Functions

 GenericParallelMaterialPropertyInterface ()
 default constructor
void getLibraryDescription (TargetsDescription &d, LibraryDescription &, const MaterialPropertyDescription &) const override
 append the generated material property to the given library description. This method allows to choose to which library is attached the material property (which is not the case of the getTargetsDescription method).
std::string getFunctionName (const MaterialPropertyDescription &) const override
void setOptions (const DataMap &) override
 give options to the interface
void getTargetsDescription (TargetsDescription &, const MaterialPropertyDescription &) const override
 : fill the target descripton
std::pair< bool, tokens_iterator > treatKeyword (const std::string &, const std::vector< std::string > &, tokens_iterator, const tokens_iterator) override
void writeOutputFiles (const MaterialPropertyDescription &, const FileDescription &) const override
 generate the output files
TypesDescription getTypesDescription () const override
std::vector< std::string > getInterfaceHeaderFiles () const override
virtual std::string getInterfaceInternalNamespace () const
std::string getInterfaceNameInCamelCase () const override
std::string getInterfaceNameInUpperCase () const override
std::string getOutOfBoundsPolicyEnumerationPrefix () const override
 ~GenericParallelMaterialPropertyInterface () override
 destructor
Public Member Functions inherited from mfront::GenericMaterialPropertyInterfaceBase
 GenericMaterialPropertyInterfaceBase ()
 default constructor
 ~GenericMaterialPropertyInterfaceBase () override
 destructor
Public Member Functions inherited from mfront::AbstractMaterialPropertyInterface
virtual ~AbstractMaterialPropertyInterface ()
 destructor

Static Public Member Functions

static std::string getName ()
Static Public Member Functions inherited from mfront::GenericMaterialPropertyInterfaceBase
static void writePointEvaluation (std::ostream &, const MaterialPropertyDescription &, const PointEvaluationOptions &)
 write the code evaluating a material property at a point, shared by the generic, cyrano and generic-parallel interfaces: physical bounds of the inputs, bounds of the inputs, body of the material property, physical bounds and bounds of the output. The variables are checked in the order of the inputs, the output being the last one. The physical bounds always make the evaluation fail. The bounds make it fail with the strict policy, and are reported with the warning policy: as with the generic interface, an unknown policy is treated as the None policy. The checks are disabled by the given macro, or not written if the runtime checks are disabled. The variables (inputs, parameters, output) and the out of bounds policy (mfront_out_of_bounds_policy) must be declared by the caller.
static std::size_t getPhysicalBoundCheck (const std::size_t, const bool)
static std::size_t getBoundCheck (const MaterialPropertyDescription &, const std::size_t, const bool)

Protected Types

using AbstractBackend = ::mfront::generic_parallel::AbstractBackend

Protected Member Functions

std::string getInterfaceName () const override
std::string getHeaderFileName (const std::string &) const override
std::string getSourceFileName (const std::string &) const override
void writeHeaderFile (const MaterialPropertyDescription &, const FileDescription &) const override
 generate the output files
void writeSrcFile (const MaterialPropertyDescription &, const FileDescription &) const override
 generate the output files

Protected Attributes

std::unique_ptr< const AbstractBackend > backend
 backend to be used

Additional Inherited Members

Public Types inherited from mfront::AbstractMaterialPropertyInterface
using DataMap = tfel::utilities::DataMap
 a simple alias
using tokens_iterator
 a simple alias
Static Public Attributes inherited from mfront::GenericMaterialPropertyInterfaceBase
static constexpr std::size_t invalid_result_check = 0
 identifier of the check of the finiteness of the result
Static Protected Member Functions inherited from mfront::GenericMaterialPropertyInterfaceBase
static void writePointwiseFunction (std::ostream &, const MaterialPropertyDescription &, const FileDescription &, const std::string &, const PointwiseFunctionDescription &)
 write the function evaluating a material property at a point, with the conventions of the generic interface (try block, errno, statuses -2 to -6). The parameters handler and the header declaring the function must have been written.

Detailed Description

the generic-parallel interface for material properties, built on the generic interface: the code evaluating a material property at a point is written by GenericMaterialPropertyInterfaceBase (see writePointEvaluation) in a function object. The generated function of batches gives this function object to the runtime of the interface (see MFront/GenericParallelMaterialProperty/Evaluate.hxx), with the primitive of the backend (see MFront/GenericParallel/Batch.hxx).

Member Function Documentation

◆ getFunctionName()

std::string mfront::GenericParallelMaterialPropertyInterface::getFunctionName ( const MaterialPropertyDescription & ) const
nodiscardoverridevirtual
Returns
the name of the generated function
Parameters
[in]mpd: material property description

Reimplemented from mfront::GenericMaterialPropertyInterfaceBase.

◆ getHeaderFileName()

std::string mfront::GenericParallelMaterialPropertyInterface::getHeaderFileName ( const std::string & ) const
nodiscardoverrideprotectedvirtual
Returns
the name of the header file

Reimplemented from mfront::GenericMaterialPropertyInterfaceBase.

◆ getInterfaceHeaderFiles()

std::vector< std::string > mfront::GenericParallelMaterialPropertyInterface::getInterfaceHeaderFiles ( ) const
nodiscardoverridevirtual

◆ getInterfaceName()

std::string mfront::GenericParallelMaterialPropertyInterface::getInterfaceName ( ) const
nodiscardoverrideprotectedvirtual

◆ getInterfaceNameInCamelCase()

std::string mfront::GenericParallelMaterialPropertyInterface::getInterfaceNameInCamelCase ( ) const
nodiscardoverridevirtual

◆ getInterfaceNameInUpperCase()

std::string mfront::GenericParallelMaterialPropertyInterface::getInterfaceNameInUpperCase ( ) const
nodiscardoverridevirtual

◆ getLibraryDescription()

void mfront::GenericParallelMaterialPropertyInterface::getLibraryDescription ( TargetsDescription & d,
LibraryDescription & ,
const MaterialPropertyDescription &  ) const
overridevirtual

append the generated material property to the given library description. This method allows to choose to which library is attached the material property (which is not the case of the getTargetsDescription method).

Parameters
[in]dtargets description
[in]llibrary description
[in]mpdmaterial property description

Reimplemented from mfront::GenericMaterialPropertyInterfaceBase.

◆ getName()

std::string mfront::GenericParallelMaterialPropertyInterface::getName ( )
static
Returns
the interface name

◆ getOutOfBoundsPolicyEnumerationPrefix()

std::string mfront::GenericParallelMaterialPropertyInterface::getOutOfBoundsPolicyEnumerationPrefix ( ) const
nodiscardoverridevirtual

◆ getSourceFileName()

std::string mfront::GenericParallelMaterialPropertyInterface::getSourceFileName ( const std::string & ) const
nodiscardoverrideprotectedvirtual
Returns
the name of the source file

Reimplemented from mfront::GenericMaterialPropertyInterfaceBase.

◆ getTargetsDescription()

void mfront::GenericParallelMaterialPropertyInterface::getTargetsDescription ( TargetsDescription & ,
const MaterialPropertyDescription &  ) const
overridevirtual

: fill the target descripton

Parameters
[out]dtarget description
[in]mpdmaterial property description

Reimplemented from mfront::GenericMaterialPropertyInterfaceBase.

◆ getTypesDescription()

TypesDescription mfront::GenericParallelMaterialPropertyInterface::getTypesDescription ( ) const
nodiscardoverridevirtual

◆ setOptions()

void mfront::GenericParallelMaterialPropertyInterface::setOptions ( const DataMap & )
overridevirtual

give options to the interface

Those options may have been read from a configuration file or from the command line

Parameters
[in]optsoptions

Reimplemented from mfront::GenericMaterialPropertyInterfaceBase.

◆ treatKeyword()

std::pair< bool, tokens_iterator > mfront::GenericParallelMaterialPropertyInterface::treatKeyword ( const std::string & ,
const std::vector< std::string > & ,
tokens_iterator ,
const tokens_iterator  )
nodiscardoverridevirtual
Parameters
[in]k: keyword to be treated
[in]ilist of interfaces to which the keyword is restricted
[in]p: iterator to the current token
[in]pe: iterator past the end of the file
Returns
a pair. The first entry is true if the keyword was treated by the interface. The second entry is an iterator after the last token treated.

Reimplemented from mfront::GenericMaterialPropertyInterfaceBase.

◆ writeHeaderFile()

void mfront::GenericParallelMaterialPropertyInterface::writeHeaderFile ( const MaterialPropertyDescription & ,
const FileDescription &  ) const
overrideprotectedvirtual

generate the output files

Parameters
[in]mpdmaterial property description
[in]fdmfront file description

Reimplemented from mfront::GenericMaterialPropertyInterfaceBase.

◆ writeOutputFiles()

void mfront::GenericParallelMaterialPropertyInterface::writeOutputFiles ( const MaterialPropertyDescription & ,
const FileDescription &  ) const
overridevirtual

generate the output files

Parameters
[in]mpdmaterial property description
[in]fdmfront file description

Reimplemented from mfront::GenericMaterialPropertyInterfaceBase.

◆ writeSrcFile()

void mfront::GenericParallelMaterialPropertyInterface::writeSrcFile ( const MaterialPropertyDescription & ,
const FileDescription &  ) const
overrideprotectedvirtual

generate the output files

Parameters
[in]mpdmaterial property description
[in]fdmfront file description

Reimplemented from mfront::GenericMaterialPropertyInterfaceBase.


The documentation for this struct was generated from the following file: