41class NonlinearMomentumOperator
44 typedef dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
49 NonlinearMomentumOperator()
50 : pde_operator(
nullptr), rhs_vector(
nullptr), time(0.0), scaling_factor_mass(1.0)
55 initialize(PDEOperator
const & pde_operator)
57 this->pde_operator = &pde_operator;
61 update(VectorType
const & rhs_vector,
double const & time,
double const & scaling_factor)
63 this->rhs_vector = &rhs_vector;
65 this->scaling_factor_mass = scaling_factor;
73 evaluate_residual(VectorType & dst, VectorType
const & src)
75 pde_operator->evaluate_nonlinear_residual(dst, src, rhs_vector, time, scaling_factor_mass);
79 PDEOperator
const * pde_operator;
81 VectorType
const * rhs_vector;
83 double scaling_factor_mass;
91class OperatorProjectionMethods :
public SpatialOperatorBase<dim, Number>
94 typedef SpatialOperatorBase<dim, Number> Base;
96 typedef typename Base::VectorType VectorType;
97 typedef typename Base::MultigridPoisson MultigridPoisson;
103 OperatorProjectionMethods(
105 std::shared_ptr<dealii::Mapping<dim>
const> mapping,
110 std::string
const & field,
111 MPI_Comm
const & mpi_comm);
116 virtual ~OperatorProjectionMethods();
127 setup_preconditioners_and_solvers()
override;
131 update_after_grid_motion(
bool const update_matrix_free)
override;
138 do_rhs_ppe_laplace_add(VectorType & dst,
double const & time)
const;
144 do_solve_pressure(VectorType & dst,
145 VectorType
const & src,
146 bool const update_preconditioner)
const;
152 apply_projection_operator(VectorType & dst, VectorType
const & src)
const;
158 apply_laplace_operator(VectorType & dst, VectorType
const & src)
const;
168 solve_linear_momentum_equation(VectorType & solution,
169 VectorType
const & rhs,
170 VectorType
const & transport_velocity,
171 bool const & update_preconditioner,
172 double const & scaling_factor_mass);
179 rhs_add_viscous_term(VectorType & dst,
double const time)
const;
187 rhs_add_convective_term(VectorType & dst,
188 VectorType
const & transport_velocity,
189 double const time)
const;
194 std::tuple<unsigned int, unsigned int>
195 solve_nonlinear_momentum_equation(VectorType & dst,
196 VectorType
const & rhs_vector,
198 bool const & update_preconditioner,
199 double const & scaling_factor_mass);
205 evaluate_nonlinear_residual(VectorType & dst,
206 VectorType
const & src,
207 VectorType
const * rhs_vector,
209 double const & scaling_factor_mass)
const;
215 std::shared_ptr<PreconditionerBase<Number>> preconditioner_pressure_poisson;
217 std::shared_ptr<Krylov::SolverBase<VectorType>> pressure_poisson_solver;
230 momentum_newton_solver;
233 std::shared_ptr<PreconditionerBase<Number>> momentum_preconditioner;
234 std::shared_ptr<Krylov::SolverBase<VectorType>> momentum_linear_solver;
237 setup_momentum_preconditioner();
240 setup_momentum_solver();
244 initialize_laplace_operator();
250 setup_preconditioner_pressure_poisson();
253 setup_solver_pressure_poisson();