GlobalParameters::TestPMLMapping Class Reference
+ Inheritance diagram for GlobalParameters::TestPMLMapping:

Public Member Functions

 TestPMLMapping ()
 Default constructor (empty) More...
 
std::complex< doublegamma (const double &nu_i, const double &pml_width_i, const double &k_squared_local, const double &alpha_shift)
 
 TestPMLMapping ()
 Default constructor (empty) More...
 
std::complex< doublegamma (const double &nu_i, const double &pml_width_i, const double &k_squared_local, const double &alpha_shift)
 
 TestPMLMapping ()
 Default constructor (empty) More...
 
std::complex< doublegamma (const double &nu_i, const double &pml_width_i, const double &k_squared_local, const double &alpha_shift=0.0)
 
- Public Member Functions inherited from oomph::PMLMapping
 PMLMapping ()
 Default constructor (empty) More...
 

Detailed Description

New mapping function that makes the mapping independent of the PML thickness

Constructor & Destructor Documentation

◆ TestPMLMapping() [1/3]

GlobalParameters::TestPMLMapping::TestPMLMapping ( )
inline

Default constructor (empty)

189 {};

◆ TestPMLMapping() [2/3]

GlobalParameters::TestPMLMapping::TestPMLMapping ( )
inline

Default constructor (empty)

248 {};

◆ TestPMLMapping() [3/3]

GlobalParameters::TestPMLMapping::TestPMLMapping ( )
inline

Default constructor (empty)

208 {};

Member Function Documentation

◆ gamma() [1/3]

std::complex<double> GlobalParameters::TestPMLMapping::gamma ( const double nu_i,
const double pml_width_i,
const double k_squared_local,
const double alpha_shift 
)
inlinevirtual

Overwrite the pure PML mapping coefficient function to return the coeffcients proposed by Bermudez et al

Implements oomph::PMLMapping.

197  {
198  // The "effective k^2" is shifted, so we shift the k used in the
199  // transformation too
200  std::complex<double> k_shifted=
201  sqrt(k_squared_local*std::complex<double>(1.0,alpha_shift));
202 
203  // Return the gamma in J++, with the shifted k
204  return (1.0/k_shifted)*std::complex<double>
205  (0.0,1.0/(std::fabs(pml_width_i-nu_i)));
206  } // End of gamma
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
Real fabs(const Real &a)
Definition: boostmultiprec.cpp:117

References boost::multiprecision::fabs(), and sqrt().

◆ gamma() [2/3]

std::complex<double> GlobalParameters::TestPMLMapping::gamma ( const double nu_i,
const double pml_width_i,
const double k_squared_local,
const double alpha_shift 
)
inlinevirtual

Overwrite the pure PML mapping coefficient function to return the coeffcients proposed by Bermudez et al

Implements oomph::PMLMapping.

256  {
257  // If we're disabling PMLs
258  if (!Disable_pml_flag)
259  {
260  // The "effective k^2" is shifted, so we shift the k used in the
261  // transformation too
262  std::complex<double> k_shifted=
263  sqrt(k_squared_local*std::complex<double>(1.0,alpha_shift));
264 
265  // Return the gamma in J++, with the shifted k
266  return (1.0/k_shifted)*std::complex<double>
267  (0.0,1.0/(std::fabs(pml_width_i-nu_i)));
268  }
269  else
270  {
271  // Otherwise just return the value 1.0
272  return 1.0;
273  }
274  } // End of gamma
unsigned Disable_pml_flag
Definition: multigrid/helmholtz_multigrid/unstructured_two_d_helmholtz.cc:78

References GlobalParameters::Disable_pml_flag, boost::multiprecision::fabs(), and sqrt().

◆ gamma() [3/3]

std::complex<double> GlobalParameters::TestPMLMapping::gamma ( const double nu_i,
const double pml_width_i,
const double k_squared_local,
const double alpha_shift = 0.0 
)
inlinevirtual

Overwrite the pure PML mapping coefficient function to return the coeffcients proposed by Bermudez et al

Implements oomph::PMLMapping.

216  {
217  // (return) gamma = 1 + (1/k) * (i/|outer_boundary - x|)
218  /*return 1.0 + (1.0 / std::complex<double> (sqrt(k_squared_local), 0))
219  * std::complex<double>
220  (0.0, 1.0/(std::fabs(pml_width_i - nu_i)));*/
221  return 1.0 + (1.0 / std::complex<double> (sqrt(k_squared_local), 0))
222  * std::complex<double>
223  (0.0, 2.0/(std::fabs(pml_width_i - nu_i)));
224  }

References boost::multiprecision::fabs(), and sqrt().


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