18 #ifndef OUTPUT_MESH_HH_ 19 #define OUTPUT_MESH_HH_ 35 namespace Input {
namespace Type {
class Record; } }
74 static const unsigned int spacedim = 3;
76 typedef std::function<void(const Armor::array &, const ElementAccessor<spacedim> &,
std::vector<double> &)>
101 void create_sub_mesh();
106 virtual void create_refined_sub_mesh()=0;
112 unsigned int n_nodes();
114 unsigned int n_elements();
120 void create_id_caches();
123 void make_serial_master_mesh();
131 if (master_mesh_)
return master_mesh_;
132 else return shared_from_this();
151 virtual std::shared_ptr<OutputMeshBase> construct_mesh()=0;
165 virtual std::shared_ptr<ElementDataCache<unsigned int>> make_serial_connectivity_cache(std::shared_ptr<
ElementDataCache<unsigned int>> global_offsets)=0;
168 std::shared_ptr<ElementDataCache<unsigned int>> get_elems_n_nodes();
190 std::shared_ptr<ElementDataCache<double>>
nodes_;
194 std::shared_ptr<ElementDataCache<unsigned int>>
offsets_;
197 std::shared_ptr<ElementDataCache<unsigned int>>
node_ids_;
199 std::shared_ptr<ElementDataCache<unsigned int>>
elem_ids_;
243 void create_refined_sub_mesh()
override;
246 bool refinement_criterion();
249 std::shared_ptr<OutputMeshBase> construct_mesh()
override;
255 std::shared_ptr<ElementDataCache<unsigned int>> make_serial_connectivity_cache(std::shared_ptr<
ElementDataCache<unsigned int>> global_offsets)
override;
271 void create_refined_sub_mesh()
override;
274 void make_parallel_master_mesh()
override;
285 void refine_aux_element(
const AuxElement& aux_element,
291 bool refinement_criterion(
const AuxElement& ele,
295 bool refinement_criterion_uniform(
const AuxElement& ele);
298 bool refinement_criterion_error(
const AuxElement& ele,
304 std::shared_ptr<OutputMeshBase> construct_mesh()
override;
310 std::shared_ptr<ElementDataCache<unsigned int>> make_serial_connectivity_cache(std::shared_ptr<
ElementDataCache<unsigned int>> global_offsets)
override;
313 #endif // OUTPUT_MESH_HH_ Class represents output mesh with continuous elements.
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...
Mesh * orig_mesh_
Pointer to the computational mesh.
Armor::ArmaVec< double, spacedim > Point
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).
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.
General iterator template. Provides iterator over objects of type Object in some container.
int LongIdx
Define type that represents indices of large arrays (elements, nodes, dofs etc.)
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
std::function< void(const Armor::array &, const ElementAccessor< spacedim > &, std::vector< double > &)> ErrorControlFieldFunc
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.)