Hermes2D  3.0
Refinement Selectors

Refinement selectors allows to select a refinement according to an error of a candidate. More...

Namespaces

 Hermes::Hermes2D::RefinementSelectors
 Namespace which encapsulates all refinement selectors.
 

Classes

singleton  Hermes::Hermes2D::RefinementSelectors::H1ProjBasedSelector< Scalar >
 A projection-based selector for H1 space. More...
 
singleton  Hermes::Hermes2D::RefinementSelectors::HcurlProjBasedSelector< Scalar >
 A projection-based selector for Hcurl space. More...
 
singleton  Hermes::Hermes2D::RefinementSelectors::L2ProjBasedSelector< Scalar >
 A projection-based selector for L2 space. More...
 
singleton  Hermes::Hermes2D::RefinementSelectors::OptimumSelector< Scalar >
 A selector that chooses an optimal candidates based on a score. More...
 
struct  Hermes::Hermes2D::RefinementSelectors::OptimumSelector< Scalar >::CandsInfo
 Information about candidates. More...
 
struct  Hermes::Hermes2D::RefinementSelectors::OptimumSelector< Scalar >::ShapeInx
 A shape index. More...
 
class  Hermes::Hermes2D::RefinementSelectors::OrderPermutator
 Hermes::Order permutator. Generates all permutations of orders from a set defined by a range of orders. More...
 
singleton  Hermes::Hermes2D::RefinementSelectors::ProjBasedSelector< Scalar >
 A general projection-based selector. More...
 
class  Hermes::Hermes2D::RefinementSelectors::ProjBasedSelector< Scalar >::TrfShapeExp
 A transform shaped function expansions. More...
 
struct  Hermes::Hermes2D::RefinementSelectors::ProjBasedSelector< Scalar >::ValueCacheItem< T >
 An item of a value cache. More...
 
struct  Hermes::Hermes2D::RefinementSelectors::ProjBasedSelector< Scalar >::ElemProj
 Projection of an element of a candidate. More...
 
struct  Hermes::Hermes2D::RefinementSelectors::ProjBasedSelector< Scalar >::ElemGIP
 Integration points in the reference domain of an element of a candidate. More...
 
struct  Hermes::Hermes2D::RefinementSelectors::ProjBasedSelector< Scalar >::ElemSubTrf
 A transformation from a reference domain of a subdomain to a reference domain of an element of a candidate. More...
 
struct  Hermes::Hermes2D::RefinementSelectors::ProjBasedSelector< Scalar >::ElemSubShapeFunc
 A shape function on subdomain of an element. More...
 
singleton  Hermes::Hermes2D::RefinementSelectors::Selector< Scalar >
 A parent of all refinement selectors. Abstract class. More...
 
singleton  Hermes::Hermes2D::RefinementSelectors::HOnlySelector< Scalar >
 A selector that selects H-refinements only. More...
 
singleton  Hermes::Hermes2D::RefinementSelectors::POnlySelector< Scalar >
 A selector that increases order (i.e., it selects P-refinements only). More...
 

Macros

#define H2DRS_MAX_ORDER_INC   1
 Maximum increase of an order in candidates.
 
#define H2DRS_DEFAULT_ERR_WEIGHT_H   2.0
 A default multiplicative coefficient of an error of a H-candidate.
 
#define H2DRS_DEFAULT_ERR_WEIGHT_P   1.0
 A default multiplicative coefficient of an error of a P-candidate.
 
#define H2DRS_DEFAULT_ERR_WEIGHT_ANISO   1.414214
 A default multiplicative coefficient of an error of a ANISO-candidate.
 
#define H2DRS_DEFAULT_ORDER   -1
 A default order. Used to indicate an unkonwn order or a maximum support order.
 
#define H2DRS_MAX_ORDER   10
 A maximum order suported by refinement selectors.
 
#define H2D_NUM_SHAPES_SIZE   12
 A maximum order suported by refinement selectors.
 

Typedefs

typedef double Hermes::Hermes2D::RefinementSelectors::CandElemProjError [H2DRS_MAX_ORDER+2][H2DRS_MAX_ORDER+2]
 Error of an element of a candidate for various permutations of orders. More...
 

Enumerations

enum  Hermes::Hermes2D::RefinementSelectors::CandList {
  Hermes::Hermes2D::RefinementSelectors::H2D_NONE, Hermes::Hermes2D::RefinementSelectors::H2D_P_ISO, Hermes::Hermes2D::RefinementSelectors::H2D_P_ANISO, Hermes::Hermes2D::RefinementSelectors::H2D_H_ISO,
  Hermes::Hermes2D::RefinementSelectors::H2D_H_ANISO, Hermes::Hermes2D::RefinementSelectors::H2D_HP_ISO, Hermes::Hermes2D::RefinementSelectors::H2D_HP_ANISO_H, Hermes::Hermes2D::RefinementSelectors::H2D_HP_ANISO_P,
  Hermes::Hermes2D::RefinementSelectors::H2D_HP_ANISO
}
 Predefined list of candidates. More...
 
