OOFEM 3.0
Loading...
Searching...
No Matches
oofem::DynamicInputRecord Class Reference

#include <dynamicinputrecord.h>

Inheritance diagram for oofem::DynamicInputRecord:
Collaboration diagram for oofem::DynamicInputRecord:

Public Member Functions

 DynamicInputRecord (std ::string answer="", int value=0)
 Creates an empty input record.
 DynamicInputRecord (FEMComponent &femc)
 Extracts input record from given component.
 DynamicInputRecord (const DynamicInputRecord &)
 Copy constructor.
virtual ~DynamicInputRecord ()
 Destructor.
DynamicInputRecordoperator= (const DynamicInputRecord &)
 Assignment operator.
std::shared_ptr< InputRecordclone () const override
void finish (bool wrn=true) override
 Terminates the current record session and if the flag is true, warning is printed for unscanned tokens.
std::string giveRecordAsString () const override
 Returns string representation of record in OOFEMs text format.
std::string giveRecordInTXTFormat () const override
std::string giveLocation () const override
void giveRecordKeywordField (std ::string &answer, int &value) override
 Reads the record id field (type of record) and its corresponding number.
void giveRecordKeywordField (std ::string &answer) override
 Reads the record id field (type of record).
void giveField (int &answer, InputFieldType id) override
 Reads the integer field value.
void giveField (double &answer, InputFieldType id) override
 Reads the double field value.
void giveField (bool &answer, InputFieldType id) override
 Reads the bool field value.
void giveField (std ::string &answer, InputFieldType id) override
 Reads the string field value.
void giveField (FloatArray &answer, InputFieldType id) override
 Reads the FloatArray field value.
void giveField (IntArray &answer, InputFieldType id) override
 Reads the IntArray field value.
void giveField (FloatMatrix &answer, InputFieldType id) override
 Reads the FloatMatrix field value.
void giveField (std ::vector< std ::string > &answer, InputFieldType id) override
 Reads the vector of strings.
void giveField (Dictionary &answer, InputFieldType id) override
 Reads the Dictionary field value.
void giveField (std ::list< Range > &answer, InputFieldType id) override
 Reads the std::list<Range> field value.
void giveField (ScalarFunction &function, InputFieldType id) override
 Reads the ScalarFunction field value.
int giveGroupCount (InputFieldType id, const std::string &name, bool optional) override
bool hasChild (InputFieldType id, const std::string &name, bool optional) override
bool hasField (InputFieldType id) override
 Returns true if record contains field identified by idString keyword.
void printYourself () override
 Print input record.
void setRecordKeywordField (std ::string keyword, int number)
void setRecordKeywordNumber (int number)
void setField (int item, InputFieldType id)
void setField (double item, InputFieldType id)
void setField (bool item, InputFieldType id)
void setField (std ::string item, InputFieldType id)
void setField (FloatArray item, InputFieldType id)
void setField (IntArray item, InputFieldType id)
void setField (FloatMatrix item, InputFieldType id)
void setField (std ::vector< std ::string > item, InputFieldType id)
void setField (const Dictionary &item, InputFieldType id)
void setField (const std ::list< Range > &item, InputFieldType id)
void setField (const ScalarFunction &function, InputFieldType id)
void setField (InputFieldType id)
 Sets an empty field with given id.
void unsetField (InputFieldType id)
 Removes given field from record.
Public Member Functions inherited from oofem::InputRecord
 InputRecord ()
 InputRecord (DataReader *reader_)
virtual ~InputRecord ()=default
 Destructor.
std::shared_ptr< InputRecordptr ()
template<typename T>
void giveOptionalField (T &answer, InputFieldType id)
DataReadergiveReader () const
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

Protected Attributes

std::string recordKeyword
int recordNumber
std ::set< std ::string > emptyRecord
 Fields without values.
std ::map< std ::string, int > intRecord
std ::map< std ::string, double > doubleRecord
std ::map< std ::string, bool > boolRecord
std ::map< std ::string, std ::string > stringRecord
std ::map< std ::string, FloatArrayfloatArrayRecord
std ::map< std ::string, IntArrayintArrayRecord
std ::map< std ::string, FloatMatrixmatrixRecord
std ::map< std ::string, std ::vector< std ::string > > stringListRecord
std ::map< std ::string, DictionarydictionaryRecord
std ::map< std ::string, std ::list< Range > > rangeRecord
std ::map< std ::string, ScalarFunctionscalarFunctionRecord

Additional Inherited Members

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)

Detailed Description

Class representing the a dynamic Input Record. The input record is represented as a list of fields. This is intended for internal usage, where new input records and such are created dynamically.

Author
Mikael Öhman

Definition at line 59 of file dynamicinputrecord.h.

Constructor & Destructor Documentation

◆ DynamicInputRecord() [1/3]

oofem::DynamicInputRecord::DynamicInputRecord ( std ::string answer = "",
int value = 0 )

◆ DynamicInputRecord() [2/3]

oofem::DynamicInputRecord::DynamicInputRecord ( FEMComponent & femc)

◆ DynamicInputRecord() [3/3]

oofem::DynamicInputRecord::DynamicInputRecord ( const DynamicInputRecord & src)

◆ ~DynamicInputRecord()

oofem::DynamicInputRecord::~DynamicInputRecord ( )
virtual

Destructor.

Definition at line 118 of file dynamicinputrecord.C.

Member Function Documentation

◆ clone()

std::shared_ptr< InputRecord > oofem::DynamicInputRecord::clone ( ) const
inlineoverridevirtual

Creates a newly allocated copy of the receiver

Implements oofem::InputRecord.

Definition at line 90 of file dynamicinputrecord.h.

◆ finish()

void oofem::DynamicInputRecord::finish ( bool wrn = true)
overridevirtual

Terminates the current record session and if the flag is true, warning is printed for unscanned tokens.

Todo
Implement warning about unread entries

Implements oofem::InputRecord.

Definition at line 150 of file dynamicinputrecord.C.

◆ giveField() [1/11]

void oofem::DynamicInputRecord::giveField ( bool & answer,
InputFieldType id )
overridevirtual

Reads the bool field value.

Implements oofem::InputRecord.

Definition at line 189 of file dynamicinputrecord.C.

References boolRecord, and recordNumber.

◆ giveField() [2/11]

void oofem::DynamicInputRecord::giveField ( Dictionary & answer,
InputFieldType id )
overridevirtual

Reads the Dictionary field value.

Implements oofem::InputRecord.

Definition at line 243 of file dynamicinputrecord.C.

References dictionaryRecord, and recordNumber.

◆ giveField() [3/11]

void oofem::DynamicInputRecord::giveField ( double & answer,
InputFieldType id )
overridevirtual

Reads the double field value.

Implements oofem::InputRecord.

Definition at line 175 of file dynamicinputrecord.C.

References doubleRecord, intRecord, and recordNumber.

◆ giveField() [4/11]

void oofem::DynamicInputRecord::giveField ( FloatArray & answer,
InputFieldType id )
overridevirtual

Reads the FloatArray field value.

Implements oofem::InputRecord.

Definition at line 207 of file dynamicinputrecord.C.

References floatArrayRecord, and recordNumber.

◆ giveField() [5/11]

void oofem::DynamicInputRecord::giveField ( FloatMatrix & answer,
InputFieldType id )
overridevirtual

Reads the FloatMatrix field value.

Implements oofem::InputRecord.

Definition at line 225 of file dynamicinputrecord.C.

References matrixRecord, and recordNumber.

◆ giveField() [6/11]

void oofem::DynamicInputRecord::giveField ( int & answer,
InputFieldType id )
overridevirtual

Reads the integer field value.

Implements oofem::InputRecord.

Definition at line 166 of file dynamicinputrecord.C.

References intRecord, and recordNumber.

◆ giveField() [7/11]

void oofem::DynamicInputRecord::giveField ( IntArray & answer,
InputFieldType id )
overridevirtual

Reads the IntArray field value.

Implements oofem::InputRecord.

Definition at line 216 of file dynamicinputrecord.C.

References intArrayRecord, and recordNumber.

◆ giveField() [8/11]

