|
IPPL API Reference
Independent Parallel Particle Layer C++ API
|
A solver for Maxwell's equations using the Finite-Difference Time-Domain (FDTD) method. More...
#include <StandardFDTDSolver.h>
Inheritance diagram for ippl::StandardFDTDSolver< EMField, SourceField, boundary_conditions >:
Collaboration diagram for ippl::StandardFDTDSolver< EMField, SourceField, boundary_conditions >: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 Types inherited from ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions > | |
| 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 | |
| StandardFDTDSolver (SourceField &source, EMField &E, EMField &B) | |
| Constructs a StandardFDTDSolver. | |
| virtual void | step () override |
| Advances the simulation by one time step. | |
| virtual void | initialize () override |
| Initializes the solver. | |
Public Member Functions inherited from ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions > | |
| 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. | |
| void | evaluate_EB () |
| Evaluates the electric and magnetic fields. | |
Public Member Functions inherited from ippl::Maxwell< EMField, SourceField > | |
| Maxwell () | |
| Maxwell (SourceField &four_current, EMField &E, EMField &B) | |
| virtual void | setSources (SourceField &four_current) |
| void | setEMFields (EMField &E, EMField &B) |
| void | mergeParameters (const ParameterList ¶ms) |
Static Public Attributes | |
| static constexpr unsigned | Dim = EMField::dim |
Static Public Attributes inherited from ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions > | |
| static constexpr unsigned | Dim = EMField::dim |
Static Public Attributes inherited from ippl::Maxwell< EMField, SourceField > | |
| static constexpr unsigned | Dim = EMField::dim |
Additional Inherited Members | |
Public Attributes inherited from ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions > | |
| SourceField | A_n |
| SourceField | A_np1 |
| SourceField | A_nm1 |
Protected Member Functions inherited from ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions > | |
| void | applyBCs () |
| Applies the boundary conditions. | |
Protected Attributes inherited from ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions > | |
| SourceField::Mesh_t * | mesh_mp |
| FieldLayout< Dim > * | layout_mp |
| NDIndex< Dim > | domain_m |
| Vector_t | hr_m |
| Vector< int, Dim > | nr_m |
| scalar | dt |
Protected Attributes inherited from ippl::Maxwell< EMField, SourceField > | |
| ParameterList | params_m |
| SourceField * | JN_mp = nullptr |
| EMField * | En_mp = nullptr |
| EMField * | Bn_mp = nullptr |
A solver for Maxwell's equations using the Finite-Difference Time-Domain (FDTD) method.
| 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). |
| ippl::StandardFDTDSolver< EMField, SourceField, boundary_conditions >::StandardFDTDSolver | ( | SourceField & | source, |
| EMField & | E, | ||
| EMField & | B | ||
| ) |
Constructs a StandardFDTDSolver.
| source | The source field. |
| E | The electric field. |
| B | The magnetic field. |
|
overridevirtual |
Initializes the solver.
This function initializes the solver by setting up the layout, mesh, and fields. It retrieves the mesh spacing, domain, and mesh size, and initializes the fields to zero.
Implements ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >.
|
overridevirtual |
Advances the simulation by one time step.
This function updates the fields by one time step using the FDTD method. It calculates the new field values based on the current and previous field values, as well as the source field. The boundary conditions are applied after the update.
Implements ippl::FDTDSolverBase< EMField, SourceField, boundary_conditions >.