|
OOFEM 3.0
|
#include <dofmanvalfield.h>
Public Member Functions | |
| DofManValueField (FieldType ft, Domain *d) | |
| DofManValueField (FieldType ft, int nNodes, int nElements, const std::string engngModel, const std::string domainDofsDefaults) | |
| virtual | ~DofManValueField () |
| void | addNode (int i, const FloatArray &coords) |
| void | addElement (int i, const char *name, const IntArray &nodes) |
| int | evaluateAt (FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep) override |
| int | evaluateAt (FloatArray &answer, DofManager *dman, ValueModeType mode, TimeStep *tStep) override |
| void | setDofManValue (int dofMan, FloatArray value) |
| const FloatArray & | getNodeCoordinates (int i) |
| 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 Attributes | |
| Domain * | domain |
| Associated domain (need its elements to interpolate). | |
| std::vector< FloatArray > | dmanvallist |
| Array of dofman values. | |
| std::unique_ptr< EngngModel > | eModel |
| Pointer to engineering model. | |
| std::unique_ptr< CrossSection > | crossSect |
| Pointer to single cross-section;. | |
| Protected Attributes inherited from oofem::Field | |
| FieldType | type |
| IntArray | regionSets |
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 does not allow to specify values for different time steps. It is also possible to create a separate, virtual domain by adding particular nodes and elements with nodal values.
Definition at line 63 of file dofmanvalfield.h.
Constructor. Creates an empty field of given type associated to given domain.
Definition at line 52 of file dofmanvalfield.C.
References dmanvallist, domain, oofem::Field::Field(), and oofem::Domain::giveNumberOfDofManagers().
| oofem::DofManValueField::DofManValueField | ( | FieldType | ft, |
| int | nNodes, | ||
| int | nElements, | ||
| const std::string | engngModel = "transienttransport", | ||
| const std::string | domainDofsDefaults = "heattransfer" ) |
Constructor. Creates a virtual empty domain which needs to be populated by nodes, elements and nodal values.
Definition at line 59 of file dofmanvalfield.C.
References oofem::classFactory, dmanvallist, domain, eModel, oofem::Field::Field(), and OOFEM_ERROR.
|
inlinevirtual |
Definition at line 88 of file dofmanvalfield.h.
| void oofem::DofManValueField::addElement | ( | int | i, |
| const char * | name, | ||
| const IntArray & | nodes ) |
Add element to the domain
Definition at line 97 of file dofmanvalfield.C.
References oofem::classFactory, domain, and OOFEM_ERROR.
| void oofem::DofManValueField::addNode | ( | int | i, |
| const FloatArray & | coords ) |
Add node to the domain
Definition at line 85 of file dofmanvalfield.C.
References oofem::classFactory, domain, eModel, and OOFEM_ERROR.
|
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 dofmanvalfield.C.
References oofem::FloatArray::add(), oofem::FloatArray::at(), domain, oofem::FEInterpolation::evalN(), oofem::Element::giveDofManagerNumber(), oofem::Element::giveInterpolation(), oofem::FloatArray::giveSize(), oofem::FEInterpolation::global2local(), OOFEM_ERROR, and oofem::FloatArray::resize().
|
overridevirtual |
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 | TimInternalStateType valID, IntArray regions, TimeStep *tStepe step to evaluate for. |
Implements oofem::Field.
Definition at line 145 of file dofmanvalfield.C.
References dmanvallist, and oofem::FEMComponent::giveNumber().
| const FloatArray & oofem::DofManValueField::getNodeCoordinates | ( | int | i | ) |
|
inlineoverridevirtual |
Implements oofem::Field.
Definition at line 131 of file dofmanvalfield.h.
|
overridevirtual |
Restores the receiver state previously written in stream.
| stream | Input stream. |
| Throws | an ContextIOERR exception if error encountered. |
Implements oofem::Field.
Definition at line 168 of file dofmanvalfield.C.
|
overridevirtual |
Stores receiver state to output stream.
| stream | Output stream. |
| Throws | an ContextIOERR exception if error encountered. |
Implements oofem::Field.
Definition at line 164 of file dofmanvalfield.C.
| void oofem::DofManValueField::setDofManValue | ( | int | dofMan, |
| FloatArray | value ) |
Sets the value associated to given dofManager
Definition at line 152 of file dofmanvalfield.C.
References dmanvallist.
|
protected |
Pointer to single cross-section;.
Definition at line 73 of file dofmanvalfield.h.
|
protected |
Array of dofman values.
Definition at line 69 of file dofmanvalfield.h.
Referenced by DofManValueField(), DofManValueField(), evaluateAt(), and setDofManValue().
|
protected |
Associated domain (need its elements to interpolate).
Definition at line 67 of file dofmanvalfield.h.
Referenced by addElement(), addNode(), DofManValueField(), DofManValueField(), evaluateAt(), and getNodeCoordinates().
|
protected |
Pointer to engineering model.
Definition at line 71 of file dofmanvalfield.h.
Referenced by addNode(), and DofManValueField().