Hermes2D
2.0
|
Represents a function defined on a mesh. More...
#include <mesh_function.h>
Public Member Functions | |
MeshFunction (const Mesh *mesh) | |
virtual bool | isOkay () const |
State querying helpers. | |
std::string | getClassName () const |
Get class name, for the purpose of messaging. | |
virtual void | init () |
virtual void | reinit () |
virtual void | set_quad_2d (Quad2D *quad_2d) |
Selects the quadrature points in which the function will be evaluated. More... | |
virtual void | set_active_element (Element *e) |
const Mesh * | get_mesh () const |
RefMap * | get_refmap (bool update=true) |
void | set_refmap (RefMap *refmap_to_set) |
virtual int | get_edge_fn_order (int edge) |
virtual Func< Scalar > * | get_pt_value (double x, double y)=0 |
Returns the value at the coordinates x,y. | |
virtual void | handle_overflow_idx () |
virtual void | push_transform (int son) |
See Transformable::push_transform. | |
virtual void | pop_transform () |
virtual MeshFunction< Scalar > * | clone () const |
![]() | |
Function () | |
Default constructor. | |
virtual | ~Function () |
int | get_num_components () const |
Returns the number of components of the function being represented by the class. | |
Scalar * | get_fn_values (int component=0) |
Returns function values. More... | |
Scalar * | get_dx_values (int component=0) |
Returns the x partial derivative. More... | |
Scalar * | get_dy_values (int component=0) |
Returns the y partial derivative. More... | |
void | get_dx_dy_values (Scalar *&dx, Scalar *&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... | |
Scalar * | get_dxx_values (int component=0) |
Returns the second x partial derivative. More... | |
Scalar * | get_dyy_values (int component=0) |
Returns the second y partial derivative. More... | |
Scalar * | 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) |
Scalar * | 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 |
![]() | |
void | check () const |
Method to handle the state. | |
Protected Member Functions | |
void | force_transform (MeshFunction< Scalar > *mf) |
void | update_refmap () |
void | force_transform (uint64_t sub_idx, Trf *ctm) |
![]() | |
virtual void | free ()=0 |
Frees all precalculated tables. | |
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... | |
virtual void | precalculate (int order, int mask)=0 |
precalculates the current function at the current integration points. | |
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) |
![]() | |
void | reset_transform () |
Empties the stack, loads identity transform. | |
double | get_transform_jacobian () const |
Trf * | get_ctm () const |
unsigned int | get_depth () const |
Protected Attributes | |
ElementMode2D | mode |
const Mesh * | mesh |
RefMap * | refmap |
![]() | |
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 | |
![]() | |
Element * | element |
The active element. | |
Trf * | ctm |
Current sub-element transformation matrix. | |
uint64_t | sub_idx |
Sub-element transformation index. | |
Trf | stack [21] |
Transformation matrix stack. | |
unsigned int | top |
Stack top. | |
Friends | |
class | RefMap |
template<typename T > | |
class | KellyTypeAdapt |
template<typename T > | |
class | Adapt |
template<typename T > | |
class | Func |
template<typename T > | |
class | Geom |
template<typename T > | |
class | DiscontinuousFunc |
template<typename T > | |
class | DiscreteProblem |
template<typename T > | |
class | DiscreteProblemLinear |
template<typename T > | |
class | NeighborSearch |
template<typename T > | |
HERMES_API Func< T > * | init_fn (MeshFunction< T > *fu, const int order) |
Additional Inherited Members | |
![]() | |
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) |
![]() | |
static int | idx2mask [6][2] |
index to mask table More... | |
Represents a function defined on a mesh.
MeshFunction is a base class for all classes representing an arbitrary function superimposed on a mesh (ie., domain). These include the Solution, ExactSolution and Filter classes, which define the concrete behavior and the way the function is (pre)calculated. Any such function can later be visualized.
(This is an abstract class and cannot be instantiated.)
Definition at line 44 of file mesh_function.h.
|
virtual |
Virtual function handling overflows. Has to be virtual, because the necessary iterators in the templated class do not work with GCC.
Implements Hermes::Hermes2D::Function< Scalar >.
Definition at line 129 of file mesh_function.cpp.
|
virtual |
Removes the current transformation matrix from the top of the stack. The new top becomes the current transformation matrix. This returns the transform to the state before the last push_transform() was performed.
Reimplemented from Hermes::Hermes2D::Transformable.
Reimplemented in Hermes::Hermes2D::ComplexFilter, Hermes::Hermes2D::Filter< Scalar >, Hermes::Hermes2D::Filter< double >, and Hermes::Hermes2D::Filter< std::complex< double > >.
Definition at line 149 of file mesh_function.cpp.
Referenced by Hermes::Hermes2D::Filter< Scalar >::pop_transform(), and Hermes::Hermes2D::ComplexFilter::pop_transform().
|
virtual |
Called by the assembling procedure and by other functions. In PrecalcShapeset it sets an internal variable that can be later retrieved by get_active_element(). In Solution it selects the element to retrieve solution values for, etc.
e[in] | Element associated with the function being represented by the class. |
Reimplemented from Hermes::Hermes2D::Transformable.
Reimplemented in Hermes::Hermes2D::LinearFilter< Scalar >, Hermes::Hermes2D::Solution< Scalar >, Hermes::Hermes2D::ComplexFilter, Hermes::Hermes2D::Filter< Scalar >, Hermes::Hermes2D::Filter< double >, and Hermes::Hermes2D::Filter< std::complex< double > >.
Definition at line 120 of file mesh_function.cpp.
Referenced by Hermes::Hermes2D::NeighborSearch< Scalar >::init_ext_fn(), Hermes::Hermes2D::Filter< Scalar >::set_active_element(), and Hermes::Hermes2D::ComplexFilter::set_active_element().
|
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.
quad_2d[in] | The quadrature points. |
Reimplemented from Hermes::Hermes2D::Function< Scalar >.
Reimplemented in Hermes::Hermes2D::ComplexFilter, Hermes::Hermes2D::Filter< Scalar >, Hermes::Hermes2D::Filter< double >, and Hermes::Hermes2D::Filter< std::complex< double > >.
Definition at line 111 of file mesh_function.cpp.
Referenced by Hermes::Hermes2D::DiscreteProblem< Scalar >::assemble(), Hermes::Hermes2D::RefinementSelectors::ProjBasedSelector< Scalar >::calc_projection_errors(), Hermes::Hermes2D::Filter< Scalar >::set_quad_2d(), and Hermes::Hermes2D::ComplexFilter::set_quad_2d().