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

The class implements the transfer of state variables based on projection using shape functions. More...

#include <mmashapefunctprojection.h>

+ Inheritance diagram for oofem::MMAShapeFunctProjection:
+ Collaboration diagram for oofem::MMAShapeFunctProjection:

Public Member Functions

 MMAShapeFunctProjection ()
 Constructor. More...
 
virtual ~MMAShapeFunctProjection ()
 Destructor. More...
 
 MMAShapeFunctProjection (const MMAShapeFunctProjection &)=delete
 
MMAShapeFunctProjectionoperator= (const MMAShapeFunctProjection &)=delete
 
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, 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)
 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...
 
void interpolateIntVarAt (FloatArray &answer, Element *elem, const FloatArray &lcoords, std::vector< FloatArray > &list, InternalStateType type, TimeStep *tStep) const
 
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 IRResultType initializeFrom (InputRecord *ir)
 
virtual void giveInputRecord (DynamicInputRecord &input)
 Setups the input record of receiver. More...
 
std::string errorInfo (const char *func) const
 Error printing helper. More...
 

Protected Attributes

std::vector< std::unique_ptr< NodalRecoveryModel > > smootherList
 Smoothers. More...
 
StateCounterType stateCounter
 Solution state counter. More...
 
IntArray intVarTypes
 Internal variables in list. More...
 
Domaindomain
 Source domain. More...
 

Detailed Description

The class implements the transfer of state variables based on projection using shape functions.

The algorithm of projecting internal vars (q) can be summarized as follows:

  1. Gauss point components $ q^h $ are projected to nodes $ q^h_N $ of old mesh.
  2. Nodal components are transferred from the old to new mesh (h+1):
    1. For each node A of new mesh (h+1) the so-called background element (in the old mesh (h)) is found.
    2. The local coordinates within the background element that correspond to the position of the node A are computed.
    3. By using the shape functions of background element, the state variables q are mapped from the nodes B of the old mesh (h) to the nodes A of the new mes (+1).
  3. The state variables at the integration points of the new mesh (h+1) are obtained by employing the shape functions of elements of the new mesh (h+1).

It is obvious, that for efficiency, it is necessary to compute the nodal values A only once and use them for all values. Therefore, the mmapper is typically declared as static material member, and is used by all IPs. Also it should be used only for mapping of one internal variable. For each internal variable there should be corresponding mapper instance.

Definition at line 72 of file mmashapefunctprojection.h.

Constructor & Destructor Documentation

oofem::MMAShapeFunctProjection::MMAShapeFunctProjection ( )

Constructor.

Definition at line 51 of file mmashapefunctprojection.C.

References domain, and stateCounter.

oofem::MMAShapeFunctProjection::~MMAShapeFunctProjection ( )
virtual

Destructor.

Definition at line 57 of file mmashapefunctprojection.C.

oofem::MMAShapeFunctProjection::MMAShapeFunctProjection ( const MMAShapeFunctProjection )
delete

Member Function Documentation

void oofem::MMAShapeFunctProjection::__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 61 of file mmashapefunctprojection.C.

References oofem::IntArray::at(), domain, oofem::IntArray::giveSize(), oofem::TimeStep::giveSolutionStateCounter(), intVarTypes, smootherList, and stateCounter.

int oofem::MMAShapeFunctProjection::__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 125 of file mmashapefunctprojection.C.

References domain, oofem::IntArray::findFirstIndexOf(), oofem::Element::giveDofManager(), oofem::SpatialLocalizer::giveElementClosestToPoint(), oofem::FEMComponent::giveNumber(), oofem::Element::giveNumberOfDofManagers(), oofem::Domain::giveSpatialLocalizer(), interpolateIntVarAt(), intVarTypes, OOFEM_ERROR, and smootherList.

void oofem::MMAShapeFunctProjection::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 92 of file mmashapefunctprojection.C.

References smootherList, and stateCounter.

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

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

Returns class name of the receiver.

Implements oofem::MaterialMappingAlgorithm.

Definition at line 105 of file mmashapefunctprojection.h.

void oofem::MMAShapeFunctProjection::interpolateIntVarAt ( FloatArray answer,
Element elem,
const FloatArray lcoords,
std::vector< FloatArray > &  list,
InternalStateType  type,
TimeStep tStep 
) const
int oofem::MMAShapeFunctProjection::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 156 of file mmashapefunctprojection.C.

References OOFEM_ERROR.

int oofem::MMAShapeFunctProjection::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 from oofem::MaterialMappingAlgorithm.

Definition at line 99 of file mmashapefunctprojection.C.

References oofem::IntArray::findFirstIndexOf(), oofem::Element::giveDofManager(), oofem::GaussPoint::giveElement(), oofem::GaussPoint::giveNaturalCoordinates(), oofem::FEMComponent::giveNumber(), oofem::Element::giveNumberOfDofManagers(), interpolateIntVarAt(), intVarTypes, OOFEM_ERROR, and smootherList.

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

MMAShapeFunctProjection& oofem::MMAShapeFunctProjection::operator= ( const MMAShapeFunctProjection )
delete

Member Data Documentation

Domain* oofem::MMAShapeFunctProjection::domain
protected

Source domain.

Definition at line 82 of file mmashapefunctprojection.h.

Referenced by __init(), __mapVariable(), and MMAShapeFunctProjection().

IntArray oofem::MMAShapeFunctProjection::intVarTypes
protected

Internal variables in list.

Definition at line 80 of file mmashapefunctprojection.h.

Referenced by __init(), __mapVariable(), and mapVariable().

std :: vector< std :: unique_ptr< NodalRecoveryModel > > oofem::MMAShapeFunctProjection::smootherList
protected

Smoothers.

Definition at line 76 of file mmashapefunctprojection.h.

Referenced by __init(), __mapVariable(), finish(), and mapVariable().

StateCounterType oofem::MMAShapeFunctProjection::stateCounter
protected

Solution state counter.

Definition at line 78 of file mmashapefunctprojection.h.

Referenced by __init(), finish(), and MMAShapeFunctProjection().


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