store delStress as a VoigtArray in MechContainer

This commit is contained in:
Arne Morten Kvarving 2025-02-05 11:30:20 +01:00
parent 9e8ab101ed
commit 779a225c9d
2 changed files with 4 additions and 31 deletions

View File

@ -66,22 +66,10 @@ allocate(const std::size_t bufferSize,
}
};
resizeAndRegister(delstress_, "DELSTR");
resizeAndRegister(strain_, "STRAIN");
resizeAndRegister(stress_, "STRESS");
this->delstressXX_.resize(bufferSize, 0.0);
rstKeywords["DELSTRXX"] = 0;
this->delstressYY_.resize(bufferSize, 0.0);
rstKeywords["DELSTRYY"] = 0;
this->delstressZZ_.resize(bufferSize, 0.0);
rstKeywords["DELSTRZZ"] = 0;
this->delstressXY_.resize(bufferSize, 0.0);
rstKeywords["DELSTRXY"] = 0;
this->delstressXZ_.resize(bufferSize, 0.0);
rstKeywords["DELSTRXZ"] = 0;
this->delstressYZ_.resize(bufferSize, 0.0);
rstKeywords["DELSTRYZ"] = 0;
this->fracstressXX_.resize(bufferSize,0.0);
rstKeywords["FRCSTRXX"] = 0;
this->fracstressYY_.resize(bufferSize,0.0);
@ -116,12 +104,7 @@ void MechContainer<Scalar>::
assignDelStress(const unsigned globalDofIdx,
const Dune::FieldVector<Scalar,6>& delStress)
{
this->delstressXX_[globalDofIdx] = delStress[0];
this->delstressYY_[globalDofIdx] = delStress[1];
this->delstressZZ_[globalDofIdx] = delStress[2];
this->delstressYZ_[globalDofIdx] = delStress[3];
this->delstressXZ_[globalDofIdx] = delStress[4];
this->delstressXY_[globalDofIdx] = delStress[5];
this->delstress_.assign(globalDofIdx, VoigtContainer<Scalar>(delStress));
}
template<class Scalar>
@ -185,12 +168,7 @@ outputRestart(data::Solution& sol) const
};
const auto solutionVectors = std::array{
DataEntry{"DELSTRXX", UnitSystem::measure::pressure, &delstressXX_},
DataEntry{"DELSTRYY", UnitSystem::measure::pressure, &delstressYY_},
DataEntry{"DELSTRZZ", UnitSystem::measure::pressure, &delstressZZ_},
DataEntry{"DELSTRXY", UnitSystem::measure::pressure, &delstressXY_},
DataEntry{"DELSTRXZ", UnitSystem::measure::pressure, &delstressXZ_},
DataEntry{"DELSTRYZ", UnitSystem::measure::pressure, &delstressYZ_},
DataEntry{"DELSTR", UnitSystem::measure::pressure, &delstress_},
DataEntry{"DISP", UnitSystem::measure::length, &disp_},
DataEntry{"FRCSTRXX", UnitSystem::measure::pressure, &fracstressXX_},
DataEntry{"FRCSTRYY", UnitSystem::measure::pressure, &fracstressYY_},

View File

@ -77,14 +77,9 @@ public:
ScalarBuffer potentialTempForce_;
std::array<ScalarBuffer,3> disp_;
VoigtArray<Scalar> delstress_;
VoigtArray<Scalar> strain_;
VoigtArray<Scalar> stress_;
ScalarBuffer delstressXX_;
ScalarBuffer delstressYY_;
ScalarBuffer delstressZZ_;
ScalarBuffer delstressXY_;
ScalarBuffer delstressXZ_;
ScalarBuffer delstressYZ_;
ScalarBuffer linstressXX_;
ScalarBuffer linstressYY_;
ScalarBuffer linstressZZ_;