Mark skin entities, i.e. boundary, next check DOFs if are properly marked when accessed form user data operator.
static char help[] =
"...\n\n";
const std::vector<unsigned char> &mArker;
if (nb_dofs == 0)
auto get_boundary_marker_directly_from_range = [&]() {
std::vector<unsigned char> ents_marker_used_for_testing;
case MBVERTEX: {
for (size_t side = 0; side != getNumberOfNodesOnElement(); ++side) {
ents_marker_used_for_testing[3 * side + 0] =
skinEnts.find(ent) != skinEnts.end() ? 1 : 0;
ents_marker_used_for_testing[3 * side + 2] =
ents_marker_used_for_testing[3 * side + 0];
}
break;
}
default: {
bool is_on_boundary = skinEnts.find(ent) != skinEnts.end();
for (size_t dof = 0; dof != nb_dofs; ++dof)
if ((dof % 3) != 1)
ents_marker_used_for_testing[dof] = is_on_boundary ? 1 : 0;
}
};
return ents_marker_used_for_testing;
};
auto test_marker = get_boundary_marker_directly_from_range();
for (
size_t n = 0;
n != nb_dofs; ++
n) {
if (test_marker[
n] != mArker[local_index])
"Wrong boundary marker");
}
}
};
int main(
int argc,
char *argv[]) {
try {
DMType dm_name = "DMMOFEM";
CHKERR simple_interface->getOptions();
CHKERR simple_interface->loadFile(
"");
CHKERR simple_interface->addDomainField(
"FIELD1",
H1,
CHKERR simple_interface->setFieldOrder(
"FIELD1",
order);
CHKERR simple_interface->setUp();
auto get_ents_on_mesh_skin = [&]() {
CHKERR skin.find_skin(0, faces,
false, skin_edges);
CHKERR moab.get_connectivity(skin_edges, skin_verts,
true);
skin_edges.merge(skin_verts);
return skin_edges;
};
auto mark_boundary_dofs = [&](
Range &skin_edges) {
std::vector<unsigned char>
marker;
problem_manager->markDofs(simple_interface->getProblemName(),
ROW,
problem_manager->modifyMarkDofs(simple_interface->getProblemName(),
ROW,
};
auto skin_ents = get_ents_on_mesh_skin();
auto marker = mark_boundary_dofs(skin_ents);
boost::shared_ptr<FaceEle> fe(
new FaceEle(m_field));
fe->getOpPtrVector().push_back(
new OpFace(skin_ents,
marker));
auto dm = simple_interface->getDM();
fe);
}
}