From 7481f2a8e1aeb2a2e5119b5044d4cd21964a167c Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 4 Feb 2025 16:31:52 +0100 Subject: [PATCH] add MechContainer, a container for Mech data output start by moving data members into it --- CMakeLists_files.cmake | 2 + .../flow/GenericOutputBlackoilModule.cpp | 154 +++++++++--------- .../flow/GenericOutputBlackoilModule.hpp | 39 +---- opm/simulators/flow/MechContainer.cpp | 29 ++++ opm/simulators/flow/MechContainer.hpp | 80 +++++++++ opm/simulators/flow/OutputBlackoilModule.hpp | 74 ++++----- 6 files changed, 227 insertions(+), 151 deletions(-) create mode 100644 opm/simulators/flow/MechContainer.cpp create mode 100644 opm/simulators/flow/MechContainer.hpp diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index 9d9dded87..f91a198a7 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -107,6 +107,7 @@ list (APPEND MAIN_SOURCE_FILES opm/simulators/flow/LogOutputHelper.cpp opm/simulators/flow/Main.cpp opm/simulators/flow/MainDispatchDynamic.cpp + opm/simulators/flow/MechContainer.cpp opm/simulators/flow/MixingRateControls.cpp opm/simulators/flow/NonlinearSolver.cpp opm/simulators/flow/partitionCells.cpp @@ -856,6 +857,7 @@ list (APPEND PUBLIC_HEADER_FILES opm/simulators/flow/KeywordValidation.hpp opm/simulators/flow/LogOutputHelper.hpp opm/simulators/flow/Main.hpp + opm/simulators/flow/MechContainer.hpp opm/simulators/flow/MixingRateControls.hpp opm/simulators/flow/NewTranFluxModule.hpp opm/simulators/flow/NonlinearSolver.hpp diff --git a/opm/simulators/flow/GenericOutputBlackoilModule.cpp b/opm/simulators/flow/GenericOutputBlackoilModule.cpp index 4155d0b06..dcf6daefc 100644 --- a/opm/simulators/flow/GenericOutputBlackoilModule.cpp +++ b/opm/simulators/flow/GenericOutputBlackoilModule.cpp @@ -513,22 +513,22 @@ assignToSolution(data::Solution& sol) const auto extendedSolutionArrays = std::array { DataEntry{"BIOFILM", UnitSystem::measure::identity, cBiofilm_}, DataEntry{"CALCITE", UnitSystem::measure::identity, cCalcite_}, - 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{"DISPX", UnitSystem::measure::length, dispX_}, - DataEntry{"DISPY", UnitSystem::measure::length, dispY_}, - DataEntry{"DISPZ", UnitSystem::measure::length, dispZ_}, + DataEntry{"DELSTRXX", UnitSystem::measure::pressure, mech_.delstressXX_}, + DataEntry{"DELSTRYY", UnitSystem::measure::pressure, mech_.delstressYY_}, + DataEntry{"DELSTRZZ", UnitSystem::measure::pressure, mech_.delstressZZ_}, + DataEntry{"DELSTRXY", UnitSystem::measure::pressure, mech_.delstressXY_}, + DataEntry{"DELSTRXZ", UnitSystem::measure::pressure, mech_.delstressXZ_}, + DataEntry{"DELSTRYZ", UnitSystem::measure::pressure, mech_.delstressYZ_}, + DataEntry{"DISPX", UnitSystem::measure::length, mech_.dispX_}, + DataEntry{"DISPY", UnitSystem::measure::length, mech_.dispY_}, + DataEntry{"DISPZ", UnitSystem::measure::length, mech_.dispZ_}, DataEntry{"DRSDTCON", UnitSystem::measure::gas_oil_ratio_rate, drsdtcon_}, - DataEntry{"MECHPOTF", UnitSystem::measure::pressure, mechPotentialForce_}, + DataEntry{"MECHPOTF", UnitSystem::measure::pressure, mech_.potentialForce_}, DataEntry{"MICROBES", UnitSystem::measure::density, cMicrobes_}, DataEntry{"OXYGEN", UnitSystem::measure::density, cOxygen_}, DataEntry{"PERMFACT", UnitSystem::measure::identity, permFact_}, DataEntry{"PORV_RC", UnitSystem::measure::identity, rockCompPorvMultiplier_}, - DataEntry{"PRESPOTF", UnitSystem::measure::pressure, mechPotentialPressForce_}, + DataEntry{"PRESPOTF", UnitSystem::measure::pressure, mech_.potentialPressForce_}, DataEntry{"PRES_OVB", UnitSystem::measure::pressure, overburdenPressure_}, DataEntry{"RSW", UnitSystem::measure::gas_oil_ratio, rsw_}, DataEntry{"RSWSAT", UnitSystem::measure::gas_oil_ratio, gasDissolutionFactorInWater_}, @@ -542,31 +542,31 @@ assignToSolution(data::Solution& sol) DataEntry{"STD_CO2", UnitSystem::measure::identity, mFracCo2_}, DataEntry{"STD_GAS", UnitSystem::measure::identity, mFracGas_}, DataEntry{"STD_OIL", UnitSystem::measure::identity, mFracOil_}, - DataEntry{"STRAINXX", UnitSystem::measure::identity, strainXX_}, - DataEntry{"STRAINYY", UnitSystem::measure::identity, strainYY_}, - DataEntry{"STRAINZZ", UnitSystem::measure::identity, strainZZ_}, - DataEntry{"STRAINXY", UnitSystem::measure::identity, strainXY_}, - DataEntry{"STRAINXZ", UnitSystem::measure::identity, strainXZ_}, - DataEntry{"STRAINYZ", UnitSystem::measure::identity, strainYZ_}, - DataEntry{"STRESSXX", UnitSystem::measure::pressure, stressXX_}, - DataEntry{"STRESSYY", UnitSystem::measure::pressure, stressYY_}, - DataEntry{"STRESSZZ", UnitSystem::measure::pressure, stressZZ_}, - DataEntry{"STRESSXY", UnitSystem::measure::pressure, stressXY_}, - DataEntry{"STRESSXZ", UnitSystem::measure::pressure, stressXZ_}, - DataEntry{"STRESSYZ", UnitSystem::measure::pressure, stressYZ_}, - DataEntry{"LINSTRXX", UnitSystem::measure::pressure, linstressXX_}, - DataEntry{"LINSTRYY", UnitSystem::measure::pressure, linstressYY_}, - DataEntry{"LINSTRZZ", UnitSystem::measure::pressure, linstressZZ_}, - DataEntry{"LINSTRXY", UnitSystem::measure::pressure, linstressXY_}, - DataEntry{"LINSTRXZ", UnitSystem::measure::pressure, linstressXZ_}, - DataEntry{"LINSTRYZ", UnitSystem::measure::pressure, linstressYZ_}, - DataEntry{"FRCSTRXX", UnitSystem::measure::pressure, fracstressXX_}, - DataEntry{"FRCSTRYY", UnitSystem::measure::pressure, fracstressYY_}, - DataEntry{"FRCSTRZZ", UnitSystem::measure::pressure, fracstressZZ_}, - DataEntry{"FRCSTRXY", UnitSystem::measure::pressure, fracstressXY_}, - DataEntry{"FRCSTRXZ", UnitSystem::measure::pressure, fracstressXZ_}, - DataEntry{"FRCSTRYZ", UnitSystem::measure::pressure, fracstressYZ_}, - DataEntry{"TEMPPOTF", UnitSystem::measure::pressure, mechPotentialTempForce_}, + DataEntry{"STRAINXX", UnitSystem::measure::identity, mech_.strainXX_}, + DataEntry{"STRAINYY", UnitSystem::measure::identity, mech_.strainYY_}, + DataEntry{"STRAINZZ", UnitSystem::measure::identity, mech_.strainZZ_}, + DataEntry{"STRAINXY", UnitSystem::measure::identity, mech_.strainXY_}, + DataEntry{"STRAINXZ", UnitSystem::measure::identity, mech_.strainXZ_}, + DataEntry{"STRAINYZ", UnitSystem::measure::identity, mech_.strainYZ_}, + DataEntry{"STRESSXX", UnitSystem::measure::pressure, mech_.stressXX_}, + DataEntry{"STRESSYY", UnitSystem::measure::pressure, mech_.stressYY_}, + DataEntry{"STRESSZZ", UnitSystem::measure::pressure, mech_.stressZZ_}, + DataEntry{"STRESSXY", UnitSystem::measure::pressure, mech_.stressXY_}, + DataEntry{"STRESSXZ", UnitSystem::measure::pressure, mech_.stressXZ_}, + DataEntry{"STRESSYZ", UnitSystem::measure::pressure, mech_.stressYZ_}, + DataEntry{"LINSTRXX", UnitSystem::measure::pressure, mech_.linstressXX_}, + DataEntry{"LINSTRYY", UnitSystem::measure::pressure, mech_.linstressYY_}, + DataEntry{"LINSTRZZ", UnitSystem::measure::pressure, mech_.linstressZZ_}, + DataEntry{"LINSTRXY", UnitSystem::measure::pressure, mech_.linstressXY_}, + DataEntry{"LINSTRXZ", UnitSystem::measure::pressure, mech_.linstressXZ_}, + DataEntry{"LINSTRYZ", UnitSystem::measure::pressure, mech_.linstressYZ_}, + DataEntry{"FRCSTRXX", UnitSystem::measure::pressure, mech_.fracstressXX_}, + DataEntry{"FRCSTRYY", UnitSystem::measure::pressure, mech_.fracstressYY_}, + DataEntry{"FRCSTRZZ", UnitSystem::measure::pressure, mech_.fracstressZZ_}, + DataEntry{"FRCSTRXY", UnitSystem::measure::pressure, mech_.fracstressXY_}, + DataEntry{"FRCSTRXZ", UnitSystem::measure::pressure, mech_.fracstressXZ_}, + DataEntry{"FRCSTRYZ", UnitSystem::measure::pressure, mech_.fracstressYZ_}, + DataEntry{"TEMPPOTF", UnitSystem::measure::pressure, mech_.potentialTempForce_}, DataEntry{"TMULT_RC", UnitSystem::measure::identity, rockCompTransMultiplier_}, DataEntry{"UREA", UnitSystem::measure::density, cUrea_}, }; @@ -992,92 +992,92 @@ doAllocBuffers(const unsigned bufferSize, rstKeywords["PRESSURE"] = 0; if (enableMech_ && eclState_.runspec().mech()) { - this->mechPotentialForce_.resize(bufferSize,0.0); + this->mech_.potentialForce_.resize(bufferSize,0.0); rstKeywords["MECHPOTF"] = 0; - this->mechPotentialTempForce_.resize(bufferSize,0.0); + this->mech_.potentialTempForce_.resize(bufferSize,0.0); rstKeywords["TEMPPOTF"] = 0; - this->mechPotentialPressForce_.resize(bufferSize,0.0); + this->mech_.potentialPressForce_.resize(bufferSize,0.0); rstKeywords["PRESPOTF"] = 0; - this->dispX_.resize(bufferSize,0.0); + this->mech_.dispX_.resize(bufferSize,0.0); rstKeywords["DISPX"] = 0; - this->dispY_.resize(bufferSize,0.0); + this->mech_.dispY_.resize(bufferSize,0.0); rstKeywords["DISPY"] = 0; - this->dispZ_.resize(bufferSize,0.0); + this->mech_.dispZ_.resize(bufferSize,0.0); rstKeywords["DISPZ"] = 0; - this->stressXX_.resize(bufferSize,0.0); + this->mech_.stressXX_.resize(bufferSize,0.0); rstKeywords["STRESSXX"] = 0; - this->stressYY_.resize(bufferSize,0.0); + this->mech_.stressYY_.resize(bufferSize,0.0); rstKeywords["STRESSYY"] = 0; - this->stressZZ_.resize(bufferSize,0.0); + this->mech_.stressZZ_.resize(bufferSize,0.0); rstKeywords["STRESSZZ"] = 0; - this->stressXY_.resize(bufferSize,0.0); + this->mech_.stressXY_.resize(bufferSize,0.0); rstKeywords["STRESSXY"] = 0; - this->stressXZ_.resize(bufferSize,0.0); + this->mech_.stressXZ_.resize(bufferSize,0.0); rstKeywords["STRESSXZ"] = 0; - this->stressXY_.resize(bufferSize,0.0); + this->mech_.stressXY_.resize(bufferSize,0.0); rstKeywords["STRESSXY"] = 0; - this->stressYZ_.resize(bufferSize,0.0); + this->mech_.stressYZ_.resize(bufferSize,0.0); rstKeywords["STRESSYZ"] = 0; - this->strainXX_.resize(bufferSize,0.0); + this->mech_.strainXX_.resize(bufferSize,0.0); rstKeywords["STRAINXX"] = 0; - this->strainYY_.resize(bufferSize,0.0); + this->mech_.strainYY_.resize(bufferSize,0.0); rstKeywords["STRAINYY"] = 0; - this->strainZZ_.resize(bufferSize,0.0); + this->mech_.strainZZ_.resize(bufferSize,0.0); rstKeywords["STRAINZZ"] = 0; - this->strainXY_.resize(bufferSize,0.0); + this->mech_.strainXY_.resize(bufferSize,0.0); rstKeywords["STRAINXY"] = 0; - this->strainXZ_.resize(bufferSize,0.0); + this->mech_.strainXZ_.resize(bufferSize,0.0); rstKeywords["STRAINXZ"] = 0; - this->strainXY_.resize(bufferSize,0.0); + this->mech_.strainXY_.resize(bufferSize,0.0); rstKeywords["STRAINXY"] = 0; - this->strainYZ_.resize(bufferSize,0.0); + this->mech_.strainYZ_.resize(bufferSize,0.0); rstKeywords["STRAINYZ"] = 0; - this->delstressXX_.resize(bufferSize,0.0); + this->mech_.delstressXX_.resize(bufferSize,0.0); rstKeywords["DELSTRXX"] = 0; - this->delstressYY_.resize(bufferSize,0.0); + this->mech_.delstressYY_.resize(bufferSize,0.0); rstKeywords["DELSTRYY"] = 0; - this->delstressZZ_.resize(bufferSize,0.0); + this->mech_.delstressZZ_.resize(bufferSize,0.0); rstKeywords["DELSTRZZ"] = 0; - this->delstressXY_.resize(bufferSize,0.0); + this->mech_.delstressXY_.resize(bufferSize,0.0); rstKeywords["DELSTRXY"] = 0; - this->delstressXZ_.resize(bufferSize,0.0); + this->mech_.delstressXZ_.resize(bufferSize,0.0); rstKeywords["DELSTRXZ"] = 0; - this->delstressXY_.resize(bufferSize,0.0); + this->mech_.delstressXY_.resize(bufferSize,0.0); rstKeywords["DELSTRXY"] = 0; - this->delstressYZ_.resize(bufferSize,0.0); + this->mech_.delstressYZ_.resize(bufferSize,0.0); rstKeywords["DELSTRYZ"] = 0; - this->fracstressXX_.resize(bufferSize,0.0); + this->mech_.fracstressXX_.resize(bufferSize,0.0); rstKeywords["FRCSTRXX"] = 0; - this->fracstressYY_.resize(bufferSize,0.0); + this->mech_.fracstressYY_.resize(bufferSize,0.0); rstKeywords["FRCSTRYY"] = 0; - this->fracstressZZ_.resize(bufferSize,0.0); + this->mech_.fracstressZZ_.resize(bufferSize,0.0); rstKeywords["FRCSTRZZ"] = 0; - this->fracstressXY_.resize(bufferSize,0.0); + this->mech_.fracstressXY_.resize(bufferSize,0.0); rstKeywords["FRCSTRXY"] = 0; - this->fracstressXZ_.resize(bufferSize,0.0); + this->mech_.fracstressXZ_.resize(bufferSize,0.0); rstKeywords["FRCSTRXZ"] = 0; - this->fracstressXY_.resize(bufferSize,0.0); + this->mech_.fracstressXY_.resize(bufferSize,0.0); rstKeywords["FRCSTRXY"] = 0; - this->fracstressYZ_.resize(bufferSize,0.0); + this->mech_.fracstressYZ_.resize(bufferSize,0.0); rstKeywords["FRCSTRYZ"] = 0; - this->linstressXX_.resize(bufferSize,0.0); + this->mech_.linstressXX_.resize(bufferSize,0.0); rstKeywords["LINSTRXX"] = 0; - this->linstressYY_.resize(bufferSize,0.0); + this->mech_.linstressYY_.resize(bufferSize,0.0); rstKeywords["LINSTRYY"] = 0; - this->linstressZZ_.resize(bufferSize,0.0); + this->mech_.linstressZZ_.resize(bufferSize,0.0); rstKeywords["LINSTRZZ"] = 0; - this->linstressXY_.resize(bufferSize,0.0); + this->mech_.linstressXY_.resize(bufferSize,0.0); rstKeywords["LINSTRXY"] = 0; - this->linstressXZ_.resize(bufferSize,0.0); + this->mech_.linstressXZ_.resize(bufferSize,0.0); rstKeywords["LINSTRXZ"] = 0; - this->linstressXY_.resize(bufferSize,0.0); + this->mech_.linstressXY_.resize(bufferSize,0.0); rstKeywords["LINSTRXY"] = 0; - this->linstressYZ_.resize(bufferSize,0.0); + this->mech_.linstressYZ_.resize(bufferSize,0.0); rstKeywords["LINSTRYZ"] = 0; } diff --git a/opm/simulators/flow/GenericOutputBlackoilModule.hpp b/opm/simulators/flow/GenericOutputBlackoilModule.hpp index d88bd3441..95df3ed5b 100644 --- a/opm/simulators/flow/GenericOutputBlackoilModule.hpp +++ b/opm/simulators/flow/GenericOutputBlackoilModule.hpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -503,43 +504,7 @@ protected: ScalarBuffer pcog_; // buffers for mechanical output - ScalarBuffer mechPotentialForce_; - ScalarBuffer mechPotentialPressForce_; - ScalarBuffer mechPotentialTempForce_; - - ScalarBuffer dispX_; - ScalarBuffer dispY_; - ScalarBuffer dispZ_; - ScalarBuffer stressXX_; - ScalarBuffer stressYY_; - ScalarBuffer stressZZ_; - ScalarBuffer stressXY_; - ScalarBuffer stressXZ_; - ScalarBuffer stressYZ_; - ScalarBuffer delstressXX_; - ScalarBuffer delstressYY_; - ScalarBuffer delstressZZ_; - ScalarBuffer delstressXY_; - ScalarBuffer delstressXZ_; - ScalarBuffer delstressYZ_; - ScalarBuffer linstressXX_; - ScalarBuffer linstressYY_; - ScalarBuffer linstressZZ_; - ScalarBuffer linstressXY_; - ScalarBuffer linstressXZ_; - ScalarBuffer linstressYZ_; - ScalarBuffer fracstressXX_; - ScalarBuffer fracstressYY_; - ScalarBuffer fracstressZZ_; - ScalarBuffer fracstressXY_; - ScalarBuffer fracstressXZ_; - ScalarBuffer fracstressYZ_; - ScalarBuffer strainXX_; - ScalarBuffer strainYY_; - ScalarBuffer strainZZ_; - ScalarBuffer strainXY_; - ScalarBuffer strainXZ_; - ScalarBuffer strainYZ_; + MechContainer mech_; std::array saturation_; std::array invB_; diff --git a/opm/simulators/flow/MechContainer.cpp b/opm/simulators/flow/MechContainer.cpp new file mode 100644 index 000000000..777aee2ad --- /dev/null +++ b/opm/simulators/flow/MechContainer.cpp @@ -0,0 +1,29 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . + Consult the COPYING file in the top-level source directory of this + module for the precise wording of the license and the list of + copyright holders. +*/ + +#include +#include + +namespace Opm { + + +} // namespace Opm diff --git a/opm/simulators/flow/MechContainer.hpp b/opm/simulators/flow/MechContainer.hpp new file mode 100644 index 000000000..af37a7272 --- /dev/null +++ b/opm/simulators/flow/MechContainer.hpp @@ -0,0 +1,80 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . + Consult the COPYING file in the top-level source directory of this + module for the precise wording of the license and the list of + copyright holders. +*/ +/*! + * \file + * \copydoc Opm::OutputBlackOilModule + */ +#ifndef OPM_MECH_CONTAINER_HPP +#define OPM_MECH_CONTAINER_HPP + +#include + +namespace Opm { + +template +class MechContainer +{ + using ScalarBuffer = std::vector; + +public: + ScalarBuffer potentialForce_; + ScalarBuffer potentialPressForce_; + ScalarBuffer potentialTempForce_; + + ScalarBuffer dispX_; + ScalarBuffer dispY_; + ScalarBuffer dispZ_; + ScalarBuffer stressXX_; + ScalarBuffer stressYY_; + ScalarBuffer stressZZ_; + ScalarBuffer stressXY_; + ScalarBuffer stressXZ_; + ScalarBuffer stressYZ_; + ScalarBuffer delstressXX_; + ScalarBuffer delstressYY_; + ScalarBuffer delstressZZ_; + ScalarBuffer delstressXY_; + ScalarBuffer delstressXZ_; + ScalarBuffer delstressYZ_; + ScalarBuffer strainXX_; + ScalarBuffer strainYY_; + ScalarBuffer strainZZ_; + ScalarBuffer strainXY_; + ScalarBuffer strainXZ_; + ScalarBuffer strainYZ_; + ScalarBuffer linstressXX_; + ScalarBuffer linstressYY_; + ScalarBuffer linstressZZ_; + ScalarBuffer linstressXY_; + ScalarBuffer linstressXZ_; + ScalarBuffer linstressYZ_; + ScalarBuffer fracstressXX_; + ScalarBuffer fracstressYY_; + ScalarBuffer fracstressZZ_; + ScalarBuffer fracstressXY_; + ScalarBuffer fracstressXZ_; + ScalarBuffer fracstressYZ_; +}; + +} // namespace Opm + +#endif // OPM_MECH_CONTAINER_HPP diff --git a/opm/simulators/flow/OutputBlackoilModule.hpp b/opm/simulators/flow/OutputBlackoilModule.hpp index 875cb1f57..b6f457923 100644 --- a/opm/simulators/flow/OutputBlackoilModule.hpp +++ b/opm/simulators/flow/OutputBlackoilModule.hpp @@ -196,7 +196,7 @@ public: void processElementMech(const ElementContext& elemCtx) { if constexpr (getPropValue()) { - if (this->mechPotentialForce_.empty()) { + if (this->mech_.potentialForce_.empty()) { return; } @@ -209,57 +209,57 @@ public: const unsigned globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, /*timeIdx=*/0); // Assume all mechanical things should be written - this->mechPotentialForce_[globalDofIdx] = model.mechPotentialForce(globalDofIdx); - this->mechPotentialPressForce_[globalDofIdx] = model.mechPotentialPressForce(globalDofIdx); - this->mechPotentialTempForce_[globalDofIdx] = model.mechPotentialTempForce(globalDofIdx); + this->mech_.potentialForce_[globalDofIdx] = model.mechPotentialForce(globalDofIdx); + this->mech_.potentialPressForce_[globalDofIdx] = model.mechPotentialPressForce(globalDofIdx); + this->mech_.potentialTempForce_[globalDofIdx] = model.mechPotentialTempForce(globalDofIdx); const auto disp = model.disp(globalDofIdx, /*include_fracture*/true); - this->dispX_[globalDofIdx] = disp[Voigt::XX]; - this->dispY_[globalDofIdx] = disp[Voigt::YY]; - this->dispZ_[globalDofIdx] = disp[Voigt::ZZ]; + this->mech_.dispX_[globalDofIdx] = disp[Voigt::XX]; + this->mech_.dispY_[globalDofIdx] = disp[Voigt::YY]; + this->mech_.dispZ_[globalDofIdx] = disp[Voigt::ZZ]; // Total stress is not stored but calculated result is Voigt notation const auto stress = model.stress(globalDofIdx, /*include_fracture*/true); - this->stressXX_[globalDofIdx] = stress[Voigt::XX]; - this->stressYY_[globalDofIdx] = stress[Voigt::YY]; - this->stressZZ_[globalDofIdx] = stress[Voigt::ZZ]; - this->stressXY_[globalDofIdx] = stress[Voigt::XY]; - this->stressXZ_[globalDofIdx] = stress[Voigt::XZ]; - this->stressYZ_[globalDofIdx] = stress[Voigt::YZ]; + this->mech_.stressXX_[globalDofIdx] = stress[Voigt::XX]; + this->mech_.stressYY_[globalDofIdx] = stress[Voigt::YY]; + this->mech_.stressZZ_[globalDofIdx] = stress[Voigt::ZZ]; + this->mech_.stressXY_[globalDofIdx] = stress[Voigt::XY]; + this->mech_.stressXZ_[globalDofIdx] = stress[Voigt::XZ]; + this->mech_.stressYZ_[globalDofIdx] = stress[Voigt::YZ]; const auto strain = model.strain(globalDofIdx, /*include_fracture*/true); - this->strainXX_[globalDofIdx] = strain[Voigt::XX]; - this->strainYY_[globalDofIdx] = strain[Voigt::YY]; - this->strainZZ_[globalDofIdx] = strain[Voigt::ZZ]; - this->strainXY_[globalDofIdx] = strain[Voigt::XY]; - this->strainXZ_[globalDofIdx] = strain[Voigt::XZ]; - this->strainYZ_[globalDofIdx] = strain[Voigt::YZ]; + this->mech_.strainXX_[globalDofIdx] = strain[Voigt::XX]; + this->mech_.strainYY_[globalDofIdx] = strain[Voigt::YY]; + this->mech_.strainZZ_[globalDofIdx] = strain[Voigt::ZZ]; + this->mech_.strainXY_[globalDofIdx] = strain[Voigt::XY]; + this->mech_.strainXZ_[globalDofIdx] = strain[Voigt::XZ]; + this->mech_.strainYZ_[globalDofIdx] = strain[Voigt::YZ]; // Not including fracture const auto delstress = model.delstress(globalDofIdx); - this->delstressXX_[globalDofIdx] = delstress[Voigt::XX]; - this->delstressYY_[globalDofIdx] = delstress[Voigt::YY]; - this->delstressZZ_[globalDofIdx] = delstress[Voigt::ZZ]; - this->delstressXY_[globalDofIdx] = delstress[Voigt::XY]; - this->delstressXZ_[globalDofIdx] = delstress[Voigt::XZ]; - this->delstressYZ_[globalDofIdx] = delstress[Voigt::YZ]; + this->mech_.delstressXX_[globalDofIdx] = delstress[Voigt::XX]; + this->mech_.delstressYY_[globalDofIdx] = delstress[Voigt::YY]; + this->mech_.delstressZZ_[globalDofIdx] = delstress[Voigt::ZZ]; + this->mech_.delstressXY_[globalDofIdx] = delstress[Voigt::XY]; + this->mech_.delstressXZ_[globalDofIdx] = delstress[Voigt::XZ]; + this->mech_.delstressYZ_[globalDofIdx] = delstress[Voigt::YZ]; const auto linstress = model.linstress(globalDofIdx); - this->linstressXX_[globalDofIdx] = linstress[Voigt::XX]; - this->linstressYY_[globalDofIdx] = linstress[Voigt::YY]; - this->linstressZZ_[globalDofIdx] = linstress[Voigt::ZZ]; - this->linstressXY_[globalDofIdx] = linstress[Voigt::XY]; - this->linstressXZ_[globalDofIdx] = linstress[Voigt::XZ]; - this->linstressYZ_[globalDofIdx] = linstress[Voigt::YZ]; + this->mech_.linstressXX_[globalDofIdx] = linstress[Voigt::XX]; + this->mech_.linstressYY_[globalDofIdx] = linstress[Voigt::YY]; + this->mech_.linstressZZ_[globalDofIdx] = linstress[Voigt::ZZ]; + this->mech_.linstressXY_[globalDofIdx] = linstress[Voigt::XY]; + this->mech_.linstressXZ_[globalDofIdx] = linstress[Voigt::XZ]; + this->mech_.linstressYZ_[globalDofIdx] = linstress[Voigt::YZ]; // is the tresagii stress which make rock fracture const auto fracstress = model.fractureStress(globalDofIdx); - this->fracstressXX_[globalDofIdx] = fracstress[Voigt::XX]; - this->fracstressYY_[globalDofIdx] = fracstress[Voigt::YY]; - this->fracstressZZ_[globalDofIdx] = fracstress[Voigt::ZZ]; - this->fracstressXY_[globalDofIdx] = fracstress[Voigt::XY]; - this->fracstressXZ_[globalDofIdx] = fracstress[Voigt::XZ]; - this->fracstressYZ_[globalDofIdx] = fracstress[Voigt::YZ]; + this->mech_.fracstressXX_[globalDofIdx] = fracstress[Voigt::XX]; + this->mech_.fracstressYY_[globalDofIdx] = fracstress[Voigt::YY]; + this->mech_.fracstressZZ_[globalDofIdx] = fracstress[Voigt::ZZ]; + this->mech_.fracstressXY_[globalDofIdx] = fracstress[Voigt::XY]; + this->mech_.fracstressXZ_[globalDofIdx] = fracstress[Voigt::XZ]; + this->mech_.fracstressYZ_[globalDofIdx] = fracstress[Voigt::YZ]; } } }