chombo-discharge
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Physics::BrownianWalker::BrownianWalkerSpecies Class Reference

Concrete ItoSpecies for the Brownian walker physics module. More...

#include <CD_BrownianWalkerSpecies.H>

Inheritance diagram for Physics::BrownianWalker::BrownianWalkerSpecies:
Inheritance graph
[legend]
Collaboration diagram for Physics::BrownianWalker::BrownianWalkerSpecies:
Collaboration graph
[legend]

Public Member Functions

 BrownianWalkerSpecies ()
 Constructor. Reads input parameters and draws the initial particle distribution.
 
 BrownianWalkerSpecies (const std::string &a_className)
 Constructor which sets the input-script prefix the species reads its options under.
 
 ~BrownianWalkerSpecies ()
 Destructor.
 
- Public Member Functions inherited from ItoSpecies
 ItoSpecies ()
 Default constructor, but user should set the name, charge/mobility/diffusivity etc.
 
 ItoSpecies (const std::string &a_name, const int a_chargeNumber, const bool a_mobile, const bool a_diffusive)
 Full constructor.
 
virtual ~ItoSpecies ()
 Destructor (does nothing):
 
std::string getName () const
 Return name.
 
int getChargeNumber () const
 Return charge.
 
const std::function< Real(const RealVect &x, const Real &t)> & getInitialDensity () const
 Return the initial density.
 
bool isDiffusive () const
 Return diffusive or not.
 
bool isMobile () const
 Mobile ItoSpecies or not.
 
virtual Real mobility (const Real a_energy) const
 Compute the mobility as a function of energy.
 
virtual Real diffusion (const Real a_energy) const
 Compute the diffusion coefficient.
 
virtual void setInitialDensity (const std::function< Real(const RealVect &x, const Real &t)> &a_initialDensity)
 Set the initial species density.
 
ParticleSoA< ItoParticle > & getInitialParticles ()
 Get initial particles – this is called by ItoSolver when filling the solver with initial particles.
 
const ParticleSoA< ItoParticle > & getInitialParticles () const
 Get initial particles – this is called by ItoSolver when filling the solver with initial particles.
 

Protected Member Functions

void drawInitParticles ()
 Draw the initial particle positions from a Gaussian distribution and assign unit weights.
 

Protected Attributes

int m_numParticles
 Number of initial computational particles to draw.
 
Real m_blobRadius
 Standard deviation of the initial Gaussian particle distribution.
 
RealVect m_blobCenter
 Center of the initial Gaussian particle distribution.
 
- Protected Attributes inherited from ItoSpecies
std::string m_name
 Ito_Species name.
 
int m_chargeNumber
 Charge.
 
int m_maxInitialParticlesPerCell
 Maximum number of initial numerical particles per cell.
 
bool m_isDiffusive
 Diffusive ItoSpecies or not.
 
bool m_isMobile
 Mobile ItoSpecies or not.
 
ParticleSoA< ItoParticle > m_initialParticles
 Initial particles.
 
std::function< Real(const RealVect &x, const Real &t)> m_initialDensity
 Initial density, in case the user wants to generate particles from a density distribution.
 

Detailed Description

Concrete ItoSpecies for the Brownian walker physics module.

Initial particles are drawn from a Gaussian distribution centered at a user-specified position with a user-specified radius. The number of particles, blob center, and blob radius are read from ParmParse at construction time. Each particle is assigned unit weight.

Constructor & Destructor Documentation

◆ BrownianWalkerSpecies()

BrownianWalkerSpecies::BrownianWalkerSpecies ( const std::string &  a_className)

Constructor which sets the input-script prefix the species reads its options under.

Matches the prefix its stepper reads, so a derived stepper's options – including the ones that describe the species – all live under one name.

Parameters
[in]a_classNameInput-script prefix.

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