chombo-discharge
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
i
k
l
m
n
p
q
r
s
t
v
w
Functions
a
b
c
d
f
g
l
m
n
p
r
s
v
w
Variables
Typedefs
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
k
m
p
s
t
Typedefs
b
c
d
f
i
k
m
n
p
r
s
t
v
Enumerations
a
b
c
d
e
f
g
i
j
l
m
n
p
r
s
t
w
Files
File List
File Members
All
Functions
Typedefs
Enumerations
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Pages
Loading...
Searching...
No Matches
Source
Electrostatics
CD_FieldSolverImplem.H
Go to the documentation of this file.
1
/* chombo-discharge
2
* Copyright © 2021 SINTEF Energy Research.
3
* Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4
*/
5
12
#ifndef CD_FieldSolverImplem_H
13
#define CD_FieldSolverImplem_H
14
15
// Our includes
16
#include <
CD_FieldSolver.H
>
17
#include <CD_NamespaceHeader.H>
18
19
Real
20
FieldSolver::getDielectricPermittivity
(
const
RealVect
&
a_pos
)
const
21
{
22
CH_TIME
(
"FieldSolver::getDielectricPermittivity(RealVect a_pos)"
);
23
24
const
Vector<Dielectric>
&
dielectrics
=
m_computationalGeometry
->getDielectrics();
25
26
Real
relPerm
= 0.0;
27
28
if
(
m_multifluidIndexSpace
->numPhases() > 1 &&
dielectrics
.size() > 0) {
29
30
// Find the closest dielectric to position a_pos. This procedure might fail if
31
// the user has two overlapping dielectrics, but those cases are not supported
32
// anyways.
33
Real
minDist
= std::numeric_limits<Real>::infinity();
34
int
closest
= 0;
35
36
for
(
int
i
= 0;
i
<
dielectrics
.size();
i
++) {
37
const
RefCountedPtr<BaseIF>
func
=
dielectrics
[
i
].getImplicitFunction();
38
39
const
Real
curDist
=
func
->value(
a_pos
);
40
41
if
(
std::abs
(
curDist
) <=
std::abs
(
minDist
)) {
42
minDist
=
curDist
;
43
closest
=
i
;
44
}
45
}
46
47
relPerm
=
dielectrics
[
closest
].getPermittivity(
a_pos
);
48
}
49
50
CH_assert
(
dielectrics
.size() > 0);
51
CH_assert
(
relPerm
> 0.0);
52
53
return
relPerm
;
54
}
20
FieldSolver::getDielectricPermittivity
(
const
RealVect
&
a_pos
)
const
{
…
}
55
56
#include <CD_NamespaceFooter.H>
57
58
#endif
CD_FieldSolver.H
Contains declaration of a base electrostatics solver class.
FieldSolver::m_multifluidIndexSpace
RefCountedPtr< MultiFluidIndexSpace > m_multifluidIndexSpace
Multifluid index space.
Definition
CD_FieldSolver.H:573
FieldSolver::m_computationalGeometry
RefCountedPtr< ComputationalGeometry > m_computationalGeometry
Computational geometry.
Definition
CD_FieldSolver.H:578
FieldSolver::getDielectricPermittivity
Real getDielectricPermittivity(const RealVect &a_pos) const
Get relative permittivity at some point in space.
Definition
CD_FieldSolverImplem.H:20
TracerParticleSolver
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition
CD_TracerParticleSolver.H:37
TracerParticleSolver::TracerParticleSolver
TracerParticleSolver()
Default constructor.
Definition
CD_TracerParticleSolverImplem.H:25
Generated by
1.9.8