Changed: Assume total rotations are in the solution vector if the

nodal rotation matrices have not been updated (linear analysis).
This commit is contained in:
Knut Morten Okstad
2021-06-10 14:38:58 +02:00
parent 27597c2d7e
commit a92cb3c51e
2 changed files with 7 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ ASMs1D::ASMs1D (unsigned char n_s, unsigned char n_f)
: ASMstruct(1,n_s,n_f), elmCS(myCS), nodalT(myT)
{
curv = proj = nullptr;
updatedT = false;
}
@@ -48,6 +49,7 @@ ASMs1D::ASMs1D (const ASMs1D& patch, unsigned char n_f)
{
curv = patch.curv;
proj = patch.proj;
updatedT = false;
// Need to set nnod here,
// as hasXNodes might be invoked before the FE data is generated
@@ -777,6 +779,7 @@ bool ASMs1D::updateRotations (const Vector& displ, bool reInit)
for (size_t i = 0; i < myT.size(); i++)
myT[i].preMult(Tensor(displ[6*i+3],displ[6*i+4],displ[6*i+5]));
updatedT = true;
return true;
}
@@ -1463,7 +1466,7 @@ bool ASMs1D::getSolution (Matrix& sField, const Vector& locSol,
{
if (!this->ASMbase::getSolution(sField,locSol,nodes))
return false;
else if (nf < 6)
else if (nf < 6 || !updatedT)
return true;
// Extract the total angular rotations as components 4-6

View File

@@ -458,6 +458,9 @@ protected:
TensorVec myCS; //!< The actual element coordinate systems
TensorVec myT; //!< The actual nodal rotation tensors
TensorVec prevT; //!< Nodal rotation tensors of last converged configuration
private:
bool updatedT; //!< If \e true, nodal rotation matrices have been updated
};
#endif