Skip to content

Commit 8247ab3

Browse files
committed
s
1 parent 79800ac commit 8247ab3

File tree

4 files changed

+40
-7
lines changed

4 files changed

+40
-7
lines changed

src/ASM/DomainDecomposition.C

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,10 @@ void DomainDecomposition::setupNodeNumbers(int basis, IntVec& lNodes,
322322
// need to expand to all bases for corners and edges
323323
for (size_t b = 1; b <= pch->getNoBasis(); ++b)
324324
cbasis.insert(b);
325-
else // directly add nodes, cbasis remains empty
325+
else { // directly add nodes, cbasis remains empty
326+
std::cout << "we go here yo" << std::endl;
326327
pch->getBoundaryNodes(lidx, lNodes, 0, thick, orient, false);
328+
}
327329

328330
const ASM2D* pch2D = dynamic_cast<const ASM2D*>(pch);
329331
const ASM3D* pch3D = dynamic_cast<const ASM3D*>(pch);

src/ASM/LR/ASMu3D.C

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2082,18 +2082,27 @@ void ASMu3D::getBoundaryNodes (int lIndex, IntVec& nodes, int basis,
20822082

20832083
if (!this->getBasis(basis)) return; // silently ignore empty patches
20842084

2085-
nodes = this->getFaceNodes(lIndex, basis, orient);
2085+
if (nodes.empty()) {
2086+
std::cout << "herrrr " << basis << std::endl;
2087+
nodes = this->getFaceNodes(lIndex, basis, orient);
2088+
if (!local)
2089+
for (int& node : nodes)
2090+
node = this->getNodeID(node);
2091+
} else {
2092+
IntVec nodes2 = this->getFaceNodes(lIndex, basis, orient);
2093+
if (!local)
2094+
for (int& node : nodes2)
2095+
node = this->getNodeID(node);
2096+
nodes.insert(nodes.end(), nodes2.begin(), nodes2.end());
2097+
}
20862098

2087-
#if SP_DEBUG > 1
2099+
//#if SP_DEBUG > 1
20882100
std::cout <<"Boundary nodes in patch "<< idx+1 <<" edge "<< lIndex <<":";
20892101
for (size_t i = 0; i < nodes.size(); i++)
20902102
std::cout <<" "<< nodes[i];
20912103
std::cout << std::endl;
2092-
#endif
2104+
//#endif
20932105

2094-
if (!local)
2095-
for (int& node : nodes)
2096-
node = this->getNodeID(node);
20972106
}
20982107

20992108

src/ASM/LR/ASMu3Dmx.C

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,3 +1108,14 @@ const LR::LRSpline* ASMu3Dmx::getRefinementBasis() const
11081108
{
11091109
return refBasis.get();
11101110
}
1111+
1112+
1113+
void ASMu3Dmx::getBoundaryNodes (int lIndex, IntVec& nodes, int basis,
1114+
int thick, int orient, bool local) const
1115+
{
1116+
if (basis > 0)
1117+
this->ASMu3D::getBoundaryNodes(lIndex, nodes, basis, thick, orient, local);
1118+
else
1119+
for (size_t b = 1; b <= this->getNoBasis(); ++b)
1120+
this->ASMu3D::getBoundaryNodes(lIndex, nodes, b, thick, orient, local);
1121+
}

src/ASM/LR/ASMu3Dmx.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,17 @@ class ASMu3Dmx : public ASMu3D, private ASMmxBase
185185
virtual bool refine(const LR::RefineData& prm, Vectors& sol,
186186
const char* fName = nullptr);
187187

188+
//! \brief Finds the global (or patch-local) node numbers on a patch boundary.
189+
//! \param[in] lIndex Local index of the boundary edge
190+
//! \param nodes Array of node numbers
191+
//! \param[in] basis Which basis to grab nodes for (0 for all)
192+
//! \param[in] thick Thickness of connection
193+
//! \param[in] orient Orientation for returned boundary nodes
194+
//! \param[in] local If \e true return patch-local node numbers
195+
virtual void getBoundaryNodes(int lIndex, IntVec& nodes,
196+
int basis, int thick = 1,
197+
int orient = 0, bool local = false) const;
198+
188199
//! \brief Remap (geometry) element wise errors to refinement basis functions.
189200
//! \param errors The remapped errors
190201
//! \param[in] origErr The element wise errors on the geometry mesh

0 commit comments

Comments
 (0)