tfel
Loading...
Searching...
No Matches
mfront::CMaterialPropertyInterfaceBase Struct Referenceabstract

Base class for a set of material properties interface. More...

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

Inheritance diagram for mfront::CMaterialPropertyInterfaceBase:
mfront::AbstractMaterialPropertyInterface mfront::CMaterialPropertyInterface mfront::Fortran03MaterialPropertyInterface mfront::FortranMaterialPropertyInterface mfront::MFrontMaterialPropertyInterface mfront::ExcelMaterialPropertyInternalInterface

Public Member Functions

 CMaterialPropertyInterfaceBase ()
 constructor
void setOptions (const DataMap &) override
 give options to the interface
void writeOutputFiles (const MaterialPropertyDescription &, const FileDescription &) const override
 generate the output files
 ~CMaterialPropertyInterfaceBase () override
 destructor
Public Member Functions inherited from mfront::AbstractMaterialPropertyInterface
virtual std::pair< bool, tokens_iterator > treatKeyword (const std::string &, const std::vector< std::string > &, tokens_iterator, const tokens_iterator)=0
virtual void getTargetsDescription (TargetsDescription &, const MaterialPropertyDescription &) const =0
 : fill the target descripton
virtual ~AbstractMaterialPropertyInterface ()
 destructor

Static Public Member Functions

static VariableDescriptionContainer::size_type getVariableNumber (const MaterialPropertyDescription &, const std::string &)

Protected Member Functions

virtual void writeBeginHeaderNamespace (std::ostream &) const =0
virtual void writeEndHeaderNamespace (std::ostream &) const =0
virtual void writeInterfaceSymbol (std::ostream &, const MaterialPropertyDescription &) const =0
virtual void writeBeginSrcNamespace (std::ostream &) const =0
virtual void writeEndSrcNamespace (std::ostream &) const =0
virtual bool requiresCheckBoundsFunction () const =0
virtual std::string getFunctionName (const MaterialPropertyDescription &) const =0
virtual std::string getCheckBoundsFunctionName (const MaterialPropertyDescription &) const =0
virtual std::string getHeaderFileName (const std::string &, const std::string &) const =0
virtual std::string getSrcFileName (const std::string &, const std::string &) const =0
virtual std::vector< std::string > getSupportedFloatingPointTypes () const
virtual bool shallGenerateOverloadedFunctionForQuantities () const
 if the material property supports quantities, this methods returns if an overloaded function supporting quantities shall be generated.
virtual void writeArgumentsList (std::ostream &, const MaterialPropertyDescription &, const std::string_view, const bool) const
 write the list of arguments
virtual void writeMaterialPropertyBody (std::ostream &, const MaterialPropertyDescription &, const FileDescription &, const std::string_view, const bool) const
 write the body of the material property function
virtual void writeMaterialPropertyCheckBoundsBody (std::ostream &, const MaterialPropertyDescription &, const std::string_view) const
 write the body of the check bounds function
virtual void writeInterfaceSpecificVariables (std::ostream &, const MaterialPropertyDescription &) const
virtual void writeFileDescriptionSymbols (std::ostream &, const MaterialPropertyDescription &, const FileDescription &) const
virtual void writeValidatorSymbol (std::ostream &, const MaterialPropertyDescription &) const
virtual void writeCompatibilityModeSymbol (std::ostream &, const MaterialPropertyDescription &) const
virtual void writeBuildIdentifierSymbol (std::ostream &, const MaterialPropertyDescription &) const
virtual void writeEntryPointSymbol (std::ostream &, const MaterialPropertyDescription &) const
virtual void writeTFELVersionSymbol (std::ostream &, const MaterialPropertyDescription &) const
virtual void writeUnitSystemSymbol (std::ostream &, const MaterialPropertyDescription &) const
virtual void writeLawSymbol (std::ostream &, const MaterialPropertyDescription &) const
virtual void writeMaterialSymbol (std::ostream &, const MaterialPropertyDescription &) const
virtual void writeMaterialKnowledgeTypeSymbol (std::ostream &, const MaterialPropertyDescription &) const
virtual void writeVariablesNamesSymbol (std::ostream &, const MaterialPropertyDescription &) const
virtual void writeVariablesBoundsSymbols (std::ostream &, const MaterialPropertyDescription &) const
virtual void writeHeaderPreprocessorDirectives (std::ostream &, const MaterialPropertyDescription &) const
virtual void writeSrcPreprocessorDirectives (std::ostream &, const MaterialPropertyDescription &) const
virtual void writeCErrorTreatment (std::ostream &, const MaterialPropertyDescription &, const std::string_view, const bool) const
virtual void writeCxxTryBlock (std::ostream &) const
 write the try statement before the material property body
