OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::MaterialMappingAlgorithm Class Referenceabstract

The class representing the general material model mapping algorithm. More...

#include <materialmappingalgorithm.h>

+ Inheritance diagram for oofem::MaterialMappingAlgorithm:

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

oofem::MaterialMappingAlgorithm::MaterialMappingAlgorithm ( )
inline

Constructor.

Definition at line 86 of file materialmappingalgorithm.h.

virtual oofem::MaterialMappingAlgorithm::~MaterialMappingAlgorithm ( )
inlinevirtual

Destructor.

Definition at line 88 of file materialmappingalgorithm.h.

Member Function Documentation

virtual void oofem::MaterialMappingAlgorithm::__init ( Domain dold,
IntArray varTypes,
const FloatArray coords,
Set sourceElemSet,
TimeStep tStep,
bool  iCohesiveZoneGP = false 
)
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.

Parameters
doldOld domain.
varTypesArray of InternalStateType values, identifying all vars to be mapped.
coordsCoordinates of the receiver point.
regionIf > 0 region id of receiver point, if < 0 ignore regions.
tStepTime step.

Implemented in oofem::MMALeastSquareProjection, oofem::MMAShapeFunctProjection, oofem::MMAClosestIPTransfer, and oofem::MMAContainingElementProjection.

Referenced by oofem::InternalVariableField::evaluateAt(), oofem::POIExportModule::exportIntVarAs(), and init().

virtual int oofem::MaterialMappingAlgorithm::__mapVariable ( FloatArray answer,
const FloatArray coords,
InternalStateType  type,
TimeStep tStep 
)
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.

Parameters
answerContains result.
typeDetermines the type of internal variable.
coordsCoordinates of receiver point to which mapping occur.
tStepTime step.
Returns
Nonzero if o.k.

Implemented in oofem::MMALeastSquareProjection, oofem::MMAShapeFunctProjection, oofem::MMAClosestIPTransfer, and oofem::MMAContainingElementProjection.

Referenced by oofem::InternalVariableField::evaluateAt(), oofem::POIExportModule::exportIntVarAs(), and mapVariable().

std :: string oofem::MaterialMappingAlgorithm::errorInfo ( const char *  func) const
inline

Error printing helper.

Definition at line 162 of file materialmappingalgorithm.h.

virtual void oofem::MaterialMappingAlgorithm::finish ( TimeStep tStep)
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.

Parameters
tStepTime step.

Implemented in oofem::MMALeastSquareProjection, oofem::MMAShapeFunctProjection, oofem::MMAClosestIPTransfer, and oofem::MMAContainingElementProjection.

Referenced by oofem::POIExportModule::exportIntVars().

virtual const char* oofem::MaterialMappingAlgorithm::giveClassName ( ) const
pure virtual
virtual void oofem::MaterialMappingAlgorithm::giveInputRecord ( DynamicInputRecord input)
inlinevirtual

Setups the input record of receiver.

Parameters
inputInput 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.

Parameters
doldOld domain.
varTypesArray of InternalStateType values, identifying all vars to be mapped.
gpIntegration point of to initialize.
tStepTime 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().

virtual IRResultType oofem::MaterialMappingAlgorithm::initializeFrom ( InputRecord ir)
inlinevirtual
virtual int oofem::MaterialMappingAlgorithm::mapStatus ( MaterialStatus oStatus) const
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().

int oofem::MaterialMappingAlgorithm::mapVariable ( FloatArray answer,
GaussPoint gp,
InternalStateType  type,
TimeStep tStep 
)
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.

Parameters
answerContains result.
typeDetermines the type of internal variable.
gpIntegration point belonging to new domain to which mapping occur.
tStepTime step.
Returns
Nonzero if o.k.

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().


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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:38 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011