Hermes2D  2.0
Hermes::Hermes2D::Views::Linearizer Class Reference

#include <linearizer.h>

+ Inheritance diagram for Hermes::Hermes2D::Views::Linearizer:

Public Member Functions

 Linearizer (bool auto_max=true)
 
void process_solution (MeshFunction< double > *sln, int item=H2D_FN_VAL_0, double eps=HERMES_EPS_NORMAL)
 
void save_solution_vtk (MeshFunction< double > *sln, const char *filename, const char *quantity_name, bool mode_3D=true, int item=H2D_FN_VAL_0, double eps=HERMES_EPS_NORMAL)
 Saves a MeshFunction (Solution, Filter) in VTK format.
 
void set_displacement (MeshFunction< double > *xdisp, MeshFunction< double > *ydisp, double dmult=1.0)
 
void calc_vertices_aabb (double *min_x, double *max_x, double *min_y, double *max_y) const
 Returns axis aligned bounding box (AABB) of vertices. Assumes lock.
 
int get_num_vertices ()
 
double3 * get_vertices ()
 
int3 * get_contour_triangles ()
 
int get_num_contour_triangles ()
 
void set_curvature_epsilon (double curvature_epsilon)
 
double get_curvature_epsilon ()
 Gets the 'curvature' epsilon determining the tolerance of catching the shape of curved elements.
 
void free ()
 Frees the instance.
 
- Public Member Functions inherited from Hermes::Hermes2D::Views::LinearizerBase
void set_max_absolute_value (double max_abs)
 
double get_min_value () const
 
double get_max_value () const
 
void lock_data () const
 
void unlock_data () const
 
int3 * get_triangles ()
 
int * get_triangle_markers ()
 
int get_num_triangles ()
 
int2 * get_edges ()
 
int * get_edge_markers ()
 
int get_num_edges ()
 
virtual bool is_empty ()
 
void free ()
 Frees the instance.
 

Protected Member Functions

int add_vertex ()
 
int get_vertex (int p1, int p2, double x, double y, double value)
 
void process_triangle (MeshFunction< double > **fns, int iv0, int iv1, int iv2, int level, double *val, double *phx, double *phy, int *indices, bool curved)
 
void process_quad (MeshFunction< double > **fns, int iv0, int iv1, int iv2, int iv3, int level, double *val, double *phx, double *phy, int *indices, bool curved)
 
void find_min_max ()
 
- Protected Member Functions inherited from Hermes::Hermes2D::Views::LinearizerBase
 LinearizerBase (bool auto_max=true)
 
void process_edge (int iv1, int iv2, int marker)
 
void regularize_triangle (int iv0, int iv1, int iv2, int mid0, int mid1, int mid2, int marker)
 
int peek_vertex (int p1, int p2)
 
void add_edge (int iv1, int iv2, int marker)
 
void add_triangle (int iv0, int iv1, int iv2, int marker)
 
int hash (int p1, int p2)
 

Protected Attributes

double curvature_epsilon
 The 'curvature' epsilon.
 
bool user_xdisp
 Information if user-supplied displacement functions have been provided.
 
bool user_ydisp
 
MeshFunction< double > * xdisp
 Displacement functions, default to ZeroFunctions, may be supplied by set_displacement();.
 
MeshFunction< double > * ydisp
 
double dmult
 
int3 * tris_contours
 triangles: vertex index triplets
 
int triangle_contours_count
 
double3 * verts
 vertices: (x, y, value) triplets
 
int item
 What kind of information do we want to get out of the solution.
 
int component
 
int value_type
 
- Protected Attributes inherited from Hermes::Hermes2D::Views::LinearizerBase
bool empty
 
double max
 
bool auto_max
 
int3 * tris
 triangles: vertex index triplets
 
int * tri_markers
 triangle_markers: triangle markers, ordering equal to tris
 
int2 * edges
 edges: pairs of vertex indices
 
int * edge_markers
 edge_markers: edge markers, ordering equal to edges
 
int * hash_table
 hash table
 
int4 * info
 info[0] = p1, info[1] = p2, info[2] = next vertex in hash
 
int vertex_count
 
int triangle_count
 
int edges_count
 Real numbers of vertices, triangles and edges.
 
int vertex_size
 
int triangle_size
 
int edges_size
 Size of arrays of vertices, triangles and edges.
 
double eps
 
double min_val
 
double max_val
 
int del_slot
 free slot index after a triangle which was deleted
 
pthread_mutex_t data_mutex
 
Hermes::Exceptions::Exception * caughtException
 

Additional Inherited Members

- Static Protected Member Functions inherited from Hermes::Hermes2D::Views::LinearizerBase
static void calc_aabb (double *x, double *y, int stride, int num, double *min_x, double *max_x, double *min_y, double *max_y)
 Calculates AABB from an array of X-axis and Y-axis coordinates. The distance between values in the array is stride bytes.
 

Detailed Description

Linearizer is a utility class which converts a higher-order FEM solution defined on a curvilinear, irregular mesh to a linear FEM solution defined on a straight-edged, regular mesh. This is done by adaptive refinement of the higher-order mesh and its subsequent regularization. The linearized mesh can then be easily displayed or exported to standard formats. The class correctly handles discontinuities in the solution (e.g., gradients or in Hcurl) by inserting double vertices where necessary. Linearizer also serves as a container for the resulting linearized mesh.

Definition at line 37 of file linearizer.h.

Member Function Documentation

void Linearizer::set_curvature_epsilon ( double  curvature_epsilon)

Sets the threshold for how fine the output for curved elements.

Parameters
[in]curvature_epsilonThe 'curvature' epsilon determining the tolerance of catching the shape of curved elements. The smaller, the finer. Default value = 1e-3.

Definition at line 307 of file linearizer.cpp.


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