diff --git a/src/SIM/SIMinput.C b/src/SIM/SIMinput.C index 343d632f..3228cacc 100644 --- a/src/SIM/SIMinput.C +++ b/src/SIM/SIMinput.C @@ -1677,5 +1677,19 @@ const TopEntity& SIMinput::getEntity (const std::string& name) const SIMinput::IdxVec3* SIMinput::getDiscretePoint (int idx) { - return idx < 0 || idx >= (int)myTopPts.size() ? NULL : &myTopPts[idx]; + return idx < 0 || idx >= (int)myTopPts.size() ? nullptr : &myTopPts[idx]; +} + + +bool SIMinput::getTopItemNodes (const TopItem& titem, IntVec& glbNodes) const +{ + ASMbase* pch = this->getPatch(titem.patch); + if (pch) + pch->getBoundaryNodes(titem.item,glbNodes); + else if (!titem.patch && titem.item >= 0 && titem.item < (int)myTopPts.size()) + glbNodes.push_back(myTopPts[titem.item].first); + else + return false; + + return true; } diff --git a/src/SIM/SIMinput.h b/src/SIM/SIMinput.h index 174fbe46..7da5b7a6 100644 --- a/src/SIM/SIMinput.h +++ b/src/SIM/SIMinput.h @@ -43,10 +43,11 @@ public: int geo_level; //!< The time level for the (adapted) geometry in the file char basis; //!< The basis to inject field into (for mixed) char component; //!< Component for field (for functions) - std::string sim_field; //!< The name of the field in the SIM class + std::string sim_field; //!< The name of the field in the %SIM class std::string file_basis; //!< Basis for field on file std::string file_field; //!< The field name in the file or type of function - std::string function; //!< Function if given in function form + std::string function; //!< Function expression if given in function form + //! \brief Default constructor. ICInfo() : file_level(-1), geo_level(0), basis(1), component(0) {} //! \brief Constructor providing the field name. @@ -256,6 +257,9 @@ public: //! \brief Returns the whole topology set container (for testing only). const TopologySet& getTopology() const { return myEntitys; } + //! \brief Returns the node numbers associated with a topological item. + bool getTopItemNodes(const TopItem& titem, std::vector& glbNodes) const; + //! \brief Returns pointer to an indexed discrete point. IdxVec3* getDiscretePoint(int idx);