Hello,
I am trying to produce a wave in elastoplastic media. I posted my full code and supporting files on fenics support mailing list recently. If you need that to help me get this running, kindly comment below and I' ll post the link. In my UFL file, I define a time step as a coefficient 'dt' in DG space inspired from this undocumented nonlinear demo.
DG0 = FiniteElement("Discontinuous Lagrange", triangle, 0)
# Time stepping parameters (Newmark)
beta = Coefficient(DG0)
gamma = Coefficient(DG0)
dt = Coefficient(DG0)
After defining it as a coefficient in UFL, I defined it as follows in the main.cpp :
// Time parameters
double t = 0.0;
auto dt = std::make_shared<Constant>(0.005); // Time step
double T = 75*(*dt);
auto beta = std::make_shared<Constant>(0.36);
auto gamma = std::make_shared<Constant>(0.7);
I get the following error which I am unable to resolve:
Error: Unable to assemble form. Reason: Coefficient number 3 ("dt")
has not been set. Where: This error was encountered inside
AssemblerBase.cpp.
Why do I get this error with 'dt' and not with 'beta' or 'gamma'?..... and the same arrangement compiles smoothly in the nonlinear demo hyperlink I provided above.