NeoN
A framework for CFD software
Loading...
Searching...
No Matches
boundaryPatchMixin.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// SPDX-FileCopyrightText: 2023 NeoN authors
3#pragma once
4
6
8{
9
23{
24
25public:
26
28
29 virtual ~BoundaryPatchMixin() = default;
30
32 : patchID_(patchID), start_(mesh.boundaryMesh().offset()[static_cast<size_t>(patchID_)]),
33 end_(mesh.boundaryMesh().offset()[static_cast<size_t>(patchID_) + 1])
34 {}
35
39
40 localIdx patchStart() const { return start_; };
41
42 localIdx patchEnd() const { return start_; };
43
44 localIdx patchSize() const { return end_ - start_; }
45
46 localIdx patchID() const { return patchID_; }
47
48 std::pair<localIdx, localIdx> range() const { return {start_, end_}; }
49
50protected:
51
55};
56}
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:30
std::size_t size_t
Definition label.hpp:36