void oofem::DynamicInputRecord::giveField ( ScalarFunction & function,
InputFieldType id )
overridevirtual

Reads the ScalarFunction field value.

Implements oofem::InputRecord.

Definition at line 261 of file dynamicinputrecord.C.

References recordNumber, and scalarFunctionRecord.

◆ giveField() [9/11]

void oofem::DynamicInputRecord::giveField ( std ::list< Range > & answer,
InputFieldType id )
overridevirtual

Reads the std::list<Range> field value.

Implements oofem::InputRecord.

Definition at line 252 of file dynamicinputrecord.C.

References rangeRecord, and recordNumber.

◆ giveField() [10/11]

void oofem::DynamicInputRecord::giveField ( std ::string & answer,
InputFieldType id )
overridevirtual

Reads the string field value.

Implements oofem::InputRecord.

Definition at line 198 of file dynamicinputrecord.C.

References recordNumber, and stringRecord.

◆ giveField() [11/11]

void oofem::DynamicInputRecord::giveField ( std ::vector< std ::string > & answer,
InputFieldType id )
overridevirtual

Reads the vector of strings.

Implements oofem::InputRecord.

Definition at line 234 of file dynamicinputrecord.C.

References recordNumber, and stringListRecord.

◆ giveGroupCount()

int oofem::DynamicInputRecord::giveGroupCount ( InputFieldType id,
const std::string & name,
bool optional )
overridevirtual

Implements oofem::InputRecord.

Definition at line 141 of file dynamicinputrecord.C.

References OOFEM_ERROR.

◆ giveLocation()

std::string oofem::DynamicInputRecord::giveLocation ( ) const
overridevirtual

Implements oofem::InputRecord.

Definition at line 386 of file dynamicinputrecord.C.

◆ giveRecordAsString()

std::string oofem::DynamicInputRecord::giveRecordAsString ( ) const
inlineoverridevirtual

Returns string representation of record in OOFEMs text format.

Implements oofem::InputRecord.

Definition at line 93 of file dynamicinputrecord.h.

References giveRecordInTXTFormat().

Referenced by oofem::Subdivision::createMesh().

◆ giveRecordInTXTFormat()

◆ giveRecordKeywordField() [1/2]

void oofem::DynamicInputRecord::giveRecordKeywordField ( std ::string & answer)
overridevirtual

Reads the record id field (type of record).

Implements oofem::InputRecord.

Definition at line 161 of file dynamicinputrecord.C.

References recordKeyword.

◆ giveRecordKeywordField() [2/2]

void oofem::DynamicInputRecord::giveRecordKeywordField ( std ::string & answer,
int & value )
overridevirtual

Reads the record id field (type of record) and its corresponding number.

Implements oofem::InputRecord.

Definition at line 155 of file dynamicinputrecord.C.

References recordKeyword, and recordNumber.

Referenced by oofem::Subdivision::createMesh(), and oofem::T3DInterface::t3d_2_OOFEM().

◆ hasChild()

bool oofem::DynamicInputRecord::hasChild ( InputFieldType id,
const std::string & name,
bool optional )
overridevirtual

Implements oofem::InputRecord.

Definition at line 145 of file dynamicinputrecord.C.

References OOFEM_ERROR.

◆ hasField()

bool oofem::DynamicInputRecord::hasField ( InputFieldType id)
overridevirtual

Returns true if record contains field identified by idString keyword.

Implements oofem::InputRecord.

Definition at line 270 of file dynamicinputrecord.C.

References boolRecord, dictionaryRecord, doubleRecord, emptyRecord, floatArrayRecord, intArrayRecord, intRecord, matrixRecord, rangeRecord, and stringListRecord.

◆ operator=()

◆ printYourself()

void oofem::DynamicInputRecord::printYourself ( )
overridevirtual

Print input record.

Implements oofem::InputRecord.

Definition at line 285 of file dynamicinputrecord.C.

◆ setField() [1/12]

void oofem::DynamicInputRecord::setField ( bool item,
InputFieldType id )

Definition at line 312 of file dynamicinputrecord.C.

References boolRecord.

◆ setField() [2/12]

void oofem::DynamicInputRecord::setField ( const Dictionary & item,
InputFieldType id )

Definition at line 342 of file dynamicinputrecord.C.

References dictionaryRecord.

◆ setField() [3/12]

void oofem::DynamicInputRecord::setField ( const ScalarFunction & function,
InputFieldType id )

Definition at line 352 of file dynamicinputrecord.C.

References scalarFunctionRecord.

◆ setField() [4/12]

void oofem::DynamicInputRecord::setField ( const std ::list< Range > & item,
InputFieldType id )

Definition at line 347 of file dynamicinputrecord.C.

References rangeRecord.

◆ setField() [5/12]

void oofem::DynamicInputRecord::setField ( double item,
InputFieldType id )

Definition at line 307 of file dynamicinputrecord.C.

References doubleRecord.

◆ setField() [6/12]

void oofem::DynamicInputRecord::setField ( FloatArray item,
InputFieldType id )

Definition at line 322 of file dynamicinputrecord.C.

References floatArrayRecord.

◆ setField() [7/12]

void oofem::DynamicInputRecord::setField ( FloatMatrix item,
InputFieldType id )

Definition at line 332 of file dynamicinputrecord.C.

References matrixRecord.

◆ setField() [8/12]

void oofem::DynamicInputRecord::setField ( InputFieldType id)

Sets an empty field with given id.

Definition at line 357 of file dynamicinputrecord.C.

References emptyRecord.

◆ setField() [9/12]

void oofem::DynamicInputRecord::setField ( int item,
InputFieldType id )

Definition at line 302 of file dynamicinputrecord.C.

References intRecord.

