Skip to content
Snippets Groups Projects
Commit 68a6c657 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Add sumfact linear acoustics

parent cf4fc9b0
No related branches found
No related tags found
No related merge requests found
......@@ -2,3 +2,8 @@ dune_add_formcompiler_system_test(UFLFILE lineartransport.ufl
BASENAME sumfact_lineartransport
INIFILE lineartransport.mini
)
dune_add_formcompiler_system_test(UFLFILE linearacoustics.ufl
BASENAME sumfact_linearacoustics
INIFILE linearacoustics.mini
)
__name = sumfact_linearacoustics_{__exec_suffix}
__exec_suffix = {diff_suffix}
diff_suffix = numdiff, symdiff | expand diff
extension = 1.0 1.0
cells = 20 20
elementType = hexahedral
[instat]
T = 1.5
dt = 0.0025
[wrapper.vtkcompare]
name = {__name}
extension = vtu
[formcompiler]
numerical_jacobian = 1, 0 | expand diff
explicit_time_stepping = 0
sumfact = 1
# This tests that all mass is transported out of the domain.
# While this is not the best of tests, it is something easily checked for.
#exact_solution_expression = g
#compare_l2errorsquared = 1e-10
cell = quadrilateral
x = SpatialCoordinate(cell)
#V = FiniteElement("DG", cell, 1)
MV = VectorElement("DG", cell=cell, degree=1, dim=3)
n = FacetNormal(cell)('+')
u = TrialFunction(MV)
v = TestFunction(MV)
rho, q0, q1 = split(u)
rhot, q0t, q1t = split(v)
mass = inner(u, v)*dx
flux = as_matrix([[q0, q1], [rho, 0.], [0., rho]])
r = -1.*inner(flux, grad(v))*dx \
+ inner(dot(avg(flux), n) + 0.5*jump(u), jump(v))*dS \
+ inner(u, v)*ds
forms = [mass, r]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment