Hermes2D
2.0
|
Caches precalculated shape function values. More...
#include <precalc.h>
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) |
![]() | |
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... | |
Quad2D * | get_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. | |
![]() | |
Element * | get_active_element () const |
void | set_transform (uint64_t idx) |
uint64_t | get_transform () const |
Additional Inherited Members | |
![]() | |
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. | |
Node * | new_node (int mask, int num_points) |
allocates a new Node structure | |
void | replace_cur_node (Node *node) |
![]() | |
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) |
![]() | |
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. | |
Node * | cur_node |
Current Node. | |
LightArray< Node * > * | overflow_nodes |
Nodes for the overflow sub-element transformation. | |
Quad2D * | quads [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 int | idx2mask [6][2] |
index to mask table | |
Caches precalculated shape function values.
PrecalcShapeset is a cache of precalculated shape function values.
Hermes::Hermes2D::PrecalcShapeset::PrecalcShapeset | ( | Shapeset * | shapeset | ) |
Constructs a standard (master) precalculated shapeset class.
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.
master_pss[in] | Master precalculated shapeset pointer. |
Definition at line 36 of file precalc.cpp.
|
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.
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().