PrecalcShapeset Class Reference

Caches precalculated shape function values. More...

#include <precalc.h>

Inherits Function< double >.

List of all members.

Public Member Functions

 PrecalcShapeset (Shapeset *shapeset)
 Constructs a standard (master) precalculated shapeset class.
 PrecalcShapeset (PrecalcShapeset *master_pss)
 Constructs a slave precalculated shapeset class.
virtual ~PrecalcShapeset ()
 Destructor.
virtual void set_quad_2d (Quad2D *quad_2d)
 Selects the quadrature points in which the function will be evaluated.
virtual void free ()
 Frees all precalculated tables.
virtual void set_active_element (Element *e)
 Ensures subsequent calls to get_active_element() will be returning 'e'. Switches the class to the appropriate mode (triangle, quad).
void 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.
int get_active_shape () const
 Returns the index of the active shape (can be negative if the shape is constrained).
Shapesetget_shapeset () const
 Returns a pointer to the shapeset which is being precalculated.
int get_type () const
 Returns type of space (0 - H1, 1 - Hcurl, 2 - Hdiv).
void set_mode (int mode)
 Internal. Use set_active_element() instead.
void set_master_transform ()
 For internal use only.
void dump_info (int quad, const char *filename)

Protected Member Functions

bool is_slave () const
virtual void precalculate (int order, int mask)
 precalculates the current function at the current integration points.
void update_max_index ()
void force_transform (uint64_t sub_idx, Trf *ctm)
 Forces a transform without using push_transform() etc. Used by the Solution class. For internal use only.

Protected Attributes

Shapesetshapeset
void * tables
 primary Judy array of shapes
int mode
int index
int max_index [2]
PrecalcShapesetmaster_pss

Friends

class Solution
class RefMap

Detailed Description

Caches precalculated shape function values.

PrecalcShapeset is a cache of precalculated shape function values.


Constructor & Destructor Documentation

PrecalcShapeset::PrecalcShapeset ( Shapeset shapeset  ) 

Constructs a standard (master) precalculated shapeset class.

Parameters:
shapeset [in] Pointer to the shapeset to be precalculated.
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.
PrecalcShapeset::~PrecalcShapeset (  )  [virtual]

Destructor.


Member Function Documentation

void PrecalcShapeset::dump_info ( int  quad,
const char *  filename 
)
void PrecalcShapeset::force_transform ( uint64_t  sub_idx,
Trf ctm 
) [inline, protected]

Forces a transform without using push_transform() etc. Used by the Solution class. For internal use only.

Reimplemented from Function< TYPE >.

void PrecalcShapeset::free (  )  [virtual]

Frees all precalculated tables.

Implements Function< TYPE >.

int PrecalcShapeset::get_active_shape (  )  const [inline]

Returns the index of the active shape (can be negative if the shape is constrained).

Shapeset* PrecalcShapeset::get_shapeset (  )  const [inline]

Returns a pointer to the shapeset which is being precalculated.

int PrecalcShapeset::get_type (  )  const [inline]

Returns type of space (0 - H1, 1 - Hcurl, 2 - Hdiv).

bool PrecalcShapeset::is_slave (  )  const [inline, protected]
void PrecalcShapeset::precalculate ( int  order,
int  mask 
) [protected, virtual]

precalculates the current function at the current integration points.

Implements Function< TYPE >.

void 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 Transformable.

void 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.
void PrecalcShapeset::set_master_transform (  )  [inline]

For internal use only.

void PrecalcShapeset::set_mode ( int  mode  ) 

Internal. Use set_active_element() instead.

void PrecalcShapeset::set_quad_2d ( Quad2D quad_2d  )  [virtual]

Selects the quadrature points in which the function will be evaluated.

It is possible to switch back and forth between different quadrature points: no precalculated values are freed. The standard quadrature is always selected by default already.

Parameters:
quad_2d [in] The quadrature points.

Reimplemented from Function< TYPE >.

void PrecalcShapeset::update_max_index (  )  [protected]

Friends And Related Function Documentation

friend class RefMap [friend]
friend class Solution [friend]

Member Data Documentation

int PrecalcShapeset::index [protected]
int PrecalcShapeset::max_index[2] [protected]
int PrecalcShapeset::mode [protected]
void* PrecalcShapeset::tables [protected]

primary Judy array of shapes


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