OOFEM 3.0
Loading...
Searching...
No Matches
oofem::ErrorCheckingExportModule Class Reference

#include <errorcheckingexportmodule.h>

Inheritance diagram for oofem::ErrorCheckingExportModule:
Collaboration diagram for oofem::ErrorCheckingExportModule:

Public Member Functions

 ErrorCheckingExportModule (int n, EngngModel *e)
 ErrorCheckingExportModule (const ErrorCheckingExportModule &)=delete
ErrorCheckingExportModuleoperator= (const ErrorCheckingExportModule &)=delete
void initialize () override
void terminate () override
void initializeFrom (InputRecord &ir) override
 Initializes receiver according to object description stored in input record.
void doOutput (TimeStep *tStep, bool forcedOutput=false) override
const char * giveClassName () const override
 Returns class name of the receiver.
const char * giveInputRecordName () const
Public Member Functions inherited from oofem::ExportModule
 ExportModule (int n, EngngModel *e)
 Constructor. Creates empty Output Manager with number n.
virtual ~ExportModule ()
 Destructor.
void doForcedOutput (TimeStep *tStep)
bool testSubStepOutput ()
virtual void initializeElementSet ()

Protected Member Functions

bool scanToErrorChecks (std ::ifstream &stream, double &errorTolerance)
std::unique_ptr< ErrorCheckingRulegiveErrorCheck (std ::ifstream &stream, double errorTolerance)
void writeCheck (Domain *domain, TimeStep *tStep)
void readRulesFromTextFile (InputRecord &ir)
void readRulesFromRecords (DataReader &dr, InputRecord &ir)
Protected Member Functions inherited from oofem::ExportModule
int giveNumberOfRegions ()
 Returns number of regions (aka regionSets).
SetgiveRegionSet (int i)
 Returns element set.
std::string giveOutputBaseFileName (TimeStep *tStep)
bool testTimeStepOutput (TimeStep *tStep)
bool testDomainOutput (int n)
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros).

Protected Attributes

std::string filename
std ::vector< std ::unique_ptr< ErrorCheckingRule > > errorCheckingRules
bool allPassed = true
bool writeChecks = false
IntArray writeIST
bool extractorMode = false
FILE * outputFile
Protected Attributes inherited from oofem::ExportModule
int number
 Component number.
EngngModelemodel
 Problem pointer.
bool tstep_all_out_flag
 Indicates all steps selection.
int tstep_step_out
 User timeStep Output step. Indicates every tstep_step_out-th step selected.
std ::list< Rangetsteps_out
 List of user selected step numbers.
bool tstep_substeps_out_flag
bool domain_all_flag
 Indicates all domains.
IntArray domainMask
 Domain selection mask.
IntArray regionSets
 regions represented by sets
double timeScale
 Scaling time in output, e.g. conversion from seconds to hours.
Set defaultElementSet
 Default region set.
bool pythonExport
 Output is carried out as a python list instead of writing files.

Detailed Description

Checks error in analysis (for automatic regression tests). Exits with error if results are incorrect.

Author
Mikael Öhman (and others)

Definition at line 212 of file errorcheckingexportmodule.h.

Constructor & Destructor Documentation

◆ ErrorCheckingExportModule() [1/2]

oofem::ErrorCheckingExportModule::ErrorCheckingExportModule ( int n,
EngngModel * e )

◆ ErrorCheckingExportModule() [2/2]

oofem::ErrorCheckingExportModule::ErrorCheckingExportModule ( const ErrorCheckingExportModule & )
delete

Member Function Documentation

◆ doOutput()

void oofem::ErrorCheckingExportModule::doOutput ( TimeStep * tStep,
bool forcedOutput = false )
overridevirtual

Writes the output. Abstract service.

Parameters
tStepTime step.
forcedOutputIf true, no testTimeStepOutput should be done.

Implements oofem::ExportModule.

Definition at line 853 of file errorcheckingexportmodule.C.