virtual void writeCxxCatchBlock (std::ostream &, const MaterialPropertyDescription &, const std::string_view, const bool) const
 write catch blocks before the material property body
virtual void returnInvalidValue (std::ostream &, std::string_view, const MaterialPropertyDescription &, const std::string_view, const bool) const
 write catch blocks before the material property body
virtual std::string getCallingConvention () const
virtual std::string getSymbolName (const MaterialPropertyDescription &) const
virtual void writeHeaderFile (const MaterialPropertyDescription &, const FileDescription &) const
 : write the source file. The headerFile member has been opened appropriately and will be closed after the call.
virtual void writeSrcFile (const MaterialPropertyDescription &, const FileDescription &) const
 : write the source file. The srcFile member has been opened appropriately and will be closed after the call.

Additional Inherited Members

Public Types inherited from mfront::AbstractMaterialPropertyInterface
using DataMap = tfel::utilities::DataMap
 a simple alias
using tokens_iterator
 a simple alias

Detailed Description

Base class for a set of material properties interface.

Member Function Documentation

◆ getCheckBoundsFunctionName()

virtual std::string mfront::CMaterialPropertyInterfaceBase::getCheckBoundsFunctionName ( const MaterialPropertyDescription & ) const
nodiscardprotectedpure virtual
Parameters
[in]mpdmaterial property description

Implemented in mfront::CMaterialPropertyInterface.

◆ getFunctionName()

virtual std::string mfront::CMaterialPropertyInterfaceBase::getFunctionName ( const MaterialPropertyDescription & ) const
nodiscardprotectedpure virtual
Returns
the name of the generated function.
Parameters
[in]mpdmaterial property description

Implemented in mfront::CMaterialPropertyInterface, and mfront::MFrontMaterialPropertyInterface.

◆ getHeaderFileName()

virtual std::string mfront::CMaterialPropertyInterfaceBase::getHeaderFileName ( const std::string & ,
const std::string &  ) const
nodiscardprotectedpure virtual
Parameters
conststd::string&, name of the material
conststd::string&, name of the class

Implemented in mfront::CMaterialPropertyInterface, and mfront::MFrontMaterialPropertyInterface.

◆ getSrcFileName()

virtual std::string mfront::CMaterialPropertyInterfaceBase::getSrcFileName ( const std::string & ,
const std::string &  ) const
nodiscardprotectedpure virtual
Parameters
conststd::string&, name of the material
conststd::string&, name of the class

Implemented in mfront::CMaterialPropertyInterface.

◆ getSupportedFloatingPointTypes()

virtual std::vector< std::string > mfront::CMaterialPropertyInterfaceBase::getSupportedFloatingPointTypes ( ) const
nodiscardprotectedvirtual
Returns
the list of supported floating-point types. Supported floating-point types are float, double and long double. For each type one overload (or two if quantities are supported) will be generated.

The default implementation only returns double.

◆ getSymbolName()

virtual std::string mfront::CMaterialPropertyInterfaceBase::getSymbolName ( const MaterialPropertyDescription & ) const
nodiscardprotectedvirtual
Returns
the name used to generate the symbols associated with the material property.
Parameters
[in]mpdmaterial property description

◆ getVariableNumber()

VariableDescriptionContainer::size_type mfront::CMaterialPropertyInterfaceBase::getVariableNumber ( const MaterialPropertyDescription & ,
const std::string &  )
static
Returns
the position of the variable in the inputs plus one.
Parameters
[in]mpdmaterial property description
[in]nvariable name

◆ requiresCheckBoundsFunction()

virtual bool mfront::CMaterialPropertyInterfaceBase::requiresCheckBoundsFunction ( ) const
nodiscardprotectedpure virtual

◆ returnInvalidValue()

