WarpX
Toggle main menu visibility
Loading...
Searching...
No Matches
Source
FieldSolver
ElectrostaticSolvers
EffectivePotentialES.H
Go to the documentation of this file.
1
/* Copyright 2024-2025 The WarpX Community
2
*
3
* This file is part of WarpX.
4
*
5
* Authors: Roelof Groenewald (TAE Technologies)
6
*
7
* License: BSD-3-Clause-LBNL
8
*/
9
10
#ifndef WARPX_EFFECTIVEPOTENTIALES_H_
11
#define WARPX_EFFECTIVEPOTENTIALES_H_
12
13
#include "
ElectrostaticSolver.H
"
14
15
#include <
ablastr/coarsen/sample.H
>
16
#include <
ablastr/fields/EffectivePotentialPoissonSolver.H
>
17
18
class
EffectivePotentialES
final :
public
ElectrostaticSolver
19
{
20
public
:
21
22
explicit
EffectivePotentialES
(
int
nlevs_max) :
ElectrostaticSolver
(nlevs_max) {
23
ReadParameters
();
24
WARPX_ALWAYS_ASSERT_WITH_MESSAGE
(
25
(nlevs_max == 1),
26
"Effective potential electrostatic solver only supports one level at present"
27
);
28
}
29
30
void
InitData
()
override
;
31
32
void
ComputeSpaceChargeField
(
33
ablastr::fields::MultiFabRegister
& fields,
34
MultiParticleContainer
& mpc,
35
MultiFluidContainer
* mfl,
36
int
max_level)
override
;
37
38
void
ComputeSigma
(
39
ablastr::fields::MultiLevelScalarField
const
& rho_fp
40
);
41
42
void
computePhi
(
43
ablastr::fields::MultiLevelScalarField
const
& rho,
44
ablastr::fields::MultiLevelScalarField
const
& phi,
45
ablastr::fields::MultiLevelVectorField
const
& efield
46
);
47
63
void
computePhi
(
64
ablastr::fields::MultiLevelScalarField
const
& rho,
65
ablastr::fields::MultiLevelScalarField
const
& phi,
66
ablastr::fields::MultiLevelVectorField
const
& efield,
67
amrex::Real
required_precision,
68
amrex::Real
absolute_tolerance,
69
int
max_iters,
70
int
verbosity
71
)
const
;
72
73
bool
m_overwrite_sigma
;
74
};
75
76
#endif
// WARPX_EFFECTIVEPOTENTIALES_H_
EffectivePotentialPoissonSolver.H
ElectrostaticSolver.H
WARPX_ALWAYS_ASSERT_WITH_MESSAGE
#define WARPX_ALWAYS_ASSERT_WITH_MESSAGE(EX, MSG)
Definition
TextMsg.H:13
EffectivePotentialES::EffectivePotentialES
EffectivePotentialES(int nlevs_max)
Definition
EffectivePotentialES.H:22
EffectivePotentialES::computePhi
void computePhi(ablastr::fields::MultiLevelScalarField const &rho, ablastr::fields::MultiLevelScalarField const &phi, ablastr::fields::MultiLevelVectorField const &efield)
Definition
EffectivePotentialES.cpp:77
EffectivePotentialES::ComputeSpaceChargeField
void ComputeSpaceChargeField(ablastr::fields::MultiFabRegister &fields, MultiParticleContainer &mpc, MultiFluidContainer *mfl, int max_level) override
Computes charge density, rho, and solves Poisson's equation to obtain the associated electrostatic po...
Definition
EffectivePotentialES.cpp:36
EffectivePotentialES::m_overwrite_sigma
bool m_overwrite_sigma
Definition
EffectivePotentialES.H:73
EffectivePotentialES::InitData
void InitData() override
Definition
EffectivePotentialES.cpp:20
EffectivePotentialES::ComputeSigma
void ComputeSigma(ablastr::fields::MultiLevelScalarField const &rho_fp)
Definition
EffectivePotentialES.cpp:88
ElectrostaticSolver::ElectrostaticSolver
ElectrostaticSolver()=default
ElectrostaticSolver::ReadParameters
void ReadParameters()
Definition
ElectrostaticSolver.cpp:29
MultiFluidContainer
Definition
MultiFluidContainer.H:36
MultiParticleContainer
Definition
MultiParticleContainer.H:69
amrex::Real
amrex_real Real
ablastr::fields::MultiLevelScalarField
amrex::Vector< ScalarField > MultiLevelScalarField
Definition
MultiFabRegister.H:210
ablastr::fields::MultiLevelVectorField
amrex::Vector< VectorField > MultiLevelVectorField
Definition
MultiFabRegister.H:218
sample.H
ablastr::fields::MultiFabRegister
Definition
MultiFabRegister.H:272
Generated by
1.17.0