69 bool volExported =
false;
75 elements.followedBy(this->
giveRegionSet(ireg)->giveElementList());
79 for (
int ist:
ists ) {
85 if ( elements.contains(elem -> giveNumber()) ){
86 for (
GaussPoint *gp: *elem->giveDefaultIntegrationRulePtr() ) {
87 double dV = elem->computeVolumeAround(gp);
90 avgState.
add(dV, ipState);
96 fprintf(this->
stream,
"%.3e ", VolTot);
101 for (
auto s: avgState ) {
102 fprintf(this->
stream,
"%e ", s);
104 fprintf(this->
stream,
" ");
106 fprintf(this->
stream,
"\n" );
114 if ( ( this->
stream = fopen(fileName.c_str(),
"w") ) == NULL ) {
115 OOFEM_ERROR(
"failed to open file %s", fileName.c_str() );
118 fprintf(this->
stream,
"#Time Volume ");
119 for (
int var: this->
ists ) {
122 fprintf(this->
stream,
"\n" );
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
bool testTimeStepOutput(TimeStep *tStep)
Tests if given time step output is required.
std::string giveOutputBaseFileName()
Returns base output file name to which extensions, like .out .vtu .osf should be added.
virtual void initialize()
IntArray ists
Material numbers over which averaging is performed. - replaced by 'regionsets'.
virtual void terminate()
Terminates the receiver.
Represents HOM (Homogenization) export module.
#define _IFT_HOMExportModule_scale
virtual void initialize()
Represents export output module - a base class for all output modules.
Class implementing an array of integers.
FILE * stream
Stream for file.
virtual void doOutput(TimeStep *tStep, bool forcedOutput=false)
Writes the output.
virtual ~HOMExportModule()
Destructor.
EngngModel * emodel
Problem pointer.
virtual void initializeElementSet()
Fill regionSets with all elements if regionSets is initially empty.
Set * giveRegionSet(int i)
Returns element set.
void resize(int n)
Checks size of receiver towards requested bounds.
double giveIntrinsicTime()
Returns intrinsic time, e.g. time in which constitutive model is evaluated.
Class representing vector of real numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
#define _IFT_HOMExportModule_ISTs
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
void times(double s)
Multiplies receiver with scalar.
std::vector< std::unique_ptr< Element > > & giveElements()
const char * __InternalStateTypeToString(InternalStateType _value)
double timeScale
Scaling time in output, e.g. conversion from seconds to hours.
Abstract base class representing the "problem" under consideration.
int giveSize() const
Returns the size of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Domain * giveDomain(int n)
Service for accessing particular problem domain.
int giveNumberOfRegions()
Returns number of regions (aka regionSets)
Class representing integration point in finite element program.
Class representing solution step.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
REGISTER_ExportModule(ErrorCheckingExportModule)
void add(const FloatArray &src)
Adds array src to receiver.
double scale
Scale of all homogenized values.