Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/underworld3/constitutive_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2184,7 +2184,7 @@ def _build_c_tensor(self):

lambda_mat[i, j, k, l] = val

lambda_mat = sympy.simplify(uw.maths.tensor.rank4_to_mandel(lambda_mat, d))
lambda_mat = uw.maths.tensor.rank4_to_mandel(lambda_mat, d)

self._c = uw.maths.tensor.mandel_to_rank4(lambda_mat, d)

Expand Down
2 changes: 1 addition & 1 deletion src/underworld3/cython/petsc_generic_snes_solvers.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3730,7 +3730,7 @@ class SNES_Stokes_SaddlePt(SolverBaseClass):
if self.saddle_preconditioner is not None:
self._pp_G0 = self.saddle_preconditioner
else:
self._pp_G0 = sympy.simplify(1 / self.constitutive_model.K)
self._pp_G0 = 1 / self.constitutive_model.K

fns_jacobian.append(self._pp_G0)

Expand Down
2 changes: 1 addition & 1 deletion src/underworld3/swarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,7 @@ def createMask(self, funcsList):
if len(funcsList) != self.indices:
raise RuntimeError("Error input for createMask() - wrong length of input")

symo = sympy.simplify(0)
symo = sympy.S.Zero
for i in range(self.indices):
symo += funcsList[i] * self._MaskArray[i]

Expand Down
2 changes: 1 addition & 1 deletion src/underworld3/systems/solver_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def F1(self):

F1_val = expression(
r"\mathbf{F}_1\left( u, \nabla u \right)",
sympy.simplify(flux),
flux,
"MyEquation pointwise flux term: $F_1(u, \\nabla u)$",
)

Expand Down
10 changes: 5 additions & 5 deletions src/underworld3/systems/solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def __init__(

F1 = Template(
r"\mathbf{F}_1\left( \mathbf{u} \right)",
lambda self: sympy.simplify(self.constitutive_model.flux.T),
lambda self: self.constitutive_model.flux.T,
r"""Diffusive flux term for the Poisson equation (pointwise).

The $\mathbf{F}_1$ vector represents the flux $k \nabla u$
Expand Down Expand Up @@ -705,7 +705,7 @@ def __init__(

F1 = Template(
r"\mathbf{F}_1\left( \mathbf{u} \right)",
lambda self: sympy.simplify(
lambda self: (
self.stress + self.penalty * self.div_u * sympy.eye(self.mesh.dim)
),
r"""Velocity equation flux/stress term (pointwise).
Expand All @@ -718,7 +718,7 @@ def __init__(

PF0 = Template(
r"\mathbf{h}_0\left( \mathbf{p} \right)",
lambda self: sympy.simplify(sympy.Matrix((self.constraints))),
lambda self: sympy.Matrix((self.constraints)),
r"""Pressure equation constraint term (continuity).

The $h_0$ term enforces the incompressibility constraint
Expand Down Expand Up @@ -2478,7 +2478,7 @@ def F0(self):
"""Pointwise source term including time derivative."""
f0 = expression(
r"f_0 \left( \mathbf{u} \right)",
-self.f + sympy.simplify(self.DuDt.bdf()) / self.delta_t,
-self.f + self.DuDt.bdf() / self.delta_t,
"Diffusion pointwise force term: f_0(u)",
)

Expand Down Expand Up @@ -2918,7 +2918,7 @@ def PF0(self):

f0 = expression(
r"\mathbf{F}_1\left( \mathbf{p} \right)",
sympy.simplify(sympy.Matrix((self.constraints))),
sympy.Matrix((self.constraints)),
"NStokes pointwise flux term: f_0(p)",
)

Expand Down
Loading