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 <vector>
9 :
10 : #include "Domain/Structure/Element.hpp"
11 :
12 : /// \cond
13 : template <size_t Dim>
14 : class Block;
15 : template <size_t Dim>
16 : class ElementId;
17 : /// \endcond
18 :
19 : namespace domain {
20 : /*!
21 : * \ingroup InitializationGroup
22 : * \brief Creates an initial element of a Block.
23 : *
24 : * \details This function creates an element at the refinement level and
25 : * position specified by the `element_id` within the `blocks`. It assumes
26 : * that all elements in a given block have the same refinement level,
27 : * given in `initial_refinement_levels`.
28 : */
29 : template <size_t VolumeDim>
30 1 : Element<VolumeDim> create_initial_element(
31 : const ElementId<VolumeDim>& element_id,
32 : const std::vector<Block<VolumeDim>>& blocks,
33 : const std::vector<std::array<size_t, VolumeDim>>&
34 : initial_refinement_levels);
35 : } // namespace domain
|