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

Add a measuring application for 3D stokes

parent 00605edf
No related branches found
No related tags found
No related merge requests found
add_subdirectory(poisson_dg) add_subdirectory(poisson_dg)
add_subdirectory(poisson_dg_tensor) add_subdirectory(poisson_dg_tensor)
add_subdirectory(knl) add_subdirectory(knl)
add_subdirectory(stokes_dg)
dune_add_formcompiler_system_test(UFLFILE stokes_dg.ufl
BASENAME app_stokes_dg
INIFILE stokes_dg.mini
NO_TESTS
)
__name = app_stokes_dg_{__exec_suffix}
__exec_suffix = deg{deg_ident}_{opcount_suffix}_level{formcompiler.instrumentation_level}
deg_ident = v{formcompiler.ufl_variants.v_degree}p{formcompiler.ufl_variants.p_degree}
opcount_suffix = opcount, nonopcount | expand opcount
{opcount_suffix} == opcount and {formcompiler.instrumentation_level} != 4 | exclude
# Calculate the size of the grid to equlibritate it to 100 MB/rank
# Input parameters
dim = 3
mbperrank = 100
ranks = 16
floatingbytes = 8
# Metaini Calculations
memperrank = {mbperrank} * 1048576 | eval
vdofsperdir = {formcompiler.ufl_variants.v_degree} + 1 | eval
pdofsperdir = {formcompiler.ufl_variants.p_degree} + 1 | eval
celldofs = {vdofsperdir} ** {dim} + {pdofsperdir} ** {dim} | eval
cellsperrank = {memperrank} / ({floatingbytes} * {celldofs}) | eval
cellsperdir = {cellsperrank} ** (1/{dim}) | eval | toint
firstdircells = {ranks} * {cellsperdir} | eval
dimminusone = {dim} - 1 | eval
ones = 1 | repeat {dimminusone}
otherdircells = {cellsperdir} | repeat {dimminusone}
# Set up the timing identifier
identifier = stokes_dg_deg{deg_ident}
# Setup the grid!
extension = 1.0 | repeat {dim}
cells = {firstdircells} {otherdircells}
partitioning = {ranks} {ones}
[wrapper.vtkcompare]
name = {__name}
extension = vtu
[formcompiler]
fastdg = 1
sumfact = 1
vectorize_quad = 1
vectorize_grads = 1
instrumentation_level = 2, 3, 4 | expand
opcounter = 1, 0 | expand opcount
time_opcounter = 0, 1 | expand opcount
quadrature_order = {formcompiler.ufl_variants.v_degree} * 2 | eval
[formcompiler.ufl_variants]
cell = hexahedron
v_degree = 2, 3, 4, 5, 6, 7, 8, 9, 10 | expand degree
p_degree = 1, 2, 3, 4, 5, 6, 7, 8, 9 | expand degree
cell = hexahedron
x = SpatialCoordinate(cell)
g_v = as_vector((16.*x[1]*(1.-x[1])*x[2]*(1.-x[2]), 0.0, 0.0))
bctype = conditional(x[0] < 1. - 1e-8, 1, 0)
V = VectorElement("DG", cell, v_degree)
P = FiniteElement("DG", cell, p_degree)
TH = V * P
v, q = TestFunctions(TH)
u, p = TrialFunctions(TH)
ds = ds(subdomain_id=1, subdomain_data=bctype)
n = FacetNormal(cell)('+')
eps = -1.0
sigma = 1.0
r = inner(grad(u), grad(v))*dx \
- p*div(v)*dx \
- q*div(u)*dx \
+ inner(avg(grad(u))*n, jump(v))*dS \
+ sigma * inner(jump(u), jump(v))*dS \
- eps * inner(avg(grad(v))*n, jump(u))*dS \
- avg(p)*inner(jump(v), n)*dS \
- avg(q)*inner(jump(u), n)*dS \
- inner(grad(u)*n, v)*ds \
+ p*inner(v, n)*ds \
+ q*inner(u, n)*ds \
+ eps * inner(grad(v)*n, u-g_v)*ds \
+ sigma * inner(u-g_v, v)*ds \
- q*inner(g_v, n)*ds
forms = [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