enum  Hermes::Hermes2D::RefinementSelectors::H1ProjBasedSelector< Scalar >::LocalFuncExpansion { Hermes::Hermes2D::RefinementSelectors::H1ProjBasedSelector< Scalar >::H2D_H1FE_VALUE = 0, Hermes::Hermes2D::RefinementSelectors::H1ProjBasedSelector< Scalar >::H2D_H1FE_DX = 1, Hermes::Hermes2D::RefinementSelectors::H1ProjBasedSelector< Scalar >::H2D_H1FE_DY = 2, Hermes::Hermes2D::RefinementSelectors::H1ProjBasedSelector< Scalar >::H2D_H1FE_NUM = 3 }
 A function expansion of a function f used by this selector. More...
 
enum  Hermes::Hermes2D::RefinementSelectors::HcurlProjBasedSelector< Scalar >::LocalFuncExpansion { Hermes::Hermes2D::RefinementSelectors::HcurlProjBasedSelector< Scalar >::H2D_HCFE_VALUE0 = 0, Hermes::Hermes2D::RefinementSelectors::HcurlProjBasedSelector< Scalar >::H2D_HCFE_VALUE1 = 1, Hermes::Hermes2D::RefinementSelectors::HcurlProjBasedSelector< Scalar >::H2D_HCFE_CURL = 2, Hermes::Hermes2D::RefinementSelectors::HcurlProjBasedSelector< Scalar >::H2D_HCFE_NUM = 3 }
 A function expansion of a function f used by this selector. More...
 
enum  Hermes::Hermes2D::RefinementSelectors::L2ProjBasedSelector< Scalar >::LocalFuncExpansion { Hermes::Hermes2D::RefinementSelectors::L2ProjBasedSelector< Scalar >::H2D_L2FE_VALUE = 0, Hermes::Hermes2D::RefinementSelectors::L2ProjBasedSelector< Scalar >::H2D_L2FE_NUM = 1 }
 A function expansion of a function f used by this selector. More...
 
enum  Hermes::Hermes2D::RefinementSelectors::OptimumSelector< Scalar >::ShapeType {
  Hermes::Hermes2D::RefinementSelectors::OptimumSelector< Scalar >::H2DST_VERTEX = 0x01, Hermes::Hermes2D::RefinementSelectors::OptimumSelector< Scalar >::H2DST_HORIZ_EDGE = 0x02, Hermes::Hermes2D::RefinementSelectors::OptimumSelector< Scalar >::H2DST_VERT_EDGE = 0x04, Hermes::Hermes2D::RefinementSelectors::OptimumSelector< Scalar >::H2DST_TRI_EDGE = 0x08,
  Hermes::Hermes2D::RefinementSelectors::OptimumSelector< Scalar >::H2DST_BUBBLE = 0x10
}
 A shape function type. More...
 
enum  ShapeTypeInt {
  H2DSI_VERTEX, H2DSI_HORIZ_EDGE, H2DSI_VERT_EDGE, H2DSI_TRI_EDGE,
  H2DSI_BUBBLE, H2DSI_ANY
}
 

Functions

HERMES_API const char * Hermes::Hermes2D::RefinementSelectors::get_cand_list_str (const CandList cand_list)
 Returns a string representation of a predefined candidate list. More...
 
HERMES_API bool Hermes::Hermes2D::RefinementSelectors::is_hp (const CandList cand_list)
 Returns true if a predefined candidate list may contain candidates that are HP. More...
 
HERMES_API bool Hermes::Hermes2D::RefinementSelectors::is_p (const CandList cand_list)
 Returns true if a predefined candidate list may contain candidates that increase P. More...
 
HERMES_API bool Hermes::Hermes2D::RefinementSelectors::is_p_aniso (const CandList cand_list)
 Returns true if a predefined candidate list may contain candidates with an anisotropic change of orders. More...
 

Variables

static const int Hermes::Hermes2D::RefinementSelectors::ProjBasedSelector< Scalar >::H2DRS_VALCACHE_INVALID = 0
 State of value cache: item contains undefined or invalid value.
 
static const int Hermes::Hermes2D::RefinementSelectors::ProjBasedSelector< Scalar >::H2DRS_VALCACHE_VALID = 1
 State of value cache: item contains a valid value.
 
static const int Hermes::Hermes2D::RefinementSelectors::ProjBasedSelector< Scalar >::H2DRS_VALCACHE_USER = 2
 State of value cache: the first state ID which can be used by the user.
 

Detailed Description

