OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Class representing field defined by nodal values associated to given domain. More...
#include <dofmanvalfield.h>
Public Member Functions | |
DofManValueField (FieldType b, Domain *d) | |
Constructor. More... | |
virtual | ~DofManValueField () |
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 | saveContext (DataStream &stream, ContextMode mode) |
Stores receiver state to output stream. More... | |
virtual contextIOResultType | restoreContext (DataStream &stream, ContextMode mode) |
Restores the receiver state previously written in stream. More... | |
void | setDofManValue (int dofMan, FloatArray value) |
Sets the value associated to given dofManager. 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 | |
Domain * | domain |
Associated domain (need its elements to interpolate) More... | |
std::vector< FloatArray > | dmanvallist |
Array of dofman values. More... | |
Protected Attributes inherited from oofem::Field | |
FieldType | type |
Class representing field defined by nodal values associated to given domain.
Field represent the spatial distribution of certain variable. The implementation allows to set individual dofMan values; However, in the current implementation doe not allow to specify values for different time steps.
Definition at line 51 of file dofmanvalfield.h.
Constructor.
Creates an empty field of given type associated to given domain.
Definition at line 44 of file dofmanvalfield.C.
References dmanvallist, domain, and oofem::Domain::giveNumberOfDofManagers().
|
inlinevirtual |
Definition at line 64 of file dofmanvalfield.h.
|
virtual |
Evaluates the field at given point.
coords | Coordinates of the point of interest |
answer | Field evaluated at coordinate. |
tStep | Time step to evaluate for. |
mode | Mode of value (total, velocity,...). |
Implements oofem::Field.
Definition at line 52 of file dofmanvalfield.C.
References oofem::FloatArray::add(), oofem::FloatArray::at(), dmanvallist, domain, oofem::FEInterpolation::evalN(), oofem::Element::giveDofManagerNumber(), oofem::SpatialLocalizer::giveElementContainingPoint(), oofem::Element::giveInterpolation(), oofem::FloatArray::giveSize(), oofem::Domain::giveSpatialLocalizer(), and oofem::FEInterpolation::global2local().
|
virtual |
Evaluates the field at given DofManager.
This potentially can be resolved quickly, as receiver data may be described using values at dof managers. 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.
[out] | answer | Evaluated field for dman. |
dman | Reference to dof manager. | |
mode | Mode of value (total, velocity,...). | |
tStep | Time step to evaluate for. |
Implements oofem::Field.
Definition at line 84 of file dofmanvalfield.C.
References dmanvallist, and oofem::FEMComponent::giveNumber().
|
inlinevirtual |
Implements oofem::Field.
Definition at line 119 of file dofmanvalfield.h.
|
virtual |
Restores the receiver state previously written in stream.
Reads the FEMComponent class-id in order to allow test consistency.
stream | Input stream. |
mode | Determines amount of info in stream (state, definition,...). |
Throws | an ContextIOERR exception if error encountered. |
Implements oofem::Field.
Definition at line 103 of file dofmanvalfield.C.
References oofem::CIO_OK.
|
virtual |
Stores receiver state to output stream.
Writes the FEMComponent class-id in order to allow test whether correct data are then restored.
stream | Output stream. |
mode | Determines amount of info in stream (state, definition,...). |
Throws | an ContextIOERR exception if error encountered. |
Implements oofem::Field.
Definition at line 97 of file dofmanvalfield.C.
References oofem::CIO_OK.
void oofem::DofManValueField::setDofManValue | ( | int | dofMan, |
FloatArray | value | ||
) |
Sets the value associated to given dofManager.
Definition at line 91 of file dofmanvalfield.C.
References dmanvallist.
|
protected |
Array of dofman values.
Definition at line 57 of file dofmanvalfield.h.
Referenced by DofManValueField(), evaluateAt(), and setDofManValue().
|
protected |
Associated domain (need its elements to interpolate)
Definition at line 55 of file dofmanvalfield.h.
Referenced by DofManValueField(), and evaluateAt().