virtual void mfront::CMaterialPropertyInterfaceBase::returnInvalidValue ( std::ostream & ,
std::string_view ,
const MaterialPropertyDescription & ,
const std::string_view ,
const bool  ) const
protectedvirtual

write catch blocks before the material property body

Parameters
[out]osoutput file stream
[in]mshcode returning the error message (a string must be escaped)
[in]mpdmaterial property description
[in]floating_point_typefloating-point type
[in]use_qtuse quantities

◆ setOptions()

void mfront::CMaterialPropertyInterfaceBase::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

Implements mfront::AbstractMaterialPropertyInterface.

◆ shallGenerateOverloadedFunctionForQuantities()

virtual bool mfront::CMaterialPropertyInterfaceBase::shallGenerateOverloadedFunctionForQuantities ( ) const
nodiscardprotectedvirtual

if the material property supports quantities, this methods returns if an overloaded function supporting quantities shall be generated.

The default implementation of this method returns false.

◆ writeArgumentsList()

virtual void mfront::CMaterialPropertyInterfaceBase::writeArgumentsList ( std::ostream & ,
const MaterialPropertyDescription & ,
const std::string_view ,
const bool  ) const
protectedvirtual

write the list of arguments

Parameters
[out]osoutput stream
[in]mpdmaterial property description
[in]tfloating-point type
[in]bboolean stating if quantities must be used

◆ writeBeginHeaderNamespace()

virtual void mfront::CMaterialPropertyInterfaceBase::writeBeginHeaderNamespace ( std::ostream & ) const
protectedpure virtual
Parameters
[out]osoutput file stream

Implemented in mfront::CMaterialPropertyInterface.

◆ writeBeginSrcNamespace()

virtual void mfront::CMaterialPropertyInterfaceBase::writeBeginSrcNamespace ( std::ostream & ) const
protectedpure virtual
Parameters
[out]osoutput file stream

Implemented in mfront::CMaterialPropertyInterface.

◆ writeBuildIdentifierSymbol()

virtual void mfront::CMaterialPropertyInterfaceBase::writeBuildIdentifierSymbol ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[out]mpdmaterial property description

◆ writeCErrorTreatment()

