IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
ippl::PicManager< T, Dim, pc, fc, orb > Class Template Referenceabstract

A template class for managing Particle-in-Cell (PIC) simulations. More...

#include <PicManager.h>

Inheritance diagram for ippl::PicManager< T, Dim, pc, fc, orb >:
Collaboration diagram for ippl::PicManager< T, Dim, pc, fc, orb >:

Public Member Functions

 PicManager ()
virtual ~PicManager ()=default
virtual void par2grid ()=0
 Particle-to-grid operation.
virtual void grid2par ()=0
 Grid-to-particle operation.
std::shared_ptr< pc > getParticleContainer ()
void setParticleContainer (std::shared_ptr< pc > pcontainer)
std::shared_ptr< fc > getFieldContainer ()
void setFieldContainer (std::shared_ptr< fc > fcontainer)
std::shared_ptr< ippl::FieldSolverBase< T, Dim > > getFieldSolver ()
void setFieldSolver (std::shared_ptr< ippl::FieldSolverBase< T, Dim > > fsolver)
std::shared_ptr< orb > getLoadBalancer ()
void setLoadBalancer (std::shared_ptr< orb > loadbalancer)
virtual void pre_run ()
 A method that should be used for setting up the simulation.
virtual void pre_step ()
 A method that should be used for preparation before perfoming a step of simulation.
virtual void post_step ()
 A method that should be used after perfoming a step of simulation.
virtual void advance ()=0
 A method that should be used to execute/advance a step of simulation.
void run (int nt)
 The main for loop fro running a simulation.

Protected Attributes

std::shared_ptr< fc > fcontainer_m
std::shared_ptr< pc > pcontainer_m
std::shared_ptr< orb > loadbalancer_m
std::shared_ptr< ippl::FieldSolverBase< T, Dim > > fsolver_m

Detailed Description

template<typename T, unsigned Dim, class pc, class fc, class orb>
class ippl::PicManager< T, Dim, pc, fc, orb >

A template class for managing Particle-in-Cell (PIC) simulations.

The PicManager class is a template class that extends the functionality of the BaseManager class for Particle-in-Cell simulations. It provides methods for particle-to-grid and grid-to-particle operations, as well as a method for dumping simulation data.

Template Parameters
TThe data type for simulation variables.
DimThe dimensionality of the simulation (e.g., 2D or 3D).
pcThe particle container type.
fcThe field container type.
orbThe load balancer type.

Definition at line 27 of file PicManager.h.

Constructor & Destructor Documentation

◆ PicManager()

template<typename T, unsigned Dim, class pc, class fc, class orb>
ippl::PicManager< T, Dim, pc, fc, orb >::PicManager ( )
inline

Definition at line 29 of file PicManager.h.

References ippl::BaseManager::BaseManager(), fcontainer_m, loadbalancer_m, and pcontainer_m.

Here is the call graph for this function:

◆ ~PicManager()

template<typename T, unsigned Dim, class pc, class fc, class orb>
virtual ippl::PicManager< T, Dim, pc, fc, orb >::~PicManager ( )
virtualdefault

Member Function Documentation

◆ advance()

virtual void ippl::BaseManager::advance ( )
pure virtualinherited

A method that should be used to execute/advance a step of simulation.

In a derived class, the user must override this method to implement their time integration method for solving the considered governing equation.

Implemented in BumponTailInstabilityManager< T, Dim >, LandauDampingManager< T, Dim >, and PenningTrapManager< T, Dim >.

Referenced by run().

Here is the caller graph for this function:

◆ getFieldContainer()

template<typename T, unsigned Dim, class pc, class fc, class orb>
std::shared_ptr< fc > ippl::PicManager< T, Dim, pc, fc, orb >::getFieldContainer ( )
inline

Definition at line 57 of file PicManager.h.

References fcontainer_m.

◆ getFieldSolver()

template<typename T, unsigned Dim, class pc, class fc, class orb>
std::shared_ptr< ippl::FieldSolverBase< T, Dim > > ippl::PicManager< T, Dim, pc, fc, orb >::getFieldSolver ( )
inline

Definition at line 61 of file PicManager.h.

References fsolver_m.

◆ getLoadBalancer()

template<typename T, unsigned Dim, class pc, class fc, class orb>
std::shared_ptr< orb > ippl::PicManager< T, Dim, pc, fc, orb >::getLoadBalancer ( )
inline

Definition at line 67 of file PicManager.h.

References loadbalancer_m.

◆ getParticleContainer()

template<typename T, unsigned Dim, class pc, class fc, class orb>
std::shared_ptr< pc > ippl::PicManager< T, Dim, pc, fc, orb >::getParticleContainer ( )
inline

Definition at line 53 of file PicManager.h.

References pcontainer_m.

◆ grid2par()

