IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
Maxwell.h
Go to the documentation of this file.
1
//
2
// Class Maxwell
3
// Base class for solvers for Maxwell's equations
4
//
5
6
#ifndef IPPL_MAXWELL_H
7
#define IPPL_MAXWELL_H
8
9
#include "
Types/Vector.h
"
10
11
#include "
Field/Field.h
"
12
13
#include "
Utility/ParameterList.h
"
14
#include "
FieldLayout/FieldLayout.h
"
15
#include "
Meshes/UniformCartesian.h
"
16
17
namespace
ippl
{
18
19
template
<
typename
EMField,
typename
SourceField>
20
class
Maxwell
{
21
public
:
22
constexpr
static
unsigned
Dim
= EMField::dim;
23
27
Maxwell
() {}
28
36
Maxwell
(SourceField& four_current, EMField& E, EMField& B) {
37
setSources
(four_current);
38
setEMFields
(E, B);
39
}
40
45
virtual
void
setSources
(SourceField& four_current) {
JN_mp
= &four_current; }
46
52
void
setEMFields
(EMField& E, EMField& B) {
53
En_mp
= &E;
54
Bn_mp
= &B;
55
}
56
57
63
void
mergeParameters
(
const
ParameterList
& params) {
params_m
.merge(params); }
64
68
virtual
void
solve
() = 0;
69
70
virtual
~Maxwell
() {}
71
72
protected
:
73
// Parameters
74
ParameterList
params_m
;
75
76
// Field for four-current (rho, J)
77
SourceField*
JN_mp
=
nullptr
;
78
79
// E and B fields
80
EMField*
En_mp
=
nullptr
;
81
EMField*
Bn_mp
=
nullptr
;
82
};
83
}
// namespace ippl
84
85
#endif
Vector.h
FieldLayout.h
Field.h
UniformCartesian.h
ParameterList.h
ippl
Definition
Archive.h:20
ippl::Maxwell< FieldType, FieldType >::params_m
ParameterList params_m
Definition
Maxwell.h:74
ippl::Maxwell::solve
virtual void solve()=0
ippl::Maxwell::Maxwell
Maxwell()
Definition
Maxwell.h:27
ippl::Maxwell::~Maxwell
virtual ~Maxwell()
Definition
Maxwell.h:70
ippl::Maxwell::Maxwell
Maxwell(SourceField &four_current, EMField &E, EMField &B)
Definition
Maxwell.h:36
ippl::Maxwell::setEMFields
void setEMFields(EMField &E, EMField &B)
Definition
Maxwell.h:52
ippl::Maxwell< FieldType, FieldType >::En_mp
FieldType * En_mp
Definition
Maxwell.h:80
ippl::Maxwell< FieldType, FieldType >::Bn_mp
FieldType * Bn_mp
Definition
Maxwell.h:81
ippl::Maxwell::setSources
virtual void setSources(SourceField &four_current)
Definition
Maxwell.h:45
ippl::Maxwell< FieldType, FieldType >::Dim
static constexpr unsigned Dim
Definition
Maxwell.h:22
ippl::Maxwell< FieldType, FieldType >::JN_mp
FieldType * JN_mp
Definition
Maxwell.h:77
ippl::Maxwell::mergeParameters
void mergeParameters(const ParameterList ¶ms)
Definition
Maxwell.h:63
ippl::ParameterList
Definition
ParameterList.h:29