NeoFOAM
WIP Prototype of a modern OpenFOAM core
Loading...
Searching...
No Matches
boundary.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// SPDX-FileCopyrightText: 2023 NeoFOAM authors
3
4#pragma once
5
8
13
17
19{
20
21/* @brief creates a vector of boundary conditions of type calculated for every boundary
22 *
23 * @tparam Type of the Boundary ie SurfaceBoundary<scalar>
24 */
25template<typename BoundaryType>
26std::vector<BoundaryType> createCalculatedBCs(const UnstructuredMesh& mesh)
27{
28 std::vector<BoundaryType> bcs;
29 for (size_t patchID = 0; patchID < mesh.nBoundaries(); patchID++)
30 {
31 Dictionary patchDict({{"type", std::string("calculated")}});
32 bcs.push_back(BoundaryType(mesh, patchDict, patchID));
33 }
34 return bcs;
35};
36
37}
38
39namespace NeoFOAM
40{
41
42namespace fvcc = finiteVolume::cellCentred;
43
46
47template class fvcc::volumeBoundary::FixedValue<scalar>;
48template class fvcc::volumeBoundary::FixedValue<Vector>;
49
50template class fvcc::volumeBoundary::FixedGradient<scalar>;
51template class fvcc::volumeBoundary::FixedGradient<Vector>;
52
53template class fvcc::volumeBoundary::Calculated<scalar>;
54template class fvcc::volumeBoundary::Calculated<Vector>;
55
56template class fvcc::volumeBoundary::Empty<scalar>;
57template class fvcc::volumeBoundary::Empty<Vector>;
58
61
62template class fvcc::surfaceBoundary::FixedValue<scalar>;
63template class fvcc::surfaceBoundary::FixedValue<Vector>;
64
65template class fvcc::surfaceBoundary::Calculated<scalar>;
66template class fvcc::surfaceBoundary::Calculated<Vector>;
67
68template class fvcc::surfaceBoundary::Empty<scalar>;
69template class fvcc::surfaceBoundary::Empty<Vector>;
70
71}
A class representing a dictionary that stores key-value pairs.
Represents an unstructured mesh in NeoFOAM.
size_t nBoundaries() const
Get the number of boundaries in the mesh.
std::vector< BoundaryType > createCalculatedBCs(const UnstructuredMesh &mesh)
Definition boundary.hpp:26