template<typename T, unsigned Dim, class pc, class fc, class orb>
virtual void ippl::PicManager< T, Dim, pc, fc, orb >::grid2par ( )
pure virtual

Grid-to-particle operation.

In a derived class, the user must override this method to perform grid-to-particle operations.

Implemented in AlpineManager< T, Dim >.

◆ par2grid()

template<typename T, unsigned Dim, class pc, class fc, class orb>
virtual void ippl::PicManager< T, Dim, pc, fc, orb >::par2grid ( )
pure virtual

Particle-to-grid operation.

In a derived class, the user must override this method to perform particle-to-grid operations.

Implemented in AlpineManager< T, Dim >.

◆ post_step()

virtual void ippl::BaseManager::post_step ( )
inlinevirtualinherited

A method that should be used after perfoming a step of simulation.

Derived classes can override this method to dump data, increment time, etc. The default implementation does nothing.

Reimplemented in AlpineManager< T, Dim >.

Definition at line 44 of file BaseManager.h.

Referenced by run().

Here is the caller graph for this function:

◆ pre_run()

virtual void ippl::BaseManager::pre_run ( )
inlinevirtualinherited

A method that should be used for setting up the simulation.

Derived classes can override this method to allocate memory, initialize variables, etc. The default implementation does nothing.

Reimplemented in BumponTailInstabilityManager< T, Dim >, LandauDampingManager< T, Dim >, and PenningTrapManager< T, Dim >.

Definition at line 25 of file BaseManager.h.

◆ pre_step()

virtual void ippl::BaseManager::pre_step ( )
inlinevirtualinherited

A method that should be used for preparation before perfoming a step of simulation.

The default implementation does nothing.

Reimplemented in AlpineManager< T, Dim >.

Definition at line 35 of file BaseManager.h.

Referenced by run().

Here is the caller graph for this function:

◆ run()

void ippl::BaseManager::run ( int nt)
inlineinherited

The main for loop fro running a simulation.

This method performs a simulation run by calling pre_step, advance, and post_step in a loop for a specified number of time steps.

Parameters
ntThe number of time steps to run the simulation.

Definition at line 63 of file BaseManager.h.

References advance(), post_step(), and pre_step().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFieldContainer()

template<typename T, unsigned Dim, class pc, class fc, class orb>
void ippl::PicManager< T, Dim, pc, fc, orb >::setFieldContainer ( std::shared_ptr< fc > fcontainer)
inline

Definition at line 59 of file PicManager.h.

References fcontainer_m.

◆ setFieldSolver()

template<typename T, unsigned Dim, class pc, class fc, class orb>
void ippl::PicManager< T, Dim, pc, fc, orb >::setFieldSolver ( std::shared_ptr< ippl::FieldSolverBase< T, Dim > > fsolver)
inline

Definition at line 63 of file PicManager.h.

References fsolver_m.

◆ setLoadBalancer()

template<typename T, unsigned Dim, class pc, class fc, class orb>
void ippl::PicManager< T, Dim, pc, fc, orb >::setLoadBalancer ( std::shared_ptr< orb > loadbalancer)
inline

Definition at line 69 of file PicManager.h.

References loadbalancer_m.

◆ setParticleContainer()

template<typename T, unsigned Dim, class pc, class fc, class orb>
void ippl::PicManager< T, Dim, pc, fc, orb >::setParticleContainer ( std::shared_ptr< pc > pcontainer)
inline

Definition at line 55 of file PicManager.h.

References pcontainer_m.

Member Data Documentation

◆ fcontainer_m

template<typename T, unsigned Dim, class pc, class fc, class orb>
std::shared_ptr<fc> ippl::PicManager< T, Dim, pc, fc, orb >::fcontainer_m
protected

Definition at line 72 of file PicManager.h.

Referenced by getFieldContainer(), PicManager(), and setFieldContainer().

◆ fsolver_m

template<typename T, unsigned Dim, class pc, class fc, class orb>
std::shared_ptr<ippl::FieldSolverBase<T, Dim> > ippl::PicManager< T, Dim, pc, fc, orb >::fsolver_m
protected

Definition at line 78 of file PicManager.h.

Referenced by getFieldSolver(), and setFieldSolver().

◆ loadbalancer_m

template<typename T, unsigned Dim, class pc, class fc, class orb>
std::shared_ptr<orb> ippl::PicManager< T, Dim, pc, fc, orb >::loadbalancer_m
protected

Definition at line 76 of file PicManager.h.

Referenced by getLoadBalancer(), PicManager(), and setLoadBalancer().

◆ pcontainer_m

template<typename T, unsigned Dim, class pc, class fc, class orb>
std::shared_ptr<pc> ippl::PicManager< T, Dim, pc, fc, orb >::pcontainer_m
protected

Definition at line 74 of file PicManager.h.

Referenced by getParticleContainer(), PicManager(), and setParticleContainer().


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