|
OOFEM 3.0
|
#include <uniformgridfield.h>
Public Member Functions | |
| UniformGridField () | |
| virtual | ~UniformGridField () |
| void | setGeometry (const FloatArray &lo_, const FloatArray &hi_, const IntArray &div_) |
| void | setValues (const std::vector< FloatArray > &vv) |
| int | evaluateAt (FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep) override |
| int | evaluateAt (FloatArray &answer, DofManager *dman, ValueModeType mode, TimeStep *tStep) override |
| const FloatArray | nodeValue2d (int i, int j) |
| const FloatArray | nodeValue3d (int i, int j, int k) |
| void | saveContext (DataStream &stream) override |
| void | restoreContext (DataStream &stream) override |
| const char * | giveClassName () const override |
| Public Member Functions inherited from oofem::Field | |
| Field (FieldType b=FieldType::FT_Unknown) | |
| virtual | ~Field () |
| virtual int | evaluateAt (FloatArray &answer, Element *elem, ValueModeType mode, TimeStep *tStep) |
| FieldType | giveType () |
| Returns the type of receiver. | |
| void | setType (FieldType b) |
| Sets the type of receiver. | |
| void | setSetsNumbers (const IntArray sets) |
| Defines a list of sets used to impose a field on specific elements. | |
| virtual bool | hasElementInSets (int nElem, Domain *d) |
| Searches if element number exist in IntArray regionSets for given domain. | |
| std::string | errorInfo (const char *func) const |
| Returns string for prepending output (used by error reporting macros). | |
| virtual void | initializeFrom (InputRecord &ir) |
Protected Member Functions | |
| void | xyz2ijk (const FloatArray &xyz, IntArray &ijk, FloatArray &normXyz) const |
Protected Attributes | |
| FloatArray | lo |
| FloatArray | hi |
| IntArray | div |
| std::vector< FloatArray > | valueList |
| Protected Attributes inherited from oofem::Field | |
| FieldType | type |
| IntArray | regionSets |
Field defined by values in uniform grid nodes, with linear interpolation for points inside the grid, or interpolation for the closest point within the grid for points outside.
Definition at line 46 of file uniformgridfield.h.
|
inline |
Constructor. Creates a field, with unspecified field values.
Definition at line 67 of file uniformgridfield.h.
References oofem::Field::Field().
|
inlinevirtual |
Definition at line 68 of file uniformgridfield.h.
|
overridevirtual |
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 111 of file uniformgridfield.C.
References oofem::FloatArray::giveSize(), oofem::IntArray::giveSize(), nodeValue2d(), nodeValue3d(), OOFEM_ERROR, valueList, xyz2ijk(), and oofem::FloatArray::zero().
Referenced by evaluateAt().
|
overridevirtual |
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.
| [out] | answer | Evaluated field for dman. |
| dman | Reference to dofManager. | |
| mode | Mode of value (total, velocity,...). | |
| tStep | Time step to evaluate for. |
Implements oofem::Field.
Definition at line 165 of file uniformgridfield.C.
References evaluateAt(), and oofem::DofManager::giveCoordinates().
|
inlineoverridevirtual |
Implements oofem::Field.
Definition at line 88 of file uniformgridfield.h.
| const FloatArray oofem::UniformGridField::nodeValue2d | ( | int | i, |
| int | j ) |
Definition at line 97 of file uniformgridfield.C.
References div, and valueList.
Referenced by evaluateAt().
| const FloatArray oofem::UniformGridField::nodeValue3d | ( | int | i, |
| int | j, | ||
| int | k ) |
Definition at line 103 of file uniformgridfield.C.
References div, and valueList.
Referenced by evaluateAt().
|
inlineoverridevirtual |
Restores the receiver state previously written in stream.
| stream | Input stream. |
| Throws | an ContextIOERR exception if error encountered. |
Implements oofem::Field.
Definition at line 85 of file uniformgridfield.h.
|
inlineoverridevirtual |
Stores receiver state to output stream.
| stream | Output stream. |
| Throws | an ContextIOERR exception if error encountered. |
Implements oofem::Field.
Definition at line 84 of file uniformgridfield.h.
| void oofem::UniformGridField::setGeometry | ( | const FloatArray & | lo_, |
| const FloatArray & | hi_, | ||
| const IntArray & | div_ ) |
Shorthand for defining geometry, with consistency checks. Used primarily from python
Definition at line 65 of file uniformgridfield.C.
References oofem::IntArray::at(), div, oofem::FloatArray::giveSize(), oofem::IntArray::giveSize(), hi, lo, OOFEM_ERROR, and valueList.
| void oofem::UniformGridField::setValues | ( | const std::vector< FloatArray > & | vv | ) |
Accessor for setting nodal values; checks size of the array for correctness.
Definition at line 86 of file uniformgridfield.C.
|
protected |
Definition at line 48 of file uniformgridfield.C.
References div, oofem::FloatArray::giveSize(), hi, lo, oofem::FloatArray::resize(), and oofem::IntArray::resize().
Referenced by evaluateAt().
|
protected |
Definition at line 53 of file uniformgridfield.h.
Referenced by nodeValue2d(), nodeValue3d(), setGeometry(), setValues(), and xyz2ijk().
|
protected |
Definition at line 51 of file uniformgridfield.h.
Referenced by setGeometry(), and xyz2ijk().
|
protected |
Definition at line 50 of file uniformgridfield.h.
Referenced by setGeometry(), and xyz2ijk().
|
protected |
Definition at line 56 of file uniformgridfield.h.
Referenced by evaluateAt(), nodeValue2d(), nodeValue3d(), setGeometry(), and setValues().