19 using coord_t = Eigen::Vector2d;
24 const unsigned no_of_cells = nx * ny;
25 const unsigned no_of_edges = (nx + 1) * ny + nx * (ny + 1);
26 const unsigned no_of_vertices = (nx + 1) * (ny + 1);
28 if (no_of_cells == 0) {
34 if ((x_size <= 0.0) || (y_size <= 0.0)) {
38 const double hx = x_size / nx;
39 const double hy = y_size / ny;
43 "TPQuadmesh: {} cells, {} edges, {} vertices, meshwidths hx/hy = {}/{}",
44 no_of_cells, no_of_edges, no_of_vertices, hx, hy);
47 std::vector<size_type> v_idx(no_of_vertices);
50 for (
size_type i = 0; i <= nx; ++i, ++node_cnt) {
52 coord_t node_coord(2);
56 SPDLOG_LOGGER_TRACE(
Logger(),
"Adding vertex {}: {}", node_cnt,
57 node_coord.transpose());
65 std::vector<size_type> t_idx(no_of_cells);
69 for (
size_type j = 0; j < ny; ++j, quad_cnt++) {
71 std::vector<size_type> vertex_index_list{
75 Eigen::Matrix<double, 2, 4> quad_geo(2, 4);
84 SPDLOG_LOGGER_TRACE(
Logger(),
"Adding quad {}:\n{}", quad_cnt, quad_geo);
90 std::make_unique<geometry::QuadO1>(quad_geo));