OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
The class representing the general material model mapping algorithm. More...
#include <materialmappingalgorithm.h>
Public Member Functions | |
MaterialMappingAlgorithm () | |
Constructor. More... | |
virtual | ~MaterialMappingAlgorithm () |
Destructor. More... | |
void | init (Domain *dold, IntArray &varTypes, GaussPoint *gp, Set &sourceElemSet, TimeStep *tStep, bool iCohesiveZoneGP=false) |
Initializes the receiver state before mapping. More... | |
virtual void | __init (Domain *dold, IntArray &varTypes, const FloatArray &coords, Set &sourceElemSet, TimeStep *tStep, bool iCohesiveZoneGP=false)=0 |
Initializes the receiver state before mapping. More... | |
virtual void | finish (TimeStep *tStep)=0 |
Finishes the mapping for given time step. More... | |
virtual int | mapVariable (FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) |
Maps and update the unknown of given type from old mesh oldd to new mesh to which gp belongs to. More... | |
virtual int | __mapVariable (FloatArray &answer, const FloatArray &coords, InternalStateType type, TimeStep *tStep)=0 |
Maps and update the unknown of given type from old mesh oldd to new mesh to which gp belongs to. More... | |
virtual int | mapStatus (MaterialStatus &oStatus) const =0 |
Initializes receiver according to object description stored in input record. More... | |
virtual IRResultType | initializeFrom (InputRecord *ir) |
virtual void | giveInputRecord (DynamicInputRecord &input) |
Setups the input record of receiver. More... | |
virtual const char * | giveClassName () const =0 |
Returns class name of the receiver. More... | |
std::string | errorInfo (const char *func) const |
Error printing helper. More... | |
The class representing the general material model mapping algorithm.
The basic task is to map the selected internal variable from old mesh to specific integration point on new mesh. Unfortunately, there are two principal ways how to implement adaptive mapping: 1) The material service is called for each IP to perform all mappings. The mapper object is used (created locally or class object) to map all necessary variables. The problem is that some mappers can be used efficiently if they are initialized for specific position and then they can be reused for all internal variables. The others, however, are efficient if if they are initialized for certain variable (of smoothing type) and then are used for all possible points. This is the key problem, whether to initialize mapper for position or for variable first. This also prevents to create some general efficient interface. 2) The other possibility is to make mapper object responsible for mapping variables in all IPs of material model. Mapper is responsible for mapping required variables, which are specified. The advantage is, that mapper can decide, whether to initialize yourself for certain variable and map all points or initialize for given point and map all necessary variables. Such approach allows efficient handling of the problem, but some additional support is required: there must exists standard way, how to access and update required history variable, elements must provide access to all integration points, and there is another tradeoff - mapper should perform loop only over elements belonging to corresponding material model and there is no efficient support for this at this time.
The idea used here is to use option (1): material model is responsible. The mappers are all assumed to require first initialization for all variables in given point. So the mappers requiring the initialization based on position can ignore given variable list and can setup for given position. The mappers requiring variable init must in general support initialization for multiple variables, but even if this operation is global, i.e., recovered variables are computed in whole domain, they should be kept, since other gp's will have typically the same requests. This also assumes that all mappers are are stored as class variables of material model in order to reuse their initialization.
Definition at line 82 of file materialmappingalgorithm.h.
|
inline |
Constructor.
Definition at line 86 of file materialmappingalgorithm.h.
|
inlinevirtual |
Destructor.
Definition at line 88 of file materialmappingalgorithm.h.
|
pure virtual |
Initializes the receiver state before mapping.
The idea is to place some common global operations before mapping particular IP's if necessary. Stores Times stamp of last initialization, so multiple calls for same step do not initialize receiver again.
dold | Old domain. |
varTypes | Array of InternalStateType values, identifying all vars to be mapped. |
coords | Coordinates of the receiver point. |
region | If > 0 region id of receiver point, if < 0 ignore regions. |
tStep | Time step. |
Implemented in oofem::MMALeastSquareProjection, oofem::MMAShapeFunctProjection, oofem::MMAClosestIPTransfer, and oofem::MMAContainingElementProjection.
Referenced by oofem::InternalVariableField::evaluateAt(), oofem::POIExportModule::exportIntVarAs(), and init().
|
pure virtual |
Maps and update the unknown of given type from old mesh oldd to new mesh to which gp belongs to.
The result is stored in answer array.
answer | Contains result. |
type | Determines the type of internal variable. |
coords | Coordinates of receiver point to which mapping occur. |
tStep | Time step. |
Implemented in oofem::MMALeastSquareProjection, oofem::MMAShapeFunctProjection, oofem::MMAClosestIPTransfer, and oofem::MMAContainingElementProjection.
Referenced by oofem::InternalVariableField::evaluateAt(), oofem::POIExportModule::exportIntVarAs(), and mapVariable().
|
inline |
Error printing helper.
Definition at line 162 of file materialmappingalgorithm.h.
|
pure virtual |
Finishes the mapping for given time step.
Used to perform cleanup. Typically some mappers require to compute some global mesh data related to current step, which are valid for all IPs - so they are computed only once for all IPs.
tStep | Time step. |
Implemented in oofem::MMALeastSquareProjection, oofem::MMAShapeFunctProjection, oofem::MMAClosestIPTransfer, and oofem::MMAContainingElementProjection.
Referenced by oofem::POIExportModule::exportIntVars().
|
pure virtual |
Returns class name of the receiver.
Implemented in oofem::MMALeastSquareProjection, oofem::MMAShapeFunctProjection, oofem::MMAClosestIPTransfer, and oofem::MMAContainingElementProjection.
|
inlinevirtual |
Setups the input record of receiver.
input | Input record to be filled. |
Reimplemented in oofem::MMALeastSquareProjection.
Definition at line 158 of file materialmappingalgorithm.h.
Referenced by oofem::IsotropicDamageMaterial1::giveInputRecord(), and oofem::MDM::giveInputRecord().
void oofem::MaterialMappingAlgorithm::init | ( | Domain * | dold, |
IntArray & | varTypes, | ||
GaussPoint * | gp, | ||
Set & | sourceElemSet, | ||
TimeStep * | tStep, | ||
bool | iCohesiveZoneGP = false |
||
) |
Initializes the receiver state before mapping.
The idea is to place some common global operations before mapping particular IP's if necessary. Stores Times stamp of last initialization, so multiple calls for same step do not initialize receiver again.
dold | Old domain. |
varTypes | Array of InternalStateType values, identifying all vars to be mapped. |
gp | Integration point of to initialize. |
tStep | Time step. |
Definition at line 41 of file materialmappingalgorithm.C.
References __init(), and oofem::GaussPoint::giveGlobalCoordinates().
Referenced by oofem::MDM::MMI_map(), oofem::IsotropicDamageMaterial1::MMI_map(), oofem::MaterialStatusMapperInterface::MSMI_map(), and oofem::MaterialStatusMapperInterface::MSMI_map_cz().
|
inlinevirtual |
Reimplemented in oofem::MMALeastSquareProjection.
Definition at line 153 of file materialmappingalgorithm.h.
References oofem::IRRT_OK.
Referenced by oofem::IDGMaterial::initializeFrom(), oofem::MazarsMaterial::initializeFrom(), oofem::IsotropicDamageMaterial1::initializeFrom(), and oofem::MDM::initializeFrom().
|
pure virtual |
Initializes receiver according to object description stored in input record.
InitString can be imagined as data record in component database belonging to receiver. Receiver may use value-name extracting functions to extract particular field from record. Map all internal state variables in one stroke.
Implemented in oofem::MMALeastSquareProjection, oofem::MMAShapeFunctProjection, oofem::MMAClosestIPTransfer, and oofem::MMAContainingElementProjection.
Referenced by oofem::MaterialStatusMapperInterface::MSMI_map(), and oofem::MaterialStatusMapperInterface::MSMI_map_cz().
|
virtual |
Maps and update the unknown of given type from old mesh oldd to new mesh to which gp belongs to.
The result is stored in answer array.
answer | Contains result. |
type | Determines the type of internal variable. |
gp | Integration point belonging to new domain to which mapping occur. |
tStep | Time step. |
Reimplemented in oofem::MMAShapeFunctProjection.
Definition at line 49 of file materialmappingalgorithm.C.
References __mapVariable(), and oofem::GaussPoint::giveGlobalCoordinates().
Referenced by oofem::MDM::MMI_map(), and oofem::IsotropicDamageMaterial1::MMI_map().