NeoN
A framework for CFD software
Loading...
Searching...
No Matches
sourceTerm.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// SPDX-FileCopyrightText: 2023 NeoN authors
3
4#pragma once
5
8#include "NeoN/core/input.hpp"
13
15{
16
17
18template<typename ValueType>
19class SourceTerm : public dsl::OperatorMixin<VolumeField<ValueType>>
20{
21
22public:
23
24 using VectorValueType = ValueType;
25
27 dsl::Operator::Type termType,
28 VolumeField<scalar>& coefficients,
30 );
31
33
35
36 void read(const Input&) {}
37
38 std::string getName() const { return "sourceTerm"; }
39
40 const la::SparsityPattern& getSparsityPattern() const { return sparsityPattern_; }
41
42private:
43
44 const VolumeField<scalar>& coefficients_;
45 const la::SparsityPattern& sparsityPattern_;
46};
47
48
49} // namespace NeoN
A class to contain the data and executors for a field and define some basic operations.
Definition vector.hpp:28
void implicitOperation(la::LinearSystem< ValueType, localIdx > &ls) const
void explicitOperation(Vector< ValueType > &source) const
const la::SparsityPattern & getSparsityPattern() const
SourceTerm(dsl::Operator::Type termType, VolumeField< scalar > &coefficients, VolumeField< ValueType > &field)
Represents a volume field in a finite volume method.
A class representing a linear system of equations.
std::variant< Dictionary, TokenList > Input
Definition input.hpp:13