These are minor bugs, but may be confusing to users due to mismatches between documentation and code behaviour.
Bug 1 — SNES_Poisson docstring: wrong sign
The class docstring states:
∇·[κ∇u] = f
But the code comment below (line 218 of solvers.py) says:
# For the Poisson equation: -∇·(k∇u) = f
Numerical tests also confirm that this code comment is correct.
Bug 2 — SNES_Darcy / DarcyFlowModel: v_Field sign
The SNES_Darcy docstring states:
v = κ∇h − s
The DarcyFlowModel docstring states:
q_i = κ_ij (∂p/∂x_j − s_j)
But in solvers.py, the projected velocity is set as:
self._v_projector.uw_function = -self.darcy_flux
so the actual v_Field = −κ·(∇h − s) has opposite sign to both docstrings.
- What version code?
Latest development branch
These are minor bugs, but may be confusing to users due to mismatches between documentation and code behaviour.
Bug 1 — SNES_Poisson docstring: wrong sign
The class docstring states:
∇·[κ∇u] = f
But the code comment below (line 218 of solvers.py) says:
# For the Poisson equation: -∇·(k∇u) = fNumerical tests also confirm that this code comment is correct.
Bug 2 — SNES_Darcy / DarcyFlowModel: v_Field sign
The SNES_Darcy docstring states:
v = κ∇h − s
The DarcyFlowModel docstring states:
q_i = κ_ij (∂p/∂x_j − s_j)
But in solvers.py, the projected velocity is set as:
self._v_projector.uw_function = -self.darcy_flux
so the actual v_Field = −κ·(∇h − s) has opposite sign to both docstrings.
Latest development branch