Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
FEDD::InputToOutputMappingClass< SC, LO, GO, NO > Class Template Referenceabstract

This abstract class defining the general concepts of a mapping between an input and an output. To hold it general the input can be any high-dimensional array. More...

#include <InputToOutputMappingClass_decl.hpp>

Public Types

typedef MultiVector< SC, LO, GO, NO > MultiVector_Type
 
typedef Teuchos::RCP< MultiVector_TypeMultiVectorPtr_Type
 
typedef Teuchos::RCP< const MultiVector_TypeMultiVectorConstPtr_Type
 

Public Member Functions

virtual void evaluateMapping (ParameterListPtr_Type params, MultiVectorConstPtr_Type input, MultiVectorPtr_Type &output)=0
 Implement a mapping for evaluating output in dependence of given input and specified parameters for MultiVectorPtr_Type inputs/ outputs.
 
virtual void evaluateDerivative (ParameterListPtr_Type params, MultiVectorConstPtr_Type x, MultiVectorPtr_Type &res)=0
 Computes value of derivative of defined function in evaluateMapping - could be derivative of output w.r.t to input but other in subclass specific versions are also possible.
 
virtual void evaluateMapping (ParameterListPtr_Type params, double x, double &res)=0
 Implements a functional description for evaluating res in dependence of given dependent variables and specified parameters Here we overload the functional evaluation because we often encounter cases where we have simple R->R mappings.
 
virtual void evaluateDerivative (ParameterListPtr_Type params, double x, double &res)=0
 Computes value of derivative of defined function in evaluateMapping specific.
 
virtual void setParams (ParameterListPtr_Type params)=0
 Function could include different parameters which will be specified in *.xml This function should set the needed parameters for defined function to the specified values.
 
virtual void echoInformationMapping ()=0
 Print e.g. parameter values used in model at runtime or problem specific.
 
virtual void updateParams (ParameterListPtr_Type params)
 Set or update the parameters read from the ParameterList.
 

Protected Member Functions

 InputToOutputMappingClass (ParameterListPtr_Type parameters)
 Constructor.
 

Protected Attributes

ParameterListPtr_Type params_
 

Detailed Description

template<class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
class FEDD::InputToOutputMappingClass< SC, LO, GO, NO >

This abstract class defining the general concepts of a mapping between an input and an output. To hold it general the input can be any high-dimensional array.

Template Parameters
SCThe scalar type. So far, this is always double, but having it as a template parameter would allow flexibily, e.g., for using complex instead
LOThe local ordinal type. The is the index type for local indices
GOThe global ordinal type. The is the index type for global indices
Todo
This should actually be removed since the class should operate only on element level)
Template Parameters
NOThe Kokkos Node type. This would allow for performance portibility when using Kokkos. Currently, this is not used.

The material parameters can be provided through a Teuchos::ParameterList object which will contain all the parameters specified in the input file ABC.xml. The structure of the input file and, hence, of the resulting parameter list can be chosen freely. The FEDDLib will take care of reading the parameters from the file and making them available.

I've made this general classification of a general Input to Output mapping in order to differentiate between different complexities of Input to Output mappings. For example, a really simple one is a general differentiable function; therefore, we derive another abstract subclass called differentiableFuncClass. We could also derive another subclass called NonDifferentiableFuncClass, and for evaluating the derivatives, throw an error. Another General Input to Output Mapping is our TrainedMlModels.

Constructor & Destructor Documentation

◆ InputToOutputMappingClass()

template<class SC, class LO, class GO, class NO>
FEDD::InputToOutputMappingClass< SC, LO, GO, NO >::InputToOutputMappingClass ( ParameterListPtr_Type parameters)
protected

Constructor.

Parameters
[in]paramsParameterlist for current problem

Member Function Documentation

◆ echoInformationMapping()

template<class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
virtual void FEDD::InputToOutputMappingClass< SC, LO, GO, NO >::echoInformationMapping ( )
pure virtual

◆ evaluateDerivative() [1/2]

template<class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
virtual void FEDD::InputToOutputMappingClass< SC, LO, GO, NO >::evaluateDerivative ( ParameterListPtr_Type params,
double x,
double & res )
pure virtual

Computes value of derivative of defined function in evaluateMapping specific.

Parameters
[in]paramsParameterlist as read from the xml file (maybe redundant)
[in]xIndependent variable
[in,out]resDependent variable

