ASMu3D::getElementCoordinates: support a separate geometry basis

This commit is contained in:
Arne Morten Kvarving 2023-08-31 09:39:25 +02:00
parent fd9e17bacb
commit be59cecf9b
2 changed files with 8 additions and 3 deletions

View File

@ -705,7 +705,7 @@ double ASMu3D::getParametricVolume (int iel) const
}
bool ASMu3D::getElementCoordinates (Matrix& X, int iel, bool) const
bool ASMu3D::getElementCoordinates (Matrix& X, int iel, bool forceItg) const
{
#ifdef INDEX_CHECK
if (iel < 1 || (size_t)iel > MNPC.size())
@ -715,8 +715,12 @@ bool ASMu3D::getElementCoordinates (Matrix& X, int iel, bool) const
return false;
}
#endif
const LR::LRSplineVolume* spline = this->getBasis(forceItg ? ASM::INTEGRATION_BASIS
: ASM::GEOMETRY_BASIS);
if (spline != lrspline.get())
iel = spline->getElementContaining(lrspline->getElement(iel-1)->midpoint()) + 1;
const LR::Element* el = lrspline->getElement(iel-1);
const LR::Element* el = spline->getElement(iel-1);
X.resize(3,el->nBasisFunctions());
int n = 1;

View File

@ -147,7 +147,8 @@ public:
//! \param[in] iel 1-based element index
//! \param[out] X 3\f$\times\f$n-matrix, where \a n is the number of nodes
//! in one element
virtual bool getElementCoordinates(Matrix& X, int iel, bool = false) const;
//! \param[in] forceItg If true return integration basis element coordinates
virtual bool getElementCoordinates(Matrix& X, int iel, bool forceItg = false) const;
//! \brief Obtain element neighbours.
virtual void getElmConnectivities(IntMat& neighs) const;