18 #ifndef OUTPUT_MESH_HH_ 19 #define OUTPUT_MESH_HH_ 34 namespace Input {
namespace Type {
class Record; } }
73 static const unsigned int spacedim = 3;
100 void create_sub_mesh();
105 virtual void create_refined_sub_mesh()=0;
111 unsigned int n_nodes();
113 unsigned int n_elements();
119 void create_id_caches();
122 void make_serial_master_mesh();
130 if (master_mesh_)
return master_mesh_;
131 else return shared_from_this();
150 virtual std::shared_ptr<OutputMeshBase> construct_mesh()=0;
164 virtual std::shared_ptr<ElementDataCache<unsigned int>> make_serial_connectivity_cache(std::shared_ptr<
ElementDataCache<unsigned int>> global_offsets)=0;
167 std::shared_ptr<ElementDataCache<unsigned int>> get_elems_n_nodes();
189 std::shared_ptr<ElementDataCache<double>>
nodes_;
193 std::shared_ptr<ElementDataCache<unsigned int>>
offsets_;
196 std::shared_ptr<ElementDataCache<unsigned int>>
node_ids_;
198 std::shared_ptr<ElementDataCache<unsigned int>>
elem_ids_;
242 void create_refined_sub_mesh()
override;
245 bool refinement_criterion();
248 std::shared_ptr<OutputMeshBase> construct_mesh()
override;
254 std::shared_ptr<ElementDataCache<unsigned int>> make_serial_connectivity_cache(std::shared_ptr<
ElementDataCache<unsigned int>> global_offsets)
override;
270 void create_refined_sub_mesh()
override;
273 void make_parallel_master_mesh()
override;
284 void refine_aux_element(
const AuxElement& aux_element,
290 bool refinement_criterion(
const AuxElement& ele,
294 bool refinement_criterion_uniform(
const AuxElement& ele);
297 bool refinement_criterion_error(
const AuxElement& ele,
303 std::shared_ptr<OutputMeshBase> construct_mesh()
override;
309 std::shared_ptr<ElementDataCache<unsigned int>> make_serial_connectivity_cache(std::shared_ptr<
ElementDataCache<unsigned int>> global_offsets)
override;
312 #endif // OUTPUT_MESH_HH_ Class represents output mesh with continuous elements.
int LongIdx
Define type that represents indices of large arrays (elements, nodes, dofs etc.)
Iter< OutputElement > OutputElementIterator
Base class for Output mesh.
Distribution * el_ds_
Parallel distribution of elements.
Represents an element of the output mesh. Provides element access on the data of the output mesh (nod...
std::function< void(const std::vector< Space< spacedim >::Point > &, const ElementAccessor< spacedim > &, std::vector< double > &)> ErrorControlFieldFunc
Mesh * orig_mesh_
Pointer to the computational mesh.
const unsigned int max_level_
Maximal level of refinement.
Template Iter serves as general template for internal iterators.
double refinement_error_tolerance_
Tolerance for error criterion refinement.
std::shared_ptr< ElementDataCache< unsigned int > > connectivity_
Vector maps the nodes to their coordinates in vector nodes_.
std::shared_ptr< ElementDataCache< unsigned int > > node_ids_
Vector gets ids of nodes. Data is used in GMSH output.
Distribution * node_ds_
Parallel distribution of nodes. Depends on elements distribution.
std::shared_ptr< ElementDataCache< unsigned int > > offsets_
Vector of offsets of node indices of elements. Maps elements to their nodes in connectivity_.
std::shared_ptr< ElementDataCache< double > > nodes_
Vector of node coordinates. [spacedim x n_nodes].
Class represents output mesh with discontinuous elements.
std::shared_ptr< OutputMeshBase > get_master_mesh()
Return master output mesh if exists or shared_ptr of this object.
ErrorControlFieldFunc error_control_field_func_
Refinement error control field function (hold value_list function of field).
arma::vec::fixed< spacedim > Point
Auxiliary structure defining element of refined output mesh.
This class is used for output data to VTK file format.
std::shared_ptr< ElementDataCache< unsigned int > > region_ids_
Vector gets ids of regions. Data is used in GMSH output.
The class for outputting data during time.
LongIdx * node_4_loc_
Index set assigning to local node index its global index.
Input::Record input_record_
Input record for output mesh.
std::shared_ptr< ElementDataCache< int > > partitions_
Vector gets partitions of elements. Data is used in GMSH output.
std::shared_ptr< OutputMeshBase > master_mesh_
bool refine_by_error_
True, if output mesh is to be refined by error criterion.
virtual void make_parallel_master_mesh()
Create output mesh of parallel output (implemented only for discontinuous mesh)
MeshType mesh_type_
Type of OutputMesh.
LongIdx * el_4_loc_
Index set assigning to local element index its global index.
std::vector< Space< spacedim >::Point > nodes
std::shared_ptr< ElementDataCache< unsigned int > > elem_ids_
Vector gets ids of elements. Data is used in GMSH output.
same as original (computational) mesh
General iterator template. Provides iterator over objects of type ObjectIn in some container...
This class is used for output data to VTK file format.
unsigned int n_local_nodes_
Hold number of local nodes (own + ghost), value is equal with size of node_4_loc array.
std::shared_ptr< std::vector< unsigned int > > orig_element_indices_
Vector of element indices in the computational mesh. (Important when refining.)