SpECTRE  v2022.09.02
elliptic::subdomain_preconditioners::MinusLaplacian< Dim, OptionsGroup, Solver, LinearSolverRegistrars > Class Template Reference

Approximate the subdomain operator with a flat-space Laplacian for every tensor component separately. More...

#include <MinusLaplacian.hpp>

Classes

struct  BoundaryConditions
 
struct  SolverOptionTag
 

Public Types

using options_group = OptionsGroup
 
using poisson_system = Poisson::FirstOrderSystem< Dim, Poisson::Geometry::FlatCartesian >
 
using BoundaryConditionsBase = typename poisson_system::boundary_conditions_base
 
using SubdomainOperator = elliptic::dg::subdomain_operator::SubdomainOperator< poisson_system, OptionsGroup, tmpl::list<>, tmpl::list< Poisson::BoundaryConditions::Robin< Dim > > >
 
using SubdomainData = ::LinearSolver::Schwarz::ElementCenteredSubdomainData< Dim, tmpl::list< Poisson::Tags::Field > >
 
using BoundaryConditionsSignature = std::map< BoundaryId, elliptic::BoundaryConditionType >
 
using solver_type = Solver
 
using options = tmpl::list< SolverOptionTag, BoundaryConditions >
 

Public Member Functions

 MinusLaplacian (MinusLaplacian &&)=default
 
MinusLaplacianoperator= (MinusLaplacian &&)=default
 
 MinusLaplacian (const MinusLaplacian &rhs)
 
MinusLaplacianoperator= (const MinusLaplacian &rhs)
 
 MinusLaplacian (StoredSolverType solver, std::optional< elliptic::BoundaryConditionType > boundary_condition_type)
 
const Solver & solver () const
 
const auto & cached_solvers () const
 The cached solvers for each unique boundary-condition signature. These are only exposed to allow verifying their consistency.
 
template<typename LinearOperator , typename VarsType , typename SourceType , typename... OperatorArgs>
Convergence::HasConverged solve (gsl::not_null< VarsType * > solution, LinearOperator &&linear_operator, const SourceType &source, const std::tuple< OperatorArgs... > &operator_args) const
 Solve the equation \(Ax=b\) by approximating \(A\) with a Laplace operator for every tensor component in \(x\).
 
void reset () override
 
void pup (PUP::er &p) override
 
std::unique_ptr< Baseget_clone () const override
 
template<typename LinearOperator , typename VarsType , typename SourceType , typename... OperatorArgs>
Convergence::HasConverged solve (const gsl::not_null< VarsType * > initial_guess_in_solution_out, LinearOperator &&, const SourceType &source, const std::tuple< OperatorArgs... > &operator_args) const
 

Static Public Attributes

static constexpr size_t volume_dim = Dim
 
static constexpr Options::String help
 

Detailed Description

template<size_t Dim, typename OptionsGroup, typename Solver = LinearSolver::Serial::LinearSolver<tmpl::list< ::LinearSolver::Serial::Registrars::Gmres< ::LinearSolver::Schwarz::ElementCenteredSubdomainData< Dim, tmpl::list<Poisson::Tags::Field>>>, ::LinearSolver::Serial::Registrars::ExplicitInverse>>, typename LinearSolverRegistrars = tmpl::list<Registrars::MinusLaplacian<Dim, OptionsGroup, Solver>>>
class elliptic::subdomain_preconditioners::MinusLaplacian< Dim, OptionsGroup, Solver, LinearSolverRegistrars >

Approximate the subdomain operator with a flat-space Laplacian for every tensor component separately.

This linear solver applies the Solver to every tensor component in turn, approximating the subdomain operator with a flat-space Laplacian. This can be a lot cheaper than solving the full subdomain operator and can provide effective preconditioning for an iterative subdomain solver. The approximation is better the closer the original PDEs are to a set of decoupled flat-space Poisson equations.

Boundary conditions
At external boundaries we impose homogeneous Dirichlet or Neumann boundary conditions on the Poisson sub-problems. For tensor components and element faces where the original boundary conditions are of Dirichlet-type we choose homogeneous Dirichlet boundary conditions, and for those where the original boundary conditions are of Neumann-type we choose homogeneous Neumann boundary conditions. This means we may end up with more than one distinct Poisson operator on subdomains with external boundaries, one per unique combination of element face and boundary-condition type among the tensor components.
Template Parameters
DimSpatial dimension
OptionsGroupThe options group identifying the LinearSolver::Schwarz::Schwarz solver that defines the subdomain geometry.
SolverAny class that provides a solve and a reset function, but typically a LinearSolver::Serial::LinearSolver. The solver will be factory-created from input-file options.

Member Data Documentation

◆ help

template<size_t Dim, typename OptionsGroup , typename Solver = LinearSolver::Serial::LinearSolver<tmpl::list< ::LinearSolver::Serial::Registrars::Gmres< ::LinearSolver::Schwarz::ElementCenteredSubdomainData< Dim, tmpl::list<Poisson::Tags::Field>>>, ::LinearSolver::Serial::Registrars::ExplicitInverse>>, typename LinearSolverRegistrars = tmpl::list<Registrars::MinusLaplacian<Dim, OptionsGroup, Solver>>>
constexpr Options::String elliptic::subdomain_preconditioners::MinusLaplacian< Dim, OptionsGroup, Solver, LinearSolverRegistrars >::help
staticconstexpr
Initial value:
=
"Approximate the linear operator with a Laplace operator "
"for every tensor component separately."

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