SpECTRE  v2024.04.12
elliptic Namespace Reference

Items related to composing nonlinear elliptic solver executables. More...

Namespaces

namespace  analytic_data
 Items related to pointwise analytic data for elliptic solves, such as initial guesses, analytic solutions, and background quantities in elliptic PDEs.
 
namespace  BoundaryConditions
 Boundary conditions for elliptic systems.
 
namespace  dg
 Functionality related to discontinuous Galerkin discretizations of elliptic equations.
 
namespace  OptionTags
 Option tags for nonlinear elliptic solver executables.
 
namespace  protocols
 Protocols related to elliptic systems
 
namespace  subdomain_preconditioners
 Linear solvers that approximately invert the elliptic::dg::subdomain_operator::SubdomainOperator to make the Schwarz subdomain solver converge faster.
 
namespace  Triggers
 Triggers for elliptic executables.
 

Classes

struct  DefaultElementsAllocator
 A Parallel::protocols::ArrayElementsAllocator that creates array elements to cover the initial computational domain. More...
 
struct  DgElementArray
 The parallel component responsible for managing the DG elements that compose the computational domain. More...
 
struct  Solver
 A complete nonlinear elliptic solver stack. Use to compose an executable. More...
 

Typedefs

template<typename System , bool Linearized>
using get_sources_computer = tmpl::conditional_t< Linearized, typename detail::sources_computer_linearized< System >::type, typename System::sources_computer >
 The System::sources_computer or the System::sources_computer_linearized, depending on the Linearized parameter. If the system has no sources_computer_linearized alias it is assumed to be linear, so the System::sources_computer is returned either way.
 
template<typename System , bool Linearized>
using get_sources_argument_tags = typename tmpl::conditional_t< std::is_same_v< get_sources_computer< System, Linearized >, void >, detail::NoSourcesComputer, get_sources_computer< System, Linearized > >::argument_tags
 The argument_tags of either the System::sources_computer or the System::sources_computer_linearized, depending on the Linearized parameter, or an empty list if the sources computer is void.
 

Enumerations

enum class  BoundaryConditionType { Dirichlet , Neumann }
 Identify types of boundary conditions for elliptic equations. More...
 

Functions

template<bool Linearized, typename ArgsTransform = void, typename BoundaryConditionClasses = tmpl::list<>, size_t Dim, typename DbTagsList , typename MapKeys , typename... FieldsAndFluxes>
void apply_boundary_condition (const elliptic::BoundaryConditions::BoundaryCondition< Dim > &boundary_condition, const db::DataBox< DbTagsList > &box, const MapKeys &map_keys_to_direction, FieldsAndFluxes &&... fields_and_fluxes)
 Apply the boundary_condition to the fields_and_fluxes with arguments from interface tags in the DataBox. More...
 
std::ostreamoperator<< (std::ostream &os, BoundaryConditionType boundary_condition_type)
 

Detailed Description

Items related to composing nonlinear elliptic solver executables.

Functionality related to solving elliptic partial differential equations.

Enumeration Type Documentation

◆ BoundaryConditionType

Identify types of boundary conditions for elliptic equations.

Enumerator
Dirichlet 

Dirichlet boundary conditions like \(u(x_0)=u_0\).

Neumann 

Neumann boundary conditions like \(n^i\partial_i u(x_0)=v_0\), where \(\boldsymbol{n}\) is the normal to the domain boundary.

Function Documentation

◆ apply_boundary_condition()

template<bool Linearized, typename ArgsTransform = void, typename BoundaryConditionClasses = tmpl::list<>, size_t Dim, typename DbTagsList , typename MapKeys , typename... FieldsAndFluxes>
void elliptic::apply_boundary_condition ( const elliptic::BoundaryConditions::BoundaryCondition< Dim > &  boundary_condition,
const db::DataBox< DbTagsList > &  box,
const MapKeys &  map_keys_to_direction,
FieldsAndFluxes &&...  fields_and_fluxes 
)

Apply the boundary_condition to the fields_and_fluxes with arguments from interface tags in the DataBox.

This functions assumes the arguments for the boundary_condition are stored in the DataBox in tags domain::Tags::Faces<Dim, Tag>. This may turn out not to be the most efficient setup, so code that uses the boundary conditions doesn't have to use this function but can procure the arguments differently. For example, future optimizations may involve storing a subset of arguments that don't change during an elliptic solve in direction-maps in the DataBox, and slicing other arguments to the interface every time the boundary conditions are applied.

The ArgsTransform template parameter can be used to transform the set of argument tags for the boundary conditions further. It must be compatible with tmpl::transform. For example, it may wrap the tags in another prefix. Set it to void (default) to apply no transformation.

The BoundaryConditionClasses can be used to list a set of classes derived from elliptic::BoundaryConditions::BoundaryCondition that are iterated to determine the concrete type of boundary_condition. It can be tmpl::list<> (default) to use the classes listed in Metavariables::factory_creation instead.