OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Class representing the implementation of a dynamic data reader for in-code use. More...
#include <dynamicdatareader.h>
Public Member Functions | |
DynamicDataReader (std::string name) | |
Constructor. More... | |
virtual | ~DynamicDataReader () |
DynamicDataReader (const DynamicDataReader &src)=delete | |
DynamicDataReader & | operator= (const DynamicDataReader &src)=delete |
void | insertInputRecord (InputRecordType type, InputRecord *record) |
Main purpose of this class it the possibility to add new input records in code. More... | |
void | setOutputFileName (const std::string &outputFileName) |
Sets the output file name. More... | |
void | setDescription (const std::string &description) |
Sets the description line. More... | |
virtual InputRecord * | giveInputRecord (InputRecordType, int recordId) |
Returns input record corresponding to given InputRecordType value and its record_id. More... | |
virtual bool | peakNext (const std::string &keyword) |
Peak in advance into the record list. More... | |
virtual void | finish () |
Allows to detach all data connections. More... | |
virtual std::string | giveReferenceName () const |
Gives the reference file name (e.g. file name) More... | |
void | writeToFile (const char *fileName) |
Writes all input records to file. More... | |
Public Member Functions inherited from oofem::DataReader | |
DataReader () | |
virtual | ~DataReader () |
std::string | giveOutputFileName () |
Gives the output file name. More... | |
std::string | giveDescription () |
Gives the problem description. More... | |
void | report_error (const char *_class, const char *proc, const char *kwd, IRResultType result, const char *file, int line) |
Prints the error message. More... | |
Protected Attributes | |
std::string | name |
std::vector< std::unique_ptr< InputRecord > >::iterator | it |
Keeps track of the current position in the list. More... | |
std::vector< std::unique_ptr< InputRecord > > | recordList |
All record types will be appended to this list, no split in terms of InputRecordType is implemented yet. More... | |
Protected Attributes inherited from oofem::DataReader | |
std::string | outputFileName |
Output file name (first line in OOFEM input files). More... | |
std::string | description |
Description line (second line in OOFEM input files). More... | |
Additional Inherited Members | |
Public Types inherited from oofem::DataReader | |
enum | InputRecordType { IR_domainRec, IR_outManRec, IR_domainCompRec, IR_geometryRec, IR_gbpmRec, IR_emodelRec, IR_mstepRec, IR_expModuleRec, IR_dofmanRec, IR_elemRec, IR_crosssectRec, IR_matRec, IR_nlocBarRec, IR_bcRec, IR_icRec, IR_funcRec, IR_setRec, IR_xfemManRec, IR_enrichFuncRec, IR_geoRec, IR_enrichItemRec, IR_enrichFrontRec, IR_propagationLawRec, IR_crackNucleationRec, IR_fracManRec, IR_failCritRec, IR_contactManRec, IR_contactDefRec } |
Determines the type of input record. More... | |
Class representing the implementation of a dynamic data reader for in-code use.
Despite its name, it can also write OOFEM text-input files.
Definition at line 53 of file dynamicdatareader.h.
oofem::DynamicDataReader::DynamicDataReader | ( | std::string | name | ) |
|
virtual |
Definition at line 48 of file dynamicdatareader.C.
|
delete |
|
virtual |
Allows to detach all data connections.
Implements oofem::DataReader.
Definition at line 84 of file dynamicdatareader.C.
References recordList.
Referenced by oofem::HuertaErrorEstimator::solveRefinedElementProblem(), and oofem::HuertaErrorEstimator::solveRefinedPatchProblem().
|
virtual |
Returns input record corresponding to given InputRecordType value and its record_id.
The returned InputRecord reference is valid only until the next call.
irType | Determines type of record to be returned. |
recordId | Determines the record number corresponding to component number. |
Implements oofem::DataReader.
Definition at line 61 of file dynamicdatareader.C.
References it, and recordList.
Referenced by oofem::StructuralFE2MaterialStatus::copyStateVariables(), and oofem::XfemStructureManager::splitCracks().
|
inlinevirtual |
Gives the reference file name (e.g. file name)
Implements oofem::DataReader.
Definition at line 90 of file dynamicdatareader.h.
void oofem::DynamicDataReader::insertInputRecord | ( | InputRecordType | type, |
InputRecord * | record | ||
) |
Main purpose of this class it the possibility to add new input records in code.
The input records can be any implementation, but the intended use would be together with the DynamicInputRecord class.
type | Currently ignored, but left here for consistency with giveInputRecord |
record | New record to be added at the end. New input records have to be added in the same order as the text input files do it. |
Definition at line 53 of file dynamicdatareader.C.
References it, and recordList.
Referenced by oofem::NCPrincipalStrain::appendInputRecords(), oofem::NCPrincipalStress::appendInputRecords(), oofem::NucleationCriterion::appendInputRecords(), oofem::GeometryBasedEI::appendInputRecords(), oofem::Delamination::appendInputRecords(), oofem::HuertaErrorEstimatorInterface::setupRefinedElementProblem1D(), oofem::HuertaErrorEstimatorInterface::setupRefinedElementProblem2D(), oofem::HuertaErrorEstimatorInterface::setupRefinedElementProblem3D(), oofem::HuertaErrorEstimator::setupRefinedProblemEpilog1(), oofem::HuertaErrorEstimator::setupRefinedProblemEpilog2(), and oofem::HuertaErrorEstimator::setupRefinedProblemProlog().
|
delete |
|
virtual |
Peak in advance into the record list.
Reimplemented from oofem::DataReader.
Definition at line 74 of file dynamicdatareader.C.
References it.
|
inline |
Sets the description line.
Used for writing input files.
Definition at line 85 of file dynamicdatareader.h.
Referenced by oofem::HuertaErrorEstimator::setupRefinedProblemProlog().
|
inline |
Sets the output file name.
Used for writing input files.
Definition at line 81 of file dynamicdatareader.h.
Referenced by oofem::HuertaErrorEstimator::setupRefinedProblemProlog().
void oofem::DynamicDataReader::writeToFile | ( | const char * | fileName | ) |
Writes all input records to file.
fileName | Name of file to dump data to. |
Definition at line 90 of file dynamicdatareader.C.
References oofem::DataReader::description, oofem::DataReader::outputFileName, and recordList.
Referenced by oofem::HuertaErrorEstimator::solveRefinedElementProblem(), oofem::HuertaErrorEstimator::solveRefinedPatchProblem(), and oofem::HuertaErrorEstimator::solveRefinedWholeProblem().
|
protected |
Keeps track of the current position in the list.
Definition at line 58 of file dynamicdatareader.h.
Referenced by DynamicDataReader(), giveInputRecord(), insertInputRecord(), and peakNext().
|
protected |
Definition at line 56 of file dynamicdatareader.h.
|
protected |
All record types will be appended to this list, no split in terms of InputRecordType is implemented yet.
Definition at line 60 of file dynamicdatareader.h.
Referenced by DynamicDataReader(), finish(), giveInputRecord(), insertInputRecord(), and writeToFile().