From a92cb3c51ecd93ef9c76905e194fd46aeabd6904 Mon Sep 17 00:00:00 2001 From: Knut Morten Okstad Date: Thu, 10 Jun 2021 14:38:58 +0200 Subject: [PATCH] Changed: Assume total rotations are in the solution vector if the nodal rotation matrices have not been updated (linear analysis). --- src/ASM/ASMs1D.C | 5 ++++- src/ASM/ASMs1D.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ASM/ASMs1D.C b/src/ASM/ASMs1D.C index a2f3ccb0..82d8b3fc 100644 --- a/src/ASM/ASMs1D.C +++ b/src/ASM/ASMs1D.C @@ -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 diff --git a/src/ASM/ASMs1D.h b/src/ASM/ASMs1D.h index 73faa507..30114f66 100644 --- a/src/ASM/ASMs1D.h +++ b/src/ASM/ASMs1D.h @@ -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