RefinementSelectors::H1ProjBasedSelector Class Reference
[Refinement Selectors]

A projection-based selector for H1 space. More...

#include <h1_proj_based_selector.h>

Inherits RefinementSelectors::ProjBasedSelector.

List of all members.

Public Member Functions

 H1ProjBasedSelector (CandList cand_list=H2D_HP_ANISO, double conv_exp=1.0, int max_order=H2DRS_DEFAULT_ORDER, H1Shapeset *user_shapeset=NULL)
 Constructor.

Protected Types

enum  LocalFuncExpansion { H2D_H1FE_VALUE = 0, H2D_H1FE_DX = 1, H2D_H1FE_DY = 2, H2D_H1FE_NUM = 3 }
 

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

More...

Protected Member Functions

virtual void set_current_order_range (Element *element)
 Sets OptimumSelector::current_max_order and OptimumSelector::current_min_order.
virtual scalar ** precalc_ref_solution (int inx_son, Solution *rsln, Element *element, int intr_gip_order)
 Returns an array of values of the reference solution at integration points.
virtual void precalc_shapes (const double3 *gip_points, const int num_gip_points, const Trf *trfs, const int num_noni_trfs, const std::vector< ShapeInx > &shapes, const int max_shape_inx, TrfShape &svals)
 Calculates values of shape function at GIP for all transformations.
virtual void precalc_ortho_shapes (const double3 *gip_points, const int num_gip_points, const Trf *trfs, const int num_noni_trfs, const std::vector< ShapeInx > &shapes, const int max_shape_inx, TrfShape &svals)
 Calculates values of orthogonalized shape function at GIP for all transformations.
virtual double ** build_projection_matrix (double3 *gip_points, int num_gip_points, const int *shape_inx, const int num_shapes)
 Builds projection matrix using a given set of shapes.
virtual scalar evaluate_rhs_subdomain (Element *sub_elem, const ElemGIP &sub_gip, const ElemSubTrf &sub_trf, const ElemSubShapeFunc &sub_shape)
 Evaluates a value of the right-hande side in a subdomain.
virtual double evaluate_error_squared_subdomain (Element *sub_elem, const ElemGIP &sub_gip, const ElemSubTrf &sub_trf, const ElemProj &elem_proj)
 Evaluates an squared error of a projection of an element of a candidate onto subdomains.

Protected Attributes

scalarprecalc_rvals [H2D_MAX_ELEMENT_SONS][H2D_H1FE_NUM]
 Array of arrays of precalculates. The first index is an index of a subdomain, the second index is an index of a function expansion (see enum LocalFuncExpansion).

Static Protected Attributes

static const int H2DRS_MAX_H1_ORDER = H2DRS_MAX_ORDER
 A maximum used order in this H1-space selector.
static H1Shapeset default_shapeset
 A default shapeset.

Detailed Description

A projection-based selector for H1 space.

This class is designed to be used with the class H1Adapt. Since an initialization of the class may take a long time, it is suggested to create the instance outside the adaptivity loop.


Member Enumeration Documentation

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.


Constructor & Destructor Documentation

RefinementSelectors::H1ProjBasedSelector::H1ProjBasedSelector ( CandList  cand_list = H2D_HP_ANISO,
double  conv_exp = 1.0,
int  max_order = H2DRS_DEFAULT_ORDER,
H1Shapeset user_shapeset = NULL 
)

Constructor.

Parameters:
[in] cand_list A predefined list of candidates.
[in] conv_exp A conversion exponent, see evaluate_cands_score().
[in] max_order A maximum order which considered. If H2DRS_DEFAULT_ORDER, a maximum order supported by the selector is used, see HcurlProjBasedSelector::H2DRS_MAX_H1_ORDER.
[in] user_shapeset A shapeset. If NULL, it will use internal instance of the class H1Shapeset.

Member Function Documentation

