35template<
typename VectorType>
55 fvSchemes.
subDict(
"ddtSchemes"), fvSolution
57 timeIntegrator.
solve(exp, solution, t, dt);
62 using ValueType =
typename VectorType::ElementType;
65 auto ls = la::createEmptyLinearSystem<ValueType, localIdx>(solution.mesh(), sparsity);
70 auto [vol, expSource, rhs] =
views(solution.mesh().cellVolumes(), expTmp, ls.rhs());
76 KOKKOS_LAMBDA(
const localIdx i) { rhs[i] -= expSource[i] * vol[i]; }
79 auto solver =
la::Solver(solution.exec(), fvSolution);
80 solver.solve(ls, solution.internalVector());
A class representing a dictionary that stores key-value pairs.
Dictionary & subDict(const std::string &key)
Retrieves a sub-dictionary associated with the given key.
const std::vector< TemporalOperator< ValueType > > & temporalOperators() const
void implicitOperation(la::LinearSystem< ValueType, localIdx > &ls)
Vector< ValueType > explicitOperation(localIdx nCells) const
const std::vector< SpatialOperator< ValueType > > & spatialOperators() const
void read(const Dictionary &input)
void solve(Expression &eqn, SolutionVectorType &sol, scalar t, scalar dt)
#define NF_ERROR_EXIT(message)
Macro for printing an error message and aborting the program.
void solve(Expression< typename VectorType::ElementType > &exp, VectorType &solution, scalar t, scalar dt, const Dictionary &fvSchemes, const Dictionary &fvSolution)
void parallelFor(const Executor &exec, std::pair< localIdx, localIdx > range, Kernel kernel, std::string name="parallelFor")
auto views(Types &... args)
Unpacks all views of the passed classes.