20 #include "../space/space.h"
21 #include "../weakform/weakform.h"
22 #include "../integrals/h1.h"
23 #include "../integrals/hcurl.h"
24 #include "../integrals/hdiv.h"
25 #include "../integrals/l2.h"
26 #include "../mesh/element_to_refine.h"
27 #include "../refinement_selectors/selector.h"
28 #include "exceptions.h"
29 #include "../global.h"
49 template<
typename Scalar>
class Global;
56 template<
typename Scalar>
57 class HERMES_API
Adapt :
public Hermes::Mixins::TimeMeasurable,
public Hermes::Mixins::Loggable
62 Adapt(Hermes::vector<
Space<Scalar>*> spaces, Hermes::vector<ProjNormType> proj_norms = Hermes::vector<ProjNormType>());
76 virtual Scalar value(
int n,
double *wt,
Func<Scalar> *u_ext[],
92 template<
typename TestFunctionDomain,
typename SolFunctionDomain>
97 template<
typename TestFunctionDomain,
typename SolFunctionDomain>
102 template<
typename TestFunctionDomain,
typename SolFunctionDomain>
107 template<
typename TestFunctionDomain,
typename SolFunctionDomain>
112 template<
typename TestFunctionDomain,
typename SolFunctionDomain>
140 Hermes::vector<double>* component_errors = NULL,
bool solutions_for_adapt =
true,
151 Hermes::vector<double>* component_errors = NULL,
bool solutions_for_adapt =
true,
164 int regularize = -1,
double to_be_processed = 0.0);
176 int regularize = -1,
double to_be_processed = 0.0);
182 double get_element_error_squared(
int component,
int id)
const;
185 Exceptions::Exception* caughtException;
196 const Hermes::vector<ElementReference>& get_regular_queue()
const;
204 virtual void apply_refinements(std::vector<ElementToRefine>& elems_to_refine);
208 const std::vector<ElementToRefine>& get_last_refinements()
const;
220 void fix_shared_mesh_refinements(
Mesh** meshes, std::vector<ElementToRefine>& elems_to_refine,
int** idx,
225 void homogenize_shared_mesh_orders(
Mesh** meshes);
237 double* errors[H2D_MAX_COMPONENTS];
243 static const unsigned char HERMES_TOTAL_ERROR_MASK = 0x0F;
244 static const unsigned char HERMES_ELEMENT_ERROR_MASK = 0xF0;
254 Hermes::vector<double>* component_errors,
bool solutions_for_adapt,
unsigned int error_flags);
258 Hermes::vector<double>* component_errors,
bool solutions_for_adapt,
unsigned int error_flags);
295 virtual void fill_regular_queue(
const Mesh** meshes);
299 class CompareElements
304 CompareElements(
double** errors);