Go to the source code of this file.
◆ first_grid()
Generate a hypercube, and output it as an svg file.
Definition at line 35 of file step-1.cc.
39 std::cout <<
"Number of original vertices: " <<
triangulation.n_vertices()
44 std::cout <<
"Number of vertices after 4 refinements: "
47 std::ofstream out(
"grid-1.svg");
50 std::cout <<
"Grid written to grid-1.svg" << std::endl;
53 std::ofstream out(
"grid-1.vtk");
56 std::cout <<
"Grid written to grid-1.vtk" << std::endl;
◆ second_grid()
Generate a locally refined hyper_shell, and output it as an svg file.
Definition at line 63 of file step-1.cc.
66 const double inner_radius = 0.5, outer_radius = 1.0;
68 triangulation, center, inner_radius, outer_radius, 10);
80 for (
const auto v : cell->vertex_indices())
82 const double distance_from_center =
85 if (std::fabs(distance_from_center - inner_radius) <=
88 cell->set_refine_flag();
◆ third_grid()
Create an L-shaped domain with one global refinement, and write it on.
Definition at line 104 of file step-1.cc.
◆ get_info()
std::tuple<unsigned int, unsigned int, unsigned int> get_info |
( |
const Triangulation< 2 > & |
| ) |
|
Returns a tuple with number of levels, number of cells, number of active.
Definition at line 112 of file step-1.cc.
115 return std::make_tuple(0, 0, 0);
◆ main()