help-octave
[Top][All Lists]

## Re: [Octave forge] [bim package] bim1a_advection*

 From: JuanPi Subject: Re: [Octave forge] [bim package] bim1a_advection* Date: Sat, 11 Jan 2020 20:26:31 +0100

```But still, the following is very puzzling (not consistent with de
docs), could you explain?

a = 1; b = 4;
# These all are equivalent
ConvDiff1 = bim1a_advection_diffusion (msh, a, 1, 1, (b/a) * ones (Nx, 1));
ConvDiff2 = bim1a_advection_diffusion (msh, 1, a, 1, (b/a) * ones (Nx, 1));
ConvDiff3 = bim1a_advection_diffusion (msh, 1, 1, a, b * ones (Nx,
1));   # Preferred

# These all are equivalent
Diff1 = bim1a_advection_diffusion (msh, a, 1, 1, 0);
Diff2 = bim1a_advection_diffusion (msh, 1, a, 1, 0);
Diff3 = bim1a_advection_diffusion (msh, 1, 1, a, 0);   # Preferred way
to define Poisson equation

Conv1 = bim1a_advection_diffusion (msh, 0, 1, 1, (b/a) * ones (Nx,
1));  # 0 because 1st argument multiplies all
Conv2 = bim1a_advection_diffusion (msh, 1, 0, 1, (b/a) * ones (Nx,
1));  # 0 because 2nd argument multiplies all
Conv3 = bim1a_advection_diffusion (msh, 1, 1, 0, b * ones (Nx, 1));  #
NaN because for some unexplained reason there is a division by the 3rd
argument (etak incode)

Why is Conv3 NaN? According to the equation in the doc, one could set
ETA to zero without affecting the rest of the equation

```