Referenced by oofem::AdditiveManufacturingProblem::add_element_if_not_exists2(), oofem::AdditiveManufacturingProblem::add_node_if_not_exists2(), oofem::AdditiveManufacturingProblem::add_sm_element_if_not_exists2(), oofem::AdditiveManufacturingProblem::add_sm_node_if_not_exists2(), oofem::Quasicontinuum::addCrosssectionToInterpolationElements(), oofem::Quasicontinuum::applyApproach1(), oofem::Quasicontinuum::applyApproach2(), oofem::Quasicontinuum::applyApproach3(), oofem::MacroLSpace::changeMicroBoundaryConditions(), oofem::Quasicontinuum::createInterpolationElements(), oofem::Subdivision::createMesh(), oofem::XfemStructuralElementInterface::giveCZInputRecord(), oofem::AbaqusUserElement::giveInputRecord(), oofem::AbaqusUserMaterial::giveInputRecord(), oofem::AnisotropicDamageMaterial::giveInputRecord(), oofem::AnisotropicLinearElasticMaterial::giveInputRecord(), oofem::BinghamFluidMaterial2::giveInputRecord(), oofem::BondCEBMaterial::giveInputRecord(), oofem::BoundaryCondition::giveInputRecord(), oofem::BoundaryLoad::giveInputRecord(), oofem::CalculatorFunction::giveInputRecord(), oofem::CBSElement::giveInputRecord(), oofem::CebFipSlip90Material::giveInputRecord(), oofem::CohesiveInterfaceMaterial::giveInputRecord(), oofem::ConstantFunction::giveInputRecord(), oofem::ConstantPressureLoad::giveInputRecord(), oofem::ConstantSurfaceLoad::giveInputRecord(), oofem::CrossSection::giveInputRecord(), oofem::DofManager::giveInputRecord(), oofem::DummyCrossSection::giveInputRecord(), oofem::Element::giveInputRecord(), oofem::EnrFrontIntersection::giveInputRecord(), oofem::EnrFrontLinearBranchFuncRadius::giveInputRecord(), oofem::FE2FluidMaterial::giveInputRecord(), oofem::FluidCrossSection::giveInputRecord(), oofem::FreeConstantSurfaceLoad::giveInputRecord(), oofem::GeneralBoundaryCondition::giveInputRecord(), oofem::HeavisideTimeFunction::giveInputRecord(), oofem::IntMatBilinearCZ::giveInputRecord(), oofem::IntMatBilinearCZElastic::giveInputRecord(), oofem::IntMatBilinearCZFagerstrom::giveInputRecord(), oofem::IntMatBilinearCZFagerstromRate::giveInputRecord(), oofem::IntMatCoulombContact::giveInputRecord(), oofem::IntMatElastic::giveInputRecord(), oofem::IntMatIsoDamage::giveInputRecord(), oofem::IntMatIsoDamageTable::giveInputRecord(), oofem::IntMatPhaseField::giveInputRecord(), oofem::IsoInterfaceDamageMaterial::giveInputRecord(), oofem::IsoInterfaceDamageMaterial_2::giveInputRecord(), oofem::IsotropicAsymmetric1DMaterial::giveInputRecord(), oofem::IsotropicDamageMaterial1::giveInputRecord(), oofem::IsotropicDamageMaterial::giveInputRecord(), oofem::IsotropicLinearElasticMaterial::giveInputRecord(), oofem::J2plasticMaterial::giveInputRecord(), oofem::LayeredCrossSection::giveInputRecord(), oofem::LEPlic::giveInputRecord(), oofem::LinearEdgeLoad::giveInputRecord(), oofem::LinearElasticMaterial::giveInputRecord(), oofem::Load::giveInputRecord(), oofem::Material::giveInputRecord(), oofem::MDM::giveInputRecord(), oofem::MicroplaneMaterial::giveInputRecord(), oofem::MisesMatNl::giveInputRecord(), oofem::MixedGradientPressureDirichlet::giveInputRecord(), oofem::MixedGradientPressureNeumann::giveInputRecord(), oofem::MixedGradientPressureWeakPeriodic::giveInputRecord(), oofem::MMALeastSquareProjection::giveInputRecord(), oofem::NewtonianFluidMaterial::giveInputRecord(), oofem::NLStructuralElement::giveInputRecord(), oofem::NodalLoad::giveInputRecord(), oofem::Node::giveInputRecord(), oofem::NonlinearFluidMaterial::giveInputRecord(), oofem::NonlocalMaterialExtensionInterface::giveInputRecord(), oofem::OrthotropicLinearElasticMaterial::giveInputRecord(), oofem::PeriodicPiecewiseLinFunction::giveInputRecord(), oofem::PiecewiseLinFunction::giveInputRecord(), oofem::PLCrackPrescribedDir::giveInputRecord(), oofem::PLCZdamageRadius::giveInputRecord(), oofem::PLHoopStressCirc::giveInputRecord(), oofem::PLMaterialForce::giveInputRecord(), oofem::PLnodeRadius::giveInputRecord(), oofem::PLPrincipalStrain::giveInputRecord(), oofem::PointLoad::giveInputRecord(), oofem::PolygonLine::giveInputRecord(), oofem::PrescribedDispSlipBCNeumannRC::giveInputRecord(), oofem::PrescribedDispSlipHomogenization::giveInputRecord(), oofem::PrescribedDispSlipMultiple::giveInputRecord(), oofem::PrescribedGenStrainShell7::giveInputRecord(), oofem::PrescribedGradientBCPeriodic::giveInputRecord(), oofem::PrescribedGradientBCWeak::giveInputRecord(), oofem::PrescribedGradientHomogenization::giveInputRecord(), oofem::PrescribedGradientMultiple::giveInputRecord(), oofem::PythonExpression::giveInputRecord(), oofem::QTrPlaneStress2dXFEM::giveInputRecord(), oofem::RandomMaterialExtensionInterface::giveInputRecord(), oofem::RotatingBoundary::giveInputRecord(), oofem::Set::giveInputRecord(), oofem::SimpleCrossSection::giveInputRecord(), oofem::SimpleInterfaceMaterial::giveInputRecord(), oofem::SimpleTransportCrossSection::giveInputRecord(), oofem::SimpleVitrificationMaterial::giveInputRecord(), oofem::StepFunction::giveInputRecord(), oofem::StructuralFE2Material::giveInputRecord(), oofem::StructuralMaterial::giveInputRecord(), oofem::StructuralPythonMaterial::giveInputRecord(), oofem::StructuralSlipFE2Material::giveInputRecord(), oofem::SUPGElement::giveInputRecord(), oofem::TR1_2D_CBS::giveInputRecord(), oofem::TR1_2D_SUPG2::giveInputRecord(), oofem::TR1_2D_SUPG2_AXI::giveInputRecord(), oofem::TR1_2D_SUPG::giveInputRecord(), oofem::TrabBoneNL3D::giveInputRecord(), oofem::TrabBoneNL::giveInputRecord(), oofem::TrabBoneNLEmbed::giveInputRecord(), oofem::TransportGradientDirichlet::giveInputRecord(), oofem::TransportGradientNeumann::giveInputRecord(), oofem::TransportGradientPeriodic::giveInputRecord(), oofem::TrPlaneStress2dXFEM::giveInputRecord(), oofem::TutorialMaterial::giveInputRecord(), oofem::TwoFluidMaterial::giveInputRecord(), oofem::UserDefDirichletBC::giveInputRecord(), oofem::UsrDefBoundaryLoad::giveInputRecord(), oofem::VariableCrossSection::giveInputRecord(), oofem::WinklerMaterial::giveInputRecord(), oofem::WinklerPasternakMaterial::giveInputRecord(), oofem::XfemManager::giveInputRecord(), oofem::XfemStructureManager::giveInputRecord(), oofem::SolutionbasedShapeFunction::setBoundaryConditionOnDof(), and oofem::SolutionbasedShapeFunction::setLoads().

