I am trying to solve a simple linear elastodynamic problem. Below is the relevant snippet of the code.
When I was saving it in PVD, the code used to save the file and I could view it in Paraview. Then, I tried to run it in parallel, and it gave me an error: PETSc error code is 76 because apparently there is some issue with solver.solve
.
I thought I should switch to saving in XDMF and use PETSc assembly to solve the problem. Right now, I am still working on PETSc implementation and still not able to run in parallel.
F = (rho*dot(a1, w) + inner(sigma(u1), grad(w)))*dx
a, L = lhs(F), rhs(F)
u = Function(V)
problem = LinearVariationalProblem(a, L, u, bcs=bc)
solver = LinearVariationalSolver(problem)
ufile = XDMFFile(mesh.mpi_comm(),"phi.xdmf")
while t <= T:
t += dt
solver.solve()
update(u, u0, v0, a0, beta, gamma, dt)
ufile << u