virtual void mfront::CMaterialPropertyInterfaceBase::writeCErrorTreatment ( std::ostream & ,
const MaterialPropertyDescription & ,
const std::string_view ,
const bool  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[in]mpdmaterial property description
[in]floating_point_typefloating-point type
[in]use_qtuse quantities

◆ writeCompatibilityModeSymbol()

virtual void mfront::CMaterialPropertyInterfaceBase::writeCompatibilityModeSymbol ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[out]mpdmaterial property description

◆ writeCxxCatchBlock()

virtual void mfront::CMaterialPropertyInterfaceBase::writeCxxCatchBlock ( std::ostream & ,
const MaterialPropertyDescription & ,
const std::string_view ,
const bool  ) const
protectedvirtual

write catch blocks before the material property body

Parameters
[out]osoutput file stream
[in]mpdmaterial property description
[in]floating_point_typefloating-point type
[in]use_qtuse quantities

◆ writeCxxTryBlock()

virtual void mfront::CMaterialPropertyInterfaceBase::writeCxxTryBlock ( std::ostream & ) const
protectedvirtual

write the try statement before the material property body

Parameters
[out]osoutput file stream

◆ writeEndHeaderNamespace()

virtual void mfront::CMaterialPropertyInterfaceBase::writeEndHeaderNamespace ( std::ostream & ) const
protectedpure virtual
Parameters
[out]osoutput file stream

Implemented in mfront::CMaterialPropertyInterface.

◆ writeEndSrcNamespace()

virtual void mfront::CMaterialPropertyInterfaceBase::writeEndSrcNamespace ( std::ostream & ) const
protectedpure virtual
Parameters
[out]osoutput file stream

Implemented in mfront::CMaterialPropertyInterface.

◆ writeEntryPointSymbol()

virtual void mfront::CMaterialPropertyInterfaceBase::writeEntryPointSymbol ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[in]mpdmaterial property description

◆ writeFileDescriptionSymbols()

virtual void mfront::CMaterialPropertyInterfaceBase::writeFileDescriptionSymbols ( std::ostream & ,
const MaterialPropertyDescription & ,
const FileDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[out]mpdmaterial property description
[out]mpdfile description

◆ writeHeaderFile()

virtual void mfront::CMaterialPropertyInterfaceBase::writeHeaderFile ( const MaterialPropertyDescription & ,
const FileDescription &  ) const
protectedvirtual

: write the source file. The headerFile member has been opened appropriately and will be closed after the call.

Parameters
[in]mpd: material property description
[in]fd: file description

◆ writeHeaderPreprocessorDirectives()

virtual void mfront::CMaterialPropertyInterfaceBase::writeHeaderPreprocessorDirectives ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[in]mpdmaterial property description

◆ writeInterfaceSpecificVariables()

virtual void mfront::CMaterialPropertyInterfaceBase::writeInterfaceSpecificVariables ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[in]mpd: material property description

◆ writeInterfaceSymbol()

virtual void mfront::CMaterialPropertyInterfaceBase::writeInterfaceSymbol ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedpure virtual

◆ writeLawSymbol()

virtual void mfront::CMaterialPropertyInterfaceBase::writeLawSymbol ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[in]mpdmaterial property description

Reimplemented in mfront::MFrontMaterialPropertyInterface.

◆ writeMaterialKnowledgeTypeSymbol()

virtual void mfront::CMaterialPropertyInterfaceBase::writeMaterialKnowledgeTypeSymbol ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[in]mpdmaterial property description

◆ writeMaterialPropertyBody()

virtual void mfront::CMaterialPropertyInterfaceBase::writeMaterialPropertyBody ( std::ostream & ,
const MaterialPropertyDescription & ,
const FileDescription & ,
const std::string_view ,
const bool  ) const
protectedvirtual

write the body of the material property function

Parameters
[out]osoutput stream
[in]mpdmaterial property description
[in]fdfile description
[in]floating_point_typefloating-point type
[in]use_qtuse_quantities on input/outputs

◆ writeMaterialPropertyCheckBoundsBody()

virtual void mfront::CMaterialPropertyInterfaceBase::writeMaterialPropertyCheckBoundsBody ( std::ostream & ,
const MaterialPropertyDescription & ,
const std::string_view  ) const
protectedvirtual

write the body of the check bounds function

Parameters
[out]osoutput stream
[in]mpdmaterial property description
[in]floating_point_typefloating-point type

◆ writeMaterialSymbol()

virtual void mfront::CMaterialPropertyInterfaceBase::writeMaterialSymbol ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[in]mpdmaterial property description

Reimplemented in mfront::MFrontMaterialPropertyInterface.

◆ writeOutputFiles()

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

generate the output files

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

Implements mfront::AbstractMaterialPropertyInterface.

Reimplemented in mfront::Fortran03MaterialPropertyInterface.

◆ writeSrcFile()

virtual void mfront::CMaterialPropertyInterfaceBase::writeSrcFile ( const MaterialPropertyDescription & ,
const FileDescription &  ) const
protectedvirtual

: write the source file. The srcFile member has been opened appropriately and will be closed after the call.

Parameters
[in]mpd: material property description
[in]fd: file description

◆ writeSrcPreprocessorDirectives()

virtual void mfront::CMaterialPropertyInterfaceBase::writeSrcPreprocessorDirectives ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[in]mpdmaterial property description

◆ writeTFELVersionSymbol()

virtual void mfront::CMaterialPropertyInterfaceBase::writeTFELVersionSymbol ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[in]mpdmaterial property description

◆ writeUnitSystemSymbol()

virtual void mfront::CMaterialPropertyInterfaceBase::writeUnitSystemSymbol ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[in]mpdmaterial property description

◆ writeValidatorSymbol()

virtual void mfront::CMaterialPropertyInterfaceBase::writeValidatorSymbol ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[out]mpdmaterial property description

◆ writeVariablesBoundsSymbols()

virtual void mfront::CMaterialPropertyInterfaceBase::writeVariablesBoundsSymbols ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[in]namename of the generated material property
[in]mpdmaterial property description

◆ writeVariablesNamesSymbol()

virtual void mfront::CMaterialPropertyInterfaceBase::writeVariablesNamesSymbol ( std::ostream & ,
const MaterialPropertyDescription &  ) const
protectedvirtual
Parameters
[out]osoutput file stream
[in]namename of the generated material property
[in]mpdmaterial property description

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