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

Abstract class representing subset of DOFs (identified by DofId mask) of primary field. More...

#include <maskedprimaryfield.h>

+ Inheritance diagram for oofem::MaskedPrimaryField:
+ Collaboration diagram for oofem::MaskedPrimaryField:

Public Member Functions

 MaskedPrimaryField (FieldType b, PrimaryField *m, IntArray dofIdMask)
 
virtual int evaluateAt (FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep)
 Evaluates the field at given point. More...
 
virtual int evaluateAt (FloatArray &answer, DofManager *dman, ValueModeType mode, TimeStep *tStep)
 Evaluates the field at given DofManager. More...
 
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode)
 Restores the receiver state previously written in stream. More...
 
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode)
 Stores receiver state to output stream. More...
 
virtual const char * giveClassName () const
 
- Public Member Functions inherited from oofem::Field
 Field (FieldType b)
 Constructor. More...
 
virtual ~Field ()
 
FieldType giveType ()
 Returns the type of receiver. More...
 
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros). More...
 

Protected Attributes

PrimaryFieldmaster
 
IntArray mask
 
- Protected Attributes inherited from oofem::Field
FieldType type
 

Detailed Description

Abstract class representing subset of DOFs (identified by DofId mask) of primary field.

As the PrimaryField stores the state directly in solution vectors that are usually directly updated by EngngModel, it may contain a mix of different fields (this is especially true for strongly coupled problems). Then masked primary field can be used to select only certain DOFs (based on DofID) from its master PrimaryField.

Definition at line 55 of file maskedprimaryfield.h.

Constructor & Destructor Documentation

oofem::MaskedPrimaryField::MaskedPrimaryField ( FieldType  b,
PrimaryField m,
IntArray  dofIdMask 
)
inline

Definition at line 61 of file maskedprimaryfield.h.

Member Function Documentation

int oofem::MaskedPrimaryField::evaluateAt ( FloatArray answer,
const FloatArray coords,
ValueModeType  mode,
TimeStep tStep 
)
virtual

Evaluates the field at given point.

Parameters
coordsCoordinates of the point of interest
answerField evaluated at coordinate.
tStepTime step to evaluate for.
modeMode of value (total, velocity,...).
Returns
Zero if ok, otherwise nonzero.

Implements oofem::Field.

Definition at line 39 of file maskedprimaryfield.C.

References oofem::PrimaryField::__evaluateAt(), mask, and master.

int oofem::MaskedPrimaryField::evaluateAt ( FloatArray answer,
DofManager dman,
ValueModeType  mode,
TimeStep tStep 
)
virtual

Evaluates the field at given DofManager.

This potentially can be resolved quickly, as receiver data may be described using values at dofManagers. Here an additional issue exists: one needs to make sure, that passed dman is from the same domain, so that its number can be used to perform suggested quick evaluation.

If this is not the case (the field is described differently), the response can be evaluated using dofman coordinates in a standard way.

Parameters
[out]answerEvaluated field for dman.
dmanReference to dofManager.
modeMode of value (total, velocity,...).
tStepTime step to evaluate for.
Returns
Zero if ok, nonzero Error code (0-ok, 1-failed)

Implements oofem::Field.

Definition at line 46 of file maskedprimaryfield.C.

References oofem::PrimaryField::__evaluateAt(), mask, and master.

virtual const char* oofem::MaskedPrimaryField::giveClassName ( ) const
inlinevirtual
Returns
Class name of the receiver.

Implements oofem::Field.

Definition at line 73 of file maskedprimaryfield.h.

virtual contextIOResultType oofem::MaskedPrimaryField::restoreContext ( DataStream stream,
ContextMode  mode 
)
inlinevirtual

Restores the receiver state previously written in stream.

Reads the FEMComponent class-id in order to allow test consistency.

Parameters
streamInput stream.
modeDetermines amount of info in stream (state, definition,...).
Returns
contextIOResultType.
Exceptions
Throwsan ContextIOERR exception if error encountered.

Implements oofem::Field.

Definition at line 70 of file maskedprimaryfield.h.

References oofem::CIO_OK.

virtual contextIOResultType oofem::MaskedPrimaryField::saveContext ( DataStream stream,
ContextMode  mode 
)
inlinevirtual

Stores receiver state to output stream.

Writes the FEMComponent class-id in order to allow test whether correct data are then restored.

Parameters
streamOutput stream.
modeDetermines amount of info in stream (state, definition,...).
Returns
contextIOResultType.
Exceptions
Throwsan ContextIOERR exception if error encountered.

Implements oofem::Field.

Definition at line 71 of file maskedprimaryfield.h.

References oofem::CIO_OK.

Member Data Documentation

IntArray oofem::MaskedPrimaryField::mask
protected

Definition at line 59 of file maskedprimaryfield.h.

Referenced by evaluateAt().

PrimaryField* oofem::MaskedPrimaryField::master
protected

Definition at line 58 of file maskedprimaryfield.h.

Referenced by evaluateAt().


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