|
OOFEM 3.0
|
#include <dynamicdatareader.h>
Public Member Functions | |
| DynamicDataReader (std ::string name) | |
| Constructor. | |
| virtual | ~DynamicDataReader () |
| DynamicDataReader (const DynamicDataReader &src)=delete | |
| DynamicDataReader & | operator= (const DynamicDataReader &src)=delete |
| void | insertInputRecord (InputRecordType type, std::unique_ptr< InputRecord > record) |
| void | setOutputFileName (const std ::string &outputFileName) |
| void | setDescription (const std ::string &description) |
| InputRecord & | giveInputRecord (InputRecordType, int recordId) override |
| bool | peekNext (const std ::string &keyword) override |
| void | finish () override |
| std::string | giveReferenceName () const override |
| Gives the reference file name (e.g. file name). | |
| void | writeToFile (const char *fileName) |
| Public Member Functions inherited from oofem::DataReader | |
| DataReader () | |
| virtual | ~DataReader () |
| virtual InputRecord * | giveTopInputRecord () |
| std::string | giveOutputFileName () |
| Gives the output file name. | |
| std::string | giveDescription () |
| Gives the problem description. | |
| virtual bool | hasFlattenedStructure () |
| virtual void | enterGroup (const std::string &name) |
| virtual void | leaveGroup (const std::string &name) |
| virtual void | enterRecord (InputRecord *rec) |
| virtual void | leaveRecord (InputRecord *rec) |
| virtual int | giveGroupCount (const std::string &name) |
| bool | hasGroup (const std::string &name) |
| Predicate whether a named group exists (it can still be empty). | |
| GroupRecords | giveGroupRecords (const std::shared_ptr< InputRecord > &ir, InputFieldType ift, const std::string &name, InputRecordType irType, bool optional) |
| GroupRecords | giveGroupRecords (const std::string &name, InputRecordType irType, int numRequired=-1) |
| InputRecord * | giveChildRecord (const std::shared_ptr< InputRecord > &ir, InputFieldType ift, const std::string &name, InputRecordType irType, bool optional) |
| Return pointer to subrecord of given type (must be exactly one); if not present, returns nullptr. | |
Protected Attributes | |
| std::string | name |
| std::vector< std::unique_ptr< InputRecord > >::iterator | it |
| Keeps track of the current position in the list. | |
| 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. | |
| Protected Attributes inherited from oofem::DataReader | |
| std::string | outputFileName |
| Output file name (first line in OOFEM input files). | |
| std::string | description |
| Description line (second line in OOFEM input files). | |
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_contactSurfaceRec , IR_fieldRec , IR_mpmVarRec , IR_mpmTermRec , IR_mpmIntegralRec , IR_unspecified } |
| Determines the type of input record. More... | |
| Static Public Attributes inherited from oofem::DataReader | |
| static constexpr const char * | InputRecordTags [] |
| static const int | NoSuchGroup =-1 |
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 | ) |
Constructor.
Definition at line 43 of file dynamicdatareader.C.
References oofem::DataReader::DataReader(), it, name, and recordList.
Referenced by DynamicDataReader(), and operator=().
|
virtual |
Definition at line 48 of file dynamicdatareader.C.
|
delete |
References DynamicDataReader().
|
overridevirtual |
Allows to detach all data connections.
Implements oofem::DataReader.
Definition at line 84 of file dynamicdatareader.C.
References recordList.
|
overridevirtual |
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().
|
inlineoverridevirtual |
Gives the reference file name (e.g. file name).
Implements oofem::DataReader.
Definition at line 90 of file dynamicdatareader.h.
References name.
| void oofem::DynamicDataReader::insertInputRecord | ( | InputRecordType | type, |
| std::unique_ptr< 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::Delamination::appendInputRecords(), oofem::GeometryBasedEI::appendInputRecords(), oofem::NCPrincipalStrain::appendInputRecords(), oofem::NCPrincipalStress::appendInputRecords(), oofem::NucleationCriterion::appendInputRecords(), and operator=().
|
delete |
References DynamicDataReader(), and insertInputRecord().
|
overridevirtual |
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.
References oofem::DataReader::description.
|
inline |
Sets the output file name. Used for writing input files.
Definition at line 81 of file dynamicdatareader.h.
References oofem::DataReader::outputFileName.
| 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.
|
protected |
Keeps track of the current position in the list.
Definition at line 58 of file dynamicdatareader.h.
Referenced by DynamicDataReader(), giveInputRecord(), insertInputRecord(), and peekNext().
|
protected |
Definition at line 56 of file dynamicdatareader.h.
Referenced by DynamicDataReader(), and giveReferenceName().
|
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().