68 if (
a ==
b ||
a*
b <= 0.)
103 for (
int i = 0,
j = 1;
i < 2;
j = 1 - 2*++
i)
143 for (
int i = 0,
j = 1;
i < 2;
j = 1 - 2*++
i)
245 for (
int i = 1;
i <=
imax;
i++) {
static int sign2(number x)
static number sq(number x)
static bool interfacial(Point point, scalar c)
scalar phi[]
The electric potential and the volume charge density are scalars while the permittivity and conductiv...
*cs[i, 0, 0] a *[i -1, 0, 0] j
#define dx(s)
We first define some useful macros, following the notations in Bonneton et al, 2011.
vector D[]
The linear system can be inverted with the multigrid Poisson solver.
trace int redistance(scalar phi, int imax=1, double cfl=0.5, int order=3, double eps=1e-6, double band=HUGE, scalar resf={-1}, const double phixxmin=1./HUGE)
static void dphidt(scalar phi, scalar dphi, scalar phi0, const double cfl, const double phixxmin)
static double minmod3(double a, double b)