Closed zhyxue0 closed 2 years ago
I probably know why, the last term
written in matrix form is .
But when written as a mixed function space, we get
the matrix is singular.
But how to deal with it?
I think you figured out a solution, do you mind mentioning it so that anyone hitting the same kind of problem can benefit from the result?
I think you figured out a solution, do you mind mentioning it so that anyone hitting the same kind of problem can benefit from the result?
OK, inspired by ksagiyam in issue #2399 , define a new trial function u_trial_V
and test function v_V
u_trial_V = TrialFunction(V)
v_V = TestFunctions(V)
M_V = assemble( u_trial_V * v_V *dx)
L = dtc * (RK_b1 * (-dot(p1,grad(v_V))*dx + dot( p1('+'), jump(v_V,n) )*dS) \
+ RK_b2 * (-dot(p2,grad(v_V))*dx + dot( p2('+'), jump(v_V,n) )*dS) )
u_solution = Function(V)
b = assemble(L)
solve(M_V, u_solution, b)
u.assign(u + u_solution)
I try to solve the heat equation
with periodic boundary conditions . The exact solution is
Local Discontinuous Galerkin(LDG) method is used for spatial discretization, we first introduce an auxiliary vector-valued variable
then find , s.t.
where the flux is
Two-stage, second-order DIRK method is used for time discretization, to discretise we set
where
I follow the example of Mixed formulation for the Poisson , but there are some problems. Here is my code:
Error: