PolyFEM
|
#include <NavierStokesSolver.hpp>
Public Member Functions | |
NavierStokesSolver (const json &solver_param) | |
void | minimize (const int n_bases, const int n_pressure_bases, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &pressure_bases, const std::vector< basis::ElementBases > &gbases, const assembler::Assembler &velocity_stokes_assembler, assembler::NavierStokesVelocity &velocity_assembler, const assembler::MixedAssembler &mixed_assembler, const assembler::Assembler &pressure_assembler, const assembler::AssemblyValsCache &ass_vals_cache, const assembler::AssemblyValsCache &pressure_ass_vals_cache, const std::vector< int > &boundary_nodes, const bool use_avg_pressure, const int problem_dim, const bool is_volume, const Eigen::MatrixXd &rhs, Eigen::VectorXd &x) |
void | get_info (json ¶ms) |
int | error_code () const |
Private Member Functions | |
int | minimize_aux (const bool is_picard, const std::vector< int > &skipping, const int n_bases, const int n_pressure_bases, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &gbases, assembler::NavierStokesVelocity &velocity_assembler, const assembler::AssemblyValsCache &ass_vals_cache, const std::vector< int > &boundary_nodes, const bool use_avg_pressure, const int problem_dim, const bool is_volume, const StiffnessMatrix &velocity_stiffness, const StiffnessMatrix &mixed_stiffness, const StiffnessMatrix &pressure_stiffness, const Eigen::VectorXd &rhs, const double grad_norm, std::unique_ptr< polysolve::linear::Solver > &solver, double &nlres_norm, Eigen::VectorXd &x) |
bool | has_nans (const polyfem::StiffnessMatrix &hessian) |
Private Attributes | |
const json | solver_param |
double | gradNorm |
int | iterations |
json | solver_info |
json | internal_solver = json::array() |
double | assembly_time |
double | inverting_time |
double | stokes_matrix_time |
double | stokes_solve_time |
Definition at line 18 of file NavierStokesSolver.hpp.
polyfem::solver::NavierStokesSolver::NavierStokesSolver | ( | const json & | solver_param | ) |
Definition at line 24 of file NavierStokesSolver.cpp.
References gradNorm, iterations, and solver_param.
|
inline |
Definition at line 46 of file NavierStokesSolver.hpp.
|
inline |
Definition at line 41 of file NavierStokesSolver.hpp.
References solver_info.
|
private |
Definition at line 244 of file NavierStokesSolver.cpp.
void polyfem::solver::NavierStokesSolver::minimize | ( | const int | n_bases, |
const int | n_pressure_bases, | ||
const std::vector< basis::ElementBases > & | bases, | ||
const std::vector< basis::ElementBases > & | pressure_bases, | ||
const std::vector< basis::ElementBases > & | gbases, | ||
const assembler::Assembler & | velocity_stokes_assembler, | ||
assembler::NavierStokesVelocity & | velocity_assembler, | ||
const assembler::MixedAssembler & | mixed_assembler, | ||
const assembler::Assembler & | pressure_assembler, | ||
const assembler::AssemblyValsCache & | ass_vals_cache, | ||
const assembler::AssemblyValsCache & | pressure_ass_vals_cache, | ||
const std::vector< int > & | boundary_nodes, | ||
const bool | use_avg_pressure, | ||
const int | problem_dim, | ||
const bool | is_volume, | ||
const Eigen::MatrixXd & | rhs, | ||
Eigen::VectorXd & | x | ||
) |
Definition at line 31 of file NavierStokesSolver.cpp.
References polyfem::assembler::Assembler::assemble(), polyfem::assembler::MixedAssembler::assemble(), assembly_time, gradNorm, inverting_time, polyfem::logger(), polyfem::assembler::AssemblerUtils::merge_mixed_matrices(), minimize_aux(), polyfem::assembler::NavierStokesVelocity::name(), solver_info, solver_param, stokes_matrix_time, stokes_solve_time, and x.
Referenced by polyfem::State::solve_navier_stokes().
|
private |
Definition at line 145 of file NavierStokesSolver.cpp.
References polyfem::assembler::NavierStokesVelocity::assemble_hessian(), assembly_time, inverting_time, iterations, polyfem::logger(), polyfem::assembler::AssemblerUtils::merge_mixed_matrices(), polyfem::assembler::NavierStokesVelocity::set_picard(), and x.
Referenced by minimize().
|
private |
Definition at line 76 of file NavierStokesSolver.hpp.
Referenced by minimize(), and minimize_aux().
|
private |
Definition at line 69 of file NavierStokesSolver.hpp.
Referenced by minimize(), and NavierStokesSolver().
|
private |
Definition at line 74 of file NavierStokesSolver.hpp.
|
private |
Definition at line 77 of file NavierStokesSolver.hpp.
Referenced by minimize(), and minimize_aux().
|
private |
Definition at line 70 of file NavierStokesSolver.hpp.
Referenced by minimize_aux(), and NavierStokesSolver().
|
private |
Definition at line 72 of file NavierStokesSolver.hpp.
Referenced by get_info(), and minimize().
|
private |
Definition at line 67 of file NavierStokesSolver.hpp.
Referenced by minimize(), and NavierStokesSolver().
|
private |
Definition at line 78 of file NavierStokesSolver.hpp.
Referenced by minimize().
|
private |
Definition at line 79 of file NavierStokesSolver.hpp.
Referenced by minimize().