58 for (
int l = 1;
l <
nl - 1;
l++) {
103 b[0] =
h[] + 2.*
dt*
D*(1./(
h[] +
h[0,0,1]) +
104 (
sq(
h[0,0,1]) + 3.*
h[]*
h[0,0,1] + 3.*
sq(
h[]))/
den);
110 rhs[0] += (-
c[0]*
h[] -
D*
dt) *
dst;
117 for (
int l = 1;
l <
nl;
l++) {
119 rhs[
l] -=
a[
l]*rhs[
l-1]/
b[
l-1];
123 for (
int l =
nl - 2;
l >= 0;
l--)
241 for (
int _s = 0;
_s < 1;
_s++) {
scalar * list_clone(scalar *l)
define VT _attribute[s.i] v y scalar * list
static number sq(number x)
vector D[]
The linear system can be inverted with the multigrid Poisson solver.
void horizontal_diffusion(scalar *list, double D, double dt)
void event_viscous_term(void)
In the layered solver, vertical viscosity is applied to the velocity field just after advection,...
trace mgstats implicit_horizontal_diffusion(scalar *list, double D, double dt)
void vertical_diffusion(Point point, scalar h, scalar s, double dt, double D, double dst, double s_b, double lambda_b)
Information about the convergence of the solver is returned in a structure.
#define poisson(...)
Finally, we overload the poisson() function called by [two-phase.h]() with our new function.