OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Represents export output module - a base class for all output modules. More...
#include <exportmodule.h>
Public Member Functions | |
ExportModule (int n, EngngModel *e) | |
Constructor. Creates empty Output Manager with number n. More... | |
virtual | ~ExportModule () |
Destructor. More... | |
virtual IRResultType | initializeFrom (InputRecord *ir) |
Initializes receiver according to object description stored in input record. More... | |
virtual void | doOutput (TimeStep *tStep, bool forcedOutput=false)=0 |
Writes the output. More... | |
void | doForcedOutput (TimeStep *tStep) |
Writes the output. More... | |
bool | testSubStepOutput () |
Initializes receiver. More... | |
virtual void | initialize () |
virtual void | initializeElementSet () |
Fill regionSets with all elements if regionSets is initially empty. More... | |
virtual void | terminate () |
Terminates the receiver. More... | |
virtual const char * | giveClassName () const =0 |
Returns class name of the receiver. More... | |
Protected Member Functions | |
int | giveNumberOfRegions () |
Returns number of regions (aka regionSets) More... | |
Set * | giveRegionSet (int i) |
Returns element set. More... | |
std::string | giveOutputBaseFileName (TimeStep *tStep) |
Gives the appropriate name (minus specific file extension). More... | |
bool | testTimeStepOutput (TimeStep *tStep) |
Tests if given time step output is required. More... | |
bool | testDomainOutput (int n) |
Test if domain output is required. More... | |
std::string | errorInfo (const char *func) const |
Returns string for prepending output (used by error reporting macros). More... | |
Protected Attributes | |
int | number |
Component number. More... | |
EngngModel * | emodel |
Problem pointer. More... | |
bool | tstep_all_out_flag |
Indicates all steps selection. More... | |
int | tstep_step_out |
User timeStep Output step. Indicates every tstep_step_out-th step selected. More... | |
std::list< Range > | tsteps_out |
List of user selected step numbers. More... | |
bool | tstep_substeps_out_flag |
Flag turning output in solution step substeps/itarations. More... | |
bool | domain_all_flag |
Indicates all domains. More... | |
IntArray | domainMask |
Domain selection mask. More... | |
IntArray | regionSets |
regions represented by sets More... | |
double | timeScale |
Scaling time in output, e.g. conversion from seconds to hours. More... | |
Set | defaultElementSet |
Default region set. More... | |
Represents export output module - a base class for all output modules.
ExportModule is an abstraction for module performing some specific kind of output. The modules can declare necessary component services using the interface concept. The basic class declares the basic services (the general interface) and implements the services intended to filter output to certain time steps. The output modules are maintained by ExportModuleManager. The output for given time step is done only if this step is selected by one of above described method.
Definition at line 71 of file exportmodule.h.
oofem::ExportModule::ExportModule | ( | int | n, |
EngngModel * | e | ||
) |
Constructor. Creates empty Output Manager with number n.
Definition at line 44 of file exportmodule.C.
References emodel, number, regionSets, oofem::IntArray::resize(), and timeScale.
|
virtual |
Destructor.
Definition at line 53 of file exportmodule.C.
|
inline |
Writes the output.
Abstract service.
tStep | time step. |
Definition at line 130 of file exportmodule.h.
|
pure virtual |
Writes the output.
Abstract service.
tStep | Time step. |
forcedOutput | If true, no testTimeStepOutput should be done. |
Implemented in oofem::ErrorCheckingExportModule, oofem::VTKXMLExportModule, oofem::MatlabExportModule, oofem::VTKExportModule, oofem::POIExportModule, oofem::GnuplotExportModule, oofem::OutputExportModule, oofem::HOMExportModule, oofem::GPExportModule, oofem::CrackExportModule, and oofem::DofManExportModule.
|
protected |
Returns string for prepending output (used by error reporting macros).
Definition at line 181 of file exportmodule.C.
References giveClassName().
|
pure virtual |
Returns class name of the receiver.
Implemented in oofem::ErrorCheckingExportModule, oofem::VTKXMLExportModule, oofem::MatlabExportModule, oofem::VTKExportModule, oofem::POIExportModule, oofem::GnuplotExportModule, oofem::OutputExportModule, oofem::HOMExportModule, oofem::GPExportModule, oofem::CrackExportModule, and oofem::DofManExportModule.
Referenced by errorInfo().
|
protected |
Returns number of regions (aka regionSets)
Definition at line 100 of file exportmodule.C.
References oofem::IntArray::giveSize(), oofem::IntArray::isEmpty(), and regionSets.
Referenced by oofem::HOMExportModule::doOutput(), oofem::VTKXMLExportModule::doOutput(), and oofem::VTKXMLExportModule::exportIntVarsInGpAs().
|
protected |
Gives the appropriate name (minus specific file extension).
tStep | Active time step. |
Definition at line 125 of file exportmodule.C.
References emodel, oofem::TimeStep::giveNumber(), oofem::EngngModel::giveNumberOfProcesses(), oofem::EngngModel::giveOutputBaseFileName(), oofem::EngngModel::giveRank(), oofem::TimeStep::giveSubStepNumber(), oofem::EngngModel::isParallel(), number, and testSubStepOutput().
Referenced by oofem::CrackExportModule::doOutput(), oofem::VTKXMLExportModule::doOutput(), oofem::VTKXMLExportModule::exportIntVarsInGpAs(), oofem::VTKXMLExportModule::giveOutputFileName(), oofem::DofManExportModule::giveOutputStream(), oofem::GPExportModule::giveOutputStream(), oofem::POIExportModule::giveOutputStream(), and oofem::VTKExportModule::giveOutputStream().
|
protected |
Returns element set.
Definition at line 109 of file exportmodule.C.
References oofem::IntArray::at(), defaultElementSet, emodel, oofem::EngngModel::giveDomain(), oofem::Domain::giveSet(), oofem::IntArray::isEmpty(), OOFEM_ERROR, and regionSets.
Referenced by oofem::HOMExportModule::doOutput(), oofem::VTKXMLExportModule::doOutput(), oofem::VTKXMLExportModule::exportIntVarsInGpAs(), oofem::VTKXMLExportModule::getNodalVariableFromIS(), oofem::VTKXMLExportModule::getNodalVariableFromPrimaryField(), oofem::QuasicontinuumVTKXMLExportModule::initRegionNodeNumbering(), oofem::VTKXMLExportModule::initRegionNodeNumbering(), oofem::QuasicontinuumVTKXMLExportModule::setupVTKPiece(), and oofem::VTKXMLExportModule::setupVTKPiece().
|
virtual |
Reimplemented in oofem::VTKXMLExportModule, oofem::MatlabExportModule, oofem::VTKExportModule, oofem::POIExportModule, oofem::GnuplotExportModule, oofem::HOMExportModule, oofem::GPExportModule, and oofem::CrackExportModule.
Definition at line 86 of file exportmodule.C.
References initializeElementSet().
Referenced by oofem::CrackExportModule::initialize(), oofem::GPExportModule::initialize(), oofem::HOMExportModule::initialize(), oofem::GnuplotExportModule::initialize(), oofem::POIExportModule::initialize(), oofem::VTKExportModule::initialize(), oofem::MatlabExportModule::initialize(), and oofem::VTKXMLExportModule::initialize().
|
virtual |
Fill regionSets with all elements if regionSets is initially empty.
Implementation depends on derived classes.
Definition at line 90 of file exportmodule.C.
References oofem::Set::addAllElements(), oofem::Set::clear(), defaultElementSet, emodel, oofem::EngngModel::giveDomain(), oofem::IntArray::isEmpty(), regionSets, and oofem::FEMComponent::setDomain().
Referenced by oofem::HOMExportModule::initialize(), and initialize().
|
virtual |
Initializes receiver according to object description stored in input record.
Reimplemented in oofem::ErrorCheckingExportModule, oofem::VTKXMLExportModule, oofem::MatlabExportModule, oofem::VTKExportModule, oofem::GnuplotExportModule, oofem::POIExportModule, oofem::QuasicontinuumVTKXMLExportModule, oofem::HOMExportModule, oofem::OutputExportModule, oofem::GPExportModule, oofem::CrackExportModule, and oofem::DofManExportModule.
Definition at line 58 of file exportmodule.C.
References _IFT_ExportModule_domainall, _IFT_ExportModule_domainmask, _IFT_ExportModule_regionsets, _IFT_ExportModule_subtstepsout, _IFT_ExportModule_timescale, _IFT_ExportModule_tstepall, _IFT_ExportModule_tstepsout, _IFT_ExportModule_tstepstep, oofem::IntArray::clear(), domain_all_flag, domainMask, oofem::InputRecord::hasField(), IR_GIVE_OPTIONAL_FIELD, oofem::IRRT_OK, regionSets, timeScale, tstep_all_out_flag, tstep_step_out, tstep_substeps_out_flag, and tsteps_out.
Referenced by oofem::CrackExportModule::initializeFrom(), oofem::DofManExportModule::initializeFrom(), oofem::GPExportModule::initializeFrom(), oofem::OutputExportModule::initializeFrom(), oofem::HOMExportModule::initializeFrom(), oofem::POIExportModule::initializeFrom(), oofem::GnuplotExportModule::initializeFrom(), oofem::VTKExportModule::initializeFrom(), oofem::MatlabExportModule::initializeFrom(), oofem::VTKXMLExportModule::initializeFrom(), and oofem::ErrorCheckingExportModule::initializeFrom().
|
inlinevirtual |
Terminates the receiver.
The terminating messages should be printed. All the streams should be closed.
Reimplemented in oofem::VTKXMLExportModule, oofem::MatlabExportModule, oofem::VTKExportModule, oofem::POIExportModule, oofem::GnuplotExportModule, oofem::HOMExportModule, oofem::OutputExportModule, oofem::GPExportModule, and oofem::CrackExportModule.
Definition at line 153 of file exportmodule.h.
References oofem::errorInfo().
|
protected |
Test if domain output is required.
Definition at line 172 of file exportmodule.C.
References domain_all_flag, domainMask, and oofem::IntArray::findFirstIndexOf().
|
inline |
Initializes receiver.
The init file messages should be printed. Returns true if module is configured to export indvidual substep/iterations.
Definition at line 138 of file exportmodule.h.
Referenced by giveOutputBaseFileName(), and oofem::MatlabExportModule::giveOutputStream().
|
protected |
Tests if given time step output is required.
tStep | Time step to check. |
Definition at line 148 of file exportmodule.C.
References oofem::TimeStep::giveNumber(), tstep_all_out_flag, tstep_step_out, and tsteps_out.
Referenced by oofem::CrackExportModule::doOutput(), oofem::DofManExportModule::doOutput(), oofem::GPExportModule::doOutput(), oofem::HOMExportModule::doOutput(), oofem::OutputExportModule::doOutput(), oofem::GnuplotExportModule::doOutput(), oofem::POIExportModule::doOutput(), oofem::VTKExportModule::doOutput(), oofem::MatlabExportModule::doOutput(), oofem::VTKXMLExportModule::doOutput(), oofem::ErrorCheckingExportModule::doOutput(), and oofem::GnuplotExportModule::outputReactionForces().
|
protected |
Default region set.
Definition at line 107 of file exportmodule.h.
Referenced by giveRegionSet(), and initializeElementSet().
|
protected |
Indicates all domains.
Definition at line 93 of file exportmodule.h.
Referenced by initializeFrom(), and testDomainOutput().
|
protected |
Domain selection mask.
Definition at line 95 of file exportmodule.h.
Referenced by initializeFrom(), and testDomainOutput().
|
protected |
Problem pointer.
Definition at line 77 of file exportmodule.h.
Referenced by oofem::MatlabExportModule::computeArea(), oofem::CrackExportModule::doOutput(), oofem::DofManExportModule::doOutput(), oofem::GPExportModule::doOutput(), oofem::HOMExportModule::doOutput(), oofem::OutputExportModule::doOutput(), oofem::GnuplotExportModule::doOutput(), oofem::VTKExportModule::doOutput(), oofem::MatlabExportModule::doOutput(), oofem::VTKXMLExportModule::doOutput(), oofem::ErrorCheckingExportModule::doOutput(), oofem::MatlabExportModule::doOutputData(), oofem::MatlabExportModule::doOutputHomogenizeDofIDs(), oofem::MatlabExportModule::doOutputIntegrationPointFields(), oofem::MatlabExportModule::doOutputMesh(), oofem::MatlabExportModule::doOutputReactionForces(), oofem::MatlabExportModule::doOutputSpecials(), oofem::VTKExportModule::exportCellVars(), oofem::VTKXMLExportModule::exportCellVars(), oofem::VTKXMLExportModule::exportExternalForces(), oofem::POIExportModule::exportIntVarAs(), oofem::VTKExportModule::exportIntVarAs(), oofem::VTKXMLExportModule::exportIntVars(), oofem::VTKXMLExportModule::exportIntVarsInGpAs(), ExportModule(), oofem::POIExportModule::exportPrimaryVars(), oofem::VTKXMLExportModule::exportPrimaryVars(), oofem::POIExportModule::exportPrimVarAs(), oofem::VTKExportModule::exportPrimVarAs(), oofem::VTKXMLExportModule::getNodalVariableFromIS(), oofem::VTKXMLExportModule::getNodalVariableFromXFEMST(), giveOutputBaseFileName(), oofem::OutputExportModule::giveOutputStream(), oofem::MatlabExportModule::giveOutputStream(), oofem::VTKXMLExportModule::givePrimVarSmoother(), giveRegionSet(), oofem::VTKExportModule::giveSmoother(), oofem::VTKXMLExportModule::giveSmoother(), oofem::HOMExportModule::initialize(), initializeElementSet(), oofem::OutputExportModule::initializeFrom(), oofem::ErrorCheckingExportModule::initializeFrom(), oofem::GnuplotExportModule::outputBoundaryCondition(), oofem::GnuplotExportModule::outputInterfaceEl(), oofem::GnuplotExportModule::outputMesh(), oofem::GnuplotExportModule::outputReactionForces(), oofem::GnuplotExportModule::outputXFEM(), oofem::GnuplotExportModule::outputXFEMGeometry(), oofem::QuasicontinuumVTKXMLExportModule::setupVTKPiece(), oofem::VTKXMLExportModule::setupVTKPiece(), oofem::OutputExportModule::terminate(), oofem::VTKXMLExportModule::writeGPVTKCollection(), oofem::VTKXMLExportModule::writeVTKCollection(), oofem::VTKXMLExportModule::writeVTKPiece(), and oofem::VTKXMLExportModule::writeXFEMVars().
|
protected |
Component number.
Definition at line 75 of file exportmodule.h.
Referenced by oofem::VTKXMLExportModule::doOutput(), ExportModule(), giveOutputBaseFileName(), oofem::MatlabExportModule::giveOutputStream(), oofem::VTKXMLExportModule::writeGPVTKCollection(), and oofem::VTKXMLExportModule::writeVTKCollection().
|
protected |
regions represented by sets
Definition at line 98 of file exportmodule.h.
Referenced by ExportModule(), giveNumberOfRegions(), giveRegionSet(), initializeElementSet(), and initializeFrom().
|
protected |
Scaling time in output, e.g. conversion from seconds to hours.
Definition at line 101 of file exportmodule.h.
Referenced by oofem::HOMExportModule::doOutput(), oofem::VTKXMLExportModule::doOutput(), ExportModule(), and initializeFrom().
|
protected |
Indicates all steps selection.
Definition at line 79 of file exportmodule.h.
Referenced by initializeFrom(), and testTimeStepOutput().
|
protected |
User timeStep Output step. Indicates every tstep_step_out-th step selected.
Definition at line 81 of file exportmodule.h.
Referenced by initializeFrom(), and testTimeStepOutput().
|
protected |
Flag turning output in solution step substeps/itarations.
Allows to visualize the varibles during equilibrium iterations, etc. Usefull for debugging. In this case the export module output name will contain timeStep substep number. This tStep substep must be set/managed by corresponding engineering model.
Definition at line 90 of file exportmodule.h.
Referenced by oofem::VTKXMLExportModule::doOutput(), initializeFrom(), oofem::VTKXMLExportModule::writeGPVTKCollection(), and oofem::VTKXMLExportModule::writeVTKCollection().
|
protected |
List of user selected step numbers.
Definition at line 83 of file exportmodule.h.
Referenced by initializeFrom(), and testTimeStepOutput().