NeoN
A framework for CFD software
Loading...
Searching...
No Matches
Namespaces | Functions
solver.hpp File Reference
#include <memory>
#include <utility>
#include <concepts>
#include <optional>
#include "NeoN/fields/field.hpp"
#include "NeoN/core/primitives/scalar.hpp"
#include "NeoN/core/primitives/vec3.hpp"
#include "NeoN/core/logging.hpp"
#include "NeoN/core/input.hpp"
#include "NeoN/core/primitives/label.hpp"
#include "NeoN/dsl/expression.hpp"
#include "NeoN/dsl/optimizer.hpp"
#include "NeoN/timeIntegration/timeIntegration.hpp"
#include "NeoN/linearAlgebra/linearSystem.hpp"
#include "NeoN/linearAlgebra/solver.hpp"

Go to the source code of this file.

Namespaces

namespace  NeoN
 Integer types used throughout NeoN.
 
namespace  NeoN::dsl
 
namespace  NeoN::dsl::detail
 

Functions

template<typename VectorType , typename IndexType >
la::SolverStats NeoN::dsl::detail::iterativeSolveImpl (Expression< typename VectorType::ElementType > &exp, la::LinearSystem< typename VectorType::ElementType > &ls, VectorType &solution, scalar t, scalar dt, const Dictionary &fvSchemes, const Dictionary &fvSolution, std::vector< const PostAssemblyBase< typename VectorType::ElementType, IndexType > * > ps={})
 
template<typename VectorType , typename IndexType >
la::SolverStats NeoN::dsl::detail::iterativeSolveImpl (Expression< typename VectorType::ElementType > &exp, VectorType &solution, scalar t, scalar dt, const Dictionary &fvSolution, std::vector< const PostAssemblyBase< typename VectorType::ElementType, IndexType > * > ps={})
 
template<typename VectorType , typename IndexType >
std::optional< la::SolverStatsNeoN::dsl::solve (Expression< typename VectorType::ElementType, IndexType > &exp, VectorType &solution, scalar t, scalar dt, const Dictionary &fvSchemes, const Dictionary &fvSolution, std::vector< const PostAssemblyBase< typename VectorType::ElementType, IndexType > * > p={})
 
KOKKOS_INLINE_FUNCTION scalar NeoN::dsl::copySign (const scalar mag, const scalar s)
 Returns |mag| carrying the sign of s (scalar overload).
 
KOKKOS_INLINE_FUNCTION scalar NeoN::dsl::componentCopySign (const scalar mag, const scalar s)
 Componentwise sign-copy (scalar overload).
 
KOKKOS_INLINE_FUNCTION Vec3 NeoN::dsl::componentCopySign (const Vec3 &mag, const Vec3 &s)
 Componentwise sign-copy (Vec3 overload — all 3 components).
 
KOKKOS_INLINE_FUNCTION scalar NeoN::dsl::componentMag (const scalar value)
 Componentwise magnitude (scalar overload).
 
KOKKOS_INLINE_FUNCTION Vec3 NeoN::dsl::componentMag (const Vec3 &value)
 Componentwise magnitude (Vec3 overload — keeps all 3 components, does NOT collapse to the L2 norm that the global mag(Vec3) returns).
 
KOKKOS_INLINE_FUNCTION scalar NeoN::dsl::componentMax (const scalar lhs, const scalar rhs)
 Componentwise max (scalar overload).
 
KOKKOS_INLINE_FUNCTION Vec3 NeoN::dsl::componentMax (const Vec3 &lhs, const Vec3 &rhs)
 Componentwise max (Vec3 overload — per component).
 
template<typename VectorType , typename MatrixValueType , typename RHSValueType , typename SystemMatrixType , typename BoundaryMatrixType >
void NeoN::dsl::applyMatrixRelaxation (la::LinearSystem< MatrixValueType, RHSValueType, SystemMatrixType, BoundaryMatrixType > &ls, const VectorType &solution, scalar alpha)
 
template<typename VectorType >
void NeoN::dsl::applyFieldRelaxation (VectorType &solution, const Vector< typename VectorType::ElementType > &previous, scalar alpha)
 
template<typename VectorType >
auto NeoN::dsl::fieldRelaxationSnapshot (const VectorType &field)