OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::MMALeastSquareProjection Class Reference

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>

+ Inheritance diagram for oofem::MMALeastSquareProjection:
+ Collaboration diagram for oofem::MMALeastSquareProjection:

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...
 
DomainpatchDomain
 Patch domain. More...
 
MMALeastSquareProjectionPatchType patchType
 Type of patch. More...
 

Detailed Description

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:

  1. The "source" element on old mesh containing point of interest is found
  2. The element patch is constructed from "source" element neighbourhood
  3. The least square fit is done
  4. Value in point of interest is evaluated.

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.

Constructor & Destructor Documentation

oofem::MMALeastSquareProjection::MMALeastSquareProjection ( )

Constructor.

Definition at line 49 of file mmaleastsquareprojection.C.

References regionFilter, and stateFilter.

oofem::MMALeastSquareProjection::~MMALeastSquareProjection ( )
virtual

Destructor.

Definition at line 55 of file mmaleastsquareprojection.C.

Member Function Documentation

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

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.

int oofem::MMALeastSquareProjection::__mapVariable ( FloatArray answer,
const FloatArray coords,
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.
coordsCoordinates of receiver point to which mapping occur.
tStepTime step.
Returns
Nonzero if o.k.

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

void oofem::MMALeastSquareProjection::computePolynomialTerms ( FloatArray P,
const FloatArray coords,
MMALeastSquareProjectionPatchType  type 
)
protected
void oofem::MMALeastSquareProjection::finish ( TimeStep tStep)
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.

Implements oofem::MaterialMappingAlgorithm.

Definition at line 262 of file mmaleastsquareprojection.C.

Referenced by oofem::MDM::MMI_finish().

virtual const char* oofem::MMALeastSquareProjection::giveClassName ( ) const
inlinevirtual

Returns class name of the receiver.

Implements oofem::MaterialMappingAlgorithm.

Definition at line 108 of file mmaleastsquareprojection.h.

void oofem::MMALeastSquareProjection::giveInputRecord ( DynamicInputRecord input)
virtual

Setups the input record of receiver.

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

int oofem::MMALeastSquareProjection::giveNumberOfUnknownPolynomialCoefficients ( MMALeastSquareProjectionPatchType  regType)
protected

Definition at line 400 of file mmaleastsquareprojection.C.

References oofem::MMALSPPatchType_1dq, and oofem::MMALSPPatchType_2dq.

Referenced by __init(), and __mapVariable().

int oofem::MMALeastSquareProjection::mapStatus ( MaterialStatus oStatus) const
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.

Member Data Documentation

Domain* oofem::MMALeastSquareProjection::patchDomain
protected

Patch domain.

Definition at line 88 of file mmaleastsquareprojection.h.

Referenced by __init().

std :: list< GaussPoint * > oofem::MMALeastSquareProjection::patchGPList
protected

List of Gp participating in patch.

Definition at line 86 of file mmaleastsquareprojection.h.

Referenced by __init(), and __mapVariable().

MMALeastSquareProjectionPatchType oofem::MMALeastSquareProjection::patchType
protected

Type of patch.

Definition at line 90 of file mmaleastsquareprojection.h.

Referenced by __init(), and __mapVariable().

int oofem::MMALeastSquareProjection::regionFilter
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().

int oofem::MMALeastSquareProjection::stateFilter
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().


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