NeoFOAM
WIP Prototype of a modern OpenFOAM core
Loading...
Searching...
No Matches
linear.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// SPDX-FileCopyrightText: 2023 NeoFOAM authors
3
4#pragma once
5
11
12#include <Kokkos_Core.hpp>
13
14#include <functional>
15
16
18{
19
20
21class Linear : public SurfaceInterpolationFactory::Register<Linear>
22{
23
24public:
25
26 Linear(const Executor& exec, const UnstructuredMesh& mesh, Input input);
27
28 Linear(const Executor& exec, const UnstructuredMesh& mesh);
29
30 static std::string name() { return "linear"; }
31
32 static std::string doc() { return "linear interpolation"; }
33
34 static std::string schema() { return "none"; }
35
36 void interpolate(const VolumeField<scalar>& volField, SurfaceField<scalar>& surfaceField)
37 const override;
38
40 const SurfaceField<scalar>& faceFlux,
41 const VolumeField<scalar>& volField,
42 SurfaceField<scalar>& surfaceField
43 ) const override;
44
45 std::unique_ptr<SurfaceInterpolationFactory> clone() const override;
46
47private:
48
49 const std::shared_ptr<GeometryScheme> geometryScheme_;
50};
51
52} // namespace NeoFOAM
Represents an unstructured mesh in NeoFOAM.
void interpolate(const SurfaceField< scalar > &faceFlux, const VolumeField< scalar > &volField, SurfaceField< scalar > &surfaceField) const override
std::unique_ptr< SurfaceInterpolationFactory > clone() const override
Linear(const Executor &exec, const UnstructuredMesh &mesh)
void interpolate(const VolumeField< scalar > &volField, SurfaceField< scalar > &surfaceField) const override
Linear(const Executor &exec, const UnstructuredMesh &mesh, Input input)
Represents a surface field in a finite volume method.
Represents a volume field in a finite volume method.
std::variant< Dictionary, TokenList > Input
Definition input.hpp:13
std::variant< SerialExecutor, CPUExecutor, GPUExecutor > Executor
Definition executor.hpp:16