Implemented in FEDD::CarreauYasuda< SC, LO, GO, NO >, FEDD::DifferentiableFuncClass< SC, LO, GO, NO >, FEDD::DifferentiableFuncClass< default_sc, default_lo, default_go, default_no >, FEDD::DifferentiableFuncClass< SC, LO, GO, NO >, FEDD::DifferentiableFuncClass< SC, LO, GO, NO >, FEDD::Dimless_Carreau< SC, LO, GO, NO >, and FEDD::PowerLaw< SC, LO, GO, NO >.

◆ evaluateDerivative() [2/2]

template<class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
virtual void FEDD::InputToOutputMappingClass< SC, LO, GO, NO >::evaluateDerivative ( ParameterListPtr_Type params,
MultiVectorConstPtr_Type x,
MultiVectorPtr_Type & res )
pure virtual

Computes value of derivative of defined function in evaluateMapping - could be derivative of output w.r.t to input but other in subclass specific versions are also possible.

Parameters
[in]paramsParameterlist as read from the xml file (maybe redundant)
[in]xIndependent variable
[in,out]resDependent variable

Implemented in FEDD::DifferentiableFuncClass< SC, LO, GO, NO >, FEDD::DifferentiableFuncClass< default_sc, default_lo, default_go, default_no >, FEDD::DifferentiableFuncClass< SC, LO, GO, NO >, and FEDD::DifferentiableFuncClass< SC, LO, GO, NO >.

◆ evaluateMapping() [1/2]

template<class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
virtual void FEDD::InputToOutputMappingClass< SC, LO, GO, NO >::evaluateMapping ( ParameterListPtr_Type params,
double x,
double & res )
pure virtual

Implements a functional description for evaluating res in dependence of given dependent variables and specified parameters Here we overload the functional evaluation because we often encounter cases where we have simple R->R mappings.

Parameters
[in]paramsParameterlist as read from the xml file (maybe redundant)
[in]xIndependent variable
[in,out]resDependent variable

Implemented in FEDD::CarreauYasuda< SC, LO, GO, NO >, FEDD::DifferentiableFuncClass< SC, LO, GO, NO >, FEDD::DifferentiableFuncClass< default_sc, default_lo, default_go, default_no >, FEDD::DifferentiableFuncClass< SC, LO, GO, NO >, FEDD::DifferentiableFuncClass< SC, LO, GO, NO >, FEDD::Dimless_Carreau< SC, LO, GO, NO >, and FEDD::PowerLaw< SC, LO, GO, NO >.

◆ evaluateMapping() [2/2]

template<class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
virtual void FEDD::InputToOutputMappingClass< SC, LO, GO, NO >::evaluateMapping ( ParameterListPtr_Type params,
MultiVectorConstPtr_Type input,
MultiVectorPtr_Type & output )
pure virtual

Implement a mapping for evaluating output in dependence of given input and specified parameters for MultiVectorPtr_Type inputs/ outputs.

Parameters
[in]paramsParameterlist as read from the xml file (maybe redundant)
[in]xinput
[in,out]resoutput

Implemented in FEDD::DifferentiableFuncClass< SC, LO, GO, NO >, FEDD::DifferentiableFuncClass< default_sc, default_lo, default_go, default_no >, FEDD::DifferentiableFuncClass< SC, LO, GO, NO >, and FEDD::DifferentiableFuncClass< SC, LO, GO, NO >.

◆ setParams()

template<class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
virtual void FEDD::InputToOutputMappingClass< SC, LO, GO, NO >::setParams ( ParameterListPtr_Type params)
pure virtual

Function could include different parameters which will be specified in *.xml This function should set the needed parameters for defined function to the specified values.

Parameters
[in]ParameterListas read from the xml file (maybe redundant)

Implemented in FEDD::CarreauYasuda< SC, LO, GO, NO >, FEDD::DifferentiableFuncClass< SC, LO, GO, NO >, FEDD::DifferentiableFuncClass< default_sc, default_lo, default_go, default_no >, FEDD::DifferentiableFuncClass< SC, LO, GO, NO >, FEDD::DifferentiableFuncClass< SC, LO, GO, NO >, FEDD::Dimless_Carreau< SC, LO, GO, NO >, and FEDD::PowerLaw< SC, LO, GO, NO >.

◆ updateParams()

template<class SC, class LO, class GO, class NO>
void FEDD::InputToOutputMappingClass< SC, LO, GO, NO >::updateParams ( ParameterListPtr_Type params)
virtual

Set or update the parameters read from the ParameterList.

Parameters
[in]ParameterListas read from the xml file

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