|
OOFEM 3.0
|
#include <mmaleastsquareprojection.h>
Public Member Functions | |
| MMALeastSquareProjection () | |
| Constructor. | |
| virtual | ~MMALeastSquareProjection () |
| Destructor. | |
| void | __init (Domain *dold, IntArray &type, const FloatArray &coords, Set &sourceElemSet, TimeStep *tStep, bool iCohesiveZoneGP=false) override |
| void | finish (TimeStep *tStep) override |
| int | __mapVariable (FloatArray &answer, const FloatArray &coords, InternalStateType type, TimeStep *tStep) override |
| int | mapStatus (MaterialStatus &oStatus) const override |
| void | initializeFrom (InputRecord &ir) override |
| void | giveInputRecord (DynamicInputRecord &input) override |
| const char * | giveClassName () const override |
| Returns class name of the receiver. | |
| const char * | giveInputRecordName () const |
| Public Member Functions inherited from oofem::MaterialMappingAlgorithm | |
| MaterialMappingAlgorithm () | |
| Constructor. | |
| virtual | ~MaterialMappingAlgorithm () |
| Destructor. | |
| void | init (Domain *dold, IntArray &varTypes, GaussPoint *gp, Set &sourceElemSet, TimeStep *tStep, bool iCohesiveZoneGP=false) |
| virtual int | mapVariable (FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) |
| std::string | errorInfo (const char *func) const |
| Error printing helper. | |
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. | |
| int | regionFilter |
| If set, then only IP in the same region are taken into account. | |
| std ::list< GaussPoint * > | patchGPList |
| List of Gp participating in patch. | |
| Domain * | patchDomain |
| Patch domain. | |
| MMALeastSquareProjectionPatchType | patchType |
| Type of patch. | |
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 oofem::MaterialMappingAlgorithm::MaterialMappingAlgorithm(), patchDomain, regionFilter, and stateFilter.
|
virtual |
Destructor.
Definition at line 56 of file mmaleastsquareprojection.C.
|
overridevirtual |
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 59 of file mmaleastsquareprojection.C.
References oofem::IntArray::at(), oofem::IntArray::clear(), oofem::Element::computeGlobalCoordinates(), oofem::FloatArray::computeNorm(), oofem::distance(), oofem::IntArray::followedBy(), oofem::SpatialLocalizer::giveClosestIP(), oofem::Domain::giveConnectivityTable(), oofem::Element::giveDefaultIntegrationRulePtr(), 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.
|
overridevirtual |
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 268 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 367 of file mmaleastsquareprojection.C.
References oofem::FloatArray::at(), oofem::MMALSPPatchType_1dq, oofem::MMALSPPatchType_2dq, OOFEM_ERROR, and oofem::FloatArray::resize().
Referenced by __mapVariable().
|
overridevirtual |
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 263 of file mmaleastsquareprojection.C.
|
inlineoverridevirtual |
Returns class name of the receiver.
Implements oofem::MaterialMappingAlgorithm.
Definition at line 108 of file mmaleastsquareprojection.h.
|
overridevirtual |
Setups the input record of receiver.
| input | Input record to be filled. |
Reimplemented from oofem::MaterialMappingAlgorithm.
Definition at line 422 of file mmaleastsquareprojection.C.
References _IFT_MMALeastSquareProjection_regionfilter, _IFT_MMALeastSquareProjection_statefilter, regionFilter, oofem::DynamicInputRecord::setField(), and stateFilter.
|
inline |
Definition at line 109 of file mmaleastsquareprojection.h.
References _IFT_MMALeastSquareProjection_Name.
|
protected |
Definition at line 399 of file mmaleastsquareprojection.C.
References oofem::MMALSPPatchType_1dq, and oofem::MMALSPPatchType_2dq.
Referenced by __init(), and __mapVariable().
|
overridevirtual |
Reimplemented from oofem::MaterialMappingAlgorithm.
Definition at line 412 of file mmaleastsquareprojection.C.
References _IFT_MMALeastSquareProjection_regionfilter, _IFT_MMALeastSquareProjection_statefilter, IR_GIVE_OPTIONAL_FIELD, regionFilter, and stateFilter.
|
overridevirtual |
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 361 of file mmaleastsquareprojection.C.
References OOFEM_ERROR.
|
protected |
Patch domain.
Definition at line 88 of file mmaleastsquareprojection.h.
Referenced by __init(), and MMALeastSquareProjection().
|
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().