72HOMExportModule :: doOutput(
TimeStep *tStep,
bool forcedOutput)
77 bool outputVol =
false;
89 if (!
ists.isEmpty()) {
90 for (
int ist:
ists ) {
91 average(answer, volTot, ist,
false, tStep);
94 this->
stream << std::scientific << volTot <<
" ";
100 }
else if (answer.
giveSize() == 1) {
104 for (
auto s: answer ) {
105 this->
stream << std::scientific << s <<
" ";
122 average(answer, volTot, IST_Undefined,
true, tStep);
127 this->
stream <<
"\n" << std::flush;
132HOMExportModule :: average(
FloatArray &answer,
double &volTot,
int ist,
bool strainEn,
TimeStep *tStep)
137 double dStrainEnergyStressDep=0;
142 if (
elements.contains(elem -> giveNumber()) ){
143 for (
GaussPoint *gp: *elem->giveDefaultIntegrationRulePtr() ) {
144 double dV = elem->computeVolumeAround(gp);
149 FloatArray stress, lastStressIP, strain, strainRed, tmp, strainStressDep, lastStrainStressDepIP, avSig, dEpsStressDep;
150 elem->giveGlobalIPValue(stress, gp, IST_StressTensor, tStep);
151 elem->giveGlobalIPValue(strain, gp, IST_StrainTensor, tStep);
154 StructuralMaterial :: giveReducedSymVectorForm(strainRed, strain, gp->giveMaterialMode());
156 StructuralMaterial :: giveFullSymVectorForm(strainStressDep, tmp, gp->giveMaterialMode());
162 lastStrainStressDepIP.
zero();
169 avSig = 0.5*lastStressIP + 0.5*stress;
170 dEpsStressDep.
beDifferenceOf(strainStressDep, lastStrainStressDepIP);
172 dStrainEnergyStressDep += dV*avSig.
dotProduct(dEpsStressDep);
184 OOFEM_ERROR(
"Strain energy calculation requires SM module");
188 answer.
add(dV, ipState);
197 answer.
at(1) = dStrainEnergyStressDep ;
std ::vector< std ::unique_ptr< Element > > & giveElements()