Added: Utilities ASMbase::getElementNodes and SIMbase::getElmNodes
This commit is contained in:
parent
b8695d24d4
commit
1910f350f3
@ -272,6 +272,15 @@ int ASMbase::getElmID (size_t iel) const
|
|||||||
return abs(MLGE[iel-1]);
|
return abs(MLGE[iel-1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const IntVec& ASMbase::getElementNodes (int iel) const
|
||||||
|
{
|
||||||
|
if (iel > 0 && (size_t)iel <= MNPC.size())
|
||||||
|
return MNPC[iel-1];
|
||||||
|
|
||||||
|
static IntVec empty;
|
||||||
|
return empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
unsigned char ASMbase::getNodalDOFs (size_t inod) const
|
unsigned char ASMbase::getNodalDOFs (size_t inod) const
|
||||||
{
|
{
|
||||||
|
@ -254,6 +254,9 @@ public:
|
|||||||
const IntVec& getMyNodeNums() const { return myMLGN; }
|
const IntVec& getMyNodeNums() const { return myMLGN; }
|
||||||
//! \brief Returns the actual global element numbers of this patch.
|
//! \brief Returns the actual global element numbers of this patch.
|
||||||
const IntVec& getMyElementNums() const { return myMLGE; }
|
const IntVec& getMyElementNums() const { return myMLGE; }
|
||||||
|
//! \brief Returns the nodal point correspondance array for an element.
|
||||||
|
//! \param[in] iel 1-based element index local to current patch
|
||||||
|
const IntVec& getElementNodes(int iel) const;
|
||||||
//! \brief Returns number of bases of this patch.
|
//! \brief Returns number of bases of this patch.
|
||||||
virtual size_t getNoBasis() const { return 1; }
|
virtual size_t getNoBasis() const { return 1; }
|
||||||
//! \brief Returns the total number of nodes in this patch.
|
//! \brief Returns the total number of nodes in this patch.
|
||||||
|
@ -609,6 +609,22 @@ size_t SIMbase::getNoElms (bool includeXelms) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool SIMbase::getElmNodes (IntVec& mnpc, int iel) const
|
||||||
|
{
|
||||||
|
if (mySam)
|
||||||
|
return mySam->getElmNodes(mnpc,iel);
|
||||||
|
else if (myModel.size() != 1)
|
||||||
|
{
|
||||||
|
std::cerr <<" *** SIMbase::getElmNodes: The nodal point correspondance is"
|
||||||
|
<<" unknown at this point in a multi-patch model."<< std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
mnpc = myModel.front()->getElementNodes(iel);
|
||||||
|
return !mnpc.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
size_t SIMbase::getNoSolutions () const
|
size_t SIMbase::getNoSolutions () const
|
||||||
{
|
{
|
||||||
return myProblem ? myProblem->getNoSolutions() : 0;
|
return myProblem ? myProblem->getNoSolutions() : 0;
|
||||||
|
@ -181,6 +181,8 @@ public:
|
|||||||
int getGlobalNode(int node) const;
|
int getGlobalNode(int node) const;
|
||||||
//! \brief Returns the process-local node number from a global node number.
|
//! \brief Returns the process-local node number from a global node number.
|
||||||
int getLocalNode(int node) const;
|
int getLocalNode(int node) const;
|
||||||
|
//! \brief Finds the Matrix of Nodal Point Correspondance for element \a iel.
|
||||||
|
bool getElmNodes(std::vector<int>& mnpc, int iel) const;
|
||||||
|
|
||||||
//! \brief Finds the list of global nodes associated with a boundary.
|
//! \brief Finds the list of global nodes associated with a boundary.
|
||||||
//! \param[in] pcode Property code identifying the boundary
|
//! \param[in] pcode Property code identifying the boundary
|
||||||
|
Loading…
Reference in New Issue
Block a user