Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
akva2 committed Jul 19, 2018
1 parent 79800ac commit 8247ab3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/ASM/DomainDecomposition.C
Original file line number Diff line number Diff line change
Expand Up @@ -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<const ASM2D*>(pch);
const ASM3D* pch3D = dynamic_cast<const ASM3D*>(pch);
Expand Down
21 changes: 15 additions & 6 deletions src/ASM/LR/ASMu3D.C
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down
11 changes: 11 additions & 0 deletions src/ASM/LR/ASMu3Dmx.C
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
11 changes: 11 additions & 0 deletions src/ASM/LR/ASMu3Dmx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8247ab3

Please sign in to comment.