OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
The class implements the transfer of state variables based on Least square fit over old mesh integration points (in the neighborhood of point of interest). More...
#include <mmaleastsquareprojection.h>
Public Member Functions | |
MMALeastSquareProjection () | |
Constructor. More... | |
virtual | ~MMALeastSquareProjection () |
Destructor. More... | |
virtual void | __init (Domain *dold, IntArray &type, const FloatArray &coords, Set &sourceElemSet, TimeStep *tStep, bool iCohesiveZoneGP=false) |
Initializes the receiver state before mapping. More... | |
virtual void | finish (TimeStep *tStep) |
Finishes the mapping for given time step. More... | |
virtual int | __mapVariable (FloatArray &answer, const FloatArray &coords, 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 | mapStatus (MaterialStatus &oStatus) const |
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 |
Returns class name of the receiver. More... | |
Public Member Functions inherited from oofem::MaterialMappingAlgorithm | |
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 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... | |
std::string | errorInfo (const char *func) const |
Error printing helper. More... | |
Protected Member Functions | |
void | computePolynomialTerms (FloatArray &P, const FloatArray &coords, MMALeastSquareProjectionPatchType type) |
int | giveNumberOfUnknownPolynomialCoefficients (MMALeastSquareProjectionPatchType regType) |
Protected Attributes | |
int | stateFilter |
If set, then only IP in the neighbourhood with same state can be used to interpolate the values. More... | |
int | regionFilter |
If set, then only IP in the same region are taken into account. More... | |
std::list< GaussPoint * > | patchGPList |
List of Gp participating in patch. More... | |
Domain * | patchDomain |
Patch domain. More... | |
MMALeastSquareProjectionPatchType | patchType |
Type of patch. More... | |
The class implements the transfer of state variables based on Least square fit over old mesh integration points (in the neighborhood of point of interest).
The algorithm of projecting internal vars (q) can be summarized as follows:
It is obvious, that this mapper operates locally and therefore there is no need to declared this mapper as static material member.
Definition at line 78 of file mmaleastsquareprojection.h.
oofem::MMALeastSquareProjection::MMALeastSquareProjection | ( | ) |
Constructor.
Definition at line 49 of file mmaleastsquareprojection.C.
References regionFilter, and stateFilter.
|
virtual |
Destructor.
Definition at line 55 of file mmaleastsquareprojection.C.
|
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. |
Implements oofem::MaterialMappingAlgorithm.
Definition at line 58 of file mmaleastsquareprojection.C.
References oofem::IntArray::at(), oofem::IntArray::clear(), oofem::Element::computeGlobalCoordinates(), oofem::FloatArray::computeNorm(), oofem::FloatArray::distance(), oofem::IntArray::followedBy(), oofem::SpatialLocalizer::giveClosestIP(), oofem::Domain::giveConnectivityTable(), oofem::Element::giveDefaultIntegrationRulePtr(), oofem::Domain::giveElement(), oofem::SpatialLocalizer::giveElementContainingPoint(), oofem::ConnectivityTable::giveElementNeighbourList(), oofem::Element::giveGeometryType(), oofem::Element::giveIPValue(), oofem::FEMComponent::giveNumber(), oofem::IntegrationRule::giveNumberOfIntegrationPoints(), giveNumberOfUnknownPolynomialCoefficients(), oofem::IntArray::giveSize(), oofem::Domain::giveSpatialLocalizer(), oofem::Set::hasElement(), oofem::MMALSPPatchType_1dq, oofem::MMALSPPatchType_2dq, oofem::norm(), OOFEM_ERROR, OOFEM_FATAL, patchDomain, patchGPList, patchType, oofem::IntArray::resize(), and stateFilter.
|
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. |
Implements oofem::MaterialMappingAlgorithm.
Definition at line 267 of file mmaleastsquareprojection.C.
References oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::FloatMatrix::beProductOf(), oofem::Element::computeGlobalCoordinates(), computePolynomialTerms(), oofem::GaussPoint::giveElement(), oofem::Element::giveIPValue(), giveNumberOfUnknownPolynomialCoefficients(), oofem::FloatArray::giveSize(), OOFEM_ERROR, patchGPList, patchType, oofem::FloatArray::resize(), oofem::FloatMatrix::resize(), oofem::FloatMatrix::solveForRhs(), oofem::FloatArray::subtract(), oofem::FloatArray::zero(), and oofem::FloatMatrix::zero().
|
protected |
Definition at line 368 of file mmaleastsquareprojection.C.
References oofem::FloatArray::at(), oofem::MMALSPPatchType_1dq, oofem::MMALSPPatchType_2dq, OOFEM_ERROR, and oofem::FloatArray::resize().
Referenced by __mapVariable().
|
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. |
Implements oofem::MaterialMappingAlgorithm.
Definition at line 262 of file mmaleastsquareprojection.C.
Referenced by oofem::MDM::MMI_finish().
|
inlinevirtual |
Returns class name of the receiver.
Implements oofem::MaterialMappingAlgorithm.
Definition at line 108 of file mmaleastsquareprojection.h.
|
virtual |
Setups the input record of receiver.
input | Input record to be filled. |
Reimplemented from oofem::MaterialMappingAlgorithm.
Definition at line 427 of file mmaleastsquareprojection.C.
References _IFT_MMALeastSquareProjection_regionfilter, _IFT_MMALeastSquareProjection_statefilter, regionFilter, oofem::DynamicInputRecord::setField(), and stateFilter.
Referenced by oofem::MDM::giveInputRecord().
|
protected |
Definition at line 400 of file mmaleastsquareprojection.C.
References oofem::MMALSPPatchType_1dq, and oofem::MMALSPPatchType_2dq.
Referenced by __init(), and __mapVariable().
|
virtual |
Reimplemented from oofem::MaterialMappingAlgorithm.
Definition at line 413 of file mmaleastsquareprojection.C.
References _IFT_MMALeastSquareProjection_regionfilter, _IFT_MMALeastSquareProjection_statefilter, IR_GIVE_OPTIONAL_FIELD, oofem::IRRT_OK, regionFilter, and stateFilter.
Referenced by oofem::MDM::initializeFrom().
|
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.
Implements oofem::MaterialMappingAlgorithm.
Definition at line 360 of file mmaleastsquareprojection.C.
References OOFEM_ERROR.
|
protected |
|
protected |
List of Gp participating in patch.
Definition at line 86 of file mmaleastsquareprojection.h.
Referenced by __init(), and __mapVariable().
|
protected |
Type of patch.
Definition at line 90 of file mmaleastsquareprojection.h.
Referenced by __init(), and __mapVariable().
|
protected |
If set, then only IP in the same region are taken into account.
Definition at line 84 of file mmaleastsquareprojection.h.
Referenced by giveInputRecord(), initializeFrom(), and MMALeastSquareProjection().
|
protected |
If set, then only IP in the neighbourhood with same state can be used to interpolate the values.
Definition at line 82 of file mmaleastsquareprojection.h.
Referenced by __init(), giveInputRecord(), initializeFrom(), and MMALeastSquareProjection().