21 std::ifstream ifs(
"../../gmsh/data/cylinder_r" + std::to_string(r) +
".msh");
25 if (std::abs(cell->center()[0]) < a) {
26 for (
unsigned int f = 0; f < GeometryInfo<2>::faces_per_cell; ++f) {
27 double dif_norm = 0.0;
28 for (
unsigned int v = 0; v < GeometryInfo<2>::vertices_per_face; ++v) {
29 dif_norm += std::abs(cell->face(f)->vertex(v)[0] - a);
33 cell->face(f)->set_user_index(2);
34 cell->set_user_index(1);
39 GridGenerator::hyper_cube(triangulation_slice, 0.0, b);
49 std::ifstream ifs(
"../../gmsh/data/sphere_r" + std::to_string(r) +
".msh");
55 for (
unsigned int f = 0; f < GeometryInfo<2>::faces_per_cell; ++f) {
56 double dif_norm = 0.0;
57 for (
unsigned int v = 0; v < GeometryInfo<2>::vertices_per_face; v++)
58 dif_norm += std::abs(cell->face(f)->vertex(0).norm() -
59 cell->face(f)->vertex(v).norm());
61 if ((dif_norm < eps) && (cell->center().norm() > rd)) {
63 cell->face(f)->set_all_manifold_ids(1);
65 double dif_norm_a = 0.0;
66 for (
unsigned int v = 0; v < GeometryInfo<2>::vertices_per_face; v++)
67 dif_norm_a += std::abs(cell->face(f)->vertex(v).norm() - a);
69 if ((dif_norm < eps) && (std::abs(cell->center().norm()) < a)) {
70 cell->face(f)->set_user_index(2);
71 cell->set_user_index(1);
79 GridGenerator::hyper_cube(triangulation_slice, 0.0, b - 0.01);
Implements the Axisymmetric - surface charge (sch-axi/) numerical experiment.
Triangulation< dim > triangulation
The mesh.