24template<
typename ValueType>
32 : exec_(exp.exec_), temporalOperators_(exp.temporalOperators_),
33 spatialOperators_(exp.spatialOperators_)
39 for (
auto& op : temporalOperators_)
43 for (
auto& op : spatialOperators_)
59 for (
auto& op : spatialOperators_)
63 op.explicitOperation(source);
71 for (
auto& op : temporalOperators_)
75 op.explicitOperation(source, t, dt);
85 for (
auto& op : spatialOperators_)
89 op.implicitOperation(ls);
96 for (
auto& op : temporalOperators_)
100 op.implicitOperation(ls, t, dt);
110 temporalOperators_.push_back(oper);
115 for (
auto& oper : equation.temporalOperators_)
117 temporalOperators_.push_back(oper);
119 for (
auto& oper : equation.spatialOperators_)
121 spatialOperators_.push_back(oper);
129 return static_cast<localIdx>(temporalOperators_.size() + spatialOperators_.size());
135 return temporalOperators_;
140 return spatialOperators_;
153 std::vector<TemporalOperator<ValueType>> temporalOperators_;
155 std::vector<SpatialOperator<ValueType>> spatialOperators_;
158template<
typename ValueType>
159[[nodiscard]]
inline Expression<ValueType>
166template<
typename ValueType>
167[[nodiscard]]
inline Expression<ValueType>
174template<
typename leftOperator,
typename rightOperator>
175[[nodiscard]]
inline Expression<typename leftOperator::VectorValueType>
178 using ValueType =
typename leftOperator::VectorValueType;
185template<
typename ValueType>
201template<
typename ValueType>
202[[nodiscard]]
inline Expression<ValueType>
209template<
typename ValueType>
210[[nodiscard]]
inline Expression<ValueType>
217template<
typename leftOperator,
typename rightOperator>
218[[nodiscard]]
inline Expression<typename leftOperator::VectorValueType>
221 using ValueType =
typename leftOperator::VectorValueType;
A class representing a dictionary that stores key-value pairs.
A class to contain the data and executors for a field and define some basic operations.
A class that represents a coefficient for the NeoN dsl.
const std::vector< TemporalOperator< ValueType > > & temporalOperators() const
void implicitOperation(la::LinearSystem< ValueType, localIdx > &ls)
Vector< ValueType > explicitOperation(localIdx nCells) const
Expression(const Executor &exec)
void implicitOperation(la::LinearSystem< ValueType, localIdx > &ls, scalar t, scalar dt)
void addOperator(const TemporalOperator< ValueType > &oper)
void addExpression(const Expression &equation)
Vector< ValueType > explicitOperation(Vector< ValueType > &source, scalar t, scalar dt) const
const std::vector< SpatialOperator< ValueType > > & spatialOperators() const
std::vector< SpatialOperator< ValueType > > & spatialOperators()
void addOperator(const SpatialOperator< ValueType > &oper)
Vector< ValueType > explicitOperation(Vector< ValueType > &source) const
Expression(const Expression &exp)
void read(const Dictionary &input)
const Executor & exec() const
std::vector< TemporalOperator< ValueType > > & temporalOperators()
A class representing a linear system of equations.
Expression< ValueType > operator+(Expression< ValueType > lhs, const Expression< ValueType > &rhs)
Coeff operator*(const Coeff &lhs, const Coeff &rhs)
Expression< ValueType > operator-(Expression< ValueType > lhs, const Expression< ValueType > &rhs)
std::variant< SerialExecutor, CPUExecutor, GPUExecutor > Executor