Flow123d  master-f44eb46
Classes | Public Member Functions | Protected Member Functions | List of all members
OutputMeshDiscontinuous Class Reference

Class represents output mesh with discontinuous elements. More...

#include <output_mesh.hh>

Inheritance diagram for OutputMeshDiscontinuous:
Inheritance graph
[legend]
Collaboration diagram for OutputMeshDiscontinuous:
Collaboration graph
[legend]

Classes

struct  AuxElement
 Auxiliary structure defining element of refined output mesh. More...
 

Public Member Functions

 OutputMeshDiscontinuous (Mesh &mesh)
 
 OutputMeshDiscontinuous (Mesh &mesh, const Input::Record &in_rec)
 
 ~OutputMeshDiscontinuous ()
 
void create_refined_sub_mesh () override
 Implements OutputMeshBase::create_refined_sub_mesh. More...
 
void make_parallel_master_mesh () override
 Overrides OutputMeshBase::make_parallel_master_mesh. More...
 
- Public Member Functions inherited from OutputMeshBase
 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...
 
void create_sub_mesh ()
 
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...
 
void make_serial_master_mesh ()
 Synchronize parallel data and create serial COLECTIVE output mesh on zero process. More...
 
std::shared_ptr< OutputMeshBaseget_master_mesh ()
 Return master output mesh if exists or shared_ptr of this object. More...
 
LongIdx get_loc_elem_idx (LongIdx global_idx)
 
std::shared_ptr< ElementDataCache< unsigned int > > offsets () const
 Getter to offsets data. More...
 

Protected Member Functions

template<int dim>
void refine_aux_element (const AuxElement &aux_element, std::vector< AuxElement > &refinement, const ElementAccessor< spacedim > &ele_acc)
 Performs the actual refinement of AuxElement. Recurrent. More...
 
bool refinement_criterion (const AuxElement &ele, const ElementAccessor< spacedim > &ele_acc)
 Collects different refinement criteria results. More...
 
bool refinement_criterion_uniform (const AuxElement &ele)
 Refinement flag - checks only maximal level of refinement. More...
 
bool refinement_criterion_error (const AuxElement &ele, const Space< spacedim >::Point &centre, const ElementAccessor< spacedim > &ele_acc)
 Refinement flag - measures discretisation error according to error control field. More...
 
std::shared_ptr< OutputMeshBaseconstruct_mesh () override
 Implements OutputMeshBase::construct_mesh. More...
 
std::shared_ptr< ElementDataCache< double > > make_serial_nodes_cache (std::shared_ptr< ElementDataCache< unsigned int >> global_offsets) override
 Implements OutputMeshBase::make_serial_nodes_cache. More...
 
std::shared_ptr< ElementDataCache< unsigned int > > make_serial_connectivity_cache (std::shared_ptr< ElementDataCache< unsigned int >> global_offsets) override
 Implements OutputMeshBase::make_serial_connectivity_cache. More...
 
- Protected Member Functions inherited from OutputMeshBase
std::shared_ptr< ElementDataCache< unsigned int > > get_elems_n_nodes ()
 Compute and return number of nodes for each elements (compute from offsets) More...
 

Additional Inherited Members

- Public Types inherited from OutputMeshBase
typedef std::function< void(const Armor::array &, const ElementAccessor< spacedim > &, std::vector< double > &)> ErrorControlFieldFunc
 
- Static Public Member Functions inherited from OutputMeshBase
static const Input::Type::Recordget_input_type ()
 The specification of output mesh. More...
 
- Static Public Attributes inherited from OutputMeshBase
static const unsigned int spacedim = 3
 Shortcut instead of spacedim template. We suppose only spacedim=3 at the moment. More...
 
- Protected Types inherited from OutputMeshBase
enum  MeshType { orig , refined , discont }
 
- Protected Attributes inherited from OutputMeshBase
Input::Record input_record_
 Input record for output mesh. More...
 
Meshorig_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...
 
std::shared_ptr< OutputMeshBasemaster_mesh_
 
LongIdxel_4_loc_
 Index set assigning to local element index its global index. More...
 
LongIdxloc_4_el_
 Index set assigning to global index its local element index. More...
 
Distributionel_ds_
 Parallel distribution of elements. More...
 
LongIdxnode_4_loc_
 Index set assigning to local node index its global index. More...
 
Distributionnode_ds_
 Parallel distribution of nodes. Depends on elements distribution. More...
 
unsigned int n_local_nodes_
 Hold number of local nodes (own + ghost), value is equal with size of node_4_loc array. More...
 

Detailed Description

Class represents output mesh with discontinuous elements.

Definition at line 280 of file output_mesh.hh.

Constructor & Destructor Documentation

◆ OutputMeshDiscontinuous() [1/2]

OutputMeshDiscontinuous::OutputMeshDiscontinuous ( Mesh mesh)

Definition at line 351 of file output_mesh.cc.

◆ OutputMeshDiscontinuous() [2/2]

OutputMeshDiscontinuous::OutputMeshDiscontinuous ( Mesh mesh,
const Input::Record in_rec 
)

Definition at line 357 of file output_mesh.cc.

◆ ~OutputMeshDiscontinuous()

OutputMeshDiscontinuous::~OutputMeshDiscontinuous ( )

Definition at line 364 of file output_mesh.cc.

Member Function Documentation

◆ construct_mesh()

std::shared_ptr< OutputMeshBase > OutputMeshDiscontinuous::construct_mesh ( )
overrideprotectedvirtual

Implements OutputMeshBase::construct_mesh.

Implements OutputMeshBase.

Definition at line 573 of file output_mesh.cc.

Here is the caller graph for this function:

◆ create_refined_sub_mesh()

void OutputMeshDiscontinuous::create_refined_sub_mesh ( )
overridevirtual

Implements OutputMeshBase::create_refined_sub_mesh.

Implements OutputMeshBase.

Definition at line 625 of file output_mesh.cc.

◆ make_parallel_master_mesh()

void OutputMeshDiscontinuous::make_parallel_master_mesh ( )
overridevirtual

Overrides OutputMeshBase::make_parallel_master_mesh.

Reimplemented from OutputMeshBase.

Definition at line 729 of file output_mesh.cc.

◆ make_serial_connectivity_cache()

std::shared_ptr< ElementDataCache< unsigned int > > OutputMeshDiscontinuous::make_serial_connectivity_cache ( std::shared_ptr< ElementDataCache< unsigned int >>  global_offsets)
overrideprotectedvirtual

Implements OutputMeshBase::make_serial_connectivity_cache.

Implements OutputMeshBase.

Definition at line 610 of file output_mesh.cc.

◆ make_serial_nodes_cache()

std::shared_ptr< ElementDataCache< double > > OutputMeshDiscontinuous::make_serial_nodes_cache ( std::shared_ptr< ElementDataCache< unsigned int >>  global_offsets)
overrideprotectedvirtual

Implements OutputMeshBase::make_serial_nodes_cache.

Implements OutputMeshBase.

Definition at line 579 of file output_mesh.cc.

◆ refine_aux_element()

template<int dim>
template void OutputMeshDiscontinuous::refine_aux_element< 3 > ( const AuxElement aux_element,
std::vector< AuxElement > &  refinement,
const ElementAccessor< spacedim > &  ele_acc 
)
protected

Performs the actual refinement of AuxElement. Recurrent.

Definition at line 370 of file output_mesh.cc.

◆ refinement_criterion()

bool OutputMeshDiscontinuous::refinement_criterion ( const AuxElement ele,
const ElementAccessor< spacedim > &  ele_acc 
)
protected

Collects different refinement criteria results.

Definition at line 516 of file output_mesh.cc.

Here is the caller graph for this function:

◆ refinement_criterion_error()

bool OutputMeshDiscontinuous::refinement_criterion_error ( const AuxElement ele,
const Space< spacedim >::Point &  centre,
const ElementAccessor< spacedim > &  ele_acc 
)
protected

Refinement flag - measures discretisation error according to error control field.

Definition at line 542 of file output_mesh.cc.

Here is the caller graph for this function:

◆ refinement_criterion_uniform()

bool OutputMeshDiscontinuous::refinement_criterion_uniform ( const AuxElement ele)
protected

Refinement flag - checks only maximal level of refinement.

Definition at line 537 of file output_mesh.cc.

Here is the caller graph for this function:

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