📄 poissondg.form
字号:
# Copyright (C) 2006-2007 Kristiand Oelgaard and Anders Logg.# Licensed under the GNU GPL version 3 or any later version.## First added: 2006-12-05# Last changed: 2007-05-09## The bilinear form a(v, u) and linear form L(v) for# Poisson's equation in a discontinuous Galerkin (DG)# formulation.## Compile this form with FFC: ffc -l dolfin Poisson.form# ElementsDG1 = FiniteElement("Discontinuous Lagrange", "triangle", 1)DGn = VectorElement("Discontinuous Lagrange", "triangle", 0)DGh = FiniteElement("Discontinuous Lagrange", "triangle", 0)# Test and trial functionsv = TestFunction(DG1)u = TrialFunction(DG1)# Normal component, mesh size and right-hand siden = Function(DGn)h = Function(DGh)f = Function(DG1)# Dirichlet and Neumann boundary conditionsgD = Function(DG1)gN = Function(DG1)# Parametersalpha = 2.0gamma = 100.0# Bilinear form#a = dot(grad(v), grad(u))*dx \# - dot(avg(grad(v)), jump(u, n))*dS \# - dot(jump(v, n), avg(grad(u)))*dS \# + alpha*avg(h)*dot(jump(v, n), jump(u, n))*dS \# + gamma*v*u*ds# Linear form#L = v*f*dx + gamma*v*gD*ds + v*gN*ds#a = dot(avg(grad(v)), jump(u, n))*dSa = dot(avg([v, v]), jump(u, n))*dS
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -