Integration on skeleton for 2dTeting integration on skeleton and checking of continuity of hcurl space on edges.
static char help[] =
"...\n\n";
};
if (
type == MBEDGE && side == getEdgeSideNumber()) {
MatrixDouble diff = getCoordsAtGaussPts() - getEdgeCoordsAtGaussPts();
const double eps = 1e-12;
if (norm_inf(diff) >
eps)
"coordinates at integration pts are different");
const size_t nb_dofs = data.
getN().size2() / 3;
const size_t nb_integration_pts = data.
getN().size1();
auto &dir = getDirection();
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_normal(
i) * t_hdiv_base(
i);
++t_hdiv_base;
}
}
}
}
};
faceSideFe(m_field), elemData(elem_data) {
auto jac_ptr = boost::make_shared<MatrixDouble>();
}
const size_t nb_dofs = data.
getN().size2() / 3;
const size_t nb_integration_pts = data.
getN().size1();
auto &dir = getDirection();
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) {
elemData.
dotEdge(gg, bb) = t_normal(
i) * t_hdiv_base(
i);
++t_hdiv_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));
}
};
}
}
};
int main(
int argc,
char *argv[]) {
try {
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->getOpPtrVector().push_back(
skeleton_fe);
}
}
return 0;
}