Hi!
In the demo case ´demo_auto-adaptive_poisson.py´ the expressions use
the keyword degree=1:
g = Expression("sin(5*x[0])", degree=1)
Why do I have to include this keyword?
Without degree=1 the refinement continuous forever for me.
Second question:
I want to use a spline function (or any function) to give the values in my expression so I want something like
class MyExpression(Expression):
def __init__(self, spline_function):
self.spline_function = spline_function
return None
def eval(self,values, x):
values[0] = self.spline_function(x[0])
return None
How can I include degree=1 in MyExpression so that I can use it in variational forms for
AdaptiveLinearVariationalSolver?
I suppose that I have initiate the base class in some way but I don't know how.