18 #ifndef OUTPUT_MESH_HH_ 19 #define OUTPUT_MESH_HH_ 32 namespace Input {
namespace Type {
class Record; } }
71 static const unsigned int spacedim = 3;
98 void create_sub_mesh();
103 virtual void create_refined_sub_mesh()=0;
109 unsigned int n_nodes();
111 unsigned int n_elements();
117 void create_id_caches();
120 void make_serial_master_mesh();
128 if (master_mesh_)
return master_mesh_;
129 else return shared_from_this();
148 virtual std::shared_ptr<OutputMeshBase> construct_mesh()=0;
162 virtual std::shared_ptr<ElementDataCache<unsigned int>> make_serial_connectivity_cache(std::shared_ptr<
ElementDataCache<unsigned int>> global_offsets)=0;
165 std::shared_ptr<ElementDataCache<unsigned int>> get_elems_n_nodes();
187 std::shared_ptr<ElementDataCache<double>>
nodes_;
191 std::shared_ptr<ElementDataCache<unsigned int>>
offsets_;
194 std::shared_ptr<ElementDataCache<unsigned int>>
node_ids_;
196 std::shared_ptr<ElementDataCache<unsigned int>>
elem_ids_;
240 void create_refined_sub_mesh()
override;
243 bool refinement_criterion();
246 std::shared_ptr<OutputMeshBase> construct_mesh()
override;
252 std::shared_ptr<ElementDataCache<unsigned int>> make_serial_connectivity_cache(std::shared_ptr<
ElementDataCache<unsigned int>> global_offsets)
override;
268 void create_refined_sub_mesh()
override;
271 void make_parallel_master_mesh()
override;
282 void refine_aux_element(
const AuxElement& aux_element,
288 bool refinement_criterion(
const AuxElement& ele,
292 bool refinement_criterion_uniform(
const AuxElement& ele);
295 bool refinement_criterion_error(
const AuxElement& ele,
301 std::shared_ptr<OutputMeshBase> construct_mesh()
override;
307 std::shared_ptr<ElementDataCache<unsigned int>> make_serial_connectivity_cache(std::shared_ptr<
ElementDataCache<unsigned int>> global_offsets)
override;
310 #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.)