16 #ifndef __H2D_SHAPESET_H
17 #define __H2D_SHAPESET_H
19 #include "../global.h"
34 namespace RefinementSelectors
36 template<
typename Scalar>
class Selector;
37 template<
typename Scalar>
class POnlySelector;
38 template<
typename Scalar>
class HOnlySelector;
39 template<
typename Scalar>
class OptimumSelector;
40 template<
typename Scalar>
class ProjBasedSelector;
41 template<
typename Scalar>
class H1ProjBasedSelector;
42 template<
typename Scalar>
class L2ProjBasedSelector;
43 template<
typename Scalar>
class HcurlProjBasedSelector;
46 #ifdef HERMES_FOR_AGROS
47 #define H2D_MAX_LOCAL_BASIS_SIZE_TRI 78
48 #define H2D_MAX_LOCAL_BASIS_SIZE_QUAD 137
49 #define H2D_MAX_LOCAL_BASIS_SIZE 137
50 #define H2D_NUM_SHAPESETS 2
52 #define H2D_MAX_LOCAL_BASIS_SIZE_QUAD 308
53 #define H2D_MAX_LOCAL_BASIS_SIZE_TRI 164
54 #define H2D_MAX_LOCAL_BASIS_SIZE 308
55 #define H2D_NUM_SHAPESETS 5
95 class HERMES_API
Shapeset :
public Hermes::Mixins::Loggable
101 typedef double(*shape_fn_t)(double, double);
106 unsigned short get_order(
int index,
ElementMode2D mode)
const;
111 unsigned char get_num_components()
const;
114 unsigned short get_max_order()
const;
115 unsigned short get_min_order()
const;
118 virtual unsigned short get_max_index(
ElementMode2D mode)
const = 0;
121 short get_vertex_index(
int vertex,
ElementMode2D mode)
const;
126 short get_edge_index(
unsigned char edge,
unsigned short ori,
unsigned short order,
ElementMode2D mode)
const;
130 virtual SpaceType get_space_type()
const = 0;
134 virtual unsigned char get_id()
const = 0;
138 double get_value(
int n,
int index,
double x,
double y,
unsigned short component,
ElementMode2D mode);
140 double get_fn_value(
int index,
double x,
double y,
unsigned short component,
ElementMode2D mode);
141 double get_dx_value(
int index,
double x,
double y,
unsigned short component,
ElementMode2D mode);
142 double get_dy_value(
int index,
double x,
double y,
unsigned short component,
ElementMode2D mode);
145 double get_fn_value_0_tri(
int index,
double x,
double y);
147 double get_dx_value_0_tri(
int index,
double x,
double y);
149 double get_dy_value_0_tri(
int index,
double x,
double y);
152 double get_fn_value_0_quad(
int index,
double x,
double y);
154 double get_dx_value_0_quad(
int index,
double x,
double y);
156 double get_dy_value_0_quad(
int index,
double x,
double y);
158 double get_dxx_value(
int index,
double x,
double y,
unsigned short component,
ElementMode2D mode);
159 double get_dyy_value(
int index,
double x,
double y,
unsigned short component,
ElementMode2D mode);
160 double get_dxy_value(
int index,
double x,
double y,
unsigned short component,
ElementMode2D mode);
163 virtual unsigned short get_num_bubbles(
unsigned short order,
ElementMode2D mode)
const;
167 virtual short* get_bubble_indices(
unsigned short order,
ElementMode2D mode)
const;
171 int get_constrained_edge_index(
unsigned char edge,
unsigned short order,
unsigned short ori,
unsigned short part,
ElementMode2D mode)
const;
176 shape_fn_t*** shape_table[6];
178 short** vertex_indices;
179 short*** edge_indices;
180 short*** bubble_indices;
181 unsigned short** bubble_count;
182 unsigned short** index_to_order;
185 unsigned char max_order, min_order;
186 unsigned char num_components;
193 unsigned short table_size;
213 double* calculate_constrained_edge_combination(
unsigned short order,
unsigned short part,
unsigned short ori,
ElementMode2D mode);
224 double* get_constrained_edge_combination(
unsigned short order,
unsigned short part,
unsigned short ori,
unsigned short& nitems,
ElementMode2D mode);
227 void free_constrained_edge_combinations();
231 double get_constrained_value(
int n,
int index,
double x,
double y,
unsigned short component,
ElementMode2D mode);
235 template<
typename Scalar>
friend class Solution;
244 template<
typename Scalar>
friend class Form;
245 template<
typename Scalar>
friend class MatrixForm;
246 template<
typename Scalar>
friend class VectorForm;
247 template<
typename Scalar>
friend class Space;
248 template<
typename Scalar>
friend class H1Space;
249 template<
typename Scalar>
friend class L2Space;
250 template<
typename Scalar>
friend class HcurlSpace;
251 template<
typename Scalar>
friend class HdivSpace;
unsigned short ebias
2 for H1 shapesets, 0 for H(curl) shapesets. It is the order of the
A projection-based selector for Hcurl space.
Caches precalculated shape function values.
A projection-based selector for H1 space.
Index of a function value f.
#define H2D_MAX_NUMBER_VERTICES
A maximum number of vertices of an element.
Should be exactly the same as is the count of enum ShapesetType.
A selector that chooses an optimal candidates based on a score.
Represents a finite element space over a domain.
Represents the reference mapping.
Provides methods of integration order calculation.
A projection-based selector for L2 space.
Represents the solution of a PDE.
FunctionExpansionIndex
Index of a function expansion. Used to selected a value in Shapeset::get_value(). ...