fixed: implement ASMu2Dmx::getCoord
need to use the correct spline object for the requested node
This commit is contained in:
parent
877601c072
commit
b2365bbeab
@ -668,3 +668,22 @@ bool ASMu2Dmx::refine (const LR::RefineData& prm,
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Vec3 ASMu2Dmx::getCoord (size_t inod) const
|
||||||
|
{
|
||||||
|
size_t b = 0;
|
||||||
|
size_t nbb = 0;
|
||||||
|
while (nbb + nb[b] < inod && b < nb.size())
|
||||||
|
nbb += nb[b++];
|
||||||
|
++b;
|
||||||
|
|
||||||
|
const LR::Basisfunction* basis = this->getBasis(b)->getBasisfunction(inod-nbb-1);
|
||||||
|
if (!basis) {
|
||||||
|
std::cerr << "Asked to get coordinate for node " << inod
|
||||||
|
<< ", but only have " << this->getBasis(b)->nBasisFunctions()
|
||||||
|
<< " nodes in basis " << b << std::endl;
|
||||||
|
return Vec3();
|
||||||
|
}
|
||||||
|
return Vec3(&(*basis->cp()),nsd);
|
||||||
|
}
|
||||||
|
@ -72,6 +72,9 @@ public:
|
|||||||
//! \brief Returns the classification of a node.
|
//! \brief Returns the classification of a node.
|
||||||
//! \param[in] inod 1-based node index local to current patch
|
//! \param[in] inod 1-based node index local to current patch
|
||||||
virtual char getNodeType(size_t inod) const;
|
virtual char getNodeType(size_t inod) const;
|
||||||
|
//! \brief Returns the global coordinates for the given node.
|
||||||
|
//! \param[in] inod 1-based node index local to current patch
|
||||||
|
virtual Vec3 getCoord(size_t inod) const;
|
||||||
|
|
||||||
//! \brief Initializes the patch level MADOF array for mixed problems.
|
//! \brief Initializes the patch level MADOF array for mixed problems.
|
||||||
virtual void initMADOF(const int* sysMadof);
|
virtual void initMADOF(const int* sysMadof);
|
||||||
|
Loading…
Reference in New Issue
Block a user