Hermes2D
3.0
|
Represents a function defined on a mesh. More...
#include <mesh_function.h>
Public Member Functions | |
MeshFunction () | |
Empty constructor. | |
MeshFunction (MeshSharedPtr mesh) | |
Constructor. | |
virtual | ~MeshFunction () |
Destructor. | |
MeshSharedPtr | get_mesh () const |
Return the mesh. | |
virtual void | copy (const MeshFunction< Scalar > *sln) |
Copy from sln to this instance. | |
virtual void | copy (MeshFunctionSharedPtr< Scalar > sln) |
RefMap * | get_refmap (bool update=true) |
Return the reference mapping. | |
virtual Func< Scalar > * | get_pt_value (double x, double y, bool use_MeshHashGrid=false, Element *e=nullptr)=0 |
Return the value at the coordinates x,y. | |
virtual MeshFunction< Scalar > * | clone () const =0 |
virtual void | multiply (Scalar coef) |
Multiplies the function represented by this class by the given coefficient. | |
virtual void | add (MeshFunctionSharedPtr< Scalar > &other_mesh_function, SpaceSharedPtr< Scalar > target_space) |
virtual Scalar | get_approx_max_value (int item=H2D_FN_VAL_0) |
Return the approximate maximum value of this instance. | |
virtual Scalar | get_approx_min_value (int item=H2D_FN_VAL_0) |
Return the approximate minimum value of this instance. | |
virtual bool | isOkay () const |
State querying helpers. | |
std::string | getClassName () const |
Internal. | |
virtual void | init () |
Internal. | |
virtual void | free () |
Frees all precalculated tables. | |
virtual void | reinit () |
Internal. | |
virtual void | set_quad_2d (Quad2D *quad_2d) |
virtual void | set_active_element (Element *e) |
virtual int | get_edge_fn_order (int edge) |
Returns the order of the edge number edge of the current active element. | |
template<> | |
double | get_approx_max_value (int item_) |
template<> | |
std::complex< double > | get_approx_max_value (int item_) |
template<> | |
double | get_approx_min_value (int item_) |
template<> | |
std::complex< double > | get_approx_min_value (int item_) |
![]() | |
Function () | |
Default constructor. | |
virtual | ~Function () |
unsigned char | get_num_components () const |
Returns the number of components of the function being represented by the class. | |
virtual const Scalar * | get_fn_values (int component=0) const |
Returns function values. More... | |
virtual const Scalar * | get_dx_values (int component=0) const |
Returns the x partial derivative. More... | |
virtual const Scalar * | get_dy_values (int component=0) const |
Returns the y partial derivative. More... | |
Scalar * | deep_copy_array (int component=0, int item=0) const |
Returns function values. More... | |
Quad2D * | get_quad_2d () const |
Returns the current quadrature points. | |
void | set_quad_order (unsigned short order, unsigned short mask=H2D_FN_DEFAULT) |
virtual const Scalar * | get_values (int component, int item) const |
virtual int | get_fn_order () const |
Returns the polynomial degree of the function being represented by the class. | |
virtual void | push_transform (int son) |
virtual void | pop_transform () |
virtual void | set_transform (uint64_t idx) |
![]() | |
Element * | get_active_element () const |
uint64_t | get_transform () const |
Protected Member Functions | |
void | update_refmap () |
![]() | |
virtual void | reset_transform () |
Empties the stack, loads identity transform. | |
virtual void | force_transform (uint64_t sub_idx, Trf *ctm) |
For internal use only. | |
virtual int | get_edge_fn_order (unsigned char edge) const |
Returns the polynomial degree of the function at given edge. To be overridden in derived classes. More... | |
virtual void | precalculate (unsigned short order, unsigned short mask) |
precalculates the current function at the current integration points. | |
void | invalidate_values () |
![]() | |
double | get_transform_jacobian () const |
Trf * | get_ctm () const |
unsigned int | get_depth () const |
Protected Attributes | |
ElementMode2D | mode |
MeshSharedPtr | mesh |
RefMap | refmap |
![]() | |
Scalar | values [H2D_MAX_SOLUTION_COMPONENTS][H2D_NUM_FUNCTION_VALUES][H2D_MAX_INTEGRATION_POINTS_COUNT] |
The data. | |
bool | values_valid |
Flag that the data are not 'dirty'. | |
int | order |
Current function polynomial order. | |
unsigned char | num_components |
Number of vector components. | |
Quad2D * | quads [H2D_MAX_QUADRATURES] |
List of available quadratures. | |
int | cur_quad |
Active quadrature (index into 'quads') | |
![]() | |
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 | DiscontinuousFunc |
template<typename T > | |
class | DiscreteProblem |
template<typename T > | |
class | NeighborSearch |
template<typename T > | |
HERMES_API Func< T > * | init_fn (MeshFunction< T > *fu, const int order) |
Additional Inherited Members | |
![]() | |
static const unsigned int | H2D_MAX_TRN_LEVEL = 15 |
If this changes, NeighborSearch::H2D_MAX_NEIGHBORS must change too. | |
![]() | |
static void | push_transforms (std::set< Transformable * > &transformables, int son) |
static void | pop_transforms (std::set< Transformable * > &transformables) |
![]() | |
static int | idx2mask [H2D_NUM_FUNCTION_VALUES][2] |
Index to mask table. More... | |
![]() | |
static const uint64_t | H2D_MAX_IDX = (1ULL << 3 * H2D_MAX_TRN_LEVEL) - 1 |
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 56 of file mesh_function.h.
|
virtual |
Adds another mesh function on the given space. ! Resulting mesh function is a solution.
Reimplemented in Hermes::Hermes2D::Solution< Scalar >, and Hermes::Hermes2D::Solution< double >.
Definition at line 123 of file mesh_function.cpp.
|
pure virtual |
Cloning function - for parallel OpenMP blocks. Designed to return an identical clone of this instance.
Implemented in Hermes::Hermes2D::LinearFilter< Scalar >, Hermes::Hermes2D::VonMisesFilter, Hermes::Hermes2D::ComplexAbsFilter, Hermes::Hermes2D::ImagFilter, Hermes::Hermes2D::RealFilter, Hermes::Hermes2D::AbsFilter, Hermes::Hermes2D::SquareFilter< Scalar >, Hermes::Hermes2D::SumFilter< Scalar >, Hermes::Hermes2D::DiffFilter< Scalar >, Hermes::Hermes2D::ExactSolutionEggShell, Hermes::Hermes2D::ValFilter, Hermes::Hermes2D::ZeroSolutionVector< Scalar >, Hermes::Hermes2D::BottomValFilter, Hermes::Hermes2D::TopValFilter, Hermes::Hermes2D::ConstantSolutionVector< Scalar >, Hermes::Hermes2D::MagFilter< Scalar >, Hermes::Hermes2D::ZeroSolution< Scalar >, Hermes::Hermes2D::ConstantSolution< Scalar >, Hermes::Hermes2D::Solution< Scalar >, Hermes::Hermes2D::Solution< double >, Hermes::Hermes2D::ExactSolutionConstantArray< Scalar, ValueType >, Hermes::Hermes2D::ExactSolution< Scalar >, and Hermes::Hermes2D::ExactSolution< double >.
|
virtual |
Set the active element. Internal.
Reimplemented from Hermes::Hermes2D::Function< Scalar >.
Reimplemented in Hermes::Hermes2D::LinearFilter< Scalar >, Hermes::Hermes2D::Solution< Scalar >, Hermes::Hermes2D::Solution< double >, Hermes::Hermes2D::ComplexFilter, Hermes::Hermes2D::Filter< Scalar >, Hermes::Hermes2D::Filter< double >, and Hermes::Hermes2D::Filter< std::complex< double > >.
Definition at line 270 of file mesh_function.cpp.
Referenced by Hermes::Hermes2D::RefinementSelectors::ProjBasedSelector< Scalar >::calc_projection_errors(), Hermes::Hermes2D::NeighborSearch< Scalar >::init_ext_fn(), Hermes::Hermes2D::Filter< Scalar >::set_active_element(), Hermes::Hermes2D::ComplexFilter::set_active_element(), and Hermes::Hermes2D::Solution< Scalar >::set_active_element().
|
virtual |
Set the quadrature rule. Internal.
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 261 of file mesh_function.cpp.
Referenced by Hermes::Hermes2D::RefinementSelectors::ProjBasedSelector< Scalar >::calc_projection_errors(), Hermes::Hermes2D::Filter< Scalar >::set_quad_2d(), and Hermes::Hermes2D::ComplexFilter::set_quad_2d().