This is the accompanying code to reproduce the numerical experiments of the paper

Fully discrete analysis of the Galerkin POD neural network approximation
with application to 3D acoustic wave scattering. 2025.
Authors: J. Dölz, F. Henríquez
Submitted to SIAM Journal on Scientific Computing
Arxiv: https://arxiv.org/abs/2502.01859

------------------------------------------------------------------------------

The numerical experiments were performed with

Python 3.9.2
HDF5 1.10.6

and the python packages

numpy 2.0.2
scipy 1.13.1
torch 2.5.1
h5py 3.12.1

------------------------------------------------------------------------------

The directory structure is as follows:
.
├── KL.ipynb                      # Figure 6.3, left
├── NN-L2-convergence.ipynb       # Figure 6.4, lower middle, bottom
├── NN-MSE-convergence.ipynb      # Figure 6.4, top, upper middle
├── NN-training.py                # Implements Galerkin-POD NN, run with runit.sh
├── plots                         # destination directory for *.ipynb
├── POD-ranks.ipynb               # Figure 6.3, right
├── raw-data                      # Directory with raw samples
│   ├── 32ksamples_wave1.hdf      # ├── for wavenumber 1, see below
│   ├── 32ksamples_wave4.hdf      # ├── for wavenumber 4, see below
│   └── KL.hdf                    # └── the KL singular values, see below
├── README                        # this file
├── runit.sh                      # runs NN-training.py
└── training-results              # destination directory for NN-training.py

------------------------------------------------------------------------------

The contents of raw-data/KL.hdf are as follows:

Dataset: Dimension                # Dimension of the KL, here 293
  Shape: ()
  Data Type: int64
Dataset: SingularValues           # Singular values of the KL
  Shape: (293, 1)
  Data Type: float64
Group: input
Dataset: input/KL_degree          # polynomial degree for KL discretization
  Shape: ()
  Data Type: int32
Dataset: input/KL_level           # number of mesh refinements for KL discretization
  Shape: ()
  Data Type: int32
Group: number_of_dofs
Dataset: number_of_dofs/KL        # number of degree of freedoms of KL discretization
  Shape: ()
  Data Type: int32
Group: time
Dataset: time/KL                  # time to compute KL
  Shape: ()
  Data Type: float64

------------------------------------------------------------------------------

The contents of raw-data/32ksamples_wave*.hdf are as follows:

Dataset: Dimension               # Dimension of the KL, here 293
  Shape: ()
  Data Type: int64
Dataset: HaltonPoints            # Halton points corresponding to HaltonSamples
  Shape: (293, 32768)
  Data Type: float64
Dataset: HaltonSamples           # Solution vectors corresponding to HaltonPoints
  Shape: (5376, 32768)
  Data Type: complex128
Dataset: SingularValues           # Singular values of the KL
  Shape: (293, 1)
  Data Type: float64
Group: input
Dataset: input/BEM_degree         # polynomial degree for BEM discretization
  Shape: ()
  Data Type: int32
Dataset: input/BEM_level          # number of mesh refinements for BEM discretization
  Shape: ()
  Data Type: int32
Dataset: input/KL_degree           # number of mesh refinements for KL discretization
  Shape: ()
  Data Type: int32
Dataset: input/KL_level           # number of mesh refinements for KL discretization
  Shape: ()
  Data Type: int32
Dataset: input/wavenumber         # used wavenumber
  Shape: ()
  Data Type: complex128
Group: number_of_dofs
Dataset: number_of_dofs/KL        # number of degree of freedoms of KL discretization
  Shape: ()
  Data Type: int32
Dataset: number_of_dofs/samples   # number of degree of freedoms of BEM discretization
  Shape: ()
  Data Type: int32
Group: time
Dataset: time/KL                  # time to compute KL
  Shape: ()
  Data Type: float64
Dataset: time/sampling            # time for sampling process
  Shape: ()
  Data Type: float64

