1 #ifndef __H2D_NEIGHBOR_H
2 #define __H2D_NEIGHBOR_H
5 #include "quadrature/quad.h"
6 #include "function/solution.h"
8 #include "mesh/refmap.h"
10 #include "space/space.h"
11 #include "adapt/error_thread_calculator.h"
17 template<
typename Scalar>
class ErrorThreadCalculator;
71 template<
typename Scalar>
72 class HERMES_API NeighborSearch
81 NeighborSearch(Element* el, MeshSharedPtr mesh);
82 NeighborSearch(
const NeighborSearch& ns);
111 void set_active_edge(
int edge);
114 bool set_active_edge_multimesh(
const int& edge);
117 std::vector<unsigned int> get_transforms(uint64_t sub_idx)
const;
120 bool is_inter_edge(
const int& edge,
const std::vector<unsigned int>& transformations)
const;
123 void update_according_to_sub_idx(
const std::vector<unsigned int>& transformations);
126 void handle_sub_idx_way_down(
const std::vector<unsigned int>& transformations);
130 bool compatible_transformations(
unsigned int a,
unsigned int b,
int edge)
const;
134 void clear_initial_sub_idx();
137 void delete_neighbor(
unsigned int position);
145 DiscontinuousFunc<Scalar>* init_ext_fn(MeshFunction<Scalar>* fu);
171 void set_quad_order(
int order);
178 int get_quad_eo(
bool on_neighbor =
false)
const;
186 int get_num_neighbors()
const;
192 const std::vector<Element*>* get_neighbors()
const;
195 void clear_supported_shapes();
198 void set_ignore_errors(
bool value);
218 void free_central_al();
221 void combine_assembly_lists();
236 bool has_support_on_neighbor(
unsigned int index)
const;
255 int local_num_of_edge;
266 int get_active_segment()
const;
269 void set_active_segment(
unsigned int index);
272 Element* get_neighb_el()
const;
278 unsigned int get_central_n_trans(
unsigned int index)
const;
281 unsigned int get_central_transformations(
unsigned int index_1,
unsigned int index_2)
const;
284 unsigned int get_neighbor_n_trans(
unsigned int index)
const;
287 unsigned int get_neighbor_transformations(
unsigned int index_1,
unsigned int index_2)
const;
298 unsigned int transf[max_level];
307 void copy_from(
const std::vector<unsigned int>& t);
311 void copy_to(std::vector<unsigned int>* t);
315 void strip_initial_transformations(
unsigned int number_of_stripped);
319 void apply_on(
const std::vector<Transformable*>& tr)
const;
323 template<
typename T>
friend class Adapt;
324 template<
typename T>
friend class Func;
332 static const unsigned int H2D_INITIAL_NEIGHBOR_NUMBER_GUESS = 32;
339 void add_central_transformations(
Transformations* to_add,
int position,
bool replace =
false);
340 unsigned int central_transformations_size;
341 unsigned int central_transformations_alloc_size;
345 void add_neighbor_transformations(
Transformations* to_add,
int position,
bool replace =
false);
346 unsigned int neighbor_transformations_size;
347 unsigned int neighbor_transformations_alloc_size;
367 std::vector<NeighborEdgeInfo> neighbor_edges;
369 std::vector<Element*> neighbors;
371 unsigned int n_neighbors;
376 enum NeighborhoodType
378 H2D_DG_NOT_INITIALIZED = -1,
379 H2D_DG_NO_TRANSF = 0,
386 NeighborhoodType neighborhood_type;
403 void find_act_elem_up(
Element* elem,
int* orig_vertex_id,
Node** par_mid_vertices,
int n_parents);
421 void find_act_elem_down(
Node* vertex,
int* bounding_verts_id,
int* sons,
unsigned int n_sons);
441 bool neighbor_edge_orientation(
int bounding_vert1,
int bounding_vert2,
int segment)
const;
444 void reset_neighb_info();
450 int central_quad_order;
452 int neighb_quad_order;
455 template<
typename T>
friend class Adapt;
456 template<
typename T>
friend class Func;
ExtendedShapeset * supported_shapes
Object allowing to set/get a particular shape function from the extended.
Stores one element of a mesh.
This class represents a function with jump discontinuity on an interface of two elements.
Element * neighb_el
Currently selected neighbor element (on the other side of active segment).
Element * central_el
Central (currently assembled) element.
Used to pass the instances of Space around.
Stores one node of a mesh.
Transformations ** central_transformations
Array of transformations of the central element to each neighbor.
uint64_t original_central_el_transform
Sub-element transformation of any function that comes from the.
int cnt
Number of shape functions in the extended shapeset.
int * dof
Array of global DOF numbers of shape functions in the extended shapeset.
Transformations ** neighbor_transformations
Array of transformations of the neighbor to the central element (go-up).
Provides methods of integration order calculation.
AsmList< Scalar > * central_al
Assembly list for the currently assembled edge on the central elem.
This class characterizes a neighborhood of a given edge in terms of adjacent elements and provides me...
AsmList< Scalar > * neighbor_al
Assembly list for the currently assembled edge on the neighbor elem.
bool orientation
Relative orientation of the neighbor edge with respect to the active edge.
Structure containing all the needed information about the active edge from the neighbor's side...