42class NonlinearMomentumOperator
45 typedef dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
50 NonlinearMomentumOperator()
51 : pde_operator(
nullptr), rhs_vector(
nullptr), time(0.0), scaling_factor_mass(1.0)
56 initialize(PDEOperator
const & pde_operator)
58 this->pde_operator = &pde_operator;
62 update(VectorType
const & rhs_vector,
double const & time,
double const & scaling_factor)
64 this->rhs_vector = &rhs_vector;
66 this->scaling_factor_mass = scaling_factor;
74 evaluate_residual(VectorType & dst, VectorType
const & src)
76 pde_operator->evaluate_nonlinear_residual(dst, src, rhs_vector, time, scaling_factor_mass);
80 PDEOperator
const * pde_operator;
82 VectorType
const * rhs_vector;
84 double scaling_factor_mass;
92class OperatorProjectionMethods :
public SpatialOperatorBase<dim, Number>
95 typedef SpatialOperatorBase<dim, Number> Base;
97 typedef typename Base::VectorType VectorType;
98 typedef typename Base::MultigridPoisson MultigridPoisson;
104 OperatorProjectionMethods(
106 std::shared_ptr<dealii::Mapping<dim>
const> mapping,
111 std::string
const & field,
112 MPI_Comm
const & mpi_comm);
117 virtual ~OperatorProjectionMethods();
128 setup_preconditioners_and_solvers()
override;
132 update_after_grid_motion(
bool const update_matrix_free)
override;
139 do_rhs_ppe_laplace_add(VectorType & dst,
double const & time)
const;
145 do_solve_pressure(VectorType & dst,
146 VectorType
const & src,
147 bool const update_preconditioner)
const;
153 apply_projection_operator(VectorType & dst, VectorType
const & src)
const;
159 apply_laplace_operator(VectorType & dst, VectorType
const & src)
const;
169 solve_linear_momentum_equation(VectorType & solution,
170 VectorType
const & rhs,
171 VectorType
const & transport_velocity,
172 bool const & update_preconditioner,
173 double const & scaling_factor_mass);
180 rhs_add_viscous_term(VectorType & dst,
double const time)
const;
188 rhs_add_convective_term(VectorType & dst,
189 VectorType
const & transport_velocity,
190 double const time)
const;
195 std::tuple<unsigned int, unsigned int>
196 solve_nonlinear_momentum_equation(VectorType & dst,
197 VectorType
const & rhs_vector,
199 bool const & update_preconditioner,
200 double const & scaling_factor_mass);
206 evaluate_nonlinear_residual(VectorType & dst,
207 VectorType
const & src,
208 VectorType
const * rhs_vector,
210 double const & scaling_factor_mass)
const;
216 std::shared_ptr<PreconditionerBase<Number>> preconditioner_pressure_poisson;
218 std::shared_ptr<Krylov::SolverBase<VectorType>> pressure_poisson_solver;
231 momentum_newton_solver;
234 std::shared_ptr<PreconditionerBase<Number>> momentum_preconditioner;
235 std::shared_ptr<Krylov::SolverBase<VectorType>> momentum_linear_solver;
238 setup_momentum_preconditioner();
241 setup_momentum_solver();
245 initialize_laplace_operator();
251 setup_preconditioner_pressure_poisson();
254 setup_solver_pressure_poisson();