diff --git a/src/ASM/DomainDecomposition.C b/src/ASM/DomainDecomposition.C index bfc344100..bab07a930 100644 --- a/src/ASM/DomainDecomposition.C +++ b/src/ASM/DomainDecomposition.C @@ -322,8 +322,10 @@ void DomainDecomposition::setupNodeNumbers(int basis, IntVec& lNodes, // need to expand to all bases for corners and edges for (size_t b = 1; b <= pch->getNoBasis(); ++b) cbasis.insert(b); - else // directly add nodes, cbasis remains empty + else { // directly add nodes, cbasis remains empty + std::cout << "we go here yo" << std::endl; pch->getBoundaryNodes(lidx, lNodes, 0, thick, orient, false); + } const ASM2D* pch2D = dynamic_cast(pch); const ASM3D* pch3D = dynamic_cast(pch); diff --git a/src/ASM/LR/ASMu3D.C b/src/ASM/LR/ASMu3D.C index 3ce855b55..9167e7377 100644 --- a/src/ASM/LR/ASMu3D.C +++ b/src/ASM/LR/ASMu3D.C @@ -2082,18 +2082,27 @@ void ASMu3D::getBoundaryNodes (int lIndex, IntVec& nodes, int basis, if (!this->getBasis(basis)) return; // silently ignore empty patches - nodes = this->getFaceNodes(lIndex, basis, orient); + if (nodes.empty()) { + std::cout << "herrrr " << basis << std::endl; + nodes = this->getFaceNodes(lIndex, basis, orient); + if (!local) + for (int& node : nodes) + node = this->getNodeID(node); + } else { + IntVec nodes2 = this->getFaceNodes(lIndex, basis, orient); + if (!local) + for (int& node : nodes2) + node = this->getNodeID(node); + nodes.insert(nodes.end(), nodes2.begin(), nodes2.end()); + } -#if SP_DEBUG > 1 +//#if SP_DEBUG > 1 std::cout <<"Boundary nodes in patch "<< idx+1 <<" edge "<< lIndex <<":"; for (size_t i = 0; i < nodes.size(); i++) std::cout <<" "<< nodes[i]; std::cout << std::endl; -#endif +//#endif - if (!local) - for (int& node : nodes) - node = this->getNodeID(node); } diff --git a/src/ASM/LR/ASMu3Dmx.C b/src/ASM/LR/ASMu3Dmx.C index 8cd9c7c89..703420f09 100644 --- a/src/ASM/LR/ASMu3Dmx.C +++ b/src/ASM/LR/ASMu3Dmx.C @@ -1108,3 +1108,14 @@ const LR::LRSpline* ASMu3Dmx::getRefinementBasis() const { return refBasis.get(); } + + +void ASMu3Dmx::getBoundaryNodes (int lIndex, IntVec& nodes, int basis, + int thick, int orient, bool local) const +{ + if (basis > 0) + this->ASMu3D::getBoundaryNodes(lIndex, nodes, basis, thick, orient, local); + else + for (size_t b = 1; b <= this->getNoBasis(); ++b) + this->ASMu3D::getBoundaryNodes(lIndex, nodes, b, thick, orient, local); +} diff --git a/src/ASM/LR/ASMu3Dmx.h b/src/ASM/LR/ASMu3Dmx.h index 58b272cb6..00d833ab9 100644 --- a/src/ASM/LR/ASMu3Dmx.h +++ b/src/ASM/LR/ASMu3Dmx.h @@ -185,6 +185,17 @@ class ASMu3Dmx : public ASMu3D, private ASMmxBase virtual bool refine(const LR::RefineData& prm, Vectors& sol, const char* fName = nullptr); + //! \brief Finds the global (or patch-local) node numbers on a patch boundary. + //! \param[in] lIndex Local index of the boundary edge + //! \param nodes Array of node numbers + //! \param[in] basis Which basis to grab nodes for (0 for all) + //! \param[in] thick Thickness of connection + //! \param[in] orient Orientation for returned boundary nodes + //! \param[in] local If \e true return patch-local node numbers + virtual void getBoundaryNodes(int lIndex, IntVec& nodes, + int basis, int thick = 1, + int orient = 0, bool local = false) const; + //! \brief Remap (geometry) element wise errors to refinement basis functions. //! \param errors The remapped errors //! \param[in] origErr The element wise errors on the geometry mesh