https://mooseframework.inl.gov
Public Member Functions | Private Types | Private Attributes | List of all members
NestedSolveInternal::RealEigenAdaptorFunctor< is_ad, R, J, store_residual_norm > Class Template Reference

Adaptor functor for scalar Real valued residual and Jacobian types. More...

#include <NestedSolve.h>

Public Member Functions

 RealEigenAdaptorFunctor (R &residual_lambda, J &jacobian_lambda)
 
int operator() (V &guess, V &residual)
 
int df (V &guess, typename NestedSolveTempl< is_ad >::template CorrespondingJacobian< V > &jacobian)
 
const RealgetResidualNorm ()
 

Private Types

using V = typename NestedSolveTempl< is_ad >::DynamicVector
 

Private Attributes

R & _residual_lambda
 
J & _jacobian_lambda
 
Real _residual_norm
 

Detailed Description

template<bool is_ad, typename R, typename J, bool store_residual_norm>
class NestedSolveInternal::RealEigenAdaptorFunctor< is_ad, R, J, store_residual_norm >

Adaptor functor for scalar Real valued residual and Jacobian types.

Picks the single scalar component.

Definition at line 664 of file NestedSolve.h.

Member Typedef Documentation

◆ V

template<bool is_ad, typename R, typename J, bool store_residual_norm>
using NestedSolveInternal::RealEigenAdaptorFunctor< is_ad, R, J, store_residual_norm >::V = typename NestedSolveTempl<is_ad>::DynamicVector
private

Definition at line 666 of file NestedSolve.h.

Constructor & Destructor Documentation

◆ RealEigenAdaptorFunctor()

template<bool is_ad, typename R, typename J, bool store_residual_norm>
NestedSolveInternal::RealEigenAdaptorFunctor< is_ad, R, J, store_residual_norm >::RealEigenAdaptorFunctor ( R &  residual_lambda,
J &  jacobian_lambda 
)
inline

Definition at line 669 of file NestedSolve.h.

670  : _residual_lambda(residual_lambda), _jacobian_lambda(jacobian_lambda)
671  {
672  }

Member Function Documentation

◆ df()

template<bool is_ad, typename R, typename J, bool store_residual_norm>
int NestedSolveInternal::RealEigenAdaptorFunctor< is_ad, R, J, store_residual_norm >::df ( V guess,
typename NestedSolveTempl< is_ad >::template CorrespondingJacobian< V > &  jacobian 
)
inline

Definition at line 680 of file NestedSolve.h.

681  {
682  _jacobian_lambda(guess(0), jacobian(0, 0));
683  return 0;
684  }

◆ getResidualNorm()

template<bool is_ad, typename R, typename J, bool store_residual_norm>
const Real& NestedSolveInternal::RealEigenAdaptorFunctor< is_ad, R, J, store_residual_norm >::getResidualNorm ( )
inline

Definition at line 686 of file NestedSolve.h.

687  {
688  if constexpr (store_residual_norm)
689  return _residual_norm;
690  }

◆ operator()()

template<bool is_ad, typename R, typename J, bool store_residual_norm>
int NestedSolveInternal::RealEigenAdaptorFunctor< is_ad, R, J, store_residual_norm >::operator() ( V guess,
V residual 
)
inline

Definition at line 673 of file NestedSolve.h.

674  {
675  _residual_lambda(guess(0), residual(0));
676  if constexpr (store_residual_norm)
678  return 0;
679  }
static Real normSquare(const V &v)
Compute squared norm of v (dropping derivatives as this is only for convergence checking) ...
Definition: NestedSolve.h:555

Member Data Documentation

◆ _jacobian_lambda

template<bool is_ad, typename R, typename J, bool store_residual_norm>
J& NestedSolveInternal::RealEigenAdaptorFunctor< is_ad, R, J, store_residual_norm >::_jacobian_lambda
private

◆ _residual_lambda

template<bool is_ad, typename R, typename J, bool store_residual_norm>
R& NestedSolveInternal::RealEigenAdaptorFunctor< is_ad, R, J, store_residual_norm >::_residual_lambda
private

◆ _residual_norm

template<bool is_ad, typename R, typename J, bool store_residual_norm>
Real NestedSolveInternal::RealEigenAdaptorFunctor< is_ad, R, J, store_residual_norm >::_residual_norm
private

The documentation for this class was generated from the following file: