# including objects not necessarily in the cycle but reachable # only from it. # # To get around this, since the default __del__ on Expr is just # "pass", we just remove the method from the definition of Expr. import ufl try: del ufl.core.expr.Expr.__del__ except AttributeError: pass del ufl from ufl import * # Set up the cache directories before importing PyOP2. import firedrake_configuration firedrake_configuration.setup_cache_dirs() from pyop2 import op2 # noqa from pyop2.mpi import COMM_WORLD, COMM_SELF # noqa from firedrake.assemble import * from firedrake.bcs import * from firedrake.checkpointing import * from firedrake.citations import * from firedrake.constant import * from firedrake.exceptions import * from firedrake.expression import * from firedrake.function import * from firedrake.functionspace import * from firedrake.interpolation import * from firedrake.output import *
# Objects that have __del__() methods and are part of a reference # cycle cause the entire reference cycle to be uncollectable, # including objects not necessarily in the cycle but reachable # only from it. # # To get around this, since the default __del__ on Expr is just # "pass", we just remove the method from the definition of Expr. import ufl try: del ufl.core.expr.Expr.__del__ except AttributeError: pass del ufl from ufl import * # Set up the cache directories before importing PyOP2. firedrake_configuration.setup_cache_dirs() from firedrake_citations import Citations # noqa: F401 # Always get the firedrake paper. Citations().register("Rathgeber2016") from pyop2 import op2 # noqa: F401 from pyop2.mpi import COMM_WORLD, COMM_SELF # noqa: F401 from firedrake.assemble import * from firedrake.bcs import * from firedrake.checkpointing import * from firedrake.constant import * from firedrake.exceptions import * from firedrake.expression import * from firedrake.function import * from firedrake.functionspace import *