waves
Basic FE playground
flow::Newton Class Reference

Newton solver. More...

#include <wNewton.h>

Inheritance diagram for flow::Newton:
Collaboration diagram for flow::Newton:

Public Member Functions

 Newton (std::shared_ptr< Problem > _pbl, std::shared_ptr< tbox::LinearSolver > _linsol)
 Initialize the solver and set default parameters. More...
 
virtual bool run () override
 Run the Newton solver. More...
 
virtual void write (std::ostream &out) const override
 
- Public Member Functions inherited from flow::Solver
 Solver (std::shared_ptr< Problem > _pbl, std::shared_ptr< tbox::LinearSolver > _linsol)
 
virtual ~Solver ()
 
void save (tbox::MshExport *mshWriter, int n=0)
 

Public Attributes

double lsTol
 tolerance for line search More...
 
int maxLsIt
 max number of line search More...
 
double avThrsh
 residual threshold to deacrease artificial viscosity More...
 
- Public Attributes inherited from flow::Solver
std::shared_ptr< Problempbl
 problem definition More...
 
std::shared_ptr< tbox::LinearSolver > linsol
 linear solver More...
 
int nthreads
 number of threads for the execution More...
 
double relTol
 relative tolerance on the residual More...
 
double absTol
 absolute tolerance on the residual More...
 
int maxIt
 max number of iterations More...
 
int verbose
 display more info More...
 
int nIt
 number of iterations More...
 
std::vector< double > phi
 full potential More...
 
std::vector< double > rPhi
 residual on potential More...
 
std::vector< double > vPhi
 perturbation potential More...
 
std::vector< Eigen::Vector3d > U
 velocity More...
 
std::vector< double > rho
 density More...
 
std::vector< double > M
 mach number More...
 
std::vector< double > Cp
 pressure coefficient More...
 
double Cl
 lift coefficient More...
 
double Cd
 drag coefficient More...
 
double Cs
 sideforce coefficient More...
 
double Cm
 pitch moment coefficient (positive nose-up) More...
 

Private Member Functions

void buildJac (Eigen::SparseMatrix< double, Eigen::RowMajor > &J)
 Build the Jacobian (tangent) matrix. More...
 
void buildRes (Eigen::Map< Eigen::VectorXd > &R)
 Build the residual vector. More...
 
void findUpwd ()
 Find upwind element which is best aligned with current velocity vector. More...
 

Private Attributes

double mCOv
 variable cut-off Mach number More...
 
double muCv
 variable artificial viscosity scaling factor More...
 

Friends

class Adjoint
 
class FpeLSFunction
 

Additional Inherited Members

- Protected Member Functions inherited from flow::Solver
void computeFlow ()
 Compute variables in the flow field. More...
 
void computeLoad ()
 Compute total aerodynamic load coefficients on boundaries. More...
 
- Protected Attributes inherited from flow::Solver
fwk::Timers tms
 internal timers More...
 
std::vector< int > rows
 unknown nodal index More...
 

Detailed Description

Newton solver.

Authors
Adrien Crovato

Constructor & Destructor Documentation

◆ Newton()

Newton::Newton ( std::shared_ptr< Problem _pbl,
std::shared_ptr< tbox::LinearSolver >  _linsol 
)

Initialize the solver and set default parameters.

Authors
Adrien Crovato

Member Function Documentation

◆ buildJac()

void Newton::buildJac ( Eigen::SparseMatrix< double, Eigen::RowMajor > &  J)
private

Build the Jacobian (tangent) matrix.

Authors
Adrien Crovato

◆ buildRes()

void Newton::buildRes ( Eigen::Map< Eigen::VectorXd > &  R)
private

Build the residual vector.

Authors
Adrien Crovato

◆ findUpwd()

void Newton::findUpwd ( )
private

Find upwind element which is best aligned with current velocity vector.

Authors
Adrien Crovato

◆ run()

bool Newton::run ( )
overridevirtual

Run the Newton solver.

Solve the steady transonic Full Potential Equation

Authors
Adrien Crovato

Reimplemented from flow::Solver.

◆ write()

void Newton::write ( std::ostream &  out) const
overridevirtual

Friends And Related Function Documentation

◆ Adjoint

friend class Adjoint
friend

◆ FpeLSFunction

friend class FpeLSFunction
friend

Member Data Documentation

◆ avThrsh

double flow::Newton::avThrsh

residual threshold to deacrease artificial viscosity

◆ lsTol

double flow::Newton::lsTol

tolerance for line search

◆ maxLsIt

int flow::Newton::maxLsIt

max number of line search

◆ mCOv

double flow::Newton::mCOv
private

variable cut-off Mach number

◆ muCv

double flow::Newton::muCv
private

variable artificial viscosity scaling factor


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