NeoN
A framework for CFD software
Loading...
Searching...
No Matches
sourceTerm.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
9#include "NeoN/core/input.hpp"
10#include "NeoN/dsl/operator.hpp"
14
16{
17
18
19template<typename ValueType>
20class SourceTerm : public dsl::OperatorMixin<VolumeField<ValueType>>
21{
22
23public:
24
25 using VectorValueType = ValueType;
26
28 dsl::Operator::Type termType,
29 VolumeField<scalar>& coefficients,
31 );
32
34
36
38
39 void read(const Input&) {}
40
41 std::string getName() const { return "sourceTerm"; }
42
43 const la::SparsityPattern& getSparsityPattern() const { return sparsityPattern_; }
44
45private:
46
47 const VolumeField<scalar>& coefficients_;
48 const la::SparsityPattern& sparsityPattern_;
49};
50
51
52} // namespace NeoN
A class to contain the data and executors for a field and define some basic operations.
Definition vector.hpp:30
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:15