added: setCoord to ASMs3DLag (#425)

similar to ASMs2DLag
This commit is contained in:
Arne Morten Kvarving 2020-07-06 15:30:03 +02:00 committed by GitHub
parent 24002aec70
commit 8e26a3903a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -238,6 +238,15 @@ Vec3 ASMs3DLag::getCoord (size_t inod) const
}
void ASMs3DLag::setCoord (size_t inod, const Vec3& Xnod)
{
if (inod > nnod)
myCoord.resize(nnod = inod);
myCoord[inod-1] = Xnod;
}
bool ASMs3DLag::getElementCoordinates (Matrix& X, int iel) const
{
if (iel < 1 || (size_t)iel > MNPC.size())

View File

@ -72,6 +72,13 @@ public:
//! \param[in] inod 1-based node index local to current patch
virtual Vec3 getCoord(size_t inod) const;
protected:
//! \brief Assigned global coordinates for the given node.
//! \param[in] inod 1-based node index local to current patch
//! \param[in] Xnod Coordinates of the node
void setCoord(size_t inod, const Vec3& Xnod);
public:
//! \brief Updates the nodal coordinates for this patch.
//! \param[in] displ Incremental displacements to update the coordinates with
virtual bool updateCoords(const Vector& displ);