Flow123d
release_3.0.0-688-g6b683cf
|
Base class for Output mesh. More...
#include <output_mesh.hh>
Public Types | |
typedef std::function< void(const std::vector< Space< spacedim >::Point > &, const ElementAccessor< spacedim > &, std::vector< double > &)> | ErrorControlFieldFunc |
Public Member Functions | |
OutputMeshBase (Mesh &mesh) | |
Constructor. Takes computational mesh as a parameter. More... | |
OutputMeshBase (Mesh &mesh, const Input::Record &in_rec) | |
Constructor. Takes computational mesh and input record as a parameters. More... | |
virtual | ~OutputMeshBase () |
OutputElementIterator | begin () |
Gives iterator to the FIRST element of the output mesh. More... | |
OutputElementIterator | end () |
Gives iterator to the LAST element of the output mesh. More... | |
virtual void | create_mesh ()=0 |
Creates the output mesh identical to the orig mesh. More... | |
virtual void | create_refined_mesh ()=0 |
Creates refined mesh. More... | |
virtual void | create_sub_mesh ()=0 |
Creates sub mesh containing only local elements. More... | |
void | set_error_control_field (ErrorControlFieldFunc error_control_field_func) |
Selects the error control field computing function of output field set according to input record. More... | |
unsigned int | n_nodes () |
Returns number of nodes. More... | |
unsigned int | n_elements () |
Returns number of element. More... | |
bool | is_created () |
Check if nodes_, connectivity_ and offsets_ data caches are created. More... | |
void | create_id_caches () |
Create nodes and elements data caches. More... | |
Static Public Member Functions | |
static const Input::Type::Record & | get_input_type () |
The specification of output mesh. More... | |
Static Public Attributes | |
static const unsigned int | spacedim = 3 |
Shortcut instead of spacedim template. We suppose only spacedim=3 at the moment. More... | |
Protected Types | |
enum | MeshType { orig, refined, discont } |
Protected Attributes | |
Input::Record | input_record_ |
Input record for output mesh. More... | |
Mesh * | orig_mesh_ |
Pointer to the computational mesh. More... | |
const unsigned int | max_level_ |
Maximal level of refinement. More... | |
ErrorControlFieldFunc | error_control_field_func_ |
Refinement error control field function (hold value_list function of field). More... | |
MeshType | mesh_type_ |
Type of OutputMesh. More... | |
bool | refine_by_error_ |
True, if output mesh is to be refined by error criterion. More... | |
double | refinement_error_tolerance_ |
Tolerance for error criterion refinement. More... | |
std::shared_ptr< std::vector< unsigned int > > | orig_element_indices_ |
Vector of element indices in the computational mesh. (Important when refining.) More... | |
std::shared_ptr< ElementDataCache< double > > | nodes_ |
Vector of node coordinates. [spacedim x n_nodes]. More... | |
std::shared_ptr< ElementDataCache< unsigned int > > | connectivity_ |
Vector maps the nodes to their coordinates in vector nodes_ . More... | |
std::shared_ptr< ElementDataCache< unsigned int > > | offsets_ |
Vector of offsets of node indices of elements. Maps elements to their nodes in connectivity_. More... | |
std::shared_ptr< ElementDataCache< unsigned int > > | node_ids_ |
Vector gets ids of nodes. Data is used in GMSH output. More... | |
std::shared_ptr< ElementDataCache< unsigned int > > | elem_ids_ |
Vector gets ids of elements. Data is used in GMSH output. More... | |
std::shared_ptr< ElementDataCache< unsigned int > > | region_ids_ |
Vector gets ids of regions. Data is used in GMSH output. More... | |
std::shared_ptr< ElementDataCache< int > > | partitions_ |
Vector gets partitions of elements. Data is used in GMSH output. More... | |
Friends | |
class | OutputElement |
Friend provides access to vectors for element accessor class. More... | |
class | OutputTime |
class | OutputMSH |
class | OutputVTK |
Base class for Output mesh.
Defines common members for Output mesh classes:
Making of output meshes and calling of their initialization methods must be execute in correct order, see example:
Definition at line 61 of file output_mesh.hh.
typedef std::function<void(const std::vector< Space<spacedim>::Point > &, const ElementAccessor<spacedim> &, std::vector<double> &)> OutputMeshBase::ErrorControlFieldFunc |
Definition at line 68 of file output_mesh.hh.
|
protected |
Possible types of OutputMesh.
Enumerator | |
---|---|
orig |
same as original (computational) mesh |
refined |
refined mesh |
discont |
discontinuous mesh |
Definition at line 114 of file output_mesh.hh.
OutputMeshBase::OutputMeshBase | ( | Mesh & | mesh | ) |
Constructor. Takes computational mesh as a parameter.
Definition at line 47 of file output_mesh.cc.
OutputMeshBase::OutputMeshBase | ( | Mesh & | mesh, |
const Input::Record & | in_rec | ||
) |
Constructor. Takes computational mesh and input record as a parameters.
Definition at line 58 of file output_mesh.cc.
|
virtual |
Definition at line 69 of file output_mesh.cc.
OutputElementIterator OutputMeshBase::begin | ( | ) |
Gives iterator to the FIRST element of the output mesh.
Definition at line 73 of file output_mesh.cc.
void OutputMeshBase::create_id_caches | ( | ) |
Create nodes and elements data caches.
Definition at line 105 of file output_mesh.cc.
|
pure virtual |
Creates the output mesh identical to the orig mesh.
Implemented in OutputMeshDiscontinuous, and OutputMesh.
|
pure virtual |
Creates refined mesh.
Implemented in OutputMeshDiscontinuous, and OutputMesh.
|
pure virtual |
Creates sub mesh containing only local elements.
Implemented in OutputMeshDiscontinuous, and OutputMesh.
OutputElementIterator OutputMeshBase::end | ( | ) |
Gives iterator to the LAST element of the output mesh.
Definition at line 80 of file output_mesh.cc.
|
static |
The specification of output mesh.
Definition at line 32 of file output_mesh.cc.
bool OutputMeshBase::is_created | ( | ) |
Check if nodes_, connectivity_ and offsets_ data caches are created.
Definition at line 137 of file output_mesh.cc.
unsigned int OutputMeshBase::n_elements | ( | ) |
Returns number of element.
Definition at line 93 of file output_mesh.cc.
unsigned int OutputMeshBase::n_nodes | ( | ) |
Returns number of nodes.
Definition at line 99 of file output_mesh.cc.
void OutputMeshBase::set_error_control_field | ( | ErrorControlFieldFunc | error_control_field_func | ) |
Selects the error control field computing function of output field set according to input record.
Definition at line 88 of file output_mesh.cc.
|
friend |
Friend provides access to vectors for element accessor class.
Definition at line 158 of file output_mesh.hh.
|
friend |
Definition at line 160 of file output_mesh.hh.
|
friend |
Definition at line 159 of file output_mesh.hh.
|
friend |
Definition at line 161 of file output_mesh.hh.
|
protected |
Vector maps the nodes to their coordinates in vector nodes_
.
Definition at line 144 of file output_mesh.hh.
|
protected |
Vector gets ids of elements. Data is used in GMSH output.
Definition at line 151 of file output_mesh.hh.
|
protected |
Refinement error control field function (hold value_list function of field).
Definition at line 132 of file output_mesh.hh.
|
protected |
Input record for output mesh.
Definition at line 123 of file output_mesh.hh.
|
protected |
Maximal level of refinement.
Definition at line 129 of file output_mesh.hh.
|
protected |
Type of OutputMesh.
Definition at line 134 of file output_mesh.hh.
|
protected |
Vector gets ids of nodes. Data is used in GMSH output.
Definition at line 149 of file output_mesh.hh.
|
protected |
Vector of node coordinates. [spacedim x n_nodes].
Definition at line 142 of file output_mesh.hh.
|
protected |
Vector of offsets of node indices of elements. Maps elements to their nodes in connectivity_.
Definition at line 146 of file output_mesh.hh.
|
protected |
Vector of element indices in the computational mesh. (Important when refining.)
Definition at line 139 of file output_mesh.hh.
|
protected |
Pointer to the computational mesh.
Definition at line 126 of file output_mesh.hh.
|
protected |
Vector gets partitions of elements. Data is used in GMSH output.
Definition at line 155 of file output_mesh.hh.
|
protected |
True, if output mesh is to be refined by error criterion.
Definition at line 135 of file output_mesh.hh.
|
protected |
Tolerance for error criterion refinement.
Definition at line 136 of file output_mesh.hh.
|
protected |
Vector gets ids of regions. Data is used in GMSH output.
Definition at line 153 of file output_mesh.hh.
|
static |
Shortcut instead of spacedim template. We suppose only spacedim=3 at the moment.
Definition at line 65 of file output_mesh.hh.