OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
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. More...
#include <uniformgridfield.h>
Public Member Functions | |
UniformGridField () | |
Constructor. More... | |
virtual | ~UniformGridField () |
void | setGeometry (const FloatArray &lo_, const FloatArray &hi_, const IntArray &div_) |
Shorthand for defining geometry, with consistency checks. More... | |
void | setValues (const FloatArray &vv) |
Accessor for setting nodal values; checks size of the array for correctness. More... | |
int | evaluateAt (FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep) override |
Implementation of Field::evaluateAt for coordinates. More... | |
int | evaluateAt (FloatArray &answer, DofManager *dman, ValueModeType mode, TimeStep *tStep) override |
Implementaton of Field::evaluateAt for DofManager. More... | |
contextIOResultType | saveContext (DataStream &stream, ContextMode mode) override |
Stores receiver state to output stream. More... | |
contextIOResultType | restoreContext (DataStream &stream, ContextMode mode) override |
Restores the receiver state previously written in stream. More... | |
const char * | giveClassName () const override |
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 Member Functions | |
void | xyz2ijk (const FloatArray &xyz, IntArray &ijk, FloatArray &normXyz) const |
double | nodeValue2d (int i, int j) |
double | nodeValue3d (int i, int j, int k) |
Protected Attributes | |
FloatArray | lo |
FloatArray | hi |
IntArray | div |
FloatArray | values |
Protected Attributes inherited from oofem::Field | |
FieldType | type |
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 69 of file uniformgridfield.h.
|
inlinevirtual |
Definition at line 70 of file uniformgridfield.h.
|
overridevirtual |
Implementation of Field::evaluateAt for coordinates.
Implements oofem::Field.
Definition at line 102 of file uniformgridfield.C.
References oofem::IntArray::giveSize(), oofem::FloatArray::giveSize(), nodeValue2d(), nodeValue3d(), OOFEM_ERROR, oofem::FloatArray::resize(), and xyz2ijk().
Referenced by evaluateAt().
|
overridevirtual |
Implementaton of Field::evaluateAt for DofManager.
Implements oofem::Field.
Definition at line 157 of file uniformgridfield.C.
References evaluateAt(), oofem::DofManager::giveCoordinates(), and oofem::DofManager::hasCoordinates().
|
inlineoverridevirtual |
Implements oofem::Field.
Definition at line 109 of file uniformgridfield.h.
|
protected |
Definition at line 88 of file uniformgridfield.C.
References div, oofem::IntArray::giveSize(), oofem::FloatArray::giveSize(), and values.
Referenced by evaluateAt().
|
protected |
Definition at line 94 of file uniformgridfield.C.
References div, oofem::IntArray::giveSize(), oofem::FloatArray::giveSize(), and values.
Referenced by evaluateAt().
|
inlineoverridevirtual |
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 106 of file uniformgridfield.h.
References oofem::CIO_OK.
|
inlineoverridevirtual |
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 uniformgridfield.h.
References oofem::CIO_OK.
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 div, oofem::IntArray::giveSize(), oofem::FloatArray::giveSize(), hi, lo, and OOFEM_ERROR.
void oofem::UniformGridField::setValues | ( | const FloatArray & | vv | ) |
Accessor for setting nodal values; checks size of the array for correctness.
Definition at line 81 of file uniformgridfield.C.
References div, oofem::IntArray::giveSize(), oofem::FloatArray::giveSize(), OOFEM_ERROR, and values.
|
protected |
Definition at line 48 of file uniformgridfield.C.
References div, oofem::IntArray::giveSize(), oofem::FloatArray::giveSize(), hi, lo, oofem::IntArray::resize(), and oofem::FloatArray::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 nodeValue2d(), nodeValue3d(), and setValues().