Hermes2D
3.0
|
#include <linearizer.h>
Classes | |
class | Iterator |
Public Member Functions | |
LinearizerMultidimensional (LinearizerOutputType linearizerOutputType) | |
void | process_solution (MeshFunctionSharedPtr< double > sln, int item=H2D_FN_VAL_0) |
void | process_solution (MeshFunctionSharedPtr< double > *sln, int *items) |
void | save_solution_vtk (MeshFunctionSharedPtr< double > sln, const char *filename, const char *quantity_name, bool mode_3D=true, int item=H2D_FN_VAL_0) |
Save a MeshFunction (Solution, Filter) in VTK format. | |
void | save_solution_vtk (std::vector< MeshFunctionSharedPtr< double > > slns, std::vector< int > items, const char *filename, const char *quantity_name, bool mode_3D=true) |
Save multiple MeshFunctions (Solutions, Filters) in VTK format. | |
void | save_solution_tecplot (MeshFunctionSharedPtr< double > sln, const char *filename, const char *quantity_name, int item=H2D_FN_VAL_0) |
Save a MeshFunction (Solution, Filter) in Tecplot format. | |
void | save_solution_tecplot (std::vector< MeshFunctionSharedPtr< double > > slns, std::vector< int > items, const char *filename, std::vector< std::string > quantity_names) |
Save multiple MeshFunctions (Solutions, Filters) in Tecplot format. | |
void | set_criterion (LinearizerCriterion criterion) |
void | set_displacement (MeshFunctionSharedPtr< double > xdisp, MeshFunctionSharedPtr< double > ydisp, double dmult=1.0) |
Set the displacement, i.e. set two functions that will deform the domain for visualization, in the x-direction, and the y-direction. | |
Iterator< typename LinearizerDataDimensions::vertex_t > | vertices_begin () const |
Return the appropriate iterator pointing to the beginning. | |
Iterator< typename LinearizerDataDimensions::triangle_t > | triangles_begin () const |
Return the appropriate iterator pointing to the beginning. | |
Iterator< typename LinearizerDataDimensions::edge_t > | edges_begin () const |
Return the appropriate iterator pointing to the beginning. | |
Iterator< triangle_indices_t > | triangle_indices_begin () const |
Return the appropriate iterator pointing to the beginning. | |
int | get_vertex_count () const |
Vertex count per all threads. | |
int | get_triangle_count () const |
Triangle per all threads. | |
int | get_edge_count () const |
Edge count per all threads. | |
int | get_triangle_index_count () const |
Triangle index count per all threads. | |
void | set_max_absolute_value (double max_abs) |
double | get_min_value () const |
double | get_max_value () const |
void | set_curvature_epsilon (double curvature_epsilon) |
double | get_curvature_epsilon () const |
Get the 'curvature' epsilon determining the tolerance of catching the shape of curved elements. | |
void | free () |
Free the instance. | |
void | lock_data () const |
Internal. | |
void | unlock_data () const |
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. | |
Public Attributes | |
LinearizerCriterion | criterion |
Protected Member Functions | |
void | check_data (MeshFunctionSharedPtr< double > *sln) |
Before assembling. | |
void | init (MeshFunctionSharedPtr< double > *sln, int *item) |
void | finish (MeshFunctionSharedPtr< double > *sln) |
void | find_min_max () |
Protected Attributes | |
Quad2D * | old_quad [LinearizerDataDimensions::dimension] |
Quad2D * | old_quad_x |
Quad2D * | old_quad_y |
LinearizerOutputType | linearizerOutputType |
ThreadLinearizerMultidimensional < LinearizerDataDimensions > ** | threadLinearizerMultidimensional |
Assembly data. | |
std::vector< MeshSharedPtr > | meshes |
double | curvature_epsilon |
Standard and curvature epsilon. | |
bool | user_xdisp |
Information if user-supplied displacement functions have been provided. | |
bool | user_ydisp |
pthread_mutex_t | data_mutex |
MeshFunctionSharedPtr< double > | xdisp |
Displacement functions, default to ZeroFunctions, may be supplied by set_displacement();. | |
MeshFunctionSharedPtr< double > | ydisp |
double | dmult |
Displacement multiplicator - used e.g. in Elasticity to multiply the displacement to make it more noticeable. | |
int | item [LinearizerDataDimensions::dimension] |
What kind of information do we want to get out of the solution. | |
int | component [LinearizerDataDimensions::dimension] |
int | value_type [LinearizerDataDimensions::dimension] |
Traverse::State ** | states |
unsigned int | num_states |
double | min_val |
double | max_val |
Protected Attributes inherited from Hermes::Hermes2D::Mixins::Parallel | |
unsigned char | num_threads_used |
std::string | exceptionMessageCaughtInParallelBlock |
Friends | |
class | ThreadLinearizerMultidimensional< LinearizerDataDimensions > |
LinearizerMultidimensional 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. LinearizerMultidimensional also serves as a container for the resulting linearized mesh. LinearizerMultidimensional serves the purpose of both scalar and vector data.
Definition at line 44 of file linearizer.h.
Hermes::Hermes2D::Views::LinearizerMultidimensional< LinearizerDataDimensions >::LinearizerMultidimensional | ( | LinearizerOutputType | linearizerOutputType | ) |
Constructor.
[in] | linearizerOutputType | Sets this instance to be either for OpenGL visualization (Hermes Views, Agros display), or saving the output to a file (VTK, Tecplot) |
Definition at line 43 of file linearizer.cpp.
void Hermes::Hermes2D::Views::LinearizerMultidimensional< LinearizerDataDimensions >::process_solution | ( | MeshFunctionSharedPtr< double > | sln, |
int | item = H2D_FN_VAL_0 |
||
) |
Main method - processes the solution and stores the data obtained by the process.
[in] | sln | the solution |
[in] | item | what item (function value, derivative wrt. x, ..) to use in the solution. |
Definition at line 235 of file linearizer.cpp.
void Hermes::Hermes2D::Views::LinearizerMultidimensional< LinearizerDataDimensions >::set_criterion | ( | LinearizerCriterion | criterion | ) |
Sets the criterion to use for the linearization process. This criterion is used in ThreadLinearizerMultidimensional class instances (see threadLinearizerMultidimensional array).
[in] | criterion | The instance of the criterion - see the class LinearizerCriterion for details (method split_decision() for the adaptive criterion, process_[triangle|quad] for the fixed one). |
Definition at line 68 of file linearizer.cpp.
Referenced by Hermes::Hermes2D::Views::ScalarView::set_linearizer_criterion(), and Hermes::Hermes2D::Views::VectorView::set_vectorizer_criterion().
void Hermes::Hermes2D::Views::LinearizerMultidimensional< LinearizerDataDimensions >::set_curvature_epsilon | ( | double | curvature_epsilon | ) |
Set the threshold for how fine the output for curved elements.
[in] | curvature_epsilon | The 'curvature' epsilon determining the tolerance of catching the shape of curved elements. The smaller, the finer. Default value = 1e-3. |
Definition at line 74 of file linearizer.cpp.
LinearizerCriterion Hermes::Hermes2D::Views::LinearizerMultidimensional< LinearizerDataDimensions >::criterion |
Assigned criterion. Defaults to a fixed criterion with one level of refinement.
Definition at line 142 of file linearizer.h.
|
protected |
Output type setting either the OpenGL or File output. This attribute influences the data that are produced - not all data are needed for both cases.
Definition at line 156 of file linearizer.h.