Dear FEniCS community,
I am trying to project the expression as follows:
import numpy as np
import dolfin as fe
mesh = fe.UnitIntervalMesh(40)
CG2 = fe.FunctionSpace(mesh, 'CG', 2)
LsCircle_exp = fe.Expression('(pow((x[0]-0.5),2.0)+pow((x[1]-0.5),2.0)-pow(t,2.0))' \
, t = 0.1, element = CG2.ufl_element())
LsCircleProject = fe.interpolate(LsCircle_exp, CG2)
It shows
python3: /usr/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h:162: Eigen::DenseCoeffsBase<Derived, 0>::CoeffReturnType Eigen::DenseCoeffsBase<Derived, 0>::operator[](Eigen::Index) const [with Derived = Eigen::Ref<const Eigen::Matrix<double, -1, 1> >; Eigen::DenseCoeffsBase<Derived, 0>::CoeffReturnType = double; Eigen::Index = long int]: Assertion `index >= 0 && index < size()' failed.
Any recommendations?
Thank you!
Meen