Refinement selectors allows to select a refinement according to an error of a candidate.

The error is calculate by comparing a candidate projected to a reference solution with the reference solution. All selectors has to be derived from the class Selector. An instance of a selector should be created outside the adaptivity loop in order to save initialization time.

Currently available selectors:

Typedef Documentation

typedef double Hermes::Hermes2D::RefinementSelectors::CandElemProjError[H2DRS_MAX_ORDER+2][H2DRS_MAX_ORDER+2]

Error of an element of a candidate for various permutations of orders.

If not noted otherwise, the first index is the horizontal order, the second index is the vertical order. The maximum allowed order is H2DRS_MAX_ORDER + 1.

Definition at line 30 of file proj_based_selector.h.

Enumeration Type Documentation

Predefined list of candidates.

Enumerator
H2D_NONE 

No adaptivity. (Used only in modules.)

H2D_P_ISO 

P-candidates only. Hermes::Orders are modified uniformly.

H2D_P_ANISO 

P-candidates only. Hermes::Orders are modified non-uniformly.

H2D_H_ISO 

H-candidates only. Hermes::Orders are not modified.

H2D_H_ANISO 

H- and ANISO-candidates only. Hermes::Orders are not modified.

H2D_HP_ISO 

H- and P-candidates only. Hermes::Orders are modified uniformly.

H2D_HP_ANISO_H 

H-, ANISO- and P-candidates. Hermes::Orders are modified uniformly.

H2D_HP_ANISO_P 

H- and P-candidates only. Hermes::Orders are modified non-uniformly.

H2D_HP_ANISO 

H-, ANISO- and P-candidates. Hermes::Orders are modified non-uniformly.

Definition at line 46 of file candidates.h.

A function expansion of a function f used by this selector.

Enumerator
H2D_L2FE_VALUE 

A function expansion: f.

H2D_L2FE_NUM 

A total considered function expansion.

Definition at line 44 of file l2_proj_based_selector.h.

A function expansion of a function f used by this selector.

Enumerator
H2D_HCFE_VALUE0 

A function expansion: f_0.

H2D_HCFE_VALUE1 

A function expansion: f_1.

H2D_HCFE_CURL 

A function expansion: curl = df_1/dx - df_0/dy.

H2D_HCFE_NUM 

A total considered function expansion.

Definition at line 45 of file hcurl_proj_based_selector.h.

A function expansion of a function f used by this selector.

Enumerator
H2D_H1FE_VALUE 

A function expansion: f.

H2D_H1FE_DX 

A function expansion: df/dx.

H2D_H1FE_DY 

A function expansion: df/dy.

H2D_H1FE_NUM 

A total considered function expansion.

Definition at line 46 of file h1_proj_based_selector.h.

template<typename Scalar >
enum Hermes::Hermes2D::RefinementSelectors::OptimumSelector::ShapeType
protected

A shape function type.

Enumerator
H2DST_VERTEX 

Vertex function.

H2DST_HORIZ_EDGE 

Horizontal edge function.

H2DST_VERT_EDGE 

Verical edge function.

H2DST_TRI_EDGE 

Triangle edge.

H2DST_BUBBLE 

Bubble function.

Definition at line 173 of file optimum_selector.h.

Function Documentation

HERMES_API const char * Hermes::Hermes2D::RefinementSelectors::get_cand_list_str ( const CandList  cand_list)

Returns a string representation of a predefined candidate list.

Used for debugging and output purposes.

Parameters
cand_listA predefined list of candidates.
Returns
A string representation of the enum value.

Definition at line 9 of file candidates.cpp.

Referenced by Hermes::Hermes2D::RefinementSelectors::ProjBasedSelector< Scalar >::calc_projection_errors().

HERMES_API bool Hermes::Hermes2D::RefinementSelectors::is_hp ( const CandList  cand_list)

Returns true if a predefined candidate list may contain candidates that are HP.

Parameters
cand_listA predefined list of candidates.
Returns
True if a predefined candidate list may contain candidates that are HP.

Definition at line 28 of file candidates.cpp.

HERMES_API bool Hermes::Hermes2D::RefinementSelectors::is_p ( const CandList  cand_list)

Returns true if a predefined candidate list may contain candidates that increase P.

Parameters
cand_listA predefined list of candidates.
Returns
True if a predefined candidate list may contain candidates that increase P.

Definition at line 45 of file candidates.cpp.

HERMES_API bool Hermes::Hermes2D::RefinementSelectors::is_p_aniso ( const CandList  cand_list)

Returns true if a predefined candidate list may contain candidates with an anisotropic change of orders.

Parameters
cand_listA predefined list of candidates.
Returns
True if a predefined candidate list may contain candidates with an anisotropic change of orders.

Definition at line 62 of file candidates.cpp.