NeoN
A framework for CFD software
Loading...
Searching...
No Matches
boundaryMesh.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
7#include <vector>
8
11
12namespace NeoN
13{
14
30{
31public:
32
50 const Executor& exec,
60 std::vector<localIdx> offset
61 );
62
63
69 const labelVector& faceCells() const;
70
71 // TODO either dont mix return types, ie dont use view and Vector
72 // for functions with same name
80
86 const vectorVector& cf() const;
87
95
101 const vectorVector& cn() const;
102
110
116 const vectorVector& sf() const;
117
125
132 const scalarVector& magSf() const;
133
143
149 const vectorVector& nf() const;
150
158
164 const vectorVector& delta() const;
165
173
179 const scalarVector& weights() const;
180
188
194 const scalarVector& deltaCoeffs() const;
195
203
209 // TODO consistent use of Vector on CPU
210 const std::vector<localIdx>& offset() const;
211
212
213private:
214
218 const Executor exec_;
219
225 labelVector faceCells_;
226
230 vectorVector Cf_;
231
235 vectorVector Cn_;
236
240 vectorVector Sf_;
241
245 scalarVector magSf_;
246
250 vectorVector nf_;
251
258 vectorVector delta_;
259
265 scalarVector weights_;
266
272 scalarVector deltaCoeffs_;
273
279 // TODO consistent use of Vector on CPU
280 std::vector<localIdx> offset_;
281};
282
283} // 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.
Definition array.hpp:20
int32_t localIdx
Definition label.hpp:32
std::variant< SerialExecutor, CPUExecutor, GPUExecutor > Executor
Definition executor.hpp:18