You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attached code does one interpolation to a vertex only mesh function. The resulting tape has two interpolate blocks.
I obtained this whilst trying to debug a more substantial issue where there is only one interpolate block but it is unconnected
to my functional on the tape graph. I couldn't find an MFE for it so I'm hoping this is related and exposes the same issue.
Steps to Reproduce
Steps to reproduce the behavior:
run the code below and view the tape graph output as pdf.
from firedrake import *
from firedrake_adjoint import *
mesh = UnitSquareMesh(10,10)
V = FunctionSpace(mesh, "CG", 1)
W = V * V
x, y = SpatialCoordinate(mesh)
w0 = Function(W).assign(1.0)
w1 = Function(W)
v0, v1 = w1.subfunctions
w1.project(w0)
VOM = VertexOnlyMesh(mesh, [[0.51,0.51]])
VVOM = FunctionSpace(VOM, "DG", 0)
y = Function(VVOM)
y.interpolate(v0)
J = assemble(y*y*dx)
Jhat = ReducedFunctional(J, (Control(w0)))
tape = pyadjoint.get_working_tape()
tape.visualise_pdf("testtape.pdf")
Expected behavior
I expect to only see one interpolate block on the grpah.
I suspect this is completely harmless. It's just recording the interpolate it does inside the creation of the VertexOnlyMesh: firedrake/mesh.py:3156
Should probably be excluded from the tape, but doubt it does any harm at the moment.
Describe the bug
The attached code does one interpolation to a vertex only mesh function. The resulting tape has two interpolate blocks.
I obtained this whilst trying to debug a more substantial issue where there is only one interpolate block but it is unconnected
to my functional on the tape graph. I couldn't find an MFE for it so I'm hoping this is related and exposes the same issue.
Steps to Reproduce
Steps to reproduce the behavior:
run the code below and view the tape graph output as pdf.
Expected behavior
I expect to only see one interpolate block on the grpah.
Error message
N/A
Environment:
firedrake-status
Firedrake Configuration:
package_manager: True
minimal_petsc: False
mpicc: None
mpicxx: None
mpif90: None
mpiexec: None
disable_ssh: False
honour_petsc_dir: False
with_parmetis: False
slepc: False
packages: []
honour_pythonpath: False
opencascade: False
tinyasm: False
torch: False
petsc_int_type: int32
cache_dir: /home/cjc1/firedrake/.cache
complex: False
remove_build_files: False
with_blas: None
netgen: False
Additions:
None
Environment:
PYTHONPATH: None
PETSC_ARCH: None
PETSC_DIR: None
Status of components:
|Package |Branch |Revision |Modified |
|FInAT |master |47f6c37 |False |
|PyOP2 |master |edae2884 |False |
|fiat |master |8c66270 |False |
|firedrake |master |dd124559f |False |
|h5py |firedrake |6cc4c912 |False |
|libspatialindex |master |4768bf3 |True |
|libsupermesh |master |69012e5 |False |
|loopy |main |cd388f74 |False |
|petsc |firedrake |9364cb008b|False |
|pyadjoint |reduced_functional_parameters |05f3e18 |False |
|pytest-mpi |main |a478bc8 |False |
|tsfc |master |ef39f72 |False |
|ufl |ufl2unicode_vom |f4d7d915 |False |
N/A
The text was updated successfully, but these errors were encountered: