4#ifndef lethe_cls_linear_subequations_solver_h
5#define lethe_cls_linear_subequations_solver_h
11#include <deal.II/base/timer.h>
12#include <deal.II/base/work_stream.h>
14#include <deal.II/distributed/tria_base.h>
16#include <deal.II/lac/trilinos_precondition.h>
17#include <deal.II/lac/trilinos_sparse_matrix.h>
18#include <deal.II/lac/trilinos_vector.h>
56 const ConditionalOStream &p_pcout,
57 std::shared_ptr<parallel::DistributedTriangulationBase<dim>>
67 p_simulation_parameters.linear_solver.at(
PhysicsID::
CLS).verbosity)
124 std::shared_ptr<FiniteElement<dim>>
fe;
GlobalVectorType system_rhs
const Parameters::Verbosity subequation_verbosity
virtual void assemble_system_matrix_and_rhs()=0
Assemble the matrix and the right-hand side (rhs) associated with the solver.
virtual ~CLSLinearSubequationsSolver()=default
Default destructor.
GlobalVectorType evaluation_point
std::shared_ptr< FiniteElement< dim > > fe
std::shared_ptr< parallel::DistributedTriangulationBase< dim > > triangulation
CLSLinearSubequationsSolver(const CLSSubequationsID &p_subequation_id, const SimulationParameters< dim > &p_simulation_parameters, const Parameters::Verbosity &p_subequation_verbosity, const ConditionalOStream &p_pcout, std::shared_ptr< parallel::DistributedTriangulationBase< dim > > p_triangulation, CLSSubequationsInterface< dim > &p_subequations_interface)
Constructor for linear subequations solvers within the CLS auxiliary physics.
std::shared_ptr< TrilinosWrappers::PreconditionILU > ilu_preconditioner
std::shared_ptr< Quadrature< dim > > cell_quadrature
IndexSet locally_owned_dofs
std::shared_ptr< Mapping< dim > > mapping
std::shared_ptr< DoFHandler< dim > > dof_handler
CLSSubequationsInterface< dim > & subequations_interface
void setup_dofs() override
Set up the DofHandler and the degree of freedom associated with the subequation.
void solve() override
Assemble and solve linear system when the equation to solve is linear without using the non-linear so...
IndexSet locally_relevant_dofs
const SimulationParameters< dim > & simulation_parameters
const CLSSubequationsID subequation_id
std::shared_ptr< GlobalVectorType > present_solution
TrilinosWrappers::SparseMatrix system_matrix
const Parameters::Verbosity linear_solver_verbosity
AffineConstraints< double > constraints
virtual void check_dependencies_validity()=0
Check if the solutions on which the subequation depends on are valid.
void solve_linear_system_and_update_solution() override
Solve linear system of equation using a strategy appropriate for the partial differential equation.
Interface for secondary equations (subequations) solved within the CLS auxiliary physics.
PhysicsLinearSubequationsSolver(const ConditionalOStream &pcout)
Constructor for physics subequations that require the use of a linear solver within the span of the p...
CLSSubequationsID
IDs associated to the different subequations solved in Lethe.
PhysicsID
Unique identifiers for each physics module in Lethe.
dealii::TrilinosWrappers::MPI::Vector GlobalVectorType