OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::InputRecord Class Referenceabstract

Class representing the general Input Record. More...

#include <inputrecord.h>

+ Inheritance diagram for oofem::InputRecord:

Public Member Functions

 InputRecord ()
 Constructor. Creates an empty input record. More...
 
 InputRecord (const InputRecord &)
 Copy constructor. More...
 
virtual ~InputRecord ()
 Destructor. More...
 
InputRecordoperator= (const InputRecord &)
 Assignment operator. More...
 
virtual InputRecordGiveCopy ()=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

Parameters
answercontains result
idStringfield keyword
Returns
IRResultType
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

Parameters
answercontains result
idStringfield keyword
Returns
IRResultType
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...
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

virtual oofem::InputRecord::~InputRecord ( )
inlinevirtual

Destructor.

Definition at line 109 of file inputrecord.h.

Member Function Documentation

virtual void oofem::InputRecord::finish ( bool  wrn = true)
pure virtual
virtual InputRecord* oofem::InputRecord::GiveCopy ( )
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().

virtual IRResultType oofem::InputRecord::giveField ( int &  answer,
InputFieldType  id 
)
pure virtual

Reads the integer field value.

Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.

Referenced by giveOptionalField().

virtual IRResultType oofem::InputRecord::giveField ( double &  answer,
InputFieldType  id 
)
pure virtual

Reads the double field value.

Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.

virtual IRResultType oofem::InputRecord::giveField ( bool &  answer,
InputFieldType  id 
)
pure virtual

Reads the bool field value.

Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.

virtual IRResultType oofem::InputRecord::giveField ( std::string &  answer,
InputFieldType  id 
)
pure virtual

Reads the string field value.

Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.

virtual IRResultType oofem::InputRecord::giveField ( FloatArray answer,
InputFieldType  id 
)
pure virtual

Reads the FloatArray field value.

Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.

virtual IRResultType oofem::InputRecord::giveField ( IntArray answer,
InputFieldType  id 
)
pure virtual

Reads the IntArray field value.

Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.

virtual IRResultType oofem::InputRecord::giveField ( FloatMatrix answer,
InputFieldType  id 
)
pure virtual

Reads the FloatMatrix field value.

Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.

virtual IRResultType oofem::InputRecord::giveField ( std::vector< std::string > &  answer,
InputFieldType  id 
)
pure virtual

Reads the vector of strings.

Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.

virtual IRResultType oofem::InputRecord::giveField ( Dictionary answer,
InputFieldType  id 
)
pure virtual

Reads the Dictionary field value.

Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.

virtual IRResultType oofem::InputRecord::giveField ( std::list< Range > &  answer,
InputFieldType  id 
)
pure virtual

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

Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.

virtual IRResultType oofem::InputRecord::giveField ( ScalarFunction function,
InputFieldType  id 
)
pure virtual

Reads the ScalarFunction field value.

Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.

IRResultType oofem::InputRecord::giveOptionalField ( int &  answer,
InputFieldType  id 
)
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.

virtual std :: string oofem::InputRecord::giveRecordAsString ( ) const
pure virtual

Returns string representation of record in OOFEMs text format.

Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.

virtual IRResultType oofem::InputRecord::giveRecordKeywordField ( std::string &  answer)
pure virtual

Reads the record id field (type of record).

Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.

virtual bool oofem::InputRecord::hasField ( InputFieldType  id)
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.

virtual void oofem::InputRecord::printYourself ( )
pure virtual

Print input record.

Implemented in oofem::DynamicInputRecord, and oofem::OOFEMTXTInputRecord.

virtual void oofem::InputRecord::report_error ( const char *  _class,
const char *  proc,
InputFieldType  id,
IRResultType  result,
const char *  file,
int  line 
)
pure virtual
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().


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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:36 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011