Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/dolfinx/v0.9.0/cpp/doxygen/d6/db4/plaza_8h_source.html
DOLFINx  0.5.1
DOLFINx C++ interface
plaza.h
1 // Copyright (C) 2014-2018 Chris Richardson
2 //
3 // This file is part of DOLFINx (https://www.fenicsproject.org)
4 //
5 // SPDX-License-Identifier: LGPL-3.0-or-later
6 
7 #include <cstdint>
8 #include <dolfinx/graph/AdjacencyList.h>
9 #include <span>
10 #include <tuple>
11 #include <utility>
12 #include <vector>
13 
14 #pragma once
15 
16 namespace dolfinx::mesh
17 {
18 class Mesh;
19 template <typename T>
20 class MeshTags;
21 } // namespace dolfinx::mesh
22 
23 namespace dolfinx::refinement
24 {
25 
29 namespace plaza
30 {
31 
37 enum class RefinementOptions : int
38 {
39  none = 0,
40  parent_cell = 1,
41  parent_facet = 2,
42  parent_cell_and_facet = 3
43 };
44 
55 std::tuple<mesh::Mesh, std::vector<std::int32_t>, std::vector<std::int8_t>>
56 refine(const mesh::Mesh& mesh, bool redistribute, RefinementOptions options);
57 
70 std::tuple<mesh::Mesh, std::vector<std::int32_t>, std::vector<std::int8_t>>
71 refine(const mesh::Mesh& mesh, const std::span<const std::int32_t>& edges,
72  bool redistribute, RefinementOptions options);
73 
83 std::tuple<graph::AdjacencyList<std::int64_t>, std::vector<double>,
84  std::array<std::size_t, 2>, std::vector<std::int32_t>,
85  std::vector<std::int8_t>>
87 
98 std::tuple<graph::AdjacencyList<std::int64_t>, std::vector<double>,
99  std::array<std::size_t, 2>, std::vector<std::int32_t>,
100  std::vector<std::int8_t>>
102  const std::span<const std::int32_t>& edges,
103  RefinementOptions options);
104 
105 } // namespace plaza
106 } // namespace dolfinx::refinement
A Mesh consists of a set of connected and numbered mesh topological entities, and geometry data.
Definition: Mesh.h:33
Mesh data structures and algorithms on meshes.
Definition: DofMap.h:30
RefinementOptions
Selection of options when refining a Mesh. parent_cell will output a list containing the local parent...
Definition: plaza.h:38
std::tuple< graph::AdjacencyList< std::int64_t >, std::vector< double >, std::array< std::size_t, 2 >, std::vector< std::int32_t >, std::vector< std::int8_t > > compute_refinement_data(const mesh::Mesh &mesh, RefinementOptions options)
Refine mesh returning new mesh data.
Definition: plaza.cpp:684
std::tuple< mesh::Mesh, std::vector< std::int32_t >, std::vector< std::int8_t > > refine(const mesh::Mesh &mesh, bool redistribute, RefinementOptions options)
Uniform refine, optionally redistributing and optionally calculating the parent-child relationships,...
Definition: plaza.cpp:613
Mesh refinement algorithms.