Hermes2D  3.0
Hermes::Hermes2D::SimpleFilter< Scalar > Class Template Referenceabstract

#include <filter.h>

+ Inheritance diagram for Hermes::Hermes2D::SimpleFilter< Scalar >:

Public Member Functions

 SimpleFilter (std::vector< MeshFunctionSharedPtr< Scalar > > solutions, std::vector< int > items=std::vector< int >())
 
virtual Func< Scalar > * get_pt_value (double x, double y, bool use_MeshHashGrid=false, Element *e=nullptr)
 Return the value at the coordinates x,y.
 
- Public Member Functions inherited from Hermes::Hermes2D::Filter< Scalar >
 Filter (std::vector< MeshFunctionSharedPtr< Scalar > > solutions)
 
virtual void reinit ()
 Internal.
 
SpaceType get_space_type () const
 
std::string getClassName () const
 State querying helpers.
 
- Public Member Functions inherited from Hermes::Hermes2D::MeshFunction< Scalar >
 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)
 
RefMapget_refmap (bool update=true)
 Return the reference mapping.
 
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 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_)
 
- Public Member Functions inherited from Hermes::Hermes2D::Function< Scalar >
 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...
 
Quad2Dget_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 set_transform (uint64_t idx)
 
- Public Member Functions inherited from Hermes::Hermes2D::Transformable
Elementget_active_element () const
 
uint64_t get_transform () const
 

Protected Member Functions

virtual void filter_fn (int n, const std::vector< const Scalar * > &values, Scalar *result)=0
 
void init_components ()
 
virtual void precalculate (unsigned short order, unsigned short mask)
 precalculates the current function at the current integration points.
 
- Protected Member Functions inherited from Hermes::Hermes2D::Filter< Scalar >
virtual void set_quad_2d (Quad2D *quad_2d)
 
virtual void set_active_element (Element *e)
 
virtual void free ()
 Frees all precalculated tables.
 
virtual void push_transform (int son)
 
virtual void pop_transform ()
 
virtual void init ()
 Internal.
 
void copy_base (Filter *flt)
 
- Protected Member Functions inherited from Hermes::Hermes2D::MeshFunction< Scalar >
void update_refmap ()
 
- Protected Member Functions inherited from Hermes::Hermes2D::Function< Scalar >
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...
 
void invalidate_values ()
 
- Protected Member Functions inherited from Hermes::Hermes2D::Transformable
double get_transform_jacobian () const
 
Trfget_ctm () const
 
unsigned int get_depth () const
 

Protected Attributes

std::vector< int > items
 
- Protected Attributes inherited from Hermes::Hermes2D::Filter< Scalar >
std::vector
< MeshFunctionSharedPtr
< Scalar > > 
solutions
 
std::vector< uint64_t > solutions_sub_idx
 
bool unimesh
 
SpaceType space_type
 
UniData ** unidata
 
- Protected Attributes inherited from Hermes::Hermes2D::MeshFunction< Scalar >
ElementMode2D mode
 
MeshSharedPtr mesh
 
RefMap refmap
 
- Protected Attributes inherited from Hermes::Hermes2D::Function< Scalar >
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.
 
Quad2Dquads [H2D_MAX_QUADRATURES]
 List of available quadratures.
 
int cur_quad
 Active quadrature (index into 'quads')
 
- Protected Attributes inherited from Hermes::Hermes2D::Transformable
Elementelement
 The active element.
 
Trfctm
 Current sub-element transformation matrix.
 
uint64_t sub_idx
 Sub-element transformation index.
 
Trf stack [21]
 Transformation matrix stack.
 
unsigned int top
 Stack top.
 

Additional Inherited Members

- Static Public Attributes inherited from Hermes::Hermes2D::Transformable
static const unsigned int H2D_MAX_TRN_LEVEL = 15
 If this changes, NeighborSearch::H2D_MAX_NEIGHBORS must change too.
 
- Static Protected Member Functions inherited from Hermes::Hermes2D::Transformable
static void push_transforms (std::set< Transformable * > &transformables, int son)
 
static void pop_transforms (std::set< Transformable * > &transformables)
 
- Static Protected Attributes inherited from Hermes::Hermes2D::Function< Scalar >
static int idx2mask [H2D_NUM_FUNCTION_VALUES][2]
 Index to mask table. More...
 
- Static Protected Attributes inherited from Hermes::Hermes2D::Transformable
static const uint64_t H2D_MAX_IDX = (1ULL << 3 * H2D_MAX_TRN_LEVEL) - 1
 

Detailed Description

template<typename Scalar>
class Hermes::Hermes2D::SimpleFilter< Scalar >

SimpleFilter is a base class for predefined simple filters (MagFilter, DiffFilter...). The 'simplicity' lies in the fact that only one value per input function can be combined (e.g., not a value and a derivative). If this is not sufficient, a full-fledged filter must be derived from the Filter class (see VonMisesFilter). SimpleFilter is also intended for the user to be able to easily create custom filters only by supplying the combining function.

The user specifies the combining function, the arguments ('sln1', 'sln2', 'sln3'), and optionally the 'item' for each argument, which can be any of H2D_FN_VAL_0, H2D_FN_DX_0, H2D_FN_DY_0 etc.

SimpleFilter is vector-valued, if at least one input function is vector-valued and both components are specified in 'item', e.g., item1 = H2D_FN_DX (which is H2D_FN_DX_0 | H2D_FN_DX_1). Otherwise it is Scalar-valued.

Definition at line 92 of file filter.h.


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