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

Represents export output module - a base class for all output modules. More...

#include <exportmodule.h>

+ Inheritance diagram for oofem::ExportModule:
+ Collaboration diagram for oofem::ExportModule:

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...
 
SetgiveRegionSet (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...
 
EngngModelemodel
 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< Rangetsteps_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...
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

oofem::ExportModule::~ExportModule ( )
virtual

Destructor.

Definition at line 53 of file exportmodule.C.

Member Function Documentation

void oofem::ExportModule::doForcedOutput ( TimeStep tStep)
inline

Writes the output.

Abstract service.

Parameters
tSteptime step.

Definition at line 130 of file exportmodule.h.

virtual void oofem::ExportModule::doOutput ( TimeStep tStep,
bool  forcedOutput = false 
)
pure virtual
std::string oofem::ExportModule::errorInfo ( const char *  func) const
protected

Returns string for prepending output (used by error reporting macros).

Definition at line 181 of file exportmodule.C.

References giveClassName().

int oofem::ExportModule::giveNumberOfRegions ( )
protected
void oofem::ExportModule::initializeElementSet ( )
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().

IRResultType oofem::ExportModule::initializeFrom ( InputRecord ir)
virtual
virtual void oofem::ExportModule::terminate ( )
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().

bool oofem::ExportModule::testDomainOutput ( int  n)
protected

Test if domain output is required.

Returns
True if required.

Definition at line 172 of file exportmodule.C.

References domain_all_flag, domainMask, and oofem::IntArray::findFirstIndexOf().

bool oofem::ExportModule::testSubStepOutput ( )
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().

Member Data Documentation

Set oofem::ExportModule::defaultElementSet
protected

Default region set.

Definition at line 107 of file exportmodule.h.

Referenced by giveRegionSet(), and initializeElementSet().

bool oofem::ExportModule::domain_all_flag
protected

Indicates all domains.

Definition at line 93 of file exportmodule.h.

Referenced by initializeFrom(), and testDomainOutput().

IntArray oofem::ExportModule::domainMask
protected

Domain selection mask.

Definition at line 95 of file exportmodule.h.

Referenced by initializeFrom(), and testDomainOutput().

EngngModel* oofem::ExportModule::emodel
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().

IntArray oofem::ExportModule::regionSets
protected

regions represented by sets

Definition at line 98 of file exportmodule.h.

Referenced by ExportModule(), giveNumberOfRegions(), giveRegionSet(), initializeElementSet(), and initializeFrom().

double oofem::ExportModule::timeScale
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().

bool oofem::ExportModule::tstep_all_out_flag
protected

Indicates all steps selection.

Definition at line 79 of file exportmodule.h.

Referenced by initializeFrom(), and testTimeStepOutput().

int oofem::ExportModule::tstep_step_out
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().

bool oofem::ExportModule::tstep_substeps_out_flag
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().

std :: list< Range > oofem::ExportModule::tsteps_out
protected

List of user selected step numbers.

Definition at line 83 of file exportmodule.h.

Referenced by initializeFrom(), and testTimeStepOutput().


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:35 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011