OOFEM 3.0
Loading...
Searching...
No Matches
oofem::MMALeastSquareProjection Class Reference

#include <mmaleastsquareprojection.h>

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

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

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

◆ MMALeastSquareProjection()

oofem::MMALeastSquareProjection::MMALeastSquareProjection ( )

◆ ~MMALeastSquareProjection()

oofem::MMALeastSquareProjection::~MMALeastSquareProjection ( )
virtual

Destructor.

Definition at line 56 of file mmaleastsquareprojection.C.

Member Function Documentation

◆ __init()

void oofem::MMALeastSquareProjection::__init ( Domain * dold,
IntArray & varTypes,
const FloatArray & coords,
Set & sourceElemSet,
TimeStep * tStep,
bool iCohesiveZoneGP = false )
overridevirtual

◆ __mapVariable()

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

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

◆ computePolynomialTerms()

void oofem::MMALeastSquareProjection::computePolynomialTerms ( FloatArray & P,
const FloatArray & coords,
MMALeastSquareProjectionPatchType type )
protected

◆ finish()

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

Parameters
tStepTime step.

Implements oofem::MaterialMappingAlgorithm.

Definition at line 263 of file mmaleastsquareprojection.C.

◆ giveClassName()

const char * oofem::MMALeastSquareProjection::giveClassName ( ) const
inlineoverridevirtual

Returns class name of the receiver.

Implements oofem::MaterialMappingAlgorithm.

Definition at line 108 of file mmaleastsquareprojection.h.

◆ giveInputRecord()

void oofem::MMALeastSquareProjection::giveInputRecord ( DynamicInputRecord & input)
overridevirtual

Setups the input record of receiver.

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

◆ giveInputRecordName()

const char * oofem::MMALeastSquareProjection::giveInputRecordName ( ) const
inline

Definition at line 109 of file mmaleastsquareprojection.h.

References _IFT_MMALeastSquareProjection_Name.

◆ giveNumberOfUnknownPolynomialCoefficients()

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

Definition at line 399 of file mmaleastsquareprojection.C.

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

Referenced by __init(), and __mapVariable().

◆ initializeFrom()

void oofem::MMALeastSquareProjection::initializeFrom ( InputRecord & ir)
overridevirtual

◆ mapStatus()

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

Member Data Documentation

◆ patchDomain

Domain* oofem::MMALeastSquareProjection::patchDomain
protected

Patch domain.

Definition at line 88 of file mmaleastsquareprojection.h.

Referenced by __init(), and MMALeastSquareProjection().

◆ patchGPList

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

◆ patchType

MMALeastSquareProjectionPatchType oofem::MMALeastSquareProjection::patchType
protected

Type of patch.

Definition at line 90 of file mmaleastsquareprojection.h.

Referenced by __init(), and __mapVariable().

◆ regionFilter

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

◆ stateFilter

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-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011