References allPassed, oofem::ExportModule::emodel, errorCheckingRules, extractorMode, oofem::TimeStep::isNotTheLastStep(), OOFEM_ERROR, OOFEM_LOG_INFO, outputFile, oofem::ExportModule::testTimeStepOutput(), writeCheck(), and writeChecks.

Referenced by operator=().

◆ giveClassName()

const char * oofem::ErrorCheckingExportModule::giveClassName ( ) const
inlineoverridevirtual

Returns class name of the receiver.

Implements oofem::ExportModule.

Definition at line 240 of file errorcheckingexportmodule.h.

◆ giveErrorCheck()

std::unique_ptr< ErrorCheckingRule > oofem::ErrorCheckingExportModule::giveErrorCheck ( std ::ifstream & stream,
double errorTolerance )
protected

Definition at line 980 of file errorcheckingexportmodule.C.

References OOFEM_ERROR.

Referenced by readRulesFromTextFile().

◆ giveInputRecordName()

const char * oofem::ErrorCheckingExportModule::giveInputRecordName ( ) const
inline

Definition at line 241 of file errorcheckingexportmodule.h.

References _IFT_ErrorCheckingExportModule_Name.

◆ initialize()

void oofem::ErrorCheckingExportModule::initialize ( )
overridevirtual

Reimplemented from oofem::ExportModule.

Definition at line 898 of file errorcheckingexportmodule.C.

References oofem::ExportModule::emodel, extractorMode, filename, and outputFile.

Referenced by operator=().

◆ initializeFrom()

◆ operator=()

ErrorCheckingExportModule & oofem::ErrorCheckingExportModule::operator= ( const ErrorCheckingExportModule & )
delete

◆ readRulesFromRecords()

void oofem::ErrorCheckingExportModule::readRulesFromRecords ( DataReader & dr,
InputRecord & ir )
protected

◆ readRulesFromTextFile()

void oofem::ErrorCheckingExportModule::readRulesFromTextFile ( InputRecord & ir)
protected

◆ scanToErrorChecks()

bool oofem::ErrorCheckingExportModule::scanToErrorChecks ( std ::ifstream & stream,
double & errorTolerance )
protected

Definition at line 963 of file errorcheckingexportmodule.C.

Referenced by readRulesFromTextFile().

◆ terminate()

void oofem::ErrorCheckingExportModule::terminate ( )
overridevirtual

Terminates the receiver. The terminating messages should be printed. All the streams should be closed.

Reimplemented from oofem::ExportModule.

Definition at line 907 of file errorcheckingexportmodule.C.

References extractorMode, and outputFile.

Referenced by operator=().

◆ writeCheck()

Member Data Documentation

◆ allPassed

bool oofem::ErrorCheckingExportModule::allPassed = true
protected

Definition at line 217 of file errorcheckingexportmodule.h.

Referenced by doOutput(), and initializeFrom().

◆ errorCheckingRules

std :: vector< std :: unique_ptr< ErrorCheckingRule > > oofem::ErrorCheckingExportModule::errorCheckingRules
protected

◆ extractorMode

bool oofem::ErrorCheckingExportModule::extractorMode = false
protected

Definition at line 220 of file errorcheckingexportmodule.h.

Referenced by doOutput(), initialize(), initializeFrom(), and terminate().

◆ filename

std::string oofem::ErrorCheckingExportModule::filename
protected

Definition at line 215 of file errorcheckingexportmodule.h.

Referenced by initialize(), initializeFrom(), and readRulesFromTextFile().

◆ outputFile

FILE* oofem::ErrorCheckingExportModule::outputFile
protected

Definition at line 221 of file errorcheckingexportmodule.h.

Referenced by doOutput(), initialize(), and terminate().

◆ writeChecks

bool oofem::ErrorCheckingExportModule::writeChecks = false
protected

Definition at line 218 of file errorcheckingexportmodule.h.

Referenced by doOutput(), and initializeFrom().

◆ writeIST

IntArray oofem::ErrorCheckingExportModule::writeIST
protected

Definition at line 219 of file errorcheckingexportmodule.h.

Referenced by initializeFrom(), and writeCheck().


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011