45#include "MR_rect_tree.hpp"
46#include "MR_cell_cplx.hpp"
47#include "MR_rt_to_cc.hpp"
50typedef mjr::tree15b2d1rT tt_t;
51typedef mjr::MRccT5 cc_t;
52typedef mjr::MR_rt_to_cc<tt_t, cc_t> tc_t;
55tt_t::rrpt_t half_sphere(tt_t::drpt_t xvec) {
56 double m = xvec[0] * xvec[0] + xvec[1] * xvec[1];
58 return std::numeric_limits<double>::quiet_NaN();
60 return std::sqrt(1-m);
66 tt_t tree({-1.1, -1.1},
71 tree.refine_grid(5, half_sphere);
75 tree.refine_recursive_if_cell_vertex_is_nan(7, half_sphere);
83 tree.balance_tree(1, half_sphere);
88 tc_t::construct_geometry_fans(ccplx,
91 {{tc_t::val_src_spc_t::FDOMAIN, 0},
92 {tc_t::val_src_spc_t::FDOMAIN, 1},
93 {tc_t::val_src_spc_t::FRANGE, 0}},
97 ccplx.create_named_datasets({
"x",
"y",
"f(x,y)"},
98 {{
"NORMALS", {0, 1, 2}}});
102 ccplx.write_xml_vtk(
"surface_plot_edge.vtu",
"surface_plot_edge");