This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Expression copy constructor

+2 votes

Is there a simple way to create a deep copy of an expression object in python? If not, what is it about the expression class that does not make it suitable to have a copy constructor?

I've tried finding similar questions but have not found any.

asked Feb 9, 2017 by miguelr FEniCS Novice (420 points)

1 Answer

0 votes

Expression doesn't store any data of its own. It simply defines virtual methods to be overridden which define the mathematical expression it encapsulates. There is no sense in providing a deep copy of Expression.

answered Feb 9, 2017 by nate FEniCS Expert (17,050 points)
...