From 30eaba2665373c46b63a95fb790d3db5efc2ad26 Mon Sep 17 00:00:00 2001 From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de> Date: Mon, 9 Jan 2017 12:58:56 +0100 Subject: [PATCH] Use the eval command for grid size calculation --- applications/poisson_dg/poisson_dg.mini | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/applications/poisson_dg/poisson_dg.mini b/applications/poisson_dg/poisson_dg.mini index 52e85877..2be33366 100644 --- a/applications/poisson_dg/poisson_dg.mini +++ b/applications/poisson_dg/poisson_dg.mini @@ -3,8 +3,22 @@ __exec_suffix = deg{formcompiler.ufl_variants.degree}_{opcount_suffix} opcount_suffix = opcount, nonopcount | expand opcount +# Calculate the size of the grid to equlibritate it to 100 MB/rank +# Input parameters +mbperrank = 1 +ranks = 16 +floatingbytes = 8 + +# Metaini Calculations +totalmem = {mbperrank} * 1048576 * {ranks} | eval +dofsperdir = {formcompiler.ufl_variants.degree} + 1 | eval +celldofs = {dofsperdir} * {dofsperdir} * {dofsperdir} | eval +totalcells = {totalmem} / ({floatingbytes} * {celldofs}) | eval +cellsperdir = {totalcells} ** (1/3) | eval | toint + +# Setup the grid! extension = 1.0 1.0 1.0 -cells = 16 16 16 +cells = {cellsperdir} {cellsperdir} {cellsperdir} [wrapper.vtkcompare] name = {__name} -- GitLab