NeoN
A framework for CFD software
Loading...
Searching...
No Matches
boundaryPatchMixin.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2023 - 2025 NeoN authors
2//
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
8
10{
11
25{
26
27public:
28
30
31 virtual ~BoundaryPatchMixin() = default;
32
34 : patchID_(patchID), start_(mesh.boundaryMesh().offset()[static_cast<size_t>(patchID_)]),
35 end_(mesh.boundaryMesh().offset()[static_cast<size_t>(patchID_) + 1])
36 {}
37
41
42 localIdx patchStart() const { return start_; };
43
44 localIdx patchEnd() const { return start_; };
45
46 localIdx patchSize() const { return end_ - start_; }
47
48 localIdx patchID() const { return patchID_; }
49
50 std::pair<localIdx, localIdx> range() const { return {start_, end_}; }
51
52protected:
53
57};
58}
Represents an unstructured mesh in NeoN.
A base class for implementing derived boundary conditions.
localIdx end_
The end index of the patch in the boundaryVector.
BoundaryPatchMixin(const UnstructuredMesh &mesh, localIdx patchID)
localIdx start_
The start index of the patch in the boundaryVector.
BoundaryPatchMixin(localIdx start, localIdx end, localIdx patchID)
std::pair< localIdx, localIdx > range() const
int32_t localIdx
Definition label.hpp:32
std::size_t size_t
Definition label.hpp:38