OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
#include <fieldmanager.h>
Public Member Functions | |
FieldManager () | |
~FieldManager () | |
void | registerField (FieldPtr eField, FieldType key) |
Registers the given field (the receiver is not assumed to own given field). More... | |
FieldPtr | giveField (FieldType key) |
Returns the previously registered field under given key; NULL otherwise. More... | |
bool | isFieldRegistered (FieldType key) |
Returns true if field is registered under key. More... | |
void | unregisterField (FieldType key) |
Unregisters (deletes) the field registered under given key. More... | |
std::vector< FieldType > | giveRegisteredKeys () |
Returns list of registered field keys, which can be obtained by calling giveField. More... | |
Protected Attributes | |
std::map< FieldType, std::shared_ptr< Field > > | externalFields |
Field container. More... | |
Definition at line 47 of file fieldmanager.h.
|
inline |
Definition at line 61 of file fieldmanager.h.
oofem::FieldManager::~FieldManager | ( | ) |
Definition at line 38 of file fieldmanager.C.
Returns the previously registered field under given key; NULL otherwise.
Definition at line 63 of file fieldmanager.C.
References externalFields.
Referenced by oofem::TransportElement::computeBoundaryEdgeLoadVector(), oofem::TransportElement::computeBoundarySurfaceLoadVector(), oofem::TransportElement::computeEdgeBCSubVectorAt(), oofem::B3Material::computeShrinkageStrainVector(), oofem::StructuralMaterial::computeStressIndependentStrainVector_3d(), oofem::TransportElement::computeSurfaceBCSubVectorAt(), oofem::LEPlic::doLagrangianPhase(), oofem::B3SolidMaterial::giveHumidity(), oofem::MPSMaterial::giveHumidity(), oofem::B3SolidMaterial::giveHumidityIncrement(), oofem::StructuralMaterial::giveIPValue(), oofem::MisesMat::giveTemperature(), oofem::MPSMaterial::giveTemperature(), and oofem::SimpleCrossSection::giveTemperatureVector().
std::vector< FieldType > oofem::FieldManager::giveRegisteredKeys | ( | ) |
Returns list of registered field keys, which can be obtained by calling giveField.
Definition at line 86 of file fieldmanager.C.
References externalFields.
bool oofem::FieldManager::isFieldRegistered | ( | FieldType | key | ) |
Returns true if field is registered under key.
Definition at line 57 of file fieldmanager.C.
References externalFields.
Registers the given field (the receiver is not assumed to own given field).
The field is registered under given key. Using this key, it can be later accessed.
could be replaced in future by this->externalFields.insert_or_assign({key, eField});
Definition at line 42 of file fieldmanager.C.
References externalFields.
Referenced by oofem::StationaryTransportProblem::initializeFrom(), oofem::TransientTransportProblem::initializeFrom(), oofem::SUPG::initializeFrom(), and oofem::CBS::initializeFrom().
void oofem::FieldManager::unregisterField | ( | FieldType | key | ) |
Unregisters (deletes) the field registered under given key.
Definition at line 75 of file fieldmanager.C.
References externalFields.
Field container.
Stores smart pointers to objects (not object themselves) to avoid copying elements and to preserve the use of polymorphic types. The use of shared_ptr is essential here, as some registered fields may be ovned (and maintained) by emodel, some may be cretead on demand and thus managed only by field manager.
Definition at line 58 of file fieldmanager.h.
Referenced by giveField(), giveRegisteredKeys(), isFieldRegistered(), registerField(), and unregisterField().