v0.14.0
Loading...
Searching...
No Matches
Functions
MoFEM::BcManagerImplTools Namespace Reference

Functions

auto get_dim (const Range &ents)
 
auto get_adj_ents (moab::Interface &moab, const Range &ents)
 

Function Documentation

◆ get_adj_ents()

auto MoFEM::BcManagerImplTools::get_adj_ents ( moab::Interface &  moab,
const Range ents 
)

Definition at line 17 of file BcManager.cpp.

17 {
18 Range verts;
19 CHK_MOAB_THROW(moab.get_connectivity(ents, verts, true), "get verts");
20 const auto dim = get_dim(ents);
21 for (size_t d = 1; d < dim; ++d) {
22 for (auto dd = d + 1; dd <= dim; ++dd) {
23 CHK_MOAB_THROW(moab.get_adjacencies(ents.subset_by_dimension(dd), d,
24 false, verts, moab::Interface::UNION),
25 "get adj");
26 }
27 }
28 verts.merge(ents);
29 return verts;
30}
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:576
const int dim
auto get_dim(const Range &ents)
Definition: BcManager.cpp:10

◆ get_dim()

auto MoFEM::BcManagerImplTools::get_dim ( const Range ents)

Definition at line 10 of file BcManager.cpp.

10 {
11 for (auto d : {3, 2, 1})
12 if (ents.num_of_dimension(d))
13 return d;
14 return 0;
15};