43#include "MR_rect_tree.hpp"
44#include "MR_cell_cplx.hpp"
45#include "MR_rt_to_cc.hpp"
48typedef mjr::tree15b2d1rT tt_t;
49typedef mjr::MRccT5 cc_t;
50typedef mjr::MR_rt_to_cc<tt_t, cc_t> tc_t;
53tt_t::rrpt_t annular_hat(tt_t::drpt_t xvec) {
54 double v = std::sqrt(std::abs(1 - xvec[0] * xvec[0] - xvec[1] * xvec[1])) - 0.15;
56 return std::numeric_limits<double>::quiet_NaN();
63tt_t::src_t unit_circle_sdf(tt_t::drpt_t xvec) {
64 double m = xvec[0] * xvec[0] + xvec[1] * xvec[1];
70 tt_t tree({-1.1, -1.1},
75 tree.refine_grid(5, annular_hat);
78 tree.refine_leaves_recursive_cell_pred(7, annular_hat, [&tree](
int i) {
return (tree.cell_cross_sdf(i, unit_circle_sdf)); });
81 tree.balance_tree(1, annular_hat);
86 tc_t::construct_geometry_fans(ccplx,
89 {{tc_t::val_src_spc_t::FDOMAIN, 0},
90 {tc_t::val_src_spc_t::FDOMAIN, 1},
91 {tc_t::val_src_spc_t::FRANGE, 0}},
95 ccplx.create_named_datasets({
"x",
"y",
"f(x,y)"},
96 {{
"NORMALS", {0, 1, 2}}});
100 ccplx.write_xml_vtk(
"surface_plot_annular_edge.vtu",
"surface_plot_annular_edge");