Skip to content
Snippets Groups Projects
Commit bdcc520b authored by Nils Kohl's avatar Nils Kohl :full_moon_with_face:
Browse files

Actually deepcopying all members of DoFSymbol in __deepcopy__.

parent 3657940f
Branches
No related tags found
1 merge request!16Refactoring forms
Pipeline #67709 passed with warnings
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
from copy import deepcopy
import sympy as sp import sympy as sp
from hog.function_space import FunctionSpace from hog.function_space import FunctionSpace
from hog.element_geometry import ElementGeometry from hog.element_geometry import ElementGeometry
...@@ -48,4 +49,9 @@ class DoFSymbol(sp.Symbol): ...@@ -48,4 +49,9 @@ class DoFSymbol(sp.Symbol):
return obj return obj
def __deepcopy__(self, memo): def __deepcopy__(self, memo):
return DoFSymbol(self.name, self.function_space, self.dof_id, self.function_id) return DoFSymbol(
deepcopy(self.name),
deepcopy(self.function_space),
deepcopy(self.dof_id),
deepcopy(self.function_id),
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment