# This file precribes parameters for the testcase found in   
#
# Gregor Gassner,
# PhD thesis
#
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
# DATA WRITER
#------------
fem.io.datafileprefix: NS
fem.io.savestep: 0.01 # SaveStep (write data every `saveStep' time period, <=0 deactivates)
fem.io.savecount: -1 # SaveCount (write data every saveCount time steps, <=0 deactivates)


femdg.stepper.printcount: 1
femdg.additionalvariables: false


# GENERAL
#--------
# toggle verbosity of on process 
# (-1: off, p: process p is verbose, in general 0 is a good choice)
fem.verboserank: 0 

# OMP THREADS 
#------------
# number of threads used in OMP program
fem.parallel.numberofthreads: 4
# write diagnostics file (
# 0 don't, 1 only speedup file, 2 write all runfiles 
# 3 only write 0, others at end, 4 all files at end for scaling) 
fem.parallel.diagnostics: 1
# if true non-blocking communication is enabled
femdg.nonblockingcomm: true
fem.threads.verbose: true
# if true thread 0 only communicates data but does not computation
fem.threads.communicationthread: false
fem.threads.partitioningmethod: sfc


# DATA WRITER
#------------
fem.prefix: ./data
fem.io.outputformat: vtk-cell # binary, vtk-cell, vtk-vertex, gnuplot, sub-vtk-cell
fem.io.subsamplinglevel: 0
# checkpointing step 
fem.io.checkpointstep: 25000000
# add time stamp to eoc file name
# to avoid overwriting the eoc files
fem.io.eocFileTimeStamp: 0
fem.eoc.outputpath: ./data


# GRID SOLUTION 
#--------------
gridsol.writesolution: false
gridsol.usegridsolution: false


# STEPPER
#-----------------
fem.eoc.steps: 1
femdg.stepper.printcount: 10
# maximal number of timesteps done (for debugging)
# femdg.stepper.maximaltimesteps: 10
#femdg.stepper.fixedtimestep: 0.002 # when 0 then use dynamic time step
femdg.fixedtimestepeocloopfactor: 1. # fixed time step is scaled with the inverse of this in each eoc loop

# GRID ADAPTATION
#----------------
fem.adaptation.method: none # none | generic | callback
# specify refinement tolerance 
fem.adaptation.refineTolerance: 0.5
# percent of refinement tol used for coarsening 
fem.adaptation.coarsenPercent: 0.05
# coarsest level that should be present 
fem.adaptation.coarsestLevel: 0
# finest level that should be present
fem.adaptation.finestLevel: 6
# marking strategy 
# shockind = shock indicator, 
# apost    = aposteriori based indicator, 
# grad     = gradient based indicator 
fem.adaptation.markingStrategy: apost
fem.adaptation.adaptcount: 1 # after this many time step, 0 disables adaptation

# GRID SOLUTION 
#--------------
gridsol.savestep: 0.5
gridsol.firstwrite: 0.5
gridsol.filename: nseq-checkpoint


# PROBLEM SETUP
#--------------
paramfile: ../../parameter/paramPhysicalConstants

# WBPROBLEM
# g: 0.7 # m/(ss)
# p0: 10. # surface pressure Pa=kg/(mss)
# diffusion coefficients
mu: 0.0001 #00001 #  kg/(ms)
g: 9.81 # m/ss
Re: 1. #(Reynold's number)
Pr: 0.72 # 0.72 #(Prandtl's number)
femdg.stepper.starttime: 0. # s
femdg.stepper.endtime: 0.005
fem.eoc.steps: 5

gammaGNS: 0.5
omegaGNS: 1.
kGNS: 3.1415926535897932385


# DOMAIN CONFIGURATION
#---------------------
fem.io.macroGridFile_1d:  ../../grids/nswaves_1d.dgf
fem.io.macroGridFile_2d:  ../../grids/nswaves_2d.dgf
#fem.io.macroGridFile_2d: ../../grids/mesh4_1_2.typ1.dgf
#fem.io.macroGridFile_2d: ../../grids/mesh4_1_1.typ1.dgf
#fem.io.macroGridFile_2d: ../../grids/nswaves_2d_unstr.dgf
fem.io.macroGridFile_3d:  ../../grids/nswaves_3d.dgf
#fem.io.macroGridFile_3d: ../../grids/dkershaw08.msh.dgf
#fem.io.macroGridFile_3d: ../../grids/RandMesh4.msh.dgf


# SOLVER CONFIGURATION
fem.ode.odesolver: IM # ode solvers: EX, IM, IMEX
#fem.ode.order: 2
fem.ode.verbose: none # ode output: none, cfl, full
fem.ode.cflincrease: 1.25
fem.ode.miniterations: 95
fem.ode.maxiterations: 105
fem.ode.cflStart: 1.
#fem.ode.cflMax: 5
fem.timeprovider.factor: 0.45
fem.timeprovider.updatestep: 1

# parameter for the implicit solvers 
fem.solver.verbose: false
fem.solver.gmres.restart: 15
fem.solver.newton.verbose: false
fem.solver.newton.linear.verbose: false
fem.solver.newton.maxlineariterations: 1000
fem.solver.newton.tolerance: 1e-10

femdg.polynomialOrder: 2
dgdiffusionflux.method: CDG2 # diffusion flux: CDG2, CDG, BR2, IP, NIPG, BO
dgdiffusionflux.theoryparameters: 1 # scaling with theory parameters
dgdiffusionflux.penalty: 0.
dgdiffusionflux.liftfactor: 1.0

