Drivers

The code repository contains several sample problems that can be found in the drivers subfolder. The drivers take several command line parameters that can be used to change the problem and the type of outputs. A listing of parameters can be displayed by passing the –help flag:

drivers/runFractional.py --help
usage: runFractional.py [-h] [--disableHeader] [--displayConfig] [--displayRanks] [--disableFileLog] [--logDependencies] [--disableTimeStamps] [--no-showTimers] [--showMemory] [--test]
                        [--yamlInput YAMLINPUT] [--hdf5Input HDF5INPUT] [--yamlOutput YAMLOUTPUT] [--hdf5Output HDF5OUTPUT] [--testCache TESTCACHE] [--overwriteCache] [--saveOperators]
                        [--vtkOutput VTKOUTPUT] [--kernelType {fractional,constant,inverseDistance,gaussian,exponential,local}] [-s S] [--horizon HORIZON] [--interaction INTERACTION] [--phi PHI]
                        [--no-normalized] [--discretizedOrder] [--gaussianVariance GAUSSIANVARIANCE] [--exponentialRate EXPONENTIALRATE]
                        [--domain {interval,disc,gradedInterval,gradedDisc,Lshape,square,cutoutCircle,disconnectedInterval,disconnectedDomain,ball}]
                        [--problem {constant,notPeriodic,plateau,sin,cos,3,source,zeroFlux,Greens,knownSolution}] [--element {P1,P2,P3,P0}]
                        [--adaptive {residualMelenk,residualNochetto,residual,hierarchical,knownSolution,None}] [--noRef NOREF] [--targetDoFsAux TARGETDOFSAUX] [--identifier IDENTIFIER]
                        [--showDependencyGraph] [--logProperties LOGPROPERTIES] [--solverType {cg-mg,gmres-mg,lu,mg,cg-jacobi,gmres-jacobi}] [--maxiter MAXITER] [--tol TOL]
                        [--quadType {auto,classical,general,adaptive,classical-refactored}] [--quadTypeBoundary {auto,classical,general,adaptive,classical-refactored}]
                        [--matrixFormat {H2,sparse,sparsified,dense}] [--debugAssemblyTimes] [--skipPlots] [--no-plot_solution] [--no-plot_error] [--no-plot_analyticSolution]
                        [--no-plot_fractionalOrder] [--plotFolder PLOTFOLDER] [--plotFormat {pdf,png,jpeg,eps,ps,svg}]

options:
  -h, --help                                      show this help message and exit

main:
  --targetDoFsAux TARGETDOFSAUX                   number of degrees of freedom for the fractional order (0 = do not discretize order) (default: 0)

input/output:
  --disableHeader                                 Disable verbose header (default: False)
  --displayConfig                                 Display configuration (default: False)
  --displayRanks                                  Display MPI ranks in log (default: False)
  --disableFileLog                                Disable logging to file (default: False)
  --logDependencies                               log dependencies (default: False)
  --disableTimeStamps                             Disable time stamps in log (default: False)
  --no-showTimers                                 Display timers (default: True)
  --showMemory                                    Show memory info in timers (default: False)
  --test                                          Run in test mode (default: False)
  --yamlInput YAMLINPUT                           YAML config file (default: )
  --hdf5Input HDF5INPUT                           HDF5 config file (default: )
  --yamlOutput YAMLOUTPUT                         YAML output file (default: )
  --hdf5Output HDF5OUTPUT                         HDF5 output file (default: )
  --testCache TESTCACHE                           YAML cache file (default: )
  --overwriteCache                                Overwrite the test cache file (default: False)
  --saveOperators                                 add operators to data file (default: False)
  --vtkOutput VTKOUTPUT                           write solution to VTK file (default: )
  --identifier IDENTIFIER                         identifier used as prefix for output ("auto" sets the identifier based on invocation) (default: auto)
  --showDependencyGraph                           Show dependency graph of problem classes. (default: False)
  --logProperties LOGPROPERTIES                   log select properties (default: )

kernel:
  --kernelType {fractional,constant,inverseDistance,gaussian,exponential,local}
                                                  type of kernel (default: fractional)
  -s S, --s S                                     fractional order (default: const(0.75))
  --horizon HORIZON                               interaction horizon (default: inf)
  --interaction INTERACTION                       interaction domain (default: fullSpace)
  --phi PHI                                       kernel coefficient (default: const(1.))
  --no-normalized                                 kernel normalization (default: True)
  --discretizedOrder                              Use a FE function for the fractional order s. (default: False)
  --gaussianVariance GAUSSIANVARIANCE             Variance of Gaussian kernel with infinite horizon. (default: 1.0)
  --exponentialRate EXPONENTIALRATE               Parameter of exponential kernel. (default: 1.0)

problem:
  --domain {interval,disc,gradedInterval,gradedDisc,Lshape,square,cutoutCircle,disconnectedInterval,disconnectedDomain,ball}
                                                  spatial domain (default: interval)
  --problem {constant,notPeriodic,plateau,sin,cos,3,source,zeroFlux,Greens,knownSolution}
                                                  select a problem to solve (default: constant)
  --element {P1,P2,P3,P0}                         finite element space (default: P1)
  --adaptive {residualMelenk,residualNochetto,residual,hierarchical,knownSolution,None}
                                                  type of error indicator (default: None)
  --noRef NOREF                                   number of uniform mesh refinements applied to initial mesh (default: -1)

solver:
  --solverType {cg-mg,gmres-mg,lu,mg,cg-jacobi,gmres-jacobi}
                                                  solver for the linear system (default: cg-mg)
  --maxiter MAXITER                               maximum number of iterations (default: 100)
  --tol TOL                                       solver tolerance (default: 1e-06)

assembly:
  --quadType {auto,classical,general,adaptive,classical-refactored}
                                                  No help defined (default: auto)
  --quadTypeBoundary {auto,classical,general,adaptive,classical-refactored}
                                                  No help defined (default: auto)
  --matrixFormat {H2,sparse,sparsified,dense}     matrix format (default: H2)
  --debugAssemblyTimes                            No help defined (default: False)

plots:
  --skipPlots                                     Do not plot anything (default: False)
  --no-plot_solution                              No help defined (default: True)
  --no-plot_error                                 No help defined (default: True)
  --no-plot_analyticSolution                      No help defined (default: True)
  --no-plot_fractionalOrder                       No help defined (default: True)
  --plotFolder PLOTFOLDER                         folder for saving plots (default: )
  --plotFormat {pdf,png,jpeg,eps,ps,svg}          File format for saving plots (default: pdf)

Some of the drivers can be run in parallel using MPI, e.g.

mpiexec -n 4 drivers/runFractional.py --domain=disc

runFractional.py

Assembles and solves fractional Poisson problems with infinite horizon.

runNonlocal.py

Assembles and solves nonlocal Poisson problems with finite horizon.

runFractionalHeat.py

Solves a fractional heat equation with infinite horizon.

runNonlocalInterface.py

A two domain interface problem with jumps in solution and flux for finite horizon kernels.

brusselator.py

Solves a fractional-order Brusselator system.

runParallelGMG.py

Assembles and solves a classical local Poisson problem using geometric multigrid.

runHelmholtz.py

Assembles and solves a classical local Helmholtz problem.