11 #ifndef BOGUS_CONSTRAINED_SOLVER_BASE_HPP
12 #define BOGUS_CONSTRAINED_SOLVER_BASE_HPP
14 #include "BlockSolverBase.hpp"
19 template<
typename Derived,
typename BlockMatrixType >
27 typedef typename GlobalProblemTraits::Scalar Scalar ;
43 template <
typename NSLaw,
typename RhsT,
typename ResT >
44 Scalar
eval (
const NSLaw &law,
const ResT &y,
const RhsT &x )
const ;
47 template <
typename NSLaw,
typename VectorT >
51 template <
typename NSLaw,
typename RhsT,
typename ResT >
52 void dualityCOV(
const NSLaw &law,
const RhsT &b, ResT &x )
const ;
54 template <
typename NSLaw,
typename RhsT,
typename ResT >
55 Scalar solve(
const NSLaw &law,
const RhsT &b, ResT &x )
const
57 return static_cast< const Derived&
>( *this ).solve( law, b, x ) ;
64 return static_cast< Derived&
>( *this ).setMatrix( matrix ) ;
69 void updateScalings( ) ;
74 typename GlobalProblemTraits::DynVector m_scaling ;
void useInfinityNorm(bool useInfNorm)
Sets whether the solver will use the infinity norm instead of the l1 one to compute the global residu...
Definition: ConstrainedSolverBase.hpp:33
void dualityCOV(const NSLaw &law, const RhsT &b, ResT &x) const
Compute associated change of variable (see NSLaw)
Scalar eval(const NSLaw &law, const ResT &y, const RhsT &x) const
Eval the current global residual as a function of the local ones.
Definition: Traits.hpp:19
Definition: BlockSolvers.fwd.hpp:33
Base class for solvers that operate on BlockMatrixBase matrices.
Definition: BlockSolverBase.hpp:29
Derived & setMatrix(const BlockObjectBase< BlockMatrixType > &matrix)
Sets the system matrix and initializes internal structures.
Definition: ConstrainedSolverBase.hpp:62
void projectOnConstraints(const NSLaw &projector, VectorT &x) const
Projects the variable x on the constraints defined by projector.
const BlockObjectBase< BlockMatrixType > * m_matrix
Pointer to the matrix of the system.
Definition: BlockSolverBase.hpp:65
Definition: ConstrainedSolverBase.hpp:20
Definition: EigenProblemTraits.hpp:38
bool m_useInfinityNorm
See useInfinityNorm(). Defaults to false.
Definition: ConstrainedSolverBase.hpp:77