Hermes2D  2.0
Hermes::Hermes2D::PrecalcShapeset Class Reference

Caches precalculated shape function values. More...

#include <precalc.h>

+ Inheritance diagram for Hermes::Hermes2D::PrecalcShapeset:

Public Member Functions

SpaceType get_space_type () const
 Returns type of space.
 
 PrecalcShapeset (Shapeset *shapeset)
 Constructs a standard (master) precalculated shapeset class. More...
 
 PrecalcShapeset (PrecalcShapeset *master_pss)
 Constructs a slave precalculated shapeset class. More...
 
virtual ~PrecalcShapeset ()
 Destructor.
 
virtual void set_active_element (Element *e)
 
void set_active_shape (int index)
 
- Public Member Functions inherited from Hermes::Hermes2D::Function< double >
 Function ()
 Default constructor.
 
virtual ~Function ()
 
int get_num_components () const
 Returns the number of components of the function being represented by the class.
 
double * get_fn_values (int component=0)
 Returns function values. More...
 
double * get_dx_values (int component=0)
 Returns the x partial derivative. More...
 
double * get_dy_values (int component=0)
 Returns the y partial derivative. More...
 
void get_dx_dy_values (double *&dx, double *&dy, int component=0)
 Returns both x and y partial derivatives. This function provides the both often-used dx and dy values in one call. More...
 
double * get_dxx_values (int component=0)
 Returns the second x partial derivative. More...
 
double * get_dyy_values (int component=0)
 Returns the second y partial derivative. More...
 
double * get_dxy_values (int component=0)
 Returns the second mixed derivative. More...
 
Quad2Dget_quad_2d () const
 Returns the current quadrature points.
 
void set_quad_order (unsigned int order, int mask=H2D_FN_DEFAULT)
 
double * get_values (int a, int b)
 
int get_fn_order () const
 Returns the polynomial degree of the function being represented by the class.
 
- Public Member Functions inherited from Hermes::Hermes2D::Transformable
Elementget_active_element () const
 
void set_transform (uint64_t idx)
 
uint64_t get_transform () const
 

Friends

class RefMap
 
template<typename T >
class KellyTypeAdapt
 
template<typename T >
class Adapt
 
template<typename T >
class Func
 
template<typename T >
class Solution
 
template<typename T >
class DiscontinuousFunc
 
template<typename T >
class DiscreteProblem
 
template<typename T >
class NeighborSearch
 
class CurvMap
 

Additional Inherited Members

- Protected Member Functions inherited from Hermes::Hermes2D::Function< double >
virtual int get_edge_fn_order (int edge) const
 Returns the polynomial degree of the function at given edge. To be overridden in derived classes. More...
 
void update_nodes_ptr ()
 
void force_transform (uint64_t sub_idx, Trf *ctm)
 For internal use only.
 
Nodenew_node (int mask, int num_points)
 allocates a new Node structure
 
void replace_cur_node (Node *node)
 
- Static Protected Member Functions inherited from Hermes::Hermes2D::Function< double >
static void check_params (int component, Node *cur_node, int num_components)
 
static void check_table (int component, Node *cur_node, int n, const char *msg)
 
- Protected Attributes inherited from Hermes::Hermes2D::Function< double >
int order
 current function polynomial order
 
int num_components
 number of vector components
 
std::map< uint64_t, LightArray
< Node * > * > * 
sub_tables
 Table of Node tables, for each possible transformation there can be a different Node table.
 
LightArray< Node * > * nodes
 Table of nodes.
 
Nodecur_node
 Current Node.
 
LightArray< Node * > * overflow_nodes
 Nodes for the overflow sub-element transformation.
 
Quad2Dquads [8]
 list of available quadratures
 
int cur_quad
 active quadrature (index into 'quads')
 
int total_mem
 total memory in bytes used by the tables
 
int max_mem
 peak memory usage
 
- Static Protected Attributes inherited from Hermes::Hermes2D::Function< double >
static int idx2mask [6][2]
 index to mask table
 

Detailed Description

Caches precalculated shape function values.

PrecalcShapeset is a cache of precalculated shape function values.

Definition at line 33 of file precalc.h.

Constructor & Destructor Documentation

Hermes::Hermes2D::PrecalcShapeset::PrecalcShapeset ( Shapeset shapeset)

Constructs a standard (master) precalculated shapeset class.

Parameters
shapeset[in]Pointer to the shapeset to be precalculated.

Definition at line 24 of file precalc.cpp.

Hermes::Hermes2D::PrecalcShapeset::PrecalcShapeset ( PrecalcShapeset master_pss)

Constructs a slave precalculated shapeset class.

The slave instance does not hold any precalculated tables. Instead, it refers to those contained in the master instance. However, the slave can have different shape function active, different transform selected, etc. Slave pss's are used for test functions when calling bilinear forms, inside Solution so as not to disrupt user's pss, etc.

Parameters
master_pss[in]Master precalculated shapeset pointer.

Definition at line 36 of file precalc.cpp.

Member Function Documentation

void Hermes::Hermes2D::PrecalcShapeset::set_active_element ( Element e)
virtual

Ensures subsequent calls to get_active_element() will be returning 'e'. Switches the class to the appropriate mode (triangle, quad).

Reimplemented from Hermes::Hermes2D::Transformable.

Definition at line 96 of file precalc.cpp.

Referenced by Hermes::Hermes2D::DiscreteProblem< Scalar >::calculate_cache_records(), and Hermes::Hermes2D::RefMap::set_active_element().

void Hermes::Hermes2D::PrecalcShapeset::set_active_shape ( int  index)

Activates a shape function given by its index. The values of the shape function can then be obtained by setting the required integration rule order by calling set_quad_order() and after that calling get_values(), get_dx_values(), etc.

Parameters
index[in]Shape index.

Definition at line 71 of file precalc.cpp.

Referenced by Hermes::Hermes2D::DiscreteProblem< Scalar >::assemble_DG_one_neighbor(), and Hermes::Hermes2D::DiscreteProblem< Scalar >::calculate_cache_records().


The documentation for this class was generated from the following files: