Hermes2D  2.0
Hermes::Hermes2D::Views Namespace Reference

Namespace containing Views classes, Linearizer classes, and support for these. More...

Classes

class  BaseView
 Visualizes the basis functions of a space. More...
 
class  VectorBaseView
 
class  Linearizer
 
class  Quad2DLin
 
class  LinearizerBase
 Base class for Linearizer, Orderizer, Vectorizer. More...
 
class  MeshView
 Displays a mesh. More...
 
class  OrderView
 Displays the polynomial degrees of elements. More...
 
class  Orderizer
 
class  ScalarView
 Visualizes a Scalar PDE solution. More...
 
class  StreamView
 Visualizes streamlines of a vector PDE solution. More...
 
class  VectorView
 Visualizes a vector PDE solution. More...
 
class  Vectorizer
 "Vectorizer" is a Linearizer for vector solutions. The only difference is that linearized vertices are vector-valued. Also, regularization of the resulting mesh is not attempted. The class can handle different meshes in both X and Y components. More...
 
struct  WinGeom
 
class  View
 Represents a simple visualization window. More...
 
class  ViewMonitor
 < A monitor used to synchronize thread in views. More...
 
class  Quad2DOrd
 
struct  BitmapFileHeader
 
struct  BitmapInfoHeader
 
struct  ThreadInfo
 
struct  ViewParams
 
struct  RemoveParams
 
struct  TitleParams
 

Typedefs

typedef unsigned int dword
 
typedef unsigned short word
 
typedef int(* CTC_FUNC )(void *)
 

Enumerations

enum  ViewWaitEvent { HERMES_WAIT_CLOSE, HERMES_WAIT_KEYPRESS }
 Wait events. More...
 
enum  ViewPaletteType {
  H2DV_PT_DEFAULT = -1, H2DV_PT_HUESCALE = 0, H2DV_PT_GRAYSCALE = 1, H2DV_PT_INVGRAYSCALE = 2,
  H2DV_PT_MAX_ID = 3
}
 View palette type. More...
 

Functions

HERMES_API bool init_glut ()
 Initialize GLUT. More...
 
HERMES_API bool shutdown_glut ()
 Shutdown GLUT. More...
 
int add_view (View *view, int x, int y, int width, int height, const char *title)
 Adds a view.
 
void set_view_title (int view_id, const char *title)
 Sets title of a view.
 
void refresh_view (int view_id)
 Forces redisplay of a view.
 
void remove_view (int view_id)
 Removes a view.
 
void wait_for_all_views_close (const char *text)
 Waits for all views to close.
 
void wait_for_any_key (const char *text)
 Waits for a keypress which is not processed.
 
void on_display_stub (void)
 
void on_reshape_stub (int width, int height)
 
void on_mouse_move_stub (int x, int y)
 
void on_key_down_stub (unsigned char key, int x, int y)
 
void on_special_key_stub (int key, int x, int y)
 
void on_entry_stub (int state)
 
void on_mouse_click_stub (int button, int state, int x, int y)
 
void on_close_stub ()
 
template HERMES_API void OrderView::show< std::complex< double > > (const Space< std::complex< double > > *space)
 
template HERMES_API void Orderizer::save_orders_vtk< std::complex< double > > (const Space< std::complex< double > > *space, const char *file_name)
 
template HERMES_API void Orderizer::save_mesh_vtk< std::complex< double > > (const Space< std::complex< double > > *space, const char *file_name)
 
template HERMES_API void Orderizer::process_space< std::complex< double > > (const Space< std::complex< double > > *space)
 
int add_view_in_thread (void *view_pars_ptr)
 Adds a new view. Function has to be called just from the inside of view thread with a locked sync_view.
 
int remove_view_in_thread (void *remove_params_ptr)
 Removes a new view. Function has to be called just from the inside of view thread with a locked sync_view.
 
void force_view_thread_shutdown ()
 

Variables

const double HERMES_EPS_LOW = 0.007
 
const double HERMES_EPS_NORMAL = 0.0004
 
const double HERMES_EPS_HIGH = 0.0001
 
const double HERMES_EPS_VERYHIGH = 0.000002
 
double3 lin_pts_0_tri []
 
double3 lin_pts_0_quad []
 
double3 lin_pts_1_tri [12]
 
double3 lin_pts_1_quad [21]
 
int quad_indices [9][5]
 
int tri_indices [5][3]
 
int lin_np_tri [2] = { 3, 12 }
 
int lin_np_quad [2] = { 4, 21 }
 
int * lin_np [2] = { lin_np_tri, lin_np_quad }
 
double3 * lin_tables_tri [2] = { lin_pts_0_tri, lin_pts_1_tri }
 
double3 * lin_tables_quad [2] = { lin_pts_0_quad, lin_pts_1_quad }
 
double3 ** lin_tables [2] = { lin_tables_tri, lin_tables_quad }
 
HERMES_API Quad2DLin g_quad_lin
 
const int LIN_MAX_LEVEL = 6
 
ViewMonitor view_sync
 synchronization between all views. Used to access OpenGL and signal a window close event and a keypress event. More...
 
template class HERMES_API BaseView< double >
 
template class HERMES_API VectorBaseView< double >
 
const word BITMAP_ID = 0x4D42
 

Detailed Description

Namespace containing Views classes, Linearizer classes, and support for these.

Enumeration Type Documentation

View palette type.

Enumerator
H2DV_PT_DEFAULT 

Default palette. Depends on viewer.

H2DV_PT_HUESCALE 

A palette based on hue scale.

H2DV_PT_GRAYSCALE 

Greyscale.

H2DV_PT_INVGRAYSCALE 

Inverted grayscale.

H2DV_PT_MAX_ID 

Maximum ID of view palette type.

Definition at line 64 of file view.h.

Wait events.

Enumerator
HERMES_WAIT_CLOSE 

Wait for all windows to close.

HERMES_WAIT_KEYPRESS 

Wait for any unprocessed keypress to happen.

Definition at line 44 of file view.h.

Function Documentation

bool Hermes::Hermes2D::Views::init_glut ( )

Initialize GLUT.

initialize GLUT

Definition at line 384 of file view_support.cpp.

bool Hermes::Hermes2D::Views::shutdown_glut ( )

Shutdown GLUT.

shutdowns GLUT

Definition at line 407 of file view_support.cpp.

Variable Documentation

double3 Hermes::Hermes2D::Views::lin_pts_0_quad
Initial value:
=
{
{ -1.0, -1.0, 0.0 },
{ 1.0, -1.0, 0.0 },
{ 1.0, 1.0, 0.0 },
{ -1.0, 1.0, 0.0 }
}

Definition at line 35 of file linearizer.cpp.

double3 Hermes::Hermes2D::Views::lin_pts_0_tri
Initial value:
=
{
{ -1.0, -1.0, 0.0 },
{ 1.0, -1.0, 0.0 },
{ -1.0, 1.0, 0.0 }
}

The tables with index zero are for obtaining solution values at the element vertices. Index one tables serve for the retrieval of interior values. Index one tables are used for adaptive approximation of the solution by transforming their points to sub-elements. Actually, the tables contain two levels of refinement – this is an optimization to reduce the number of calls to sln->get_values().

Definition at line 28 of file linearizer.cpp.

double3 Hermes::Hermes2D::Views::lin_pts_1_quad
Initial value:
=
{
{ 0.0, -1.0, 0.0 },
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
{ -1.0, 0.0, 0.0 },
{ 0.0, 0.0, 0.0 },
{ -0.5, -1.0, 0.0 },
{ 0.0, -0.5, 0.0 },
{ -0.5, 0.0, 0.0 },
{ -1.0, -0.5, 0.0 },
{ -0.5, -0.5, 0.0 },
{ 0.5, -1.0, 0.0 },
{ 1.0, -0.5, 0.0 },
{ 0.5, 0.0, 0.0 },
{ 0.5, -0.5, 0.0 },
{ 1.0, 0.5, 0.0 },
{ 0.5, 1.0, 0.0 },
{ 0.0, 0.5, 0.0 },
{ 0.5, 0.5, 0.0 },
{ -0.5, 1.0, 0.0 },
{ -1.0, 0.5, 0.0 },
{ -0.5, 0.5, 0.0 }
}

Definition at line 59 of file linearizer.cpp.

double3 Hermes::Hermes2D::Views::lin_pts_1_tri
Initial value:
=
{
{ 0.0, -1.0, 0.0 },
{ 0.0, 0.0, 0.0 },
{ -1.0, 0.0, 0.0 },
{ -0.5, -1.0, 0.0 },
{ -0.5, -0.5, 0.0 },
{ -1.0, -0.5, 0.0 },
{ 0.5, -1.0, 0.0 },
{ 0.5, -0.5, 0.0 },
{ 0.0, -0.5, 0.0 },
{ -0.5, 0.0, 0.0 },
{ -0.5, 0.5, 0.0 },
{ -1.0, 0.5, 0.0 }
}

Definition at line 43 of file linearizer.cpp.

int Hermes::Hermes2D::Views::quad_indices
Initial value:
=
{
{ 0, 1, 2, 3, 4 },
{ 5, 6, 7, 8, 9 }, { 10, 11, 12, 6, 13 },
{ 12, 14, 15, 16, 17 }, { 7, 16, 18, 19, 20 },
{ 0, 11, 4, 8, 6 }, { 4, 14, 2, 19, 16 },
{ 5, 4, 18, 3, 7 }, { 10, 1, 15, 4, 12 }
}

Definition at line 84 of file linearizer.cpp.

int Hermes::Hermes2D::Views::tri_indices
Initial value:
=
{
{ 0, 1, 2 }, { 3, 4, 5 }, { 6, 7, 8 }, { 9, 10, 11 }, { 9, 4, 8 }
}

Definition at line 93 of file linearizer.cpp.

ViewMonitor Hermes::Hermes2D::Views::view_sync

synchronization between all views. Used to access OpenGL and signal a window close event and a keypress event.

Synchronization.

Definition at line 42 of file view_support.cpp.

Referenced by Hermes::Hermes2D::Views::View::refresh(), remove_view_in_thread(), Hermes::Hermes2D::Views::View::save_screenshot(), Hermes::Hermes2D::Views::View::set_title(), wait_for_all_views_close(), and wait_for_any_key().