◆ setField() [10/12]

void oofem::DynamicInputRecord::setField ( IntArray item,
InputFieldType id )

Definition at line 327 of file dynamicinputrecord.C.

References intArrayRecord.

◆ setField() [11/12]

void oofem::DynamicInputRecord::setField ( std ::string item,
InputFieldType id )

Definition at line 317 of file dynamicinputrecord.C.

References stringRecord.

◆ setField() [12/12]

void oofem::DynamicInputRecord::setField ( std ::vector< std ::string > item,
InputFieldType id )

Definition at line 337 of file dynamicinputrecord.C.

References stringListRecord.

◆ setRecordKeywordField()

◆ setRecordKeywordNumber()

void oofem::DynamicInputRecord::setRecordKeywordNumber ( int number)

Definition at line 297 of file dynamicinputrecord.C.

References recordNumber.

◆ unsetField()

void oofem::DynamicInputRecord::unsetField ( InputFieldType id)

Member Data Documentation

◆ boolRecord

std :: map< std :: string, bool > oofem::DynamicInputRecord::boolRecord
protected

◆ dictionaryRecord

std :: map< std :: string, Dictionary > oofem::DynamicInputRecord::dictionaryRecord
protected

◆ doubleRecord

std :: map< std :: string, double > oofem::DynamicInputRecord::doubleRecord
protected

◆ emptyRecord

std :: set< std :: string > oofem::DynamicInputRecord::emptyRecord
protected

◆ floatArrayRecord

std :: map< std :: string, FloatArray > oofem::DynamicInputRecord::floatArrayRecord
protected

◆ intArrayRecord

std :: map< std :: string, IntArray > oofem::DynamicInputRecord::intArrayRecord
protected

◆ intRecord

std :: map< std :: string, int > oofem::DynamicInputRecord::intRecord
protected

◆ matrixRecord

std :: map< std :: string, FloatMatrix > oofem::DynamicInputRecord::matrixRecord
protected

◆ rangeRecord

std :: map< std :: string, std :: list< Range > > oofem::DynamicInputRecord::rangeRecord
protected

◆ recordKeyword

std::string oofem::DynamicInputRecord::recordKeyword
protected

◆ recordNumber

◆ scalarFunctionRecord

std :: map< std :: string, ScalarFunction > oofem::DynamicInputRecord::scalarFunctionRecord
protected

Definition at line 76 of file dynamicinputrecord.h.

Referenced by giveField(), giveRecordInTXTFormat(), setField(), and unsetField().

◆ stringListRecord

std :: map< std :: string, std :: vector< std :: string > > oofem::DynamicInputRecord::stringListRecord
protected

◆ stringRecord

std :: map< std :: string, std :: string > oofem::DynamicInputRecord::stringRecord
protected

The documentation for this class was generated from the following files:

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011