1 #ifndef OMEGA_H_ADAPT_HPP
2 #define OMEGA_H_ADAPT_HPP
6 #include <Omega_h_config.h>
7 #include <Omega_h_compare.hpp>
8 #include <Omega_h_defines.hpp>
9 #include <Omega_h_mark.hpp>
17 virtual void out_of_line_virtual_method();
18 virtual void refine(
Mesh& old_mesh,
Mesh& new_mesh,
LOs keys2edges,
19 LOs keys2midverts, Int prod_dim,
LOs keys2prods,
LOs prods2new_ents,
20 LOs same_ents2old_ents,
LOs same_ents2new_ents) = 0;
21 virtual void coarsen(
Mesh& old_mesh,
Mesh& new_mesh,
LOs keys2verts,
22 Adj keys2doms, Int prod_dim,
LOs prods2new_ents,
LOs same_ents2old_ents,
23 LOs same_ents2new_ents) = 0;
24 virtual void swap(
Mesh& old_mesh,
Mesh& new_mesh, Int prod_dim,
25 LOs keys2edges,
LOs keys2prods,
LOs prods2new_ents,
26 LOs same_ents2old_ents,
LOs same_ents2new_ents) = 0;
27 virtual void swap_copy_verts(
Mesh& old_mesh,
Mesh& new_mesh) = 0;
32 std::map<std::string, Omega_h_Transfer> type_map;
33 std::map<std::string, std::string> integral_map;
34 std::map<std::string, std::string>
36 std::map<std::string, std::string>
37 velocity_momentum_map;
38 std::map<std::string, VarCompareOpts>
40 std::shared_ptr<UserTransfer> user_xfer;
41 void validate(
Mesh* mesh)
const;
44 enum Verbosity { SILENT, EACH_ADAPT, EACH_REBUILD, EXTRA_STATS };
46 #ifdef OMEGA_H_USE_EGADS
54 Real min_length_desired;
55 Real max_length_desired;
56 Real max_length_allowed;
57 Real min_quality_allowed;
58 Real min_quality_desired;
61 Real length_histogram_min;
62 Real length_histogram_max;
63 Int nlength_histogram_bins;
64 Int nquality_histogram_bins;
65 #ifdef OMEGA_H_USE_EGADS
67 bool should_smooth_snap;
68 Real snap_smooth_tolerance;
69 bool allow_snap_failure;
74 bool should_coarsen_slivers;
75 bool should_prevent_coarsen_flip;
85 void print_adapt_histograms(
Mesh* mesh,
AdaptOpts const& opts);
87 void fix_momentum_velocity_verts(
88 Mesh* mesh, std::vector<ClassPair>
const& class_pairs, Int comp);
91 bool exit_on_stall =
false, Int max_niters = 40);
92 bool approach_metric(
Mesh* mesh,
AdaptOpts const& opts, Real min_step = 1e-4);
98 Omega_h_Isotropy isotropy;
99 Omega_h_Scales scales;
102 std::string
const& tag_name_ =
"",
103 Omega_h_Isotropy isotropy_ = OMEGA_H_ANISOTROPIC,
104 Omega_h_Scales scales_ = OMEGA_H_SCALES);
110 std::vector<MetricSource> sources;
111 bool should_limit_lengths;
114 bool should_limit_gradation;
115 Real max_gradation_rate;
116 Real gradation_convergence_tolerance;
117 bool should_limit_element_count;
118 Real max_element_count;
119 Real min_element_count;
120 Real element_count_over_relaxation;
121 Int nsmoothing_steps;
127 Mesh* mesh,
Reals metrics, std::string
const& name =
"metric");
130 void add_implied_metric_tag(
Mesh* mesh);
131 void add_implied_isos_tag(
Mesh* mesh);
132 void add_implied_metric_based_on_target(
Mesh* mesh);
134 void fix(
Mesh* mesh,
AdaptOpts const& adapt_opts, Omega_h_Isotropy isotropy,
136 void fix_for_given_metric(
139 void grade_fix_adapt(
142 void add_rcField_transferMap(
AdaptOpts *opts, std::string
const &name,
143 Omega_h_Transfer
const transfer);
144 void add_rcField_integralMap(
AdaptOpts *opts, std::string
const &name,
145 std::string
const &
map);
Definition: Omega_h_mesh.hpp:35
Definition: amr_mpi_test.cpp:6
Definition: Omega_h_adapt.hpp:50
Definition: Omega_h_adj.hpp:11
Definition: Omega_h_egads.cpp:83
Definition: Omega_h_adapt.hpp:94
Definition: Omega_h_adapt.hpp:30
Definition: Omega_h_adapt.hpp:15
Definition: Omega_h_rbtree.hpp:1039