Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <array>
7 : #include <cstddef>
8 : #include <unordered_map>
9 :
10 : /// \cond
11 : namespace amr {
12 : template <size_t VolumeDim>
13 : struct Info;
14 : } // namespace amr
15 : template <size_t VolumeDim>
16 : class Direction;
17 : template <size_t VolumeDim>
18 : class ElementId;
19 : template <size_t VolumeDim>
20 : class Mesh;
21 : template <size_t VolumeDim, typename IdType>
22 : class Neighbors;
23 : /// \endcond
24 :
25 : namespace amr {
26 : /// \ingroup AmrGroup
27 : /// \brief returns the ElementId and Mesh of the new neighbors in the given
28 : /// `direction` of the Element whose ElementId is `my_id` given the
29 : /// `previous_neighbors_in_direction` and their amr::Info\.
30 : ///
31 : /// The new meshes are given with respect to the host element's orientation.
32 : ///
33 : /// \note `previous_neighbors_in_direction` should be from the parent (or a
34 : /// child) of the Element with `my_id` if `my_id` corresponds to a newly created
35 : /// child (or parent) Element.
36 : ///
37 : /// \note `previous_neighbors_amr_info` may contain info from neighbors in
38 : /// directions other than `direction`
39 : template <size_t VolumeDim>
40 1 : std::unordered_map<ElementId<VolumeDim>, Mesh<VolumeDim>> new_neighbor_ids(
41 : const ElementId<VolumeDim>& my_id, const Direction<VolumeDim>& direction,
42 : const Neighbors<VolumeDim, ElementId<VolumeDim>>&
43 : previous_neighbors_in_direction,
44 : const std::unordered_map<ElementId<VolumeDim>, Info<VolumeDim>>&
45 : previous_neighbors_amr_info);
46 : } // namespace amr
|