WarpX
Public Member Functions | Private Attributes | List of all members
SemiImplicitEM Class Reference

#include <SemiImplicitEM.H>

Inheritance diagram for SemiImplicitEM:
ImplicitSolver

Public Member Functions

 SemiImplicitEM ()=default
 
 ~SemiImplicitEM () override=default
 
 SemiImplicitEM (const SemiImplicitEM &)=delete
 
SemiImplicitEMoperator= (const SemiImplicitEM &)=delete
 
 SemiImplicitEM (SemiImplicitEM &&)=delete
 
SemiImplicitEMoperator= (SemiImplicitEM &&)=delete
 
void Define (WarpX *a_WarpX) override
 Read user-provided parameters that control the implicit solver. Allocate internal arrays for intermediate field values needed by the solver. More...
 
void PrintParameters () const override
 
void OneStep (amrex::Real a_time, amrex::Real a_dt, int a_step) override
 Advance fields and particles by one time step using the specified implicit algorithm. More...
 
void ComputeRHS (WarpXSolverVec &a_RHS, const WarpXSolverVec &a_E, amrex::Real a_time, amrex::Real a_dt, int a_nl_iter, bool a_from_jacobian) override
 Computes the RHS of the equation corresponding to the specified implicit algorithm. The discrete equations corresponding to numerical integration of ODEs are often written in the form U = b + RHS(U), where U is the variable to be solved for (e.g., the solution at the next time step), b is a constant (i.e., the solution from the previous time step), and RHS(U) is the right-hand-side of the equation. Iterative solvers, such as Picard and Newton, and higher-order Runge-Kutta methods, need to compute RHS(U) multiple times for different values of U. Thus, a routine that returns this value is needed. e.g., Ebar - E^n = cvac^2*0.5*dt*(curl(Bbar) - mu0*Jbar(Ebar,Bbar)) Here, U = Ebar, b = E^n, and the expression on the right is RHS(U). More...
 
- Public Member Functions inherited from ImplicitSolver
 ImplicitSolver ()=default
 
virtual ~ImplicitSolver ()=default
 
 ImplicitSolver (const ImplicitSolver &)=delete
 
ImplicitSolveroperator= (const ImplicitSolver &)=delete
 
 ImplicitSolver (ImplicitSolver &&)=delete
 
ImplicitSolveroperator= (ImplicitSolver &&)=delete
 
bool IsDefined () const
 
void GetParticleSolverParams (int &a_max_particle_iter, amrex::ParticleReal &a_particle_tol) const
 

Private Attributes

WarpXSolverVec m_E
 Solver vectors for E and Eold. More...
 
WarpXSolverVec m_Eold
 

Additional Inherited Members

- Protected Member Functions inherited from ImplicitSolver
void parseNonlinearSolverParams (const amrex::ParmParse &pp)
 parse nonlinear solver parameters (if one is used) More...
 
- Protected Attributes inherited from ImplicitSolver
WarpXm_WarpX
 Pointer back to main WarpX class. More...
 
bool m_is_defined = false
 
NonlinearSolverType m_nlsolver_type
 Nonlinear solver type and object. More...
 
std::unique_ptr< NonlinearSolver< WarpXSolverVec, ImplicitSolver > > m_nlsolver
 
amrex::ParticleReal m_particle_tolerance = 1.0e-10
 tolerance used by the iterative method used to obtain a self-consistent update of the particle positions and velocities for given E and B on the grid More...
 
int m_max_particle_iterations = 21
 maximum iterations for the iterative method used to obtain a self-consistent update of the particle positions and velocities for given E and B on the grid More...
 

Constructor & Destructor Documentation

◆ SemiImplicitEM() [1/3]

SemiImplicitEM::SemiImplicitEM ( )
default

◆ ~SemiImplicitEM()

SemiImplicitEM::~SemiImplicitEM ( )
overridedefault

◆ SemiImplicitEM() [2/3]

SemiImplicitEM::SemiImplicitEM ( const SemiImplicitEM )
delete

◆ SemiImplicitEM() [3/3]

SemiImplicitEM::SemiImplicitEM ( SemiImplicitEM &&  )
delete

Member Function Documentation

◆ ComputeRHS()

void SemiImplicitEM::ComputeRHS ( WarpXSolverVec a_RHS,
const WarpXSolverVec a_E,
amrex::Real  a_time,
amrex::Real  a_dt,
int  a_nl_iter,
bool  a_from_jacobian 
)
overridevirtual

Computes the RHS of the equation corresponding to the specified implicit algorithm. The discrete equations corresponding to numerical integration of ODEs are often written in the form U = b + RHS(U), where U is the variable to be solved for (e.g., the solution at the next time step), b is a constant (i.e., the solution from the previous time step), and RHS(U) is the right-hand-side of the equation. Iterative solvers, such as Picard and Newton, and higher-order Runge-Kutta methods, need to compute RHS(U) multiple times for different values of U. Thus, a routine that returns this value is needed. e.g., Ebar - E^n = cvac^2*0.5*dt*(curl(Bbar) - mu0*Jbar(Ebar,Bbar)) Here, U = Ebar, b = E^n, and the expression on the right is RHS(U).

Implements ImplicitSolver.

◆ Define()

void SemiImplicitEM::Define ( WarpX a_WarpX)
overridevirtual

Read user-provided parameters that control the implicit solver. Allocate internal arrays for intermediate field values needed by the solver.

Implements ImplicitSolver.

◆ OneStep()

void SemiImplicitEM::OneStep ( amrex::Real  a_time,
amrex::Real  a_dt,
int  a_step 
)
overridevirtual

Advance fields and particles by one time step using the specified implicit algorithm.

Implements ImplicitSolver.

◆ operator=() [1/2]

SemiImplicitEM& SemiImplicitEM::operator= ( const SemiImplicitEM )
delete

◆ operator=() [2/2]

SemiImplicitEM& SemiImplicitEM::operator= ( SemiImplicitEM &&  )
delete

◆ PrintParameters()

void SemiImplicitEM::PrintParameters ( ) const
overridevirtual

Implements ImplicitSolver.

Member Data Documentation

◆ m_E

WarpXSolverVec SemiImplicitEM::m_E
private

Solver vectors for E and Eold.

◆ m_Eold

WarpXSolverVec SemiImplicitEM::m_Eold
private

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