Closed NengLu closed 3 years ago
So copying the mesh did not work?
So copying the mesh did not work? mesh.data.copy() didn't work. and there are no function of mesh.copy() or copy(mesh),
from copy import copy
copy(mesh)
from copy import copy copy(mesh)
Humm, weird, that still didn‘t work. Here are the mid of the RTI model mesh nodes coords, which should be around 0.500 while it deforms too much.
Try with
from copy import deepcopy
Try with
from copy import deepcopy
deepcopy can't work on model.mesh object, shows error:
TypeError: can't pickle SwigPyObject objects
Can we create the init_mesh in the _model.py below the def freeSurface, make it only works when the users using the freeSurf=True. It seems an easy way to build when the copy(mesh) didn't work, and more clear than the changes in commit https://github.com/underworldcode/UWGeodynamics/commit/43374a2c0bee06987784f34a0af29b157d763672
def freeSurface(self, value):
if value:
self._init_mesh =
self._freeSurface = FreeSurfaceProcessor(self)
No because it goes against encapsulation. I would rather have the code as it is now.
No because it goes against encapsulation. I would rather have the code as it is now.
Okay, thanks.
Reference