|
IPPL (Independent Parallel Particle Layer)
IPPL
|
Base class for FDTD solvers in the ippl library. More...
#include <FDTDSolverBase.h>
Public Types | |
| using | scalar = typename EMField::value_type::value_type |
| using | Vector_t = Vector<typename EMField::value_type::value_type, Dim> |
| using | SourceVector_t = typename SourceField::value_type |
Public Member Functions | |
| FDTDSolverBase (SourceField &source, EMField &E, EMField &B) | |
| Constructor for the FDTDSolverBase class. | |
| void | solve () override |
| Solves the FDTD equations. | |
| void | setPeriodicBoundaryConditions () |
| Sets periodic boundary conditions. | |
| scalar | getDt () const |
| Gets the time step size. | |
| void | timeShift () |
| Shifts the saved fields in time. | |
| virtual void | step ()=0 |
| Steps the solver forward in time. This is a pure virtual function. | |
| void | evaluate_EB () |
| Evaluates the electric and magnetic fields. | |
| virtual void | initialize ()=0 |
| Initializes the solver. This is a pure virtual function. | |
| virtual void | setSources (SourceField &four_current) |
| void | setEMFields (EMField &E, EMField &B) |
| void | mergeParameters (const ParameterList ¶ms) |
Public Attributes | |
| SourceField | A_n |
| SourceField | A_np1 |
| SourceField | A_nm1 |
Static Public Attributes | |
| static constexpr unsigned | Dim = EMField::dim |
Protected Member Functions | |
| void | applyBCs () |
| Applies the boundary conditions. | |
Protected Attributes | |
| SourceField::Mesh_t * | mesh_mp |
| FieldLayout< Dim > * | layout_mp |
| NDIndex< Dim > | domain_m |
| Vector_t | hr_m |
| Vector< int, Dim > | nr_m |
| scalar | dt |
| ParameterList | params_m |
| SourceField * | JN_mp = nullptr |
| EMField * | En_mp = nullptr |
| EMField * | Bn_mp = nullptr |
Base class for FDTD solvers in the ippl library.
| EMField | The type representing the electromagnetic field. |
| SourceField | The type representing the source field. |
| boundary_conditions | The boundary conditions to be applied (default is periodic). |
Definition at line 28 of file FDTDSolverBase.h.
| using ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::scalar = typename EMField::value_type::value_type |
Definition at line 31 of file FDTDSolverBase.h.
| using ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::SourceVector_t = typename SourceField::value_type |
Definition at line 33 of file FDTDSolverBase.h.
| using ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::Vector_t = Vector<typename EMField::value_type::value_type, Dim> |
Definition at line 32 of file FDTDSolverBase.h.
| ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::FDTDSolverBase | ( | SourceField & | source, |
| EMField & | E, | ||
| EMField & | B ) |
Constructor for the FDTDSolverBase class.
| source | Reference to the source field. |
| E | Reference to the electric field. |
| B | Reference to the magnetic field. |
Initializes the solver by setting the source and electromagnetic fields.
| source | Reference to the source field. |
| E | Reference to the electric field. |
| B | Reference to the magnetic field. |
Definition at line 18 of file FDTDSolverBase.hpp.
References ippl::Maxwell< EMField, SourceField >::setEMFields(), and ippl::Maxwell< EMField, SourceField >::setSources().
|
protected |
Applies the boundary conditions.
Applies the specified boundary conditions (periodic or absorbing) to the fields.
Definition at line 81 of file FDTDSolverBase.hpp.
References A_n, A_nm1, A_np1, nr_m, and ippl::periodic.
| void ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::evaluate_EB | ( | ) |
Evaluates the electric and magnetic fields.
Computes the electric and magnetic fields based on the current, previous, and next time step field values, as well as the source field.
Definition at line 101 of file FDTDSolverBase.hpp.
References A_n, A_nm1, A_np1, ippl::Maxwell< EMField, SourceField >::Bn_mp, dt, ippl::Maxwell< EMField, SourceField >::En_mp, hr_m, and ippl::Maxwell< EMField, SourceField >::JN_mp.
Referenced by solve().
|
inline |
Gets the time step size.
Definition at line 59 of file FDTDSolverBase.h.
References dt.
|
pure virtual |
Initializes the solver. This is a pure virtual function.
Implemented in ippl::NonStandardFDTDSolver< EMField, SourceField, boundary_conditions >, and ippl::StandardFDTDSolver< EMField, SourceField, boundary_conditions >.
|
inlineinherited |
|
inlineinherited |
Set the problem LHS (electromagnetic fields)
| E | The electric field |
| B | The magnetic field |
Definition at line 52 of file Maxwell.h.
Referenced by ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::FDTDSolverBase(), and ippl::Maxwell< FieldType, FieldType >::Maxwell().
| void ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::setPeriodicBoundaryConditions | ( | ) |
Sets periodic boundary conditions.
Configures the solver to use periodic boundary conditions by setting the appropriate boundary conditions for the fields.
Definition at line 46 of file FDTDSolverBase.hpp.
|
inlinevirtualinherited |
Set the problem RHS (charge & current densities)
| four_current | The four current field (rho, J) |
Definition at line 45 of file Maxwell.h.
Referenced by ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::FDTDSolverBase(), and ippl::Maxwell< FieldType, FieldType >::Maxwell().
|
overridevirtual |
Solves the FDTD equations.
Advances the simulation by one time step, shifts the time for the fields, and evaluates the electric and magnetic fields at the new time.
Implements ippl::Maxwell< EMField, SourceField >.
Definition at line 32 of file FDTDSolverBase.hpp.
References evaluate_EB(), step(), and timeShift().
|
pure virtual |
Steps the solver forward in time. This is a pure virtual function.
Implemented in ippl::NonStandardFDTDSolver< EMField, SourceField, boundary_conditions >, and ippl::StandardFDTDSolver< EMField, SourceField, boundary_conditions >.
Referenced by solve().
| void ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::timeShift | ( | ) |
Shifts the saved fields in time.
Copies the current field values to the previous time step field and the next time step field values to the current field.
Definition at line 69 of file FDTDSolverBase.hpp.
Referenced by solve().
| SourceField ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::A_n |
Definition at line 61 of file FDTDSolverBase.h.
Referenced by applyBCs(), evaluate_EB(), and timeShift().
| SourceField ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::A_nm1 |
Definition at line 63 of file FDTDSolverBase.h.
Referenced by applyBCs(), evaluate_EB(), and timeShift().
| SourceField ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::A_np1 |
Definition at line 62 of file FDTDSolverBase.h.
Referenced by applyBCs(), and evaluate_EB().
|
protectedinherited |
Definition at line 81 of file Maxwell.h.
Referenced by ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::evaluate_EB().
|
staticconstexpr |
Definition at line 30 of file FDTDSolverBase.h.
|
protected |
Definition at line 92 of file FDTDSolverBase.h.
|
protected |
Definition at line 96 of file FDTDSolverBase.h.
Referenced by evaluate_EB(), and getDt().
|
protectedinherited |
Definition at line 80 of file Maxwell.h.
Referenced by ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::evaluate_EB().
|
protected |
Definition at line 93 of file FDTDSolverBase.h.
Referenced by evaluate_EB().
|
protectedinherited |
Definition at line 77 of file Maxwell.h.
Referenced by ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >::evaluate_EB(), ippl::NonStandardFDTDSolver< EMField, SourceField, boundary_conditions >::step(), and ippl::StandardFDTDSolver< EMField, SourceField, boundary_conditions >::step().
|
protected |
Definition at line 91 of file FDTDSolverBase.h.
|
protected |
Definition at line 90 of file FDTDSolverBase.h.
|
protected |
Definition at line 95 of file FDTDSolverBase.h.
Referenced by applyBCs().
|
protectedinherited |