21 std::ifstream ifs(
"../../gmsh/data/cylinder_r" + std::to_string(r) +
".msh");
25 if (std::abs(cell->center()[0]) < a) {
26 cell->set_material_id(mid_2);
28 cell->set_material_id(mid_1);
32 GridGenerator::hyper_cube(triangulation_slice, 0.0, b);
42 std::ifstream ifs(
"../../gmsh/data/sphere_r" + std::to_string(r) +
".msh");
49 if (cell->center().norm() < a)
50 cell->set_material_id(mid_2);
52 for (
unsigned int f = 0; f < GeometryInfo<2>::faces_per_cell; ++f) {
53 double dif_norm = 0.0;
54 for (
unsigned int v = 0; v < GeometryInfo<2>::vertices_per_face; v++)
55 dif_norm += std::abs(cell->face(f)->vertex(0).norm() -
56 cell->face(f)->vertex(v).norm());
58 if ((dif_norm < eps) && (cell->center().norm() > rd))
59 cell->face(f)->set_all_manifold_ids(1);
65 GridGenerator::hyper_cube(triangulation_slice, 0.0, b - 0.01);
Implements the Axisymmetric - volume charge (rho-axi/) numerical experiment.
Triangulation< dim > triangulation
The mesh.