mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move assignment of potential forces into MechContainer
This commit is contained in:
parent
b692bbd15e
commit
e6a0ff522a
@ -117,6 +117,18 @@ allocate(const std::size_t bufferSize,
|
|||||||
allocated_ = true;
|
allocated_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class Scalar>
|
||||||
|
void MechContainer<Scalar>::
|
||||||
|
assignPotentialForces(const unsigned globalDofIdx,
|
||||||
|
const Scalar force,
|
||||||
|
const Scalar pressForce,
|
||||||
|
const Scalar tempForce)
|
||||||
|
{
|
||||||
|
potentialForce_[globalDofIdx] = force;
|
||||||
|
potentialPressForce_[globalDofIdx] = pressForce;
|
||||||
|
potentialTempForce_[globalDofIdx] = tempForce;
|
||||||
|
}
|
||||||
|
|
||||||
template<class Scalar>
|
template<class Scalar>
|
||||||
void MechContainer<Scalar>::
|
void MechContainer<Scalar>::
|
||||||
outputRestart(data::Solution& sol) const
|
outputRestart(data::Solution& sol) const
|
||||||
|
@ -44,6 +44,11 @@ public:
|
|||||||
void allocate(const std::size_t bufferSize,
|
void allocate(const std::size_t bufferSize,
|
||||||
std::map<std::string, int>& rstKeywords);
|
std::map<std::string, int>& rstKeywords);
|
||||||
|
|
||||||
|
void assignPotentialForces(const unsigned globalDofIdx,
|
||||||
|
const Scalar force,
|
||||||
|
const Scalar pressForce,
|
||||||
|
const Scalar tempForce);
|
||||||
|
|
||||||
void outputRestart(data::Solution& sol) const;
|
void outputRestart(data::Solution& sol) const;
|
||||||
|
|
||||||
bool allocated() const
|
bool allocated() const
|
||||||
|
@ -209,9 +209,10 @@ public:
|
|||||||
const unsigned globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, /*timeIdx=*/0);
|
const unsigned globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, /*timeIdx=*/0);
|
||||||
|
|
||||||
// Assume all mechanical things should be written
|
// Assume all mechanical things should be written
|
||||||
this->mech_.potentialForce_[globalDofIdx] = model.mechPotentialForce(globalDofIdx);
|
this->mech_.assignPotentialForces(globalDofIdx,
|
||||||
this->mech_.potentialPressForce_[globalDofIdx] = model.mechPotentialPressForce(globalDofIdx);
|
model.mechPotentialForce(globalDofIdx),
|
||||||
this->mech_.potentialTempForce_[globalDofIdx] = model.mechPotentialTempForce(globalDofIdx);
|
model.mechPotentialPressForce(globalDofIdx),
|
||||||
|
model.mechPotentialTempForce(globalDofIdx));
|
||||||
|
|
||||||
const auto disp = model.disp(globalDofIdx, /*include_fracture*/true);
|
const auto disp = model.disp(globalDofIdx, /*include_fracture*/true);
|
||||||
this->mech_.dispX_[globalDofIdx] = disp[Voigt::XX];
|
this->mech_.dispX_[globalDofIdx] = disp[Voigt::XX];
|
||||||
|
Loading…
Reference in New Issue
Block a user