double ** RefinementSelectors::H1ProjBasedSelector::build_projection_matrix ( double3 gip_points,
int  num_gip_points,
const int *  shape_inx,
const int  num_shapes 
) [protected, virtual]

Builds projection matrix using a given set of shapes.

Overriden function. For details, see ProjBasedSelector::build_projection_matrix().

Implements RefinementSelectors::ProjBasedSelector.

double RefinementSelectors::H1ProjBasedSelector::evaluate_error_squared_subdomain ( Element sub_elem,
const ElemGIP sub_gip,
const ElemSubTrf sub_trf,
const ElemProj elem_proj 
) [protected, virtual]

Evaluates an squared error of a projection of an element of a candidate onto subdomains.

Overriden function. For details, see ProjBasedSelector::evaluate_error_squared_subdomain().

Implements RefinementSelectors::ProjBasedSelector.

scalar RefinementSelectors::H1ProjBasedSelector::evaluate_rhs_subdomain ( Element sub_elem,
const ElemGIP sub_gip,
const ElemSubTrf sub_trf,
const ElemSubShapeFunc sub_shape 
) [protected, virtual]

Evaluates a value of the right-hande side in a subdomain.

Overriden function. For details, see ProjBasedSelector::evaluate_rhs_subdomain().

Implements RefinementSelectors::ProjBasedSelector.

void RefinementSelectors::H1ProjBasedSelector::precalc_ortho_shapes ( const double3 gip_points,
const int  num_gip_points,
const Trf trfs,
const int  num_noni_trfs,
const std::vector< ShapeInx > &  shapes,
const int  max_shape_inx,
TrfShape svals 
) [protected, virtual]

Calculates values of orthogonalized shape function at GIP for all transformations.

Overriden function. For details, see ProjBasedSelector::precalc_ortho_shapes().

Reimplemented from RefinementSelectors::ProjBasedSelector.

scalar ** RefinementSelectors::H1ProjBasedSelector::precalc_ref_solution ( int  inx_son,
Solution rsln,
Element element,
int  intr_gip_order 
) [protected, virtual]

Returns an array of values of the reference solution at integration points.

Overriden function. For details, see ProjBasedSelector::precalc_ref_solution().

Implements RefinementSelectors::ProjBasedSelector.

void RefinementSelectors::H1ProjBasedSelector::precalc_shapes ( const double3 gip_points,
const int  num_gip_points,
const Trf trfs,
const int  num_noni_trfs,
const std::vector< ShapeInx > &  shapes,
const int  max_shape_inx,
TrfShape svals 
) [protected, virtual]

Calculates values of shape function at GIP for all transformations.

Overriden function. For details, see ProjBasedSelector::precalc_shapes().

Reimplemented from RefinementSelectors::ProjBasedSelector.

void RefinementSelectors::H1ProjBasedSelector::set_current_order_range ( Element element  )  [protected, virtual]

Sets OptimumSelector::current_max_order and OptimumSelector::current_min_order.

The default order range is [1, 9]. If curved, the upper boundary of the range becomes lower. Overriden function. For details, see OptimumSelector::set_current_order_range().

Todo:
Replace calculations inside with calculations that uses symbolic constants instead of fixed numbers.

Implements RefinementSelectors::OptimumSelector.


Member Data Documentation

A default shapeset.

const int RefinementSelectors::H1ProjBasedSelector::H2DRS_MAX_H1_ORDER = H2DRS_MAX_ORDER [static, protected]

A maximum used order in this H1-space selector.

scalar* RefinementSelectors::H1ProjBasedSelector::precalc_rvals[H2D_MAX_ELEMENT_SONS][H2D_H1FE_NUM] [protected]

Array of arrays of precalculates. The first index is an index of a subdomain, the second index is an index of a function expansion (see enum LocalFuncExpansion).


The documentation for this class was generated from the following files:
Generated on Sat Jun 5 15:17:44 2010 for Hermes2D Library: Real Version by  doxygen 1.6.3