NeoN
WIP Prototype of a modern OpenFOAM core
Loading...
Searching...
No Matches
boundaryMesh.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// SPDX-FileCopyrightText: 2023 NeoN authors
3#pragma once
4
5#include <vector>
6
9
10namespace NeoN
11{
12
28{
29public:
30
48 const Executor& exec,
58 std::vector<localIdx> offset
59 );
60
61
67 const labelVector& faceCells() const;
68
69 // TODO either dont mix return types, ie dont use view and Vector
70 // for functions with same name
78
84 const vectorVector& cf() const;
85
93
99 const vectorVector& cn() const;
100
108
114 const vectorVector& sf() const;
115
123
130 const scalarVector& magSf() const;
131
141
147 const vectorVector& nf() const;
148
156
162 const vectorVector& delta() const;
163
171
177 const scalarVector& weights() const;
178
186
192 const scalarVector& deltaCoeffs() const;
193
201
207 // FIXME use Vector here?
208 const std::vector<localIdx>& offset() const;
209
210
211private:
212
216 const Executor exec_;
217
223 labelVector faceCells_;
224
228 vectorVector Cf_;
229
233 vectorVector Cn_;
234
238 vectorVector Sf_;
239
243 scalarVector magSf_;
244
248 vectorVector nf_;
249
256 vectorVector delta_;
257
263 scalarVector weights_;
264
270 scalarVector deltaCoeffs_;
271
277 // FIXME use Vector here?
278 std::vector<localIdx> offset_;
279};
280
281} // namespace NeoN
Represents boundaries of an unstructured mesh.
View< const scalar > magSf(const localIdx i) const
Get a view of magnitudes of face areas normals for a specific boundary face.
View< const Vec3 > sf(const localIdx i) const
Get a view of face areas normals for a specific boundary face.
const vectorVector & sf() const
Get the field of face areas normals.
View< const scalar > weights(const localIdx i) const
Get a view of weights for a specific boundary face.
View< const Vec3 > nf(const localIdx i) const
Get a view of face unit normals for a specific boundary face.
const std::vector< localIdx > & offset() const
Get the offset of the boundary faces.
const scalarVector & deltaCoeffs() const
Get the field of delta coefficients.
BoundaryMesh(const Executor &exec, labelVector faceCells, vectorVector cf, vectorVector cn, vectorVector sf, scalarVector magSf, vectorVector nf, vectorVector delta, scalarVector weights, scalarVector deltaCoeffs, std::vector< localIdx > offset)
Constructor for the BoundaryMesh class.
View< const scalar > deltaCoeffs(const localIdx i) const
Get a view of delta coefficients for a specific boundary face.
const vectorVector & nf() const
Get the field of face unit normals.
const scalarVector & magSf() const
Get the field of magnitudes of face areas normals.
const vectorVector & cf() const
Get the field of face centres.
View< const Vec3 > cf(const localIdx i) const
Get a view of face centres for a specific boundary face.
View< const Vec3 > delta(const localIdx i) const
Get a view of delta vectors for a specific boundary face.
View< const Vec3 > cn(const localIdx i) const
Get a view of face normals for a specific boundary face.
const labelVector & faceCells() const
Get the field of face cells.
View< const label > faceCells(const localIdx i) const
Get a view of face cells for a specific boundary face.
const vectorVector & cn() const
Get the field of face normals.
const vectorVector & delta() const
Get the field of delta vectors.
const scalarVector & weights() const
Get the field of weights.
int32_t localIdx
Definition label.hpp:30
std::variant< SerialExecutor, CPUExecutor, GPUExecutor > Executor
Definition executor.hpp:16