diff --git a/applications/CMakeLists.txt b/applications/CMakeLists.txt index 5a75b84e1c0c3b4d4daa19381d7032489d2cbddb..f472b3d2b80421c4f18b1283a63f80a065a97435 100644 --- a/applications/CMakeLists.txt +++ b/applications/CMakeLists.txt @@ -1,2 +1,3 @@ add_subdirectory(poisson_dg) add_subdirectory(poisson_dg_tensor) +add_subdirectory(knl) diff --git a/applications/knl/CMakeLists.txt b/applications/knl/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..f935128ee68641b5bcecd6287f913d92045ac2cc --- /dev/null +++ b/applications/knl/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(poisson_dg) + diff --git a/applications/knl/poisson_dg/CMakeLists.txt b/applications/knl/poisson_dg/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..3fb870b93fe7503680851d173e82421629e20e18 --- /dev/null +++ b/applications/knl/poisson_dg/CMakeLists.txt @@ -0,0 +1,5 @@ +dune_add_formcompiler_system_test(UFLFILE poisson_dg.ufl + BASENAME app_knl_poisson + INIFILE knl_poisson_dg.mini + NO_TESTS + ) diff --git a/applications/knl/poisson_dg/knl_poisson_dg.mini b/applications/knl/poisson_dg/knl_poisson_dg.mini new file mode 100644 index 0000000000000000000000000000000000000000..876dc1cafe657e75ed9da13211d5fb334dde6a85 --- /dev/null +++ b/applications/knl/poisson_dg/knl_poisson_dg.mini @@ -0,0 +1,50 @@ +__name = app_knl_poisson_dg_{__exec_suffix} +__exec_suffix = deg{formcompiler.ufl_variants.degree}_{opcount_suffix}_level{formcompiler.instrumentation_level} + +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 +dofsperdir = {formcompiler.ufl_variants.degree} + 1 | eval +celldofs = {dofsperdir} ** {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 = knl_poisson_dg_deg{formcompiler.ufl_variants.degree} + +# 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_diagonal = 1 +instrumentation_level = 2, 3, 4 | expand +opcounter = 1, 0 | expand opcount +time_opcounter = 0, 1 | expand opcount +quadrature_order = {formcompiler.ufl_variants.degree} * 2 | eval +architecture = knl + +[formcompiler.ufl_variants] +cell = hexahedron +degree = 1, 3, 5, 7, 9 | expand diff --git a/applications/knl/poisson_dg/poisson_dg.ufl b/applications/knl/poisson_dg/poisson_dg.ufl new file mode 100644 index 0000000000000000000000000000000000000000..2c0f2c34436f1c6b76817d6abad344fae3183d62 --- /dev/null +++ b/applications/knl/poisson_dg/poisson_dg.ufl @@ -0,0 +1,32 @@ +dim = 3 +x = SpatialCoordinate(cell) +f = -6. +g = x[0]*x[0] + x[1]*x[1] + x[2]*x[2] + +V = FiniteElement("DG", cell, degree) + +u = TrialFunction(V) +v = TestFunction(V) + +n = FacetNormal(cell)('+') + +alpha = 1.0 +h_ext = CellVolume(cell) / FacetArea(cell) +cse_gamma_ext = (alpha * degree * (degree + dim - 1)) / h_ext +h_int = Min(CellVolume(cell)('+'), CellVolume(cell)('-')) / FacetArea(cell) +cse_gamma_int = (alpha * degree * (degree + dim - 1)) / h_int + +theta = -1.0 + +r = inner(grad(u), grad(v))*dx \ + + inner(n, avg(grad(u)))*jump(v)*dS \ + + cse_gamma_int*jump(u)*jump(v)*dS \ + - theta*jump(u)*inner(avg(grad(v)), n)*dS \ + - inner(n, grad(u))*v*ds \ + + cse_gamma_ext*u*v*ds \ + + theta*u*inner(grad(v), n)*ds \ + - f*v*dx \ + - theta*g*inner(grad(v), n)*ds \ + - cse_gamma_ext*g*v*ds + +forms = [r]