Hi,
i calculted the solution from the incompressible Navier-Stokes-Equation on a 2D-mesh and without time-dependencies.
When i use du1dx1 = project(nabla_grad(u)[0,0], Q, "gmres", prec)
with Q = FunctionSpace(mesh, "CG", 1)
and prec = "amg" if has_krylov_solver_preconditioner("amg") else "default"
, i get the error:
ufl.log.UFLException: Invalid subdomain_id.
For the last calculations, it works fine.Now i only changed the mesh and get this error.
Earlier i used the PolygonalMeshGenerator
and it was fine. Now i generate my own mesh:
mesh = Mesh()
editor = MeshEditor()
editor.open(mesh,2,2)
editor.init_vertices(len(Vertex_list))
editor.init_cells(len(Cell_list))
for i in range(len(Vertex_list)):
editor.add_vertex(Vertex_list[i][0], Vertex_list[i][1], Vertex_list[i][2])
for j in range(len(Cell_list)):
editor.add_cell(j, Cell_list[j][0], Cell_list[j][1], Cell_list[j][2])
editor.close()
I saved it to .xml and load it in another script. Did i need to initialize something on the mesh, before project?
Thx for help