OPALX (Object Oriented Parallel Accelerator Library for Exascale) MINIorX
OPALX
FieldSolver.hpp
Go to the documentation of this file.
1#ifndef OPAL_FIELD_SOLVER_H
2#define OPAL_FIELD_SOLVER_H
3
4#include <memory>
7
8// Define the FieldSolver class
9template <typename T, unsigned Dim>
10class FieldSolver : public ippl::FieldSolverBase<T, Dim> {
11private:
15 unsigned int call_counter_m;
16public:
17 FieldSolver(std::string solver,
18 Field_t<Dim>* rho,
20 Field<T, Dim>* phi)
21 : ippl::FieldSolverBase<T, Dim>(solver),
22 rho_m(rho), E_m(E), phi_m(phi), call_counter_m(0) {
23
25 }
26
28 }
29
30 void dumpScalField(std::string what);
31 void dumpVectField(std::string what);
32
34 return rho_m;
35 }
36 void setRho(Field_t<Dim>* rho) {
37 rho_m = rho;
38 }
39
41 return E_m;
42 }
44 E_m = E;
45 }
46
48 return phi_m;
49 }
50 void setPhi(Field<T, Dim>* phi) {
51 phi_m = phi;
52 }
53
55
56 void initSolver() override ;
57
59
60 void runSolver() override;
61
62 template <typename Solver>
64
66
68
69 void initCGSolver() { }
70
71 void initP3MSolver() { }
72
73};
74
75// Explicit specialization declaration
76template<>
78
79#endif
Implementations for FFT constructor/destructor and transforms.
Definition: Archive.h:20
VField_t< T, Dim > * getE() const
Definition: FieldSolver.hpp:40
void initP3MSolver()
Definition: FieldSolver.hpp:71
void setRho(Field_t< Dim > *rho)
Definition: FieldSolver.hpp:36
void dumpVectField(std::string what)
void setPhi(Field< T, Dim > *phi)
Definition: FieldSolver.hpp:50
void initSolver() override
void initFFTSolver()
void initCGSolver()
Definition: FieldSolver.hpp:69
void runSolver() override
void initSolverWithParams(const ippl::ParameterList &sp)
Field_t< Dim > * getRho()
Definition: FieldSolver.hpp:33
Field< T, Dim > * getPhi() const
Definition: FieldSolver.hpp:47
void initOpenSolver()
void setE(VField_t< T, Dim > *E)
Definition: FieldSolver.hpp:43
VField_t< T, Dim > * E_m
Definition: FieldSolver.hpp:13
void initNullSolver()
unsigned int call_counter_m
Definition: FieldSolver.hpp:15
Field_t< Dim > * rho_m
Definition: FieldSolver.hpp:12
FieldSolver(std::string solver, Field_t< Dim > *rho, VField_t< T, Dim > *E, Field< T, Dim > *phi)
Definition: FieldSolver.hpp:17
void dumpScalField(std::string what)
void setPotentialBCs()
Field_t< Dim > * phi_m
Definition: FieldSolver.hpp:14
FieldSolverBase(std::string solver)
constexpr unsigned Dim