OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Class representing the general Input Record. More...
#include <inputrecord.h>
Public Member Functions | |||||
InputRecord () | |||||
Constructor. Creates an empty input record. More... | |||||
InputRecord (const InputRecord &) | |||||
Copy constructor. More... | |||||
virtual | ~InputRecord () | ||||
Destructor. More... | |||||
InputRecord & | operator= (const InputRecord &) | ||||
Assignment operator. More... | |||||
virtual InputRecord * | GiveCopy ()=0 | ||||
Creates a newly allocated copy of the receiver. More... | |||||
virtual std::string | giveRecordAsString () const =0 | ||||
Returns string representation of record in OOFEMs text format. More... | |||||
virtual bool | hasField (InputFieldType id)=0 | ||||
Returns true if record contains field identified by idString keyword. More... | |||||
const char * | strerror (IRResultType) | ||||
Returns error string corresponding to given value of IRResultType type. More... | |||||
virtual void | printYourself ()=0 | ||||
Print input record. More... | |||||
virtual void | report_error (const char *_class, const char *proc, InputFieldType id, IRResultType result, const char *file, int line)=0 | ||||
Prints the error message. More... | |||||
virtual void | finish (bool wrn=true)=0 | ||||
Terminates the current record session and if the flag is true, warning is printed for unscanned tokens. More... | |||||
Compulsory field extraction methods | |||||
Reads the field value identified by keyword
| |||||
virtual IRResultType | giveRecordKeywordField (std::string &answer, int &value)=0 | ||||
Reads the record id field (type of record) and its corresponding number. More... | |||||
virtual IRResultType | giveRecordKeywordField (std::string &answer)=0 | ||||
Reads the record id field (type of record). More... | |||||
virtual IRResultType | giveField (int &answer, InputFieldType id)=0 | ||||
Reads the integer field value. More... | |||||
virtual IRResultType | giveField (double &answer, InputFieldType id)=0 | ||||
Reads the double field value. More... | |||||
virtual IRResultType | giveField (bool &answer, InputFieldType id)=0 | ||||
Reads the bool field value. More... | |||||
virtual IRResultType | giveField (std::string &answer, InputFieldType id)=0 | ||||
Reads the string field value. More... | |||||
virtual IRResultType | giveField (FloatArray &answer, InputFieldType id)=0 | ||||
Reads the FloatArray field value. More... | |||||
virtual IRResultType | giveField (IntArray &answer, InputFieldType id)=0 | ||||
Reads the IntArray field value. More... | |||||
virtual IRResultType | giveField (FloatMatrix &answer, InputFieldType id)=0 | ||||
Reads the FloatMatrix field value. More... | |||||
virtual IRResultType | giveField (std::vector< std::string > &answer, InputFieldType id)=0 | ||||
Reads the vector of strings. More... | |||||
virtual IRResultType | giveField (Dictionary &answer, InputFieldType id)=0 | ||||
Reads the Dictionary field value. More... | |||||
virtual IRResultType | giveField (std::list< Range > &answer, InputFieldType id)=0 | ||||
Reads the std::list<Range> field value. More... | |||||
virtual IRResultType | giveField (ScalarFunction &function, InputFieldType id)=0 | ||||
Reads the ScalarFunction field value. More... | |||||
Optional field extraction methods | |||||
Reads the field value identified by keyword
| |||||
IRResultType | giveOptionalField (int &answer, InputFieldType id) | ||||
Reads the integer field value. More... | |||||
IRResultType | giveOptionalField (double &answer, InputFieldType id) | ||||
Reads the double field value. More... | |||||
IRResultType | giveOptionalField (bool &answer, InputFieldType id) | ||||
Reads the bool field value. More... | |||||
IRResultType | giveOptionalField (std::string &answer, InputFieldType id) | ||||
Reads the string field value. More... | |||||
IRResultType | giveOptionalField (FloatArray &answer, InputFieldType id) | ||||
Reads the FloatArray field value. More... | |||||
IRResultType | giveOptionalField (IntArray &answer, InputFieldType id) | ||||
Reads the IntArray field value. More... | |||||
IRResultType | giveOptionalField (FloatMatrix &answer, InputFieldType id) | ||||
Reads the FloatMatrix field value. More... | |||||
IRResultType | giveOptionalField (std::vector< std::string > &answer, InputFieldType id) | ||||
Reads the vector of strings. More... | |||||
IRResultType | giveOptionalField (Dictionary &answer, InputFieldType id) | ||||
Reads the Dictionary field value. More... | |||||
IRResultType | giveOptionalField (std::list< Range > &answer, InputFieldType id) | ||||
Reads the std::list<Range> field value. More... | |||||
IRResultType | giveOptionalField (ScalarFunction &function, InputFieldType id) | ||||
Reads the ScalarFunction field value. More... | |||||
Class representing the general Input Record.
The input record consists of several fields. Provides several requesting functions for reading field values. The derived classes of Input record can represent database records or text file records, allowing the transparent input operations. The input record after init phase should "contain" all relevant data, so the input record should resolve all dependencies. This allows to create a copy of input record instance for later use without the need to re-open input files (used for metasteps).
Definition at line 101 of file inputrecord.h.
oofem::InputRecord::InputRecord | ( | ) |
Constructor. Creates an empty input record.
Definition at line 38 of file inputrecord.C.
oofem::InputRecord::InputRecord | ( | const InputRecord & | src | ) |
Copy constructor.
Definition at line 40 of file inputrecord.C.
|
inlinevirtual |
Destructor.
Definition at line 109 of file inputrecord.h.
|
pure virtual |
Terminates the current record session and if the flag is true, warning is printed for unscanned tokens.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
Referenced by oofem::EngngModel::initMetaStepAttributes(), oofem::ProblemSequence::instanciateYourself(), oofem::StaggeredProblem::instanciateYourself(), oofem::ParticleTopologyDescription::instanciateYourself(), oofem::Domain::instanciateYourself(), and oofem::EngngModel::instanciateYourself().
|
pure virtual |
Creates a newly allocated copy of the receiver.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
Referenced by oofem::MetaStep::initializeFrom(), oofem::InstanciateProblem(), and oofem::MetaStep::MetaStep().
|
pure virtual |
Reads the integer field value.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
Referenced by giveOptionalField().
|
pure virtual |
Reads the double field value.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
|
pure virtual |
Reads the bool field value.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
|
pure virtual |
Reads the string field value.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
|
pure virtual |
Reads the FloatArray field value.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
|
pure virtual |
Reads the IntArray field value.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
|
pure virtual |
Reads the FloatMatrix field value.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
|
pure virtual |
Reads the vector of strings.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
|
pure virtual |
Reads the Dictionary field value.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
|
pure virtual |
Reads the std::list<Range> field value.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
|
pure virtual |
Reads the ScalarFunction field value.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
IRResultType oofem::InputRecord::giveOptionalField | ( | int & | answer, |
InputFieldType | id | ||
) |
Reads the integer field value.
Definition at line 64 of file inputrecord.C.
References giveField(), oofem::IRRT_NOTFOUND, and oofem::IRRT_OK.
Referenced by oofem::GnuplotExportModule::initializeFrom(), oofem::QTrPlaneStress2dXFEM::initializeFrom(), and oofem::TrPlaneStress2dXFEM::initializeFrom().
IRResultType oofem::InputRecord::giveOptionalField | ( | double & | answer, |
InputFieldType | id | ||
) |
Reads the double field value.
Definition at line 75 of file inputrecord.C.
References giveField(), oofem::IRRT_NOTFOUND, and oofem::IRRT_OK.
IRResultType oofem::InputRecord::giveOptionalField | ( | bool & | answer, |
InputFieldType | id | ||
) |
Reads the bool field value.
Definition at line 86 of file inputrecord.C.
References giveField(), oofem::IRRT_NOTFOUND, and oofem::IRRT_OK.
IRResultType oofem::InputRecord::giveOptionalField | ( | std::string & | answer, |
InputFieldType | id | ||
) |
Reads the string field value.
Definition at line 97 of file inputrecord.C.
References giveField(), oofem::IRRT_NOTFOUND, and oofem::IRRT_OK.
IRResultType oofem::InputRecord::giveOptionalField | ( | FloatArray & | answer, |
InputFieldType | id | ||
) |
Reads the FloatArray field value.
Definition at line 108 of file inputrecord.C.
References giveField(), oofem::IRRT_NOTFOUND, and oofem::IRRT_OK.
IRResultType oofem::InputRecord::giveOptionalField | ( | IntArray & | answer, |
InputFieldType | id | ||
) |
Reads the IntArray field value.
Definition at line 119 of file inputrecord.C.
References giveField(), oofem::IRRT_NOTFOUND, and oofem::IRRT_OK.
IRResultType oofem::InputRecord::giveOptionalField | ( | FloatMatrix & | answer, |
InputFieldType | id | ||
) |
Reads the FloatMatrix field value.
Definition at line 130 of file inputrecord.C.
References giveField(), oofem::IRRT_NOTFOUND, and oofem::IRRT_OK.
IRResultType oofem::InputRecord::giveOptionalField | ( | std::vector< std::string > & | answer, |
InputFieldType | id | ||
) |
Reads the vector of strings.
Definition at line 141 of file inputrecord.C.
References giveField(), oofem::IRRT_NOTFOUND, and oofem::IRRT_OK.
IRResultType oofem::InputRecord::giveOptionalField | ( | Dictionary & | answer, |
InputFieldType | id | ||
) |
Reads the Dictionary field value.
Definition at line 152 of file inputrecord.C.
References giveField(), oofem::IRRT_NOTFOUND, and oofem::IRRT_OK.
IRResultType oofem::InputRecord::giveOptionalField | ( | std::list< Range > & | answer, |
InputFieldType | id | ||
) |
Reads the std::list<Range> field value.
Definition at line 163 of file inputrecord.C.
References giveField(), oofem::IRRT_NOTFOUND, and oofem::IRRT_OK.
IRResultType oofem::InputRecord::giveOptionalField | ( | ScalarFunction & | function, |
InputFieldType | id | ||
) |
Reads the ScalarFunction field value.
Definition at line 174 of file inputrecord.C.
References giveField(), oofem::IRRT_NOTFOUND, and oofem::IRRT_OK.
|
pure virtual |
Returns string representation of record in OOFEMs text format.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
|
pure virtual |
Reads the record id field (type of record) and its corresponding number.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
Referenced by oofem::StructuralFE2MaterialStatus::copyStateVariables(), oofem::ContactManager::initializeFrom(), oofem::InstanciateProblem(), oofem::GeometryBasedEI::instanciateYourself(), oofem::NucleationCriterion::instanciateYourself(), oofem::Delamination::instanciateYourself(), oofem::ContactManager::instanciateYourself(), oofem::ModuleManager< InitModule >::instanciateYourself(), oofem::XfemManager::instanciateYourself(), oofem::FractureManager::instanciateYourself(), and oofem::Domain::instanciateYourself().
|
pure virtual |
Reads the record id field (type of record).
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
|
pure virtual |
Returns true if record contains field identified by idString keyword.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
Referenced by oofem::AdaptiveNonLinearStatic::assembleInitialLoadVector(), oofem::IntElLine2IntPen::initializeFrom(), oofem::IntElLine2::initializeFrom(), oofem::PiecewiseLinFunction::initializeFrom(), oofem::MacroLSpace::initializeFrom(), oofem::SimpleTransportCrossSection::initializeFrom(), oofem::Structural3DElement::initializeFrom(), oofem::TransportGradientNeumann::initializeFrom(), oofem::SurfaceTensionBoundaryCondition::initializeFrom(), oofem::IntElLine1PhF::initializeFrom(), oofem::StructuralInterfaceCrossSection::initializeFrom(), oofem::IntElLine1PF::initializeFrom(), oofem::IntElPoint::initializeFrom(), oofem::HydratingHeMoMaterial::initializeFrom(), oofem::InterfaceElem2dLin::initializeFrom(), oofem::IntElLine1::initializeFrom(), oofem::SolidShell::initializeFrom(), oofem::Delamination::initializeFrom(), oofem::ConstantPressureLoad::initializeFrom(), oofem::InterfaceElem2dQuad::initializeFrom(), oofem::StructuralMaterialEvaluator::initializeFrom(), oofem::WinklerPasternakMaterial::initializeFrom(), oofem::Structural2DElement::initializeFrom(), oofem::Quad1Mindlin::initializeFrom(), oofem::IncrementalLinearStatic::initializeFrom(), oofem::Set::initializeFrom(), oofem::StaticStructural::initializeFrom(), oofem::InterfaceElem1d::initializeFrom(), oofem::StationaryTransportProblem::initializeFrom(), oofem::GnuplotExportModule::initializeFrom(), oofem::QTrPlaneStress2dXFEM::initializeFrom(), oofem::TransportGradientDirichlet::initializeFrom(), oofem::EigenValueDynamic::initializeFrom(), oofem::TrPlaneStress2dXFEM::initializeFrom(), oofem::HydratingIsoHeatMaterial::initializeFrom(), oofem::Quad1MindlinShell3D::initializeFrom(), oofem::Masonry02::initializeFrom(), oofem::LinearStability::initializeFrom(), oofem::OutputManager::initializeFrom(), oofem::EnrichmentItem::initializeFrom(), oofem::TransientTransportProblem::initializeFrom(), oofem::MatlabExportModule::initializeFrom(), oofem::ExportModule::initializeFrom(), oofem::VariableCrossSection::initializeFrom(), oofem::FRCFCM::initializeFrom(), oofem::BoundaryCondition::initializeFrom(), oofem::RCSDNLMaterial::initializeFrom(), oofem::NonLinearDynamic::initializeFrom(), oofem::StructuralFE2Material::initializeFrom(), oofem::AbaqusUserMaterial::initializeFrom(), oofem::IntMatBilinearCZ::initializeFrom(), oofem::NlDEIDynamic::initializeFrom(), oofem::Beam2d::initializeFrom(), oofem::Shell7Base::initializeFrom(), oofem::SimpleCrossSection::initializeFrom(), oofem::NonLinearStatic::initializeFrom(), oofem::NonStationaryTransportProblem::initializeFrom(), oofem::StaggeredProblem::initializeFrom(), oofem::Load::initializeFrom(), oofem::Beam3d::initializeFrom(), oofem::NRSolver::initializeFrom(), oofem::SUPG::initializeFrom(), oofem::Shell7BaseXFEM::initializeFrom(), oofem::Node::initializeFrom(), oofem::ErrorCheckingExportModule::initializeFrom(), oofem::Eurocode2CreepMaterial::initializeFrom(), oofem::IntMatBilinearCZJansson::initializeFrom(), oofem::FCMMaterial::initializeFrom(), oofem::RheoChainMaterial::initializeFrom(), oofem::HydrationModel::initializeFrom(), oofem::MPSDamMaterial::initializeFrom(), oofem::IsotropicDamageMaterial1::initializeFrom(), oofem::MPSMaterial::initializeFrom(), oofem::MDM::initializeFrom(), oofem::NonlocalMaterialExtensionInterface::initializeFrom(), oofem::DofManager::initializeFrom(), oofem::ConcreteDPM::initializeFrom(), oofem::EngngModel::initializeFrom(), oofem::Element::initializeFrom(), oofem::Domain::instanciateYourself(), oofem::StaggeredProblem::updateAttributes(), and oofem::NonLinearStatic::updateLoadVectors().
InputRecord & oofem::InputRecord::operator= | ( | const InputRecord & | src | ) |
Assignment operator.
Definition at line 43 of file inputrecord.C.
|
pure virtual |
Print input record.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
|
pure virtual |
Prints the error message.
Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.
Referenced by oofem::StructuralFE2MaterialStatus::copyStateVariables(), oofem::InstanciateProblem(), oofem::GeometryBasedEI::instanciateYourself(), oofem::NucleationCriterion::instanciateYourself(), oofem::Delamination::instanciateYourself(), and oofem::XfemManager::instanciateYourself().
const char * oofem::InputRecord::strerror | ( | IRResultType | rt | ) |
Returns error string corresponding to given value of IRResultType type.
Definition at line 49 of file inputrecord.C.
References oofem::IRRT_BAD_FORMAT, and oofem::IRRT_NOTFOUND.
Referenced by oofem::OOFEMTXTInputRecord::report_error(), and oofem::DynamicInputRecord::report_error().