This repository hosts the FreeFEM++ input files, auxiliary scripts, and reference data that were used to study how different domain decomposition (DD) and multigrid (MG) strategies scale for diffusion-dominated PDEs. The deterministic folders focus on steady and transient Poisson/heat problems, while the stochastic folders extend the same solvers with polynomial chaos expansions (PCE) to capture input randomness modelled either as random variables or random processes.
*Comparison of scalability of two-grid restricted additive Schwarz variants for the linear heat equation. Left: Strong numerical scalability. Right: Strong parallel scalability *| Path | Purpose | Highlights |
|---|---|---|
deterministic/Linear |
Linear Poisson DD/MG solvers | poisson_1L.edp, poisson_2L*.edp, VTK outputs, Slurm example runff_niagara_weak.sh |
deterministic/NL |
Non-linear Poisson DD solver with Picard iterations | NL_1L.edp, NL_2L.edp, timing logs, MATLAB plotter MGNL.m |
deterministic/heat |
Transient heat equation with multilevel MG preconditioner | heat_2L.edp |
deterministic/heatNL |
Non-linear heat equation benchmarks | heatNL_1L.edp, heatNL_2L.edp, MATLAB script MGheat.m |
deterministic/DD_vsMG |
Side-by-side DD vs MG experiments for linear and non-linear Poisson models | poisson_2L_V2/V3*.edp, NL_2L*.edp, error logs |
stochastic/process |
Random-process driven Poisson problems | FreeFEM++ decks under linear/ & nonlinear/, Slurm launchers |
stochastic/rvariable |
Random-variable (PCE) driven Poisson problems | poisson_L and poisson_NL solvers, macro generators (generate*.edp), PCE tensors, weak/strong scaling results |
poisson_1L.edpis the single-level DD benchmark; thepoisson_2L*.edpvariants add coarse grids/multigrid V2–V3 refinements and AMG comparisons.- Launch templates (e.g.,
runff_niagara_weak.sh) illustrate how weak-scaling studies were run on Slurm clusters usingFreeFem++-mpi. U_4*.vtu/.pvdfiles provide sample VTK output for visualization;A.mcontains MATLAB post-processing utilities.
NL_1L.edp&NL_2L.edpsolve a coefficient-dependent Poisson problem with Picard iterations. The solver loads PETSc and HPDDM, constructs weighted operators viamacro_ddm.idp, and reports convergence histories inerror_iter_picard_ddm.dat.runff_niagara_weak.shholds the reference submission script used for scaling studies.
heat_2L.edpdemonstrates a transient MG solve with PETSc configured for multiplicative multigrid across recursively generated meshes (buildMatRecursiveplusset(MG, ...)options).- The non-linear variant in
heatNLmirrors the structure but augments it with MATLAB diagnostics (MGheat.m) and multiple FreeFEM decks (heatNL_1L.edp,heatNL_2L.edp).
- Collects lightly-edited Poisson and non-linear Poisson decks used to isolate the performance delta between classical DD and multigrid-enhanced variants.
- Logs (e.g.,
error_iter_picard_ddm.dat) make it easy to reproduce the figures referenced in associated reports.
- Contains the original experiments described in
process_updates.txt, including the observation that increasing the Gaussian input standard deviation can render the assembled matrices indefinite unless the Cijk tensors are corrected. runff_beluga.shandrunff_niagara_weak.shshow how the stochastic decks were executed on clusters (IntelMPI modules, Slurm directives, etc.).- The
nonlinear/examples extend the deterministic Picard solver to process-driven inputs.
- Houses two solver families:
poisson_L(linear) andpoisson_NL(non-linear). Each contains FreeFEM++ source (poisson_ss*.edp), macro generators (generate.edp,generate_nl.edp), reference meshes (square.geo/.msh), and automation scripts (clear.sh). generate.edp/generate_nl.edpemit helper files (ssinit.edp,ssweakcomp.edp, etc.) by taking polynomial chaos orders (-ordo,-ordi) and statistical parameters (-muG,-sigmaG) viagetARGV. This enables reproducible PCE assembly.Tijkldirectories contain MATLAB.mscripts and multi-index tables for higher-order chaos tensors, whilestrong/andweak/folders provide EPS/Fig plots plus scaling logs.- The
code/output/directory holds example VTK snapshots (U_*.pvd/.vtu) that showcase the stochastic solution fields.
- FreeFEM++ compiled with MPI support and linked to PETSc and HPDDM, matching what the
.edpscripts load viaload "PETSc"andload "hpddm". - MPI runtime (
mpirun/mpiexec) available on the execution host; examples assume Slurm-managed clusters such as Niagara or Béluga. - Optional visualization in ParaView/VisIt for
.pvd/.vtuoutputs. - Optional MATLAB/Octave for the post-processing utilities in
MG*.mand scaling plot generators instochastic/**/strong|weak. - For mesh regeneration or edits, install Gmsh to work with the
.geosources understochastic/rvariable.
# from the repo root
mpirun -np 40 FreeFem++-mpi deterministic/Linear/poisson_1L.edp -m 750 -n 750 -nw -log_viewCommon flags:
-m/-nset the structured mesh density.-nwprevents the GUI from opening on headless nodes.- PETSc options (e.g.,
-log_view) can be appended directly; additional KSP/PC tuning is embedded in each.edp.
To compare multi-level variants, point the same command at poisson_2L_V2.edp or poisson_2L_V3.edp. The dd_vsMG folders expose AMG-based runs (poisson_2L_V3_amg.edp, NL_2L_AMG.edp) for side-by-side testing.
sbatch deterministic/Linear/runff_niagara_weak.shEdit the script to match your allocation (--account, --nodes, etc.) and FreeFEM++ installation path before submitting. The templates already load the Niagara/Béluga module stacks that were used for the published scaling data.
cd stochastic/rvariable/poisson_L/code
FreeFem++ generate.edp -ordo 3 -ordi 2 -sigmaG 0.3
mpirun -np 160 FreeFem++-mpi ../poisson_ss_2L.edp -m 400 -n 400 -nw- Run the generator script with the desired chaos orders/statistics. This writes the helper macros consumed by the solver.
- Launch the solver with
FreeFem++-mpi, optionally sweeping mesh sizes or polynomial orders to replicate the weak/strong scaling tests captured underweak/andstrong/.
For the random-process branch, use stochastic/process/runff_beluga.sh or craft a similar mpirun command pointing at the desired .edp (poissonNL_process2L.edp, etc.). When increasing sigmaG, monitor the PETSc eigenvalues to ensure the assembled matrix remains definite; see process_updates.txt for context.
- Numerical solutions are written as ParaView-ready
.pvd/.vtufiles (deterministic/Linear/U_*,stochastic/rvariable/**/output/). - Time-to-solution and iteration counts are echoed to STDOUT/Slurm logs; representative logs are stored under
stochastic/**/weak|stronganddeterministic/NL/error_iter*.dat. - MATLAB scripts (
MGheat.m,MGNL.m,stochastic/**/plot_*.m) recreate the figures used in the accompanying reports. They assume the log files remain in the same directories; update the paths if you relocate the data.
- Indefinite matrices: When the Gaussian input standard deviation grows, PCE systems can become indefinite. Regenerating
Cijkwith the corrected multi-index tables (see comments instochastic/process/process_updates.txt) resolves the issue. - Macro dependencies: Several
.edpfiles rely onmacro_ddm.idpand similar helper files that ship with FreeFEM++. Ensure those are discoverable viaFF_INSTALL_PATH/idp/or adjust yourFF_INCLUDEPATH. - VTK cleanup: Use the provided
clear.shscripts inside stochastic code folders to purge generated helper files and VTK outputs between runs. - Reproducibility: Capture PETSc logs (
-log_view) and VTK snapshots when sweeping processor counts so you can validate both convergence behavior and scaling statistics.
The repository mirrors research snapshots rather than a packaged library. If you extend the solvers (new PDEs, preconditioners, stochastic inputs), keep the following in mind:
- Add a short README inside any new folder summarizing what changed and how to rerun the cases.
- Version-control only the
.edp,.m,.msh, and representative.outfiles. Keep large solver outputs out of the repo or compress them. - When targeting a new cluster, duplicate and adapt the nearest
runff_*.shscript so others can follow the workflow.
Sudhi Sharma P V
sudhisharmapadillath@gmail.com
@phdthesis{vasudevan2023scalable,
title={Scalable Domain Decomposition Methods for Nonlinear and Time-Dependent Stochastic Systems},
author={Vasudevan, Padillath and Sharma, Sudhi},
year={2023},
school={Carleton University}
}

