Hi,
My question does not particularly belong to specific problems. When solving a PDE using CG FEM, since the basis functions are defined as 1 at each vertex, the DOFs are actually solution values. However, since DG basis functions are defined differently, we cannot do the same way as CG solution. Is there any way to get the maximum and minimum values of the DG solution without plotting? This question is related to postprocessing DG solution. Below is an example code.
domain = mesh.create_unit_square(MPI.COMM_WORLD, 10, 10, cell_type=mesh.CellType.triangle)
P = fem.functionspace(domain, ("DG", 2))
ph = fem.Function(P)
problem = LinearProblem(ufl.lhs(F1), ufl.rhs(F1), bcs=[],
petsc_options={"ksp_type": "preonly", "pc_type": "lu"})
ph = problem.solve()
ph contains the DOFs of the DG solution.
Thanks.