Skip to content

Instantly share code, notes, and snippets.

@ysimillides
Last active August 16, 2017 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ysimillides/f7b6d01c646d1d13034ec1069eec4104 to your computer and use it in GitHub Desktop.
Save ysimillides/f7b6d01c646d1d13034ec1069eec4104 to your computer and use it in GitHub Desktop.
small example of how to fix precompilation in FEniCS.jl
#replace @pyimport fenics with the following code below.
const fenics = PyNULL()
function __init__()
copy!(fenics, pyimport_conda("fenics", "FEniCS", "conda-forge"))
end
#to now call a function we need to change UnitTriangleMesh() = Mesh(fenics.UnitTriangleMesh()) to
UnitTriangleMesh() = Mesh(fenics[:UnitTriangleMesh]())
#the usage(exported api) of the package would remain the same
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment