Integration on skeleton for 2d Teting integration on skeleton and checking of continuity of hcurl space on edges.
static char help[] =
"...\n\n";
};
elemData(elem_data) {}
if (
type == MBEDGE && side == getEdgeSideNumber()) {
MatrixDouble diff = getCoordsAtGaussPts() - getEdgeCoordsAtGaussPts();
const double eps = 1e-12;
if (norm_inf(diff) >
eps) {
<< "Quad coords: " << getCoordsAtGaussPts();
<< "Edge coords: " << getEdgeCoordsAtGaussPts();
MOFEM_LOG(
"ATOM", Sev::error) <<
"Difference: " << diff;
"Coordinates at integration pts are different");
}
const size_t nb_dofs = data.
getN().size2();
const size_t nb_integration_pts = data.
getN().size1();
if (getFEMethod()->nInTheLoop == 0)
else
dot_elem_data.resize(nb_integration_pts, nb_dofs, false);
for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
for (size_t bb = 0; bb != nb_dofs; ++bb) {
dot_elem_data(gg, bb) = t_base;
++t_base;
}
}
}
}
};
faceSideFe(m_field), elemData(elem_data) {
}
const size_t nb_dofs = data.
getN().size2();
const size_t nb_integration_pts = data.
getN().size1();
<< "Cords at integration points" << getCoordsAtGaussPts();
elemData.
dotEdge.resize(nb_integration_pts, nb_dofs,
false);
elemData.
dotEleLeft.resize(nb_integration_pts, 0,
false);
elemData.
dotEleRight.resize(nb_integration_pts, 0,
false);
for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
for (size_t bb = 0; bb != nb_dofs; ++bb) {
++t_base;
}
}
CHKERR loopSideFaces(
"dFE", faceSideFe);
auto check_continuity_of_base = [&](auto &vol_dot_data) {
if (vol_dot_data.size1() != elemData.
dotEdge.size1())
"Inconsistent number of integration points");
if (vol_dot_data.size2() != elemData.
dotEdge.size2())
"Inconsistent number of base functions");
const double eps = 1e-12;
for (size_t gg = 0; gg != vol_dot_data.size1(); ++gg)
for (size_t bb = 0; bb != vol_dot_data.size2(); ++bb) {
const double error =
std::abs(vol_dot_data(gg, bb) - elemData.
dotEdge(gg, bb));
"Inconsistency (%d, %d) %3.4e != %3.4e", gg, bb,
vol_dot_data(gg, bb), elemData.
dotEdge(gg, bb));
else
}
};
}
}
};
int main(
int argc,
char *argv[]) {
try {
auto core_log = logging::core::get();
core_log->add_sink(
DMType dm_name = "DMMOFEM";
{
enum bases { AINSWORTH, DEMKOWICZ, LASTBASEOP };
const char *list_bases[] = {"ainsworth", "demkowicz"};
PetscBool flg;
PetscInt choice_base_value = AINSWORTH;
LASTBASEOP, &choice_base_value, &flg);
if (flg == PETSC_TRUE) {
if (choice_base_value == AINSWORTH)
else if (choice_base_value == DEMKOWICZ)
return base;
}
};
auto base = get_base();
auto dm = simple_interface->
getDM();
boost::shared_ptr<EdgeEle> skeleton_fe =
boost::shared_ptr<EdgeEle>(
new EdgeEle(m_field));
skeleton_fe->getOpPtrVector().push_back(
skeleton_fe);
}
}
return 0;
}