|
OOFEM 3.0
|
#include <inputrecord.h>
Public Member Functions | |||||
| InputRecord () | |||||
| InputRecord (DataReader *reader_) | |||||
| virtual | ~InputRecord ()=default | ||||
| Destructor. | |||||
| virtual std::shared_ptr< InputRecord > | clone () const =0 | ||||
| std::shared_ptr< InputRecord > | ptr () | ||||
| virtual std::string | giveRecordAsString () const =0 | ||||
| Returns string representation of record in OOFEMs text format. | |||||
| virtual std::string | giveRecordInTXTFormat () const =0 | ||||
| virtual std::string | giveLocation () const =0 | ||||
Optional field extraction methods | |||||
Reads the field value identified by keyword
| |||||
| template<typename T> | |||||
| void | giveOptionalField (T &answer, InputFieldType id) | ||||
Child reader methods | |||||
| virtual int | giveGroupCount (InputFieldType id, const std::string &name, bool optional)=0 | ||||
| virtual bool | hasChild (InputFieldType id, const std::string &name, bool optional)=0 | ||||
| virtual bool | hasField (InputFieldType id)=0 | ||||
| Returns true if record contains field identified by idString keyword. | |||||
| virtual void | printYourself ()=0 | ||||
| Print input record. | |||||
| virtual void | finish (bool wrn=true)=0 | ||||
| Terminates the current record session and if the flag is true, warning is printed for unscanned tokens. | |||||
| DataReader * | giveReader () const | ||||
Private Attributes | |
| DataReader * | reader = nullptr |
Compulsory field extraction methods | |||||
Reads the field value identified by keyword
| |||||
| virtual void | giveRecordKeywordField (std ::string &answer, int &value)=0 | ||||
| Reads the record id field (type of record) and its corresponding number. | |||||
| virtual void | giveRecordKeywordField (std ::string &answer)=0 | ||||
| Reads the record id field (type of record). | |||||
| virtual void | giveField (int &answer, InputFieldType id)=0 | ||||
| Reads the integer field value. | |||||
| virtual void | giveField (double &answer, InputFieldType id)=0 | ||||
| Reads the double field value. | |||||
| virtual void | giveField (bool &answer, InputFieldType id)=0 | ||||
| Reads the bool field value. | |||||
| virtual void | giveField (std ::string &answer, InputFieldType id)=0 | ||||
| Reads the string field value. | |||||
| virtual void | giveField (FloatArray &answer, InputFieldType id)=0 | ||||
| Reads the FloatArray field value. | |||||
| virtual void | giveField (IntArray &answer, InputFieldType id)=0 | ||||
| Reads the IntArray field value. | |||||
| virtual void | giveField (FloatMatrix &answer, InputFieldType id)=0 | ||||
| Reads the FloatMatrix field value. | |||||
| virtual void | giveField (std ::vector< std ::string > &answer, InputFieldType id)=0 | ||||
| Reads the vector of strings. | |||||
| virtual void | giveField (Dictionary &answer, InputFieldType id)=0 | ||||
| Reads the Dictionary field value. | |||||
| virtual void | giveField (std ::list< Range > &answer, InputFieldType id)=0 | ||||
| Reads the std::list<Range> field value. | |||||
| virtual void | giveField (ScalarFunction &function, InputFieldType id)=0 | ||||
| Reads the ScalarFunction field value. | |||||
| template<typename AnEnum> | |||||
| void | giveField (AnEnum &answer, InputFieldType id) | ||||
| Reads enumeration (must be defined via enum-impl.hpp) directly. | |||||
| void | traceField (InputFieldType id, const char *type) const | ||||
| static std::string | error_msg_with_hints (const std::string &val, const std::map< int, std::vector< std::string > > &v2nn) | ||||
| static int | giveLevenshteinDist (const std::string &word1, const std::string &word2) | ||||
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 97 of file inputrecord.h.
|
inline |
Definition at line 102 of file inputrecord.h.
Referenced by oofem::XMLInputRecord::XMLInputRecord().
| oofem::InputRecord::InputRecord | ( | DataReader * | reader_ | ) |
Definition at line 140 of file inputrecord.C.
References reader.
|
virtualdefault |
Destructor.
|
pure virtual |
Creates a newly allocated copy of the receiver
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
References ptr().
Referenced by oofem::EngngModel::initializeFrom(), oofem::EnrichmentItem::initializeFrom(), oofem::MetaStep::initializeFrom(), oofem::Set::initializeFrom(), oofem::XfemManager::initializeFrom(), oofem::InstanciateProblem(), and oofem::Domain::instanciateYourself().
|
static |
Definition at line 91 of file inputrecord.C.
References giveLevenshteinDist().
Referenced by giveField(), and giveField().
|
pure virtual |
Terminates the current record session and if the flag is true, warning is printed for unscanned tokens.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
References giveReader().
Referenced by oofem::AdditiveManufacturingProblem::instanciateYourself(), and oofem::ProblemSequence::instanciateYourself().
|
inline |
Reads enumeration (must be defined via enum-impl.hpp) directly.
Definition at line 154 of file inputrecord.h.
References error_msg_with_hints(), giveField(), giveLocation(), OOFEM_ERROR, and traceField().
|
pure virtual |
Reads the bool field value.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
|
pure virtual |
Reads the Dictionary field value.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
|
pure virtual |
Reads the double field value.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
|
pure virtual |
Reads the FloatArray field value.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
|
pure virtual |
Reads the FloatMatrix field value.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
|
pure virtual |
Reads the integer field value.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
Referenced by oofem::BeamElementErrorCheckingRule::BeamElementErrorCheckingRule(), oofem::EigenValueErrorCheckingRule::EigenValueErrorCheckingRule(), oofem::ElementErrorCheckingRule::ElementErrorCheckingRule(), giveField(), giveOptionalField(), oofem::Variable::initializeFrom(), oofem::InternalElementDofManErrorCheckingRule::InternalElementDofManErrorCheckingRule(), oofem::LoadLevelErrorCheckingRule::LoadLevelErrorCheckingRule(), oofem::NodeErrorCheckingRule::NodeErrorCheckingRule(), and oofem::ReactionErrorCheckingRule::ReactionErrorCheckingRule().
|
pure virtual |
Reads the IntArray field value.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
|
pure virtual |
Reads the ScalarFunction field value.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
References error_msg_with_hints(), and giveLevenshteinDist().
|
pure virtual |
Reads the std::list<Range> field value.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
|
pure virtual |
Reads the string field value.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
|
pure virtual |
Reads the vector of strings.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
|
pure virtual |
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
Referenced by oofem::EnrichmentItem::initializeFrom().
|
static |
Definition at line 49 of file inputrecord.C.
Referenced by error_msg_with_hints(), and giveField().
|
pure virtual |
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
Referenced by oofem::BadFormatInputException::BadFormatInputException(), giveField(), oofem::MissingKeywordInputException::MissingKeywordInputException(), and oofem::ValueInputException::ValueInputException().
|
inline |
Definition at line 193 of file inputrecord.h.
References giveField(), and hasField().
Referenced by oofem::BeamElementErrorCheckingRule::BeamElementErrorCheckingRule(), oofem::EigenValueErrorCheckingRule::EigenValueErrorCheckingRule(), oofem::ElementErrorCheckingRule::ElementErrorCheckingRule(), oofem::OOFEMTXTInputRecord::giveGroupCount(), hasChild(), oofem::GnuplotExportModule::initializeFrom(), oofem::LoadLevelErrorCheckingRule::LoadLevelErrorCheckingRule(), oofem::NodeErrorCheckingRule::NodeErrorCheckingRule(), oofem::ReactionErrorCheckingRule::ReactionErrorCheckingRule(), oofem::ErrorCheckingExportModule::readRulesFromRecords(), and oofem::XMLInputRecord::setRecId().
| DataReader * oofem::InputRecord::giveReader | ( | ) | const |
Definition at line 145 of file inputrecord.C.
References reader.
Referenced by oofem::XMLInputRecord::_reader(), finish(), oofem::OOFEMTXTInputRecord::giveLocation(), oofem::EngngModel::initializeFrom(), oofem::ErrorCheckingExportModule::initializeFrom(), and oofem::TimeStepController::initializeFrom().
|
pure virtual |
Returns string representation of record in OOFEMs text format.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
|
pure virtual |
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
|
pure virtual |
Reads the record id field (type of record).
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
|
pure virtual |
Reads the record id field (type of record) and its corresponding number.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
Referenced by oofem::StructuralFE2MaterialStatus::copyStateVariables(), oofem::Delamination::instanciateYourself(), oofem::Domain::instanciateYourself(), oofem::FractureManager::instanciateYourself(), oofem::GeometryBasedEI::instanciateYourself(), and oofem::NucleationCriterion::instanciateYourself().
|
pure virtual |
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
References giveOptionalField().
Referenced by oofem::EnrichmentItem::initializeFrom().
|
pure virtual |
Returns true if record contains field identified by idString keyword.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
Referenced by giveOptionalField(), oofem::AbaqusUserMaterial::initializeFrom(), oofem::AdditiveManufacturingProblem::initializeFrom(), oofem::BoundaryCondition::initializeFrom(), oofem::BTSigmaTerm2::initializeFrom(), oofem::ConcreteDPM::initializeFrom(), oofem::ConcreteFCMViscoElastic::initializeFrom(), oofem::ConstantPressureLoad::initializeFrom(), oofem::Delamination::initializeFrom(), oofem::DGProblem::initializeFrom(), oofem::EigenValueDynamic::initializeFrom(), oofem::EngngModel::initializeFrom(), oofem::EnrichmentItem::initializeFrom(), oofem::ErrorCheckingExportModule::initializeFrom(), oofem::Eurocode2CreepMaterial::initializeFrom(), oofem::ExportModule::initializeFrom(), oofem::FCMMaterial::initializeFrom(), oofem::FRCFCM::initializeFrom(), oofem::GnuplotExportModule::initializeFrom(), oofem::HOMExportModule::initializeFrom(), oofem::HydratingHeMoMaterial::initializeFrom(), oofem::HydratingIsoHeatMaterial::initializeFrom(), oofem::HydrationModel::initializeFrom(), oofem::IncrementalLinearStatic::initializeFrom(), oofem::InitialCondition::initializeFrom(), oofem::IntElLine1PF::initializeFrom(), oofem::IntMatBilinearCZ::initializeFrom(), oofem::IntMatBilinearCZJansson::initializeFrom(), oofem::IsotropicDamageMaterial1::initializeFrom(), oofem::LatticeCrossSection::initializeFrom(), oofem::LatticePlasticityDamageViscoelastic::initializeFrom(), oofem::LinearStability::initializeFrom(), oofem::Load::initializeFrom(), oofem::MacroLSpace::initializeFrom(), oofem::Masonry02::initializeFrom(), oofem::MatlabExportModule::initializeFrom(), oofem::MDM::initializeFrom(), oofem::MetaStep::initializeFrom(), oofem::MPMProblem::initializeFrom(), oofem::MPSDamMaterial::initializeFrom(), oofem::MPSMaterial::initializeFrom(), oofem::NlDEIDynamic::initializeFrom(), oofem::NlIsoMoistureMaterial::initializeFrom(), oofem::NonLinearDynamic::initializeFrom(), oofem::NonLinearStatic::initializeFrom(), oofem::NonlocalMaterialExtensionInterface::initializeFrom(), oofem::NonStationaryTransportProblem::initializeFrom(), oofem::NRSolver::initializeFrom(), oofem::OutputManager::initializeFrom(), oofem::PiecewiseLinFunction::initializeFrom(), oofem::PulseFunction::initializeFrom(), oofem::PythonExpression::initializeFrom(), oofem::RCSDNLMaterial::initializeFrom(), oofem::RheoChainMaterial::initializeFrom(), oofem::Set::initializeFrom(), oofem::Shell7BaseXFEM::initializeFrom(), oofem::SimpleCrossSection::initializeFrom(), oofem::SimpleTransportCrossSection::initializeFrom(), oofem::StaggeredProblem::initializeFrom(), oofem::StaticStructural::initializeFrom(), oofem::StationaryTransportProblem::initializeFrom(), oofem::StepFunction::initializeFrom(), oofem::StructuralFE2Material::initializeFrom(), oofem::StructuralInterfaceCrossSection::initializeFrom(), oofem::StructuralMaterialEvaluator::initializeFrom(), oofem::StructuralSlipFE2Material::initializeFrom(), oofem::SUPG::initializeFrom(), oofem::SurfaceTensionBoundaryCondition::initializeFrom(), oofem::TransientTransportProblem::initializeFrom(), oofem::TransportGradientDirichlet::initializeFrom(), oofem::TransportGradientNeumann::initializeFrom(), oofem::VariableCrossSection::initializeFrom(), oofem::VTKXMLExportModule::initializeFrom(), oofem::WinklerPasternakMaterial::initializeFrom(), and oofem::NonLinearStatic::updateLoadVectors().
|
pure virtual |
Print input record.
Implemented in oofem::DynamicInputRecord, oofem::OOFEMTXTInputRecord, and oofem::XMLInputRecord.
| std::shared_ptr< InputRecord > oofem::InputRecord::ptr | ( | ) |
Definition at line 150 of file inputrecord.C.
References OOFEM_ERROR.
Referenced by clone(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveRecordKeywordField(), oofem::TimeStepController::initializeFrom(), oofem::Domain::instanciateYourself(), oofem::EngngModel::instanciateYourself(), and oofem::FieldManager::instanciateYourself().
|
inline |
Definition at line 185 of file inputrecord.h.
Referenced by giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), oofem::OOFEMTXTInputRecord::giveField(), and oofem::OOFEMTXTInputRecord::hasField().
|
private |
Definition at line 99 of file inputrecord.h.
Referenced by giveReader(), and InputRecord().