-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Describe the bug
Encountering a symbolic evaluation problem in an annulus mesh. Evaluating a variable or the mesh coordinate system unit individually works, but it fails when calculating the expression involving the product of the variable and mesh.coordinatesystem_unit_e_0.
Reproduce
import underworld3 as uw
import sympy
mesh = uw.meshing.Annulus(radiusOuter=2, radiusInner=1, cellSize=0.05, qdegree=2, degree=1)
D = uw.discretisation.MeshVariable("D", mesh, vtype=uw.VarType.SCALAR, degree=1, continuous=True)
D.data[:,0] = 1.
uw.function.evaluate(D.sym * mesh.CoordinateSystem.unit_e_0 , mesh.X.coords)Error
File <lambdifygenerated-10>:4, in _lambdifygenerated(_Dummy_68, _Dummy_69)
2 [Dummy_67, Dummy_66] = _Dummy_68
3 [PKBSM] = _Dummy_69
----> 4 return array([[1.0e-18*Dummy_66*Dummy_67 + Dummy_67*PKBSM[/sqrt](http://localhost:8888/sqrt)(_uw_x**2 + _uw_y**2), 1.0e-18*Dummy_66*Dummy_67 + PKBSM*_uw_y[/sqrt](http://localhost:8888/sqrt)(_uw_x**2 + _uw_y**2)]])
NameError: name '_uw_x' is not definedEnvironment
Python 3.12
PETSc via Pixi environment
Branch: latest development (2026-02-24)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels