SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
Poisson::Solutions::Lorentzian< Dim, DataType > Class Template Reference

A Lorentzian solution to the Poisson equation. More...

#include <Lorentzian.hpp>

Classes

struct  ComplexPhase
struct  PlusConstant

Public Types

using options

Public Member Functions

 Lorentzian (const Lorentzian &)=default
Lorentzianoperator= (const Lorentzian &)=default
 Lorentzian (Lorentzian &&)=default
Lorentzianoperator= (Lorentzian &&)=default
 Lorentzian (const double constant, const double complex_phase=0.)
double constant () const
double complex_phase () const
std::unique_ptr< elliptic::analytic_data::AnalyticSolutionget_clone () const override
template<typename... RequestedTags>
tuples::TaggedTuple< RequestedTags... > variables (const tnsr::I< DataVector, Dim > &x, tmpl::list< RequestedTags... >) const
void pup (PUP::er &p) override

Static Public Attributes

static constexpr Options::String help

Detailed Description

template<size_t Dim, typename DataType = DataVector>
class Poisson::Solutions::Lorentzian< Dim, DataType >

A Lorentzian solution to the Poisson equation.

Details

This implements the Lorentzian solution \(u(\boldsymbol{x})=\left(1+r^2\right)^{-\frac{1}{2}}\) to the three-dimensional Poisson equation \(-\Delta u(\boldsymbol{x})=f(\boldsymbol{x})\), where \(r^2=x^2+y^2+z^2\). The corresponding source is \(f(\boldsymbol{x})=3\left(1+r^2\right)^{-\frac{5}{2}}\).

If DataType is ComplexDataVector, the solution is multiplied by exp(i * complex_phase) to rotate it in the complex plane. This allows to use this solution for the complex Poisson equation.

Note
Corresponding 1D and 2D solutions are not implemented yet.

Member Typedef Documentation

◆ options

template<size_t Dim, typename DataType = DataVector>
using Poisson::Solutions::Lorentzian< Dim, DataType >::options
Initial value:
tmpl::flatten<tmpl::list<
tmpl::conditional_t<std::is_same_v<DataType, ComplexDataVector>,
ComplexPhase, tmpl::list<>>>>

Member Function Documentation

◆ get_clone()

template<size_t Dim, typename DataType = DataVector>
std::unique_ptr< elliptic::analytic_data::AnalyticSolution > Poisson::Solutions::Lorentzian< Dim, DataType >::get_clone ( ) const
inlineoverridevirtual

Member Data Documentation

◆ help

template<size_t Dim, typename DataType = DataVector>
Options::String Poisson::Solutions::Lorentzian< Dim, DataType >::help
staticconstexpr
Initial value:
{
"A Lorentzian solution to the Poisson equation."}

The documentation for this class was generated from the following file:
  • src/PointwiseFunctions/AnalyticSolutions/Poisson/Lorentzian.hpp