%% LyX 2.3.0dev created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[10pt,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{geometry}
\geometry{verbose,lmargin=2cm,rmargin=2cm}
\synctex=-1
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\numberwithin{equation}{section}
\numberwithin{figure}{section}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\pdfoutput=1

\usepackage{amsmath, amsthm, amssymb, amsfonts}
\usepackage{bbm}
\usepackage{bbold}
\usepackage[basic]{complexity}
\usepackage[pdftex,bookmarks,colorlinks]{hyperref}
\usepackage[shortlabels]{enumitem}
\usepackage{color}
\usepackage{fancyhdr}
\usepackage{algorithmic}
\usepackage[ruled]{algorithm}

%\setlength{\topmargin}{-1in}
%\setlength{\oddsidemargin}{0 in}
%\setlength{\evensidemargin}{0 in}
%\setlength{\textwidth}{6.5 in}
%\setlength{\textheight}{8.5 in}
%\setlength{\headsep}{0.75 in}
%\setlength{\parindent}{0 in}
%\setlength{\parskip}{0.05 in}

\renewcommand{\baselinestretch}{1.10}

%%---------------------------------------------------------------------------
%%      Margins:
%%---------------------------------------------------------------------------
\oddsidemargin 0in \evensidemargin 0in \topmargin -0.5in
\headheight 0.25in \headsep 0.25in
\textwidth 6.5in \textheight 9in %\marginparsep 0pt \marginparwidth 0pt
\parskip 1.5ex \parindent 0ex \footskip 20pt

%%---------------------------------------------------------------------------
%%      Fonts:
%%---------------------------------------------------------------------------
\newfont{\bssten}{cmssbx10}
\newfont{\bssnine}{cmssbx10 scaled 900}
\newfont{\bssdoz}{cmssbx10 scaled 1200}
\newfont{\bssftn}{cmssbx10 scaled 1400}

\usepackage{sectsty}
\sectionfont{\bssdoz}
\subsectionfont{\bssten}

%%---------------------------------------------------------------------------
%%      Header/Footer:
%%---------------------------------------------------------------------------
\pagestyle{fancy}
\fancyhf{}
%\fancyhead[C]{\bssnine <<HEADER>>}
%\fancyhead[R]{\bssnine \arabic{page}}
\fancyfoot[C]{\bssnine \arabic{page}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

%%---------------------------------------------------------------------------
%%      Math operators:
%%---------------------------------------------------------------------------
%\DeclareMathOperator*{\argmaxTex}{arg\,max}
%\DeclareMathOperator*{\argminTex}{arg\,min}
%\DeclareMathOperator*{\signTex}{sign}
%\DeclareMathOperator*{\rankTex}{rank}
%\DeclareMathOperator*{\diagTex}{diag}
%\DeclareMathOperator*{\imTex}{im}

%%---------------------------------------------------------------------------
%%      Extra packages:
%%---------------------------------------------------------------------------
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{booktabs}
\usepackage{array,multirow,graphicx}
\usepackage[outdir=./]{epstopdf}
\usepackage{subcaption}
\usepackage{mathabx}
 \usepackage{alltt}
 \usepackage{url}

\makeatother

%%---------------------------------------------------------------------------
%%      Title:
%%---------------------------------------------------------------------------
%\title{\bssftn \vspace{-6ex} Nonlinear Model Reduction in AERO-F 2.0, February 2020 Update \vspace{-2ex}}
\title{\bssftn Nonlinear Model Reduction in AERO-F}
\author{\bssdoz Sebastian Grimberg}
%\date{\vspace{-4ex}}

\begin{document}

%%---------------------------------------------------------------------------
%%      Page formatting:
%%---------------------------------------------------------------------------
\include{general_notation}
\maketitle
%\thispagestyle{empty}
%{\bssten Sebastian Grimberg, April 24, 2019}
\vspace{-12pt}

\newlength{\oparskip}
\setlength{\oparskip}{\parskip}
%\newcommand{\hind}{\hangindent=4ex}
%\newcommand{\dhind}{\hangindent=8ex}
\newcommand{\hind}{\hangindent}
\newcommand{\dhind}{\hangindent}

%%---------------------------------------------------------------------------
%%     Begin document text:
%%---------------------------------------------------------------------------

\section{Object: Problem}

\begin{alltt}
under Problem \{
    ...
    Type = \emph{type-id};
    ...
\}
\end{alltt}

with

\emph{type-id} [\texttt{Steady}]:

\texttt{NonlinearRomPreprocessing} \\
\hind Performs all offline preprocessing for ROM simulations, including those with hyper-reduction.
Typically a single \texttt{NonlinearRomPreprocessing} simulation is used to construct all quantities needed for the online ROM simulation (with or without hyperreduction), though it can be split up as needed.
See \texttt{NonlinearRomPreprocessing}.
\parskip 0ex

\texttt{SteadyNonlinearRom} \\
\hind Online steady-state nonlinear ROM computation.
Is is recommended to set \texttt{Time.Implicit.Type} = \texttt{SpatialOnly} in this case.

\texttt{UnsteadyNonlinearRom} \\
\hind Online unsteady nonlinear ROM computation.

\texttt{AcceleratedUnsteadyNonlinearRom} \\
\hind Online accelerated unsteady nonlinear ROM computation.
See \texttt{Accelerated}.

\texttt{ForcedUnsteadyNonlinearRom} \\
\hind Online nonlinear ROM computation for forced oscillations of a rigid or flexible obstacle.
See \texttt{Forced}.

\texttt{SteadyNonlinearRomPostprocessing} \\
\hind Postprocessing to compute output quantities after an online steady-state nonlinear ROM computation.

\texttt{UnsteadyNonlinearRomPostprocessing} \\
\hind Postprocessing to compute output quantities after an online unsteady nonlinear ROM computation.
\parskip \oparskip

%%

\section{Object: Input}

\begin{alltt}
under Input \{
    ...
    Solution = \emph{solution-str};
    SolutionIndex = \emph{solutionindex-int};
    MultipleSolutionsData = \emph{multisolutionsdata-str};
    ParameterData = \emph{parameterdata-str};
    ParametricDistanceExponent = \emph{patametricdistanceexp-real};
    MaxInterpolatedSolutions = \emph{maxinterpolatedsolutions-int};
    SnapshotReferenceSolution = \emph{snaprefsolution-str};
    SnapshotReferenceSolutionIndex = \emph{snaprefsolutionindex-int};
    StateSnapshotData = \emph{statesnapdata-str};
    SuperStateSnapshotData = \emph{superstatesnapdata-str};
    AdaptiveSnapshotData = \emph{adaptivestatesnapdata-str};
    UnbalancedSnapshotData = \emph{unbalancedstatesnapdata-str};
    ProjectionErrorSnapshotData = \emph{projerrorsnapdata-str};
    MeshSamplingSnapshotData = \emph{meshsamplingsnapdata-str};
    SuperMeshSamplingSnapshotData = \emph{supermeshsamplingsnapdata-str};
    TrainingData = \emph{trainingdata-str};
    ReducedCoorindates = \emph{reducedcoordinates-str};
    GeometryPrefix = \emph{geometryprefix-str};
    InputSampleNodes = \emph{inputsampnodes-str};
    InputSampleWeights = \emph{inputsampweights-str};
    ...
\}
\end{alltt}

with

\emph{solution-str} [\textquotedbl\textquotedbl]: \\
\hind ... When \texttt{Problem.Type} = \texttt{NonlinearRomPreprocessing}, this file is used to specify the desired initial condition for the online ROM simulation.

\emph{solutionindex-int} [1]: \\
\hind Can be used to specify a certain step of the binary file \emph{solution-str} to read.

\emph{multisolutionsdata-str} [\textquotedbl\textquotedbl]: \\
\hind This file is relevant when it is desired to construct an interpolated initial condition for a nonlinear ROM simulation based on a set of solutions corresponding to points in the parameter domain.
This file contains a list of parameters and corresponding solution file names to perform this interpolation.
It is required during both the offline and online nonlinear ROM simulations in order to construct an appropriate initial condition.
The file is formatted as follows:

\parindent=4ex
\hind \emph{numFiles-int}\\
\hind \emph{numParams-int}\\
\emph{solutionFile1-str} \emph{solutionIndex1-int}\\
\emph{firstParamFile1-real}\\
...\\
\emph{lastParamFile1-real}\\
...

with

\dhind \emph{numFiles-int}: \\
Number of binary solution files listed in \emph{multisolutionsdata-str}.

\dhind \emph{numParams-int}:\\
Dimension of the parameter space for the problem under consideration.

\dhind \emph{solutionFile1-str}: \\
Name of the first binary solution file.

\dhind \emph{solutionIndex1-int}: \\
The index, using 1-based indexing, of the solution to read from \emph{solutionFile1-str}.
If this field is left blank, AERO-F will read the first solution from the file.

\dhind \emph{firstParamFile1-real}\\
The first parameter value corresponding to the solution in the first file.

\dhind \emph{lastParamFile1-real}\\
The last parameter value corresponding to the solution in the first file.
\parindent=0ex

\emph{parameterdata-str} [\textquotedbl\textquotedbl]: \\
\hind This file must accompany the file specified by \emph{multisolutionsdata-str} for online nonlinear ROM simulations.
It contains the information related to the queries parameter point at which to form an interpolated initial condition.
It is formatted as follows:

\parindent=4ex
\hind \emph{numParams-int}\\
\emph{firstParam-real}\\
...\\
\emph{lastParam-real}\\

with

\dhind \emph{numParams-int}:\\
Dimension of the parameter space for the problem under consideration.

\dhind \emph{firstParam-real}\\
The first parameter value corresponding to the online queried parameter point.

\dhind \emph{lastParam-real}\\
The last parameter value corresponding to the online queried parameter point.
\parindent=0ex

\emph{patametricdistanceexp-real} [1.0]: \\
\hind Exponent for the inverse-distance-based interpolation scheme used to compute an interpolated initial condition.
 
\emph{maxinterpolatedsolutions-int} [--]: \\
\hind If specified, gives the maximum number of nearest solutions to participate in the interpolation of an initial condition at the parameter point specified in \emph{parameterdata-str}.

\emph{snaprefsolution-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the binary solution file containing the solution to be used as the affine offset when constructing a solution approximation subspace for a nonlinear ROM.
Only relevant when \path{NonlinearRomPreprocessing.ConstructROB.Snapshots.ReferenceState} = \texttt{Input}.

\emph{snaprefsolutionindex-int} [1]: \\
\hind Can be used to specify a certain step of the binary file \emph{snaprefsolution-str} to read.

\emph{statesnapdata-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the ASCII file containing the state snapshot files to be used when constructing a reduced order basis.
This is relevant when  \texttt{Problem.Type} = \texttt{NonlinearRomPreprocessing}.
This file consists of:

\parindent=4ex
\hind \emph{numFiles-int}\\
\emph{snapFilePath1-str} \emph{startSnaps1-int} \emph{endSnaps1-int} \emph{frequency1-int} \emph{weight1-real}\\
...

with

\dhind \emph{numFiles-int}: \\
Number of binary snapshot files listed in \emph{statesnapdata-str}.

\dhind \emph{snapFilePath1-str}:\\
Name of the first binary snapshot file.

\dhind \emph{startSnaps1-int}: \\
AERO-F will read snapshots from \emph{snapFilePath1-str} starting with snapshot \emph{startSnaps1-int}, using 1-based indexing.
Set to 0 or 1 for no truncation.

\dhind \emph{endSnaps1-int}: \\
AERO-F will read snapshots from \emph{snapFilePath1-str} up to, and including, snapshot \emph{endSnaps1-int}.
Set to 0 to read through the end of \emph{snapFilePath1-str}.

\dhind \emph{frequency1-int}: \\
The frequency at which snapshots are read from \emph{snapFilePath1-str} starting at \emph{startSnaps1-int}.

\dhind \emph{weight1-real}: \\
The weight given to all snapshots from \emph{snapFilePath1-str}.
Setting the weight to zero implies a weighting of 1.0 for all snapshots.
\parindent=0ex

\emph{superstatesnapdata-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the ASCII file containing the state snapshot files to be used when constructing a reduced order basis in the PMOR-AMR framework. This file has the same structure as \emph{statesnapdata-str}, however each line in the file corresponds to a snapshot file with a potentially different mesh than the other snapshot files. Thus, reading these files requires loading and unloading the appropriate meshes, which is automatically done for snapshot files specified with this field. Usually, this ASCII file is used to specify snapshots that have been interpolated onto local supermeshes in the PMOR-AMR framework, with each line corresponding to a single local supermesh. This is relevant when  \texttt{Problem.Type} = \texttt{NonlinearRomPreprocessing}.

\emph{adaptivestatesnapdata-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the ASCII file containing the state snapshot files to be used when computing inner products or interpolating snapshots in the PMOR-AMR framework. This file has the same structure as \emph{superstatesnapdata-str}. Usually, this ASCII files is used to specify snapshots generated by the HDM.

\emph{unbalancedstatesnapdata-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the ASCII file containing the unbalanced state snapshot files to be used when constructing a reduced order basis in the PMOR-AMR framework. This file has the same structure as \emph{superstatesnapdata-str}.

\emph{projerrorsnapdata-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the ASCII file containing state snapshot files to be used for relative projection error calculations.
This file has the same format as \emph{statesnapdata-str}.
This is relevant when \texttt{Problem.Type} = \texttt{NonlinearRomPreprocessing} and \path{NonlinearRomPreprocessing.ConstructROB.RelativeProjectionError.ComputeProjectionError} = \texttt{True}.

\emph{meshsamplingsnapdata-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the ASCII file containing state snapshot files to be used for assembling the training data for construction of a reduced mesh required for a hyperreduced ROM simulation.
That is, this file specifies the state snapshots to be used for hyperreduction training using ECSW, or for generating snapshots of the nonlinear residual in order to construct a residual ROB when using the GNAT or least-squares collocation hyperreduction methods.
This file has the same format as \emph{statesnapdata-str}.
This is relevant when \texttt{Problem.Type} = \texttt{NonlinearRomPreprocessing} in one of two cases:

a) \path{NonlinearRomPreprocessing.ConstructReducedMesh.ComputeReducedMesh} = \texttt{True} and \path{TrainingData} = \textquotedbl\textquotedbl, or

b) when  \path{NonlinearRomPreprocessing.ConstructReducedMesh.GenerateTrainingData} = \texttt{True}.

\emph{supermeshsamplingsnapdata-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the ASCII file containing state snapshot files to be used for assembling the training data for construction of a reduced mesh required for a hyperreduced ROM simulation in the PMOR-AMR framework. This file has the same format as \emph{superstatesnapdata-str}.

\emph{trainingdata-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the ASCII file containing residual snapshot files generated in a previous run with \path{NonlinearRomPreprocessing.ConstructReducedMesh.GenerateTrainingData} = \texttt{True} to be used as training data for constructing the reduced mesh required for a hyperreduced ROM simulation. That is, this file specifies the rows of the training matrix to be used for hyperreduction training using  ECSW, or the nonlinear residual vectors in order to construct a residual ROB when using the GNAT or least-squares collocation hyperreduction methods.
This file has the same format as \emph{statesnapdata-str}. This is relevant when \path{NonlinearRomPreprocessing.ConstructReducedMesh.ComputeReducedMesh} = \texttt{True}. 

\emph{reducedcoordinates-str} [\textquotedbl\textquotedbl]: \\
\hind When \texttt{Problem.Type} = \texttt{SteadyNonlinearRomPostprocessing} or \texttt{UnsteadyNonlinearRomPostprocessing}, this entry specifies the ASCII file containing the reduced coordinates written during an online ROM simulation as specified under \texttt{Output.NonlinearROM.ReducedCoordinates}.

\emph{geometryprefix-str} [\textquotedbl\textquotedbl]: \\
\hind ... For online hyperreduced ROM simulations, this entry specifies the prefix name for all files describing the connectivity, geometry, decomposition, CPU map, and distance-to-the-wall generated by SOWER for the \emph{reduced mesh} constructed during a previous run of AERO-F with \texttt{Problem.Type} = \texttt{NonlinearRomPreprocessing}.
These files are written in Ascii XPost format in the location specified by the \texttt{NonlinearRomFileSystem} object.
The same goes for \emph{walldistance-str} and \emph{position-str}, as well as any other input files that correspond to the reduced mesh.

\emph{inputsampnodes-str} [\textquotedbl\textquotedbl]: \\
\hind This file is relevant only when  \texttt{Problem.Type} = \texttt{NonlinearRomPreprocessing} and \path{NonlinearRomPreprocessing.ConstructReducedMesh.ComputeReducedMesh} = \texttt{True}. If \path{NonlinearRomPreprocessing.ConstructReducedMesh.UseInputSamplingSolution} = \texttt{True}, this file must be specified and is used to specify the sample nodes used for constructing the reduced mesh. If \path{NonlinearRomPreprocessing.ConstructReducedMesh.UseInputSamplingSolution} = \texttt{False}, these nodes will be used as hot-start indices to accelerate the convergence of the sampling algorithm. It is formatted as follows:

\hind \emph{numNodes-int}\\
1 \emph{firstGlobalNode-int}\\
...\\
\emph{numNodes-int} \emph{lastGlobalNode-int}\\

with

\dhind \emph{numNodes-int}:\\
The number of nodes specified in the file.

\dhind \emph{firstGlobalNode-int}\\
The global node index of the first specified node.

\dhind \emph{lastGlobalNode-int}\\
The global node index of the last specified node.

\emph{inputsampweights-str} [\textquotedbl\textquotedbl]: \\
\hind This file is relevant only when \path{NonlinearRomPreprocessing.ConstructReducedMesh.Type} = \texttt{SamplingWeighting}. If \path{NonlinearRomPreprocessing.ConstructReducedMesh.UseInputSamplingSolution} = \texttt{True}. this file must be specified and is used to specify the sample weights used for constructing the reduced mesh, corresponding to the sample nodes specified under \texttt{InputSampleNodes}, and should follow the same sequential ordering. It is formatted as follows:

\hind \emph{numWeights-int}\\
1 \emph{firstWeight-real}\\
...\\
\emph{numWeights-int} \emph{lastWeight-real}\\

with

\dhind \emph{numWeights-int}:\\
The number of nodes specified in the file.

\dhind \emph{firstWeight-real}\\
The first specified weight.

\dhind \emph{lastWeight-real}\\
The last specified weight.
%%

\section{Object: Output}

\begin{alltt}
under Output \{
    ...
    under NonlinearROM \{ ... \}
    ...
\}
\end{alltt}

with

\texttt{NonlinearROM}: \\
\hind Specifies the outputs related to nonlinear ROM simulations.

%%

\section{Object: NonlinearROM}

\begin{alltt}
under NonlinearROM \{ ... \}
    Prefix = \emph{prefix-str};
    StateVector = \emph{statevector-str};
    ResidualVector = \emph{residualvector-str};
    Frequency = \emph{frequency-int};
    OutputResidualSnapshotData = \emph{outputresidualsnapshotdata-flag};
    ReducedCoordinates = \emph{reducedcoordinates-str};
    ReducedResidual = \emph{reducedresidual-str};
\}
\end{alltt}

with

\emph{prefix-str} [\textquotedbl\textquotedbl]: \\
\hind String that is prefixed to all nonlinearROM output file names.

\emph{statevector-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the binary file containing the state vector snapshots collected from a high-dimensional AERO-F simulation.
These state snapshots are stored in nondimensional, conservative form.
This is relevant when \texttt{Problem.Type} = \texttt{Steady}, \texttt{Unsteady}, \texttt{AcceleratedUnsteady}, or \texttt{Forced}.

\emph{residualvector-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the binary file containing the residual vector snapshots generated for purpose hyperreduction training.
For ECSW, these are blocks of the nodal contribution to the projected nonlinear residual. For GNAT or least-squares collocation hyperreduction, these are vectors of the nodal contributions to the full-dimensional nonlinear residual.
This is relevant when \texttt{Problem.Type} = \texttt{NonlinearRomPreProcessing} and \path{NonlinearRomPreprocessing.ConstructReducedMesh.GenerateTrainingData} = \texttt{True}.


\emph{frequency-int} [0]: \\
\hind The frequency (every so many time-iterations) at which snapshot files are written.
If the frequency is set to zero, a snapshot file is written to disk at the last time-iteration.
When the frequency is set to a nonzero value, the snapshots are also written at the last time-iteration.

\emph{outputresidualsnapshotdata-flag} [\texttt{False}]: \\
\hind This flag controls the writing to disk of auxiliary quantities used to construct residual training snapshots for constructing a hyperreduced ROM.
These files are placed in the same location as specified by \emph{statevector-str} with certain hard-coded suffixes and are read subsequently during a simulation when \texttt{Problem.Type} = \texttt{NonlinearRomPreprocessing}.

\texttt{True} \\
\hind In this case, the auxiliary information is written to disk.
\parskip 0ex

\noindent \texttt{False} \\
\hind In this case, the auxiliary information is not written to disk.
\parskip \oparskip

\emph{reducedcoordinates-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the ASCII file written during an online ROM simulation which contains a set of reduced coordinates for every time-step, as well as cluster information.
This can be used for any online ROM simulation but is required later as input for the postprocessing of a hyperreduced ROM simulation.

\emph{reducedresidual-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the ASCII file written during an online ROM simulation which contains the projected residual $W^T r$ from the final Newton iteration of each time-step, as well as cluster information.

%%

\section{Object: NonlinearRomFilesystem}

Due to the large number of files required for nonlinear ROM simulations, this object seeks to streamline the process for the user by limiting the amount of filenames to specify at each stage of the offline and online process.
Furthermore, for nonlinear ROM simulations, many files are used as both inputs and outputs depending on the stage and thus do not necessarily belong under the \texttt{Input} or \texttt{Output} objects uniquely.

\begin{alltt}
under NonlinearRomFilesystem \{
    Prefix = \emph{prefix-str};
    TopLevelDirectory = \emph{topleveldirectory-str};
    ClusterDirectory = \emph{clusterdirectory-str};
    NumClusters = \emph{numclusters-int};
    DuplicateSnapshtos = \emph{duplicatesnaps-flag};
    under Files \{
        StatePrefix = \emph{stateprefix-str};
        ResidualPrefix = \emph{residualprefix-str};
        ReducedMeshPrefix = \emph{reducedmeshprefix-str};
        StateBasis = \emph{statebasis-str};
        StateBasisReference = \emph{statebasisref-str};
        GNATMatrix = \emph{gnatmatrix-str};
    \}
\}
\end{alltt}

with

\emph{prefix-str} [\textquotedbl\textquotedbl]: \\
\hind String that is prefixed to \emph{topleveldirectory-str}.

\emph{topleveldirectory-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the top level directory for the nonlinear ROM filesystem.

\emph{clusterdirectory-str} [\textquotedbl\textquotedbl]: \\
\hind Prefix for all cluster directories which are subdirectories of \emph{topleveldirectory-str}.
AERO-F will automatically append a unique integer identifier for each separate cluster directory.

\emph{numclusters-int} [1]: \\
\hind Number of piecewise affine, local subspace approximations to construct.
The choice \texttt{NumClusters} = 1 indicates a global subspace approximation.

\emph{dubplicatesnaps-flag} [\texttt{False}]: \\
\hind This flag controls whether or not to duplicate the original snapshot files after clustering.

\texttt{True} \\
\hind Duplicate original snapshot files, organizing them by cluster.
\parskip 0ex

\texttt{False} \\
\hind Do not duplicate original snapshot files, instead writing to disk a mapping of the storage location on disk of each snapshot for each cluster.
\parskip \oparskip

\emph{stateprefix-str} [\textquotedbl\textquotedbl]: \\
\hind Prefix for all files generated related to the state snapshots and subspace approximation, including potentially multiple ROBs.

\emph{residualprefix-str} [\textquotedbl\textquotedbl]: \\
\hind Prefix for all files generated related to the residual ROB.
Only relevant for GNAT and possibly least-squares collocations hyperreduced ROMs.

\emph{reducedmeshprefix-str} [\textquotedbl\textquotedbl]: \\
\hind Prefix for all files generated related to the reduced mesh and online hyperreduced ROM computations.

\emph{statebasis-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the binary file containing the state ROB.
In general, \emph{statebasis-str} only needs to be specified for an online hyperreduced ROM simulation, where it should contain the name of the files generated by SOWER corresponding to the sampling of the high-dimensional state ROBs on the \emph{reduced mesh}.

\emph{statebasisref-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the binary file containing the affine offsets for each state ROB.
Similar to \emph{statebasis-str}, \emph{statebasisref-str} only needs to be specified for an online hyperreduced ROM simulation, where it should contain the name of the files generated by SOWER corresponding to the sampling of the high-dimensional affine offsets on the \emph{reduced mesh}.

\emph{gnatmatrix-str} [\textquotedbl\textquotedbl]: \\
\hind Name of the binary file containing the gappy POD matrix for online hyperreduced ROM simulations using the GNAT hyperreduction method.
This file is the generated by SOWER corresponding to the \emph{reduced mesh}.

%%

\section{Object: NonlinearRomPreprocessing}

This object is relevant only in the case when \texttt{Problem.Type} = \texttt{NonlinearRomPreprocessing}.

\begin{alltt}
under NonlinearRomPreprocessing \{
    under ConstructROB \{ ... \}
    under ConstructReducedMesh \{ ... \}
    under AdaptiveROM \{ ... \}
\}
\end{alltt}

with

\texttt{ConstructROB}: \\
\hind Controls the clustering of snapshots and construction of the solution approximation subspace.

\texttt{ConstructReducedMesh}: \\
\hind Controls the reduced mesh construction and all preprocessing related to hyperreduced ROM simulations.

\texttt{AdaptiveROM}: \\
\hind Controls all ROM preprocessing details related to the utilization of snapshots generated with AMR.

%%

\subsection{Object: ConstructROB}

\begin{alltt}
under ConstructROB \{ ... \}
    ProjectInitialCondition = \emph{projectic-flag};
    PreprocessForProjections = \emph{preprocessproj-flag};
    under Clustering \{ ... \}
    under StateROB (or ResidualROB) \{
        under Snapshots \{ ... \}
        under Compression \{ ... \}
    \}
    under RelativeProjectionError \{ ... \}
\}
\end{alltt}

with

\emph{projectic-flag} [\texttt{False}]: \\
\hind This flag controls the pre-computation of the ROM initial condition or quantities related to the interpolation of multiple initial conditions in the online evaluation of a ROM.
During an online nonlinear ROM computation, AERO-F automatically loads the files pre-computed by this command for the nonlinear ROM initial condition (the filename given by \texttt{Input.Solution} is ignored).

\texttt{True} \\
\hind Pre-computations such as the projection of the high-dimensional initial condition are performed.
\parskip 0ex

\texttt{False} \\
\hind No pre-computations are performed.
\parskip \oparskip

\emph{preprocessproj-flag} [\texttt{False}]: \\
\hind This flag controls the pre-computation of the various quantities used in the fast switching between local subspace approximations in an online local ROM simulation.
Thus, this flag is only relevant when \texttt{NonlinearRomFilesystem.NumClusters} $>1$.

\texttt{True} \\
\hind Pre-computations for fast distance comparisons and fast switching between clusters are performed.
\parskip 0ex

\texttt{False} \\
\hind No pre-computations are performed.
\parskip \oparskip

\texttt{Clustering}: \\
\hind Controls the clustering of the state snapshots for constructing a local subspace approximation.

\texttt{Snapshots}: \\
\hind Controls the referencing and scaling of the snapshots.

\texttt{Compression}: \\
\hind Controls the compression of snapshots to form an ROB.

\texttt{RelativeProjectionError}: \\
\hind Controls the computation of the relative projection error to evaluate the accuracy of a constructed subspace approximation.

%%

\subsubsection{Object: Clustering}

The clustering procedure uses the $k$-means algorithm to cluster the snapshots into the number of clusters specified by \texttt{NonlinearRomFileSystem.NumClusters}.

\begin{alltt}
under Clustering \{
    UseExistingClusters = \emph{useexistingclusters-flag};
    PercentOverlap = \emph{percentoverlap-real};
    KMeansMaxIterations = \emph{kmeansmaxit-int};
    KmeansRandomSeed = \emph{kmeansrandseed-int};
    MinClusterSize = \emph{minclustersize-int};
\}
\end{alltt}

with

\emph{useexistingclusters-flag} [\texttt{False}]: \\
\hind When set to \texttt{True}, the computation of clusters is skipped and an existing clustering from disk is used.

\texttt{True} \\
\hind Clustering computations are skipped, using instead an existing clustering stored in the \texttt{NonlinearRomFilesystem}.
\parskip 0ex

\texttt{False} \\
\hind Clustering computations are performed and a new clustering is constructed and written to disk.
\parskip \oparskip

\emph{percentoverlap-real} [10.0]: \\
\hind After clustering the state snapshots, the initially disjoint clustering can be adjusted with the goal of sharing snapshots close to cluster boundaries between the two neighboring clusters.
This value specifies a percentage of each neighbor's clusters to add to produce overlap.

\emph{kmeansmaxit-int} [100]: \\
\hind Maximum number of iterations for the $k$-means clustering algorithm.

\emph{kmeansrandseed-int} [--]: \\
\hind Random seed provided to select the initial cluster centroids for the $k$-means algorithm.
This is useful if seeking to reproduce a previously computed clustering for testing purposes.

\emph{minclustersize-int} [1]:
\hind Any clusters at the termination of $k$-means with size less than \emph{minclustersize-int} will be assimilated into the nearest neighboring cluster.

%%

\subsubsection{Object: Snapshots}

\begin{alltt}
under Snapshots \{
    NormalizeSnaps = \emph{normalizesnaps-flag};
    ReferenceState = \emph{refstate-id};
\}
\end{alltt}

with

\emph{normalizesnaps-flag} [\texttt{False}]: \\
\hind Controls the normalization of snapshots before compression.

\texttt{True} \\
\hind Snapshots are normalized.
\parskip 0ex

\texttt{False} \\
\hind Snapshots are not normalized.
\parskip \oparskip

\emph{refstate-id} [\texttt{None}]: \\
\hind Controls the reference state used to construct each affine subspace approximation.
This flag is only relevant under \texttt{StateROB} and not to be used under \texttt{ResidualROB}.

\texttt{None} \\
\hind The affine offset is set to zero, and thus a linear subspace approximation is constructed.
\parskip 0ex

\texttt{Input} \\
\hind The solution vector specified by \texttt{Input.SnapshotReferenceSolution} and \texttt{Input.SnapshotReferenceSolutionIndex} is used as the affine offset for all clusters.
\parskip 0ex

\texttt{Center} \\
\hind The centroid of all snapshots within each cluster is used as the affine offset for that cluster.
This option is recommended when constructing a piecewise affine, local subspace approximation.
\parskip 0ex

\texttt{Initial} \\
\hind The first snapshot within each cluster is used as the affine offset for that cluster.
\parskip \oparskip

%%

\subsubsection{Object: Compression}

\begin{alltt}
under Compression \{
    ComputePOD = \emph{computepod-flag};
    PODMethod = \emph{podmethod-id};
    MinBasisSize = \emph{minbasissize-int};
    MaxBasisSize = \emph{maxbasissize-int};
    MaxEnergyRetained = \emph{maxenergyretained-real};
    SingularValueTolerance = \emph{singvaltolerance-real};
\}
\end{alltt}

with

\emph{computepod-flag} [\texttt{False}]: \\
\hind This flag controls whether to perform POD computations for a set of snapshots.

\texttt{True} \\
\hind Compute the POD and construct one or potentially more ROBs.
\parskip 0ex

\texttt{False} \\
\hind No POD computations are performed.
\parskip \oparskip

\emph{podmethod-id} [\texttt{ScalapackSVD}]: \\
\hind Controls which algorithm to use when computing the POD.

\texttt{ScalapackSVD} \\
\hind ScaLAPACK's SVD solver is employed for POD.
This method requries compilation with the ScaLAPACK libraries.
\parskip 0ex

\texttt{RSVD} \\
\hind An R-SVD algorithm based on first computing a QR decomposition followed by a serial SVD is employed.
\parskip \oparskip

\emph{minbasissize-int} [1]: \\
\hind Minimum number of vectors to retain after computing the POD.
If \emph{minbasissize-int} is larger than the number of columns in the snapshot matrix, that number is used instead.

\emph{maxbasissize-int} [--]: \\
\hind Maximum number of vectors to retain after computing the POD.

\emph{maxenergyretained-real} [1.0]: \\
\hind Singular value energy threshold for specifying the number of POD vectors to retain.

\emph{singvaltolerance-real} [\texttt{MachinePrecision}]: \\
\hind Alternative stopping criterion to determine how many POD vectors to retain.

%%

\subsubsection{Object: RelativeProjectionError}

\begin{alltt}
under RelativeProjectionError \{
    ComputeProjectionError = \emph{relativeprojerror-flag};
    MinimumDimension = \emph{mindimension-int};
    MaximumDimension = \emph{maxdimension-int};
    MaximumEnergy = \emph{maxenergy-real};
\}
\end{alltt}

with

\emph{relativeprojerror-flag} [\texttt{False}]: \\
\hind This flag controls whether to compute the projection error of a set of snapshots using a previously computed subspace approximation.

\texttt{True} \\
\hind Compute the projection error for the set of snapshots specified under \texttt{Input.ProjectionErrorSnapshotData}.
\parskip 0ex

\texttt{False} \\
\hind Do not compute the projection error.
\parskip \oparskip

\emph{mindimension-int} [1]: \\
\hind Minimum dimension of the state ROB to use for relative projection error computations.

\emph{maxdimension-int} [--]: \\
\hind Maximum dimension of the state ROB to use for relative projection error computations.

\emph{maxenergy-real} [1.0]: \\
\hind Singular value energy threshold tolerance for specifying the size of the state ROB to use for relative projection error computations.

%%

\subsection{Object: ConstructReducedMesh}

This section details the offline procedures related to construction of a \emph{hyperreduced} nonlinear ROM.
In the case where \texttt{NonlinearRomFilesystem.NumClusters} $>1$ (i.e. a local subspace approximation is employed), AERO-F constructs a single reduced mesh applicable for all clusters rather than constructing a unique reduced mesh for each local affine subspace.
The user is reminded that following this step, it is required to preprocess the relevant XPost outputs using SOWER to use as inputs for an online hyperreduced ROM simulation.
These typically include the reduced mesh geometry, as well as the state basis, state basis reference, wall distance, and potentially GNAT matrix files corresponding to the reduced mesh.

\begin{alltt}
under ConstructReducedMesh \{ ... \}
    GenerateTrainingData = \emph{generatetraining-flag};
    ComputeReducedMesh = \emph{computereducedmesh-flag};
    UseInputSamplingSolution = \emph{useinptsamplesol-flag};
    Type = \emph{type-id};
    IncludeAllLiftDragFaces = \emph{includeallliftdragfaces-flag};
    IncludeAllPeriodicFaces = \emph{includeallperiodicfaces-flag};
    StackedTraining = \emph{stackedtraining-flag};
    MinimumDimensionStateBasis = \emph{mindimensionstatebasis-int};
    MaximumDimensionStateBasis = \emph{maxdimensionstatebasis-int};
    MaximumEnergyStateBasis = \emph{maxenergystatebasis-real};
    MinimumDimensionResidualBasis = \emph{mindimensionresidualbasis-int};
    MaximumDimensionResidualBasis = \emph{maxdimensionresidualbasis-int};
    MaximumEnergyResidualBasis = \emph{maxenergyresidualbasis-real};
    under SamplingWeighting \{ ... \}
    under GappyPOD \{ ... \}
\}
\end{alltt}

with

\emph{generatetraining-flag} [\texttt{False}]: \\

\hind This flag control whether to generate training data and write it to disk to be used to construct a reduced mesh in a future run.

\texttt{True} \\
\hind Training data is generated from the state snapshots specified in \path{Input.MeshSamplingSnapshotData} and written to disk. When constructing a parametric ROM, it is recommended to use this flag to generate all training data prior to a run with \texttt{ComputeReducedMesh = True}, such that the residual for each set of state snapshots is evaluated at it's respective parameter instance.

\parskip 0ex

\texttt{False} \\
\hind Training data is not generated and written to disk.

\parskip \oparskip

\emph{computereducedmesh-flag} [\texttt{False}]: \\
\hind This flag controls whether to construct a reduced mesh for hyperreduced ROM computations.

\texttt{True} \\
\hind Reduced mesh computations are performed on training data specified in \path{Input.TrainingData}. If no file is specified in \path{Input.TrainingData}, then the hyperreduction training data is also generated and stored in memory.
\parskip 0ex

\texttt{False} \\
\hind Reduced mesh computations are not performed.
\parskip \oparskip

\emph{useinpsamplesol-flag} [\texttt{False}]: \\
\hind This flag controls whether to use a user-specified mesh sampling solution to construct a reduced mesh for hyperreduced ROM computations. This is only relevant when when \texttt{ComputeReducedMesh} = \texttt{True}.

\texttt{True} \\
\hind The sample nodes specified in \path{Input.InputSampleNodes} are used for construction of the reduced mesh. In this case, the mesh sampling algorithm is not performed and no training data generation is necessary. If \texttt{Type = SamplingWeighting}, \path{Input.InputSampleWeights} must also be specified. 
\parskip 0ex

\texttt{False} \\
\hind A user-specified sampling solution is not used for construction of the reduced mesh, and the mesh sampling algorithm is performed. If \path{Input.InputSampleNodes} is specified, the nodes are used to hot-start the mesh sampling algorithm to accelerate convergence.

\parskip \oparskip

\emph{type-id} [\texttt{SamplingWeighting}]: \\
\hind This flag controls whether to construct a reduced mesh for hyperreduced ROMs based on the gappy POD, that is those using the GNAT or least-squares collocation hyperreduction methods, or whether to preprocess for the ECSW hyperreduction method.

\texttt{SamplingWeighting} \\
\hind Run hyperreduction preprocessing for the ECSW hyperreduction method.
\parskip 0ex

\texttt{GappyPOD} \\
\hind Construct a reduced mesh and perform hyperreduction preprocessing for GNAT or least-squares collocation hyperreduction methods.
\parskip \oparskip

\emph{includeallliftdragfaces-flag} [\texttt{False}]: \\
\hind When true, this flag specifies to include in the reduced mesh all faces involved in the computation of lift and drag so that no additional postprocessing step is required to compute these quantities following a hyperreduced ROM simulation.

\texttt{True} \\
\hind Augment the reduced mesh with all lift and drag faces.
\parskip 0ex

\texttt{False} \\
\hind Do not augment the reduced mesh with all lift and drag faces.
\parskip \oparskip

\emph{includeallperiodicfaces-flag} [\texttt{False}]: \\
\hind Similar to the \texttt{IncludeAllLiftDragFaces} keyword, this flag specifies whether to include in the reduced mesh all faces on periodic boundaries.
It is useful for testing the construction of a reduced mesh for a problem involving periodic boundary conditions.

\texttt{True} \\
\hind Augment the reduced mesh with all faces on periodic boundaries.
\parskip 0ex

\texttt{False} \\
\hind Do not augment the reduced mesh with all faces on periodic boundaries.
\parskip \oparskip

\emph{stackedtraining-flag} [\texttt{False}]: \\
\hind This flag controls the formulation of the hyperreduction approximation.
By default, when \texttt{StackedTraining} = \texttt{False}, AERO-F computes the hyperreduced approximation of the quantity $W^T(M\dot{u}+f(u))$.
However, in certain cases, it can be desired to modify this formulation.

\texttt{On} \\
\hind In this case, the hyperreduced approximation is split and the quantities $W^T M \dot{u}$ and $W^T f(u)$ are separately approximated.
This can be more accurate and also doubles the amount of training data.
\parskip 0ex

\texttt{Off} \\
\hind In this case, the standard formulation $W^T(M\dot{u}+f(u))$ is used.

\texttt{SpatialOnly} \\
\hind In this case, only the term $W^T f(u)$ is used for training the hyperreduced approximation.
This can be useful for steady-state problems when the online ROM seeks to solve $W^T f(u) = 0$ directly.
\parskip \oparskip

\emph{mindimensionstatebasis-int} [1]: \\
\hind Minimum dimension of the state ROB to use for hyperreduction training computations.

\emph{maxdimensionstatebasis-int} [--]: \\
\hind Maximum dimension of the state ROB to use for hyperreduction training computations.

\emph{maxenergystatebasis-real} [1.0]: \\
\hind Singular value energy threshold tolerance for specifying the size of the state ROB to use for hyperreduction training computations.

\emph{mindimensionresidualbasis-int} [1]: \\
\hind Minimum dimension of the residual ROB to use for hyperreduction training computations.
This is only used when \texttt{Type} = \texttt{GappyPOD}.

\emph{maxdimensionresidualbasis-int} [--]: \\
\hind Maximum dimension of the residual ROB to use for hyperreduction training computations.
This is only used when \texttt{Type} = \texttt{GappyPOD}.

\emph{maxenergyresidualbasis-real} [1.0]: \\
\hind Singular value energy threshold tolerance for specifying the size of the residual ROB to use for hyperreduction training computations.
This is only used when \texttt{Type} = \texttt{GappyPOD}.

\texttt{SamplingWeighting}: \\
\hind Specify the parameters required when sampling the high-dimensional mesh using the ECSW method.

\texttt{GappyPOD}: \\
\hind Specify the parameters required when sampling the high-dimensional mesh using a gappy POD approach.

%%

\subsubsection{Object: SamplingWeighting}

\begin{alltt}
under SamplingWeighting \{
    Algorithm = \emph{algorithm-id};
    Solver = \emph{solver-id};
    SamplingTolerance = \emph{samplingtol-real};
    MaxSizeRatio = \emph{maxsizeratio-real};
    MaxItsRatio = \emph{maxitsratio-real};
    UseColumnScaling = \emph{usecolumnscaling-flag};
    UseRowScaling = \emph{userowscaling-flag};
    UseCentering = \emph{usecentering-flag};
    DecomposeBoundaryConditions = \emph{decomposeboundaryconditions-flag};
    UseGlobalTolerance = \emph{useglobaltol-flag};
    Projection = \emph{projection-id};
\}
\end{alltt}

with

\emph{algorithm-id} [\texttt{NNLS}]: \\
\hind Controls which convex approximation of the mesh sampling problem to use.

\texttt{NNLS} \\
\hind In this case, the problem is posed as a non-negative least squares problem with an accuracy constraint for early termination.
\parskip 0ex

\texttt{PFP} \\
\hind In this case, the polytope faces pursuit algorithm is used to solve the convex basis pursuit problem.
\parskip \oparskip

\emph{solver-id} [\texttt{CG}]: \\
\hind Controls which solver to use for solving the convex optimization algorithm given by \texttt{Algorithm}.

\texttt{CG} \\
\hind In this case, a parallelized directional pursuit solver based on non-negative conjugate gradients is employed.
\parskip 0ex

\texttt{QR} \\
\hind In this case, a solver based on a parallelized, updatable QR factorization is employed.
This method requires compilation with the ScaLAPACK libraries and is most similar to the original Lawson and Hanson algorithm.
\parskip \oparskip

\emph{samplingtol-real} [1.0e-6]: \\
\hind Relative sampling error tolerance for the mesh sampling problem.

\emph{maxsizeratio-real} [1.0]: \\
\hind The maximum cardinality of the sample entity set is given as $\min(m, \emph{maxsizeratio-real} \times n)$ where the ECSW training matrix $G$ is of dimension $m \times n$.

\emph{maxitsratio-real} [3.0]: \\
\hind The maximum number of iterations for the mesh sampling solver is given by $\emph{maxitsratio-real} \times n$, where $n$ is the number of columns in the ECSW training matrix $G$.

\emph{usecolumnscaling-flag} [\texttt{True}]: \\
\hind This flag controls the scaling each column of each column of the ECSW training matrix $G$ to have unit norm.
Doing so usually results in faster convergence of the solver, but can lead to massively disparate sample weights so should be used with caution.

\texttt{True} \\
\hind Scale the columns of $G$ to have unit norm.
\parskip 0ex

\texttt{False} \\
\hind Do not scale the columns of $G$.
\parskip \oparskip

\emph{userowscaling-flag} [\texttt{False}]: \\
\hind This flag controls the scaling of each row-wise block of $G$ corresponding to each training snapshot to have the same magnitude.
That is, the row-wise block of $G$ corresponding to each snapshot is divided by the norm of the projected residual for that training snapshot to balance contributions between snapshots.

\texttt{True} \\
\hind Scale the rows of $G$ to balance contributions of each training snapshot.
\parskip 0ex

\texttt{False} \\
\hind Do not scale the rows of $G$.
\parskip \oparskip

\emph{usecentering-flag} [\texttt{False}]: \\
\hind This flag controls whether to center the columns of $G$ such that they have zero mean.

\texttt{True} \\
\hind Center the columns of $G$ to have zero mean.
\parskip 0ex

\texttt{False} \\
\hind Do not center the columns of $G$.
\parskip \oparskip

\emph{decomposeboundaryconditions-flag} [\texttt{False}]: \\
\hind Using this flag, the mesh sampling can be decomposed such that cells of the high-dimensional mesh corresponding to different boundary conditions are sampled independently.
That is, the interior domain cells, wall boundary cells, and farfield cells are sampled independently to ensure that the reduced mesh contains at least one of each boundary condition class.

\texttt{True} \\
\hind Decompose the mesh by boundary condition and perform the mesh sampling independently for each boundary condition class.
\parskip 0ex

\texttt{False} \\
\hind Do not decompose the mesh and sample the entire global mesh at one time.
\parskip \oparskip

\emph{useglobaltol-flag} [\texttt{False}]: \\
\hind This flag is relevant when \texttt{DecomposeBoundaryConditions} = {True}.
It controls whether the converge tolerance should be adjusted to account for the relative contribution of each boundary condition class to the norm of the global residual.

\texttt{True} \\
\hind In this case, the tolerance specified by \emph{samplingtol-real} is used for sampling the mesh corresponding to each boundary condition.
\parskip 0ex

\texttt{False} \\
\hind In this case, the tolerance specified by \emph{samplingtol-real} is adjusted such that the sum of the errors from sampling the mesh for each boundary condition independently can still be shown to be smaller than the tolerance specified by \emph{samplingtol-real}, but generally is larger than if \texttt{UseGlobalTolerance} = \texttt{True}.
\parskip \oparskip

\emph{projection-id} [\texttt{LeastSquaresPetrovGalerkin}]: \\
\hind This flag is relevant training the hyperreduction approximation for an online hyperreduced ROM based on a Galerkin or Petrov-Galerkin projection.

\texttt{LeastSquaresPetrovGalerkin} \\
\hind In this case, the training is performed for the left ROB $W$ constructed via the least-squares Petrov-Galerkin method.
\parskip 0ex

\texttt{Galerkin} \\
\hind In this case, the training is performed for the left ROB $W = V$ corresponding to a Galerkin projection.
\parskip \oparskip

%%

\subsubsection{Object:GappyPOD}

\begin{alltt}
under GappyPOD \{
    MinDimensionGreedyAlgorithm = \emph{mindimensiongreedyalgorithm-int};
    MaxDimensionGreedyAlgorithm = \emph{maxdimensiongreedyalgorithm-int};
    DimensionGreedyAlgorithmFactor = \emph{dimgreedyalgorithmfactor-real};
    MinSampleNodes = \emph{minsamplenodes-int};
    MaxSampleNodes = \emph{maxsamplenodes-int};
    SampleNodesFactor = \emph{samplenodesfactor-real};
    GreedyData = \emph{greedydata-id};
    GreedyLeastSquaresSolver = \emph{greedyleastsquaressolver-id};
    PerformGNATPrepro = \emph{performgnatprepro-flag};
    PseudoInverseLeastSquaresSolver = \emph{pseudoinverseleastsquaressolver-id};
    MinimumNumberSampleNodesOnFarfield = \emph{minnumbersamplenodesonfarfield-int};
    MinimumFractionSampleNodesOnSurface = \emph{minfractionsamplenodesonsurface-real};
    MinimumFractionSampleNodesInTargetRegion = \emph{minfractionsamplenodesintargetregion-real};
    under ReducedMeshTargetRegions \{ ... \}     
\}
\end{alltt}

with

\emph{mindimensiongreedyalgorithm-int} [1]: \\
\hind Minimum number of POD vectors to use in the greedy mesh sampling algorithm.

\emph{maxdimensiongreedyalgorithm-int} [--]: \\
\hind Maximum number of POD vectors to use in the greedy mesh sampling algorithm.

\emph{dimgreedyalgorithmfactor-real} [1.0]: \\
\hind Alternative way to specify the number of POD vectors to use in the greedy mesh sampling algorithm, specified as \emph{dimgreedyalgorithmfactor-real} $\times$ total number of available POD vectors, given by the dimension of the corresponding ROB being used as specified by \texttt{GreedyData}.

\emph{minsamplenodes-int} [1]: \\
\hind minimum number of sample cells to select in the greedy mesh sampling procedure.

\emph{maxsamplenodes-int} [--]: \\
\hind Maximum number of sample cells to select in the greedy mesh sampling procedure.

\emph{samplenodesfactor-real} [1.0]: \\
\hind Maximum number of sample cells to select in the greedy mesh sampling procedure.
If not specified, this value is set to the number of cells in the high-dimensional mesh.

\emph{greedydata-id} [\texttt{ResidualROB}]: \\
\hind Controls which ROB to use as input to the greedy mesh sampling algorithm for selecting the sample mesh cells.

\texttt{ResidualROB} \\
\hind In this case, an ROB for the residual constructed previously (see \texttt{NonlinearRomPreprocessing.ConstructROB.ResidualROB}) is read from disk and used for the mesh sampling.
\parskip 0ex

\texttt{StateROB} \\
\hind In this case, the state ROB is read from disk and used for the mesh sampling.
In the case where a local subspace approximation is employed, this option is not supported and it is recommended that the user construct a residual ROB for hyperreduction training and specify \texttt{GreedyData} = \texttt{ResidualROB}.
\parskip \oparskip

\emph{greedyleastsquaressolver-id} [\texttt{QR}]: \\
\hind Controls which algorithm is used to solve the least-squares problem arising at each iteration of the greedy mesh sampling algorithm.

\texttt{QR} \\
\hind The least-squares solution is obtained using a QR factorization approach.
This option requires compilation with the ScaLAPACK libraries.
\parskip 0ex

\texttt{NormalEquations} \\
\hind The normal equations are used to solve each arising least-squares problem.
\parskip \oparskip

\emph{performgnatprepro-flag} [\texttt{False}]: \\
\hind This flag controls whether to compute and write to disk the gappy POD matrix associated with the GNAT hyperreduction method when preprocessing for a GNAT-based hyperreduced ROM.

\texttt{True} \\
\hind Compute the GNAT gappy POD matrix.
\parskip 0ex

\texttt{False} \\
\hind Do not compute the GNAT gappy POD matrix.
\parskip \oparskip

\emph{pseudoinverseleastsquaressolver-id} [\texttt{QR}]: \\
\hind Controls which algorithm is used to compute the Moore-Penrose pseudoinverse as required by the gappy POD matrix.
This option is only relevant when \texttt{PerformGNATPrepro} = \texttt{True}.

\texttt{QR} \\
\hind The Moore-Penrose pseudoinverse of a matrix is obtained using a QR factorization approach.
This option requires compilation with the ScaLAPACK libraries.
\parskip 0ex

\texttt{NormalEquations} \\
\hind The normal equations are used to solve for the Moore-Penrose pseudoinverse of a matrix.
\parskip \oparskip

\emph{minnumbersamplenodesonfarfield-int} [1]: \\
\hind At least this many cells will be sampled from farfield boundaries in the high-dimensional mesh and included in the reduced mesh.

\emph{minfractionsamplenodesonsurface-real} [--]: \\
\hind At least this fraction of the sampled cells will lie on wall boundary surfaces of the high-dimensional mesh.

\emph{minfractionsamplenodesintargetregion-real} [--]: \\
\hind At least this fraction of the sampled cells will lie within the target regions specified under \path{ReducedMeshTargetRegions}.

\texttt{ReducedMeshTargetRegions}: \\
\hind If desired, this object is used to specify target regions of the high-dimensional mesh to sample from when constructing the reduced mesh.
The format for this object is identical to that of \texttt{Space.Fixes}.

%%

\subsection{Object: AdaptiveROM}

\begin{alltt}
under AdaptiveROM \{ ... \}
    GeometryPrefix = \emph{geometryprefix-str};
    UnbalancedPrefix = \emph{unbalancedprefix-str};
    SupermeshPrefix = \emph{supermeshprefix-str};
    InnerProductFilename = \emph{innerproductfilename-str};
    ComputeAROM = \emph{computearom-flag};
    ComputeUnbalanced = \emph{computeunbalanced-flag};
    ComputeL2 = \emph{computel2-flag};
    RecomputeL2 = \emph{recomputel2-flag};
    ComputeSupermesh = \emph{computesupermesh-flag};
    ComputeSubmesh = \emph{computesubmesh-flag};
    SubtractRefStateBeforeL2 = \emph{subtractrefstatebeforel2-flag};
    UseSupermesh = \emph{usesupermesh-flag};
    ApproxType = \emph{approxtype-id};
    BasisComputation = \emph{basiscomputation-id};
    NumLoadedMeshes = \emph{numloadedmeshes-int};
    ReferenceMesh = \emph{referencemesh-int};
    ShiftSnaps = \emph{shiftsnaps-int};
\}
\end{alltt}

with

\emph{geometryprefix-str} [\textquotedbl\textquotedbl]: \\
\hind This entry specifies the prefix name for all of the files describing the connectivity, geometry, decomposition, CPU map, and distance-to-the-wall which are output by Aero-F during an AMR simulation or any simulation which outputs binary files on multiple meshes. To read the mesh files of a particular mesh, the corrrect suffix number is automatically appended at runtime to the filenames in \texttt{Domain::readMesh}.

\emph{unbalancedprefix-str} [\textquotedbl\textquotedbl]: \\
\hind This entry specifies the directory on disk where unbalanced snapshots are stored. The prefix for the files is taken from the end of \texttt{GeometryPrefix}, with the directory path updated at runtime with \texttt{NonlinearRomAdaptive::changeGeometryPrefix}.

\emph{supermeshprefix-str} [\textquotedbl\textquotedbl]: \\
\hind This entry specifies the directory on disk where interpolated supermesh snapshots are stored. The prefix for the files is taken from the end of \texttt{GeometryPrefix}, with the directory path updated at runtime with \texttt{NonlinearRomAdaptive::changeGeometryPrefix}.

\emph{computearom-flag} [\texttt{False}]: \\
\hind This flag activates the modifications to the code relevant for PMOR with AMR-generated snapshots, and should be turned on in this case whenever \texttt{Problem.Type} is set to any of the ROM-related types.

\texttt{True} \\
\hind PMOR-AMR framework is activated.
\parskip 0ex

\texttt{False} \\
\hind Conventional PMOR with a static mesh.
\parskip \oparskip

\emph{computeunbalanced-flag} [\texttt{False}]: \\
\hind This flag activates mesh unbalancing of the meshes associated with the snapshots. Due to AMR load balancing in the HDM, the snapshots have different domain decompositions. This can make the L2 inner product computation expensive. The option allows for enforcing the same domain decomposition on all snapshots a posteriori.

\texttt{True} \\
\hind All meshes and associated snapshots are repartitioned to the domain decomposition of the mesh with index \texttt{ReferenceMesh}.
\parskip 0ex

\texttt{False} \\
\hind No repartitioning performed.
\parskip \oparskip

\emph{computel2-flag} [\texttt{True}]: \\
\hind This flag controls the computation of the inner product matrix between snapshots.

\texttt{True} \\
\hind The inner product matrix is computed.
\parskip 0ex

\texttt{False} \\
\hind The inner product matrix is read from \texttt{InnerProductFilename}.
\parskip \oparskip

\emph{RecomputeL2-flag} [\texttt{False}]: \\
\hind This is an alternative to \texttt{ShiftSnaps}. It recomputes the inner product matrix on the interpolated snapshots, rather than the original snapshots.

\texttt{True} \\
\hind The inner product matrix is recomputed.
\parskip 0ex

\texttt{False} \\
\hind The inner product matrix of the original snapshots is utilized.
\parskip \oparskip

\emph{computesupermesh-flag} [\texttt{False}]: \\
\hind This flag activates the construction of supermeshes, the interpolation of snapshots onto supermeshes, and their output to disk.

\texttt{True} \\
\hind The snapshots are interpolated onto supermeshes and outputted.
\parskip 0ex

\texttt{False} \\
\hind The snapshots are not interpolated onto supermeshes.
\parskip \oparskip

\emph{computesubmesh-flag} [\texttt{False}]: \\
\hind If \texttt{ComputeL2 = True}, this flag activates the more computationally efficient inner product matrix computation based on the discrete dot product of snapshots restricted to the global submesh.

\texttt{True} \\
\hind The inner product matrix is computed with the submesh.
\parskip 0ex

\texttt{False} \\
\hind The inner product matrix is computed with the L2 inner product.
\parskip \oparskip

\emph{subtractrefstatebeforel2-flag} [\texttt{False}]: \\
\hind This flag activates the subtraction of a reference state (the first snapshot) from all snapshots. The motivation for this is to improve the condition number of the inner product matrix computed with the referenced snapshots. Due to AMR, this subtraction requires interpolating the reference state onto the global supermesh. Due to load balancing (see \texttt{ComputeUnbalanced}), MPI data exchange is then required to perform the subtraction.

\texttt{True} \\
\hind The reference state is subtracted from all snapshots before the inner product matrix is computed.
\parskip 0ex

\texttt{False} \\
\hind The reference state is not subtracted from all snapshots before the inner product matrix is computed.
\parskip \oparskip

\emph{usesupermesh-flag} [\texttt{True}]: \\
\hind This flag controls whether the snapshots interpolated onto the supermeshes are used, or if only the inner product matrix is utilized for the POD.

\texttt{True} \\
\hind POD-related quantities such as the basis and reference state are output to disk using the snapshots interpolated onto the supermesh.
\parskip 0ex

\texttt{False} \\
\hind Only the eigendecomposition of the inner product matrix is output to disk. For example, the basis is output only in terms of snapshot coefficients.
\parskip \oparskip

\emph{approxtype-id} [\texttt{State}]: \\
\hind Controls which state variables are used for the L2 inner product.

\texttt{Velocity} \\
\hind The velocity magnitude at each mesh node is utilized.
\parskip 0ex

\texttt{Pressure} \\
\hind The pressure at each mesh node is utilized.
\parskip 0ex

\texttt{Density} \\
\hind The density at each mesh node is utilized.
\parskip 0ex

\texttt{State} \\
\hind The full state at each mesh node is utilized.
\parskip \oparskip

\emph{basiscomputation-id} [\texttt{IPM}]: \\
\hind Controls the method of basis construction used in the PMOR-AMR framework.

\texttt{IPM} \\
\hind The eigendecomposition of the inner product matrix is utilized. This is not recommended when \texttt{ComputeSubmesh = True}.
\parskip 0ex

\texttt{SVD} \\
\hind The SVD of the interpolated snapshots within each snapshot cluster is utilized.
\parskip 0ex

\texttt{RBM} \\
\hind The reduced basis method is utilized, where the basis is set to the full-rank counterpart of the snapshot matrix, determined with the QR decomposition.
\parskip \oparskip

\emph{numloadedmeshes-int} [2]: \\
\hind Number of meshes that can be loaded at once for the L2 inner product computation. Setting this higher will reduce the computation time of the inner product, but will require more runtime memory. This value must be at least 2.

\emph{referencemesh-int} [1]: \\
\hind Mesh index corresponding to the mesh which is used for mesh unbalancing.

\emph{shiftsnaps-int} [0]: \\
\hind This should be set to the number of smoothing iterations done when interpolating the AMR-generated snapshots, which is determined by \texttt{Output.NonlinearROM.Frequency}. The inner product matrix is shifted by this number of indices, and therefore is reduced in dimension by this number of indices as well.

%%

\section{Object: NonlinearRomOnline}

This object is relevant for any online nonlinear ROM simulations as well as during postprocessing for a hyperreduced nonlinear ROM simulation.

\begin{alltt}
under NonlinearRomOnline \{
    Projection = \emph{projection-id};
    SystemApproximation = \emph{systemapproximation-id};
    LeastSquaresSolver = \emph{leastsquaressolver-id};
    MinimumDimension = \emph{mindimension-int};
    MaximumDimension = \emph{maxdimension-int};
    MaximumEnergy = \emph{maxenergy-real};
    FreezeJacobian = \emph{freezejacobian-flag};
    MatrixStorageImplementation = \emph{matrixstorage-flag};
    FastDistanceComparisons = \emph{fastdistance-flag};
\}
\end{alltt}

with

\emph{projection-id} [\texttt{LeastSquaresPetrovGalerkin}]: \\
\hind Controls the type of projection to be used when construction the ROM equations from the associated high-dimensional model.

\texttt{LeastSquaresPetrovGalerkin} \\
\hind In this case, the least-squares Petrov-Galerkin projection is used.
It is the recommended option for all simulations.
\parskip 0ex

\texttt{Galerkin} 
\hind In this case, the Galerkin projection with left ROB $W = V$ is used to construct the ROM.
\parskip \oparskip

\emph{systemapproximation-id} [\texttt{None}]: \\
\hind This flag controls the hyperreduction of the associated ROM.

\texttt{None} \\
\hind In this case, no hyperreduction method is employed.
Thus, the resulting nonlinear ROM simulation cannot be expected to deliver substantial speedups relative to the high-dimensional model.
\parskip 0ex

\texttt{ECSW} \\
\hind The ECSW hyperreduction method is employed.
In this case, it is expected that during the offline phase, \path{NonlinearRomPreprocessing.ConstructReducedMesh.Type} was set to \texttt{SamplingWeighting}.

\texttt{Collocation} \\
\hind The least-squares collocation hyperreduction method is employed.
In this case, it is expected that during the offline phase, \path{NonlinearRomPreprocessing.ConstructReducedMesh.Type} was set to \texttt{GappyPOD}.

\texttt{GNAT} \\
\hind The GNAT hyperreduction method is employed.
In this case, it is expected that during the offline phase, \path{NonlinearRomPreprocessing.ConstructReducedMesh.Type} was set to \texttt{GappyPOD} with \path{NonlinearRomPreprocessing.ConstructReducedMesh.GappyPOD.PerformGNATPrepro} = \texttt{True}.
Moreover, for this option, the filename \texttt{NonlinearRomFileSystem.Files.GNATMatrix} must be specified.
\parskip \oparskip

\emph{leastsquaressolver-id} [\texttt{QR}]: \\
\hind Controls which algorithm is used to solve the least-squares problem arising at each Gauss-Newton iteration, or equivalently how to construct the reduced Newton iterations.

\texttt{QR} \\
\hind The least-squares solution is obtained using a QR factorization approach.
This option requires compilation with the ScaLAPACK libraries, and is only applicable when \texttt{Projection} = \texttt{LeastSquaresPetrovGalerkin}.
\parskip 0ex

\texttt{NormalEquations} \\
\hind The normal equations are used to solve each arising least-squares problem.
This option is equally applicable if \texttt{Projection} = \texttt{LeastSquaresPetrovGalerkin} or \texttt{Galerkin}.
\parskip \oparskip

\emph{mindimension-int} [1]: \\
\hind Minimum dimension of the state ROB to use for relative projection error computations.

\emph{maxdimension-int} [--]: \\
\hind Maximum dimension of the state ROB to use for relative projection error computations.

\emph{maxenergy-real} [1.0]: \\
\hind Singular value energy threshold tolerance for specifying the size of the state ROB to use for relative projection error computations.

\emph{freezejacobian-flag} [\texttt{False}]: \\
\hind For further improvement of computational performance, the Jacobian matrix can be computed once at the beginning of each computational time-step and reused for all Newton iterations associated with that time-step.
This means products of the form $W^T J V$ (or their hyperreduced approximation) can be assembled only once for each time-step. 

\texttt{True} \\
\hind Compute the Jacobian at the beginning of each computational time-step and reuse it for all Newton iterations associated with that time-step, automatically avoiding recomputing matrix products involving the Jacobian and delivering a reduction in computational cost at the expense of some accuracy loss due to using a defect Jacobian.
\parskip 0ex

\texttt{False} \\
\hind Recompute the Jacobian matrix at each Newton iteration of each computational time-step.
This is the most accurate approach.
\parskip \oparskip

\emph{matrixstorage-flag} [\texttt{New}]: \\
\hind This flag controls the underlying storage architecture of an ROB.

\texttt{New} \\
\hind This triggers the new architecture for storing an ROB.
It is not possible to be used with the option \texttt{Time.Implicit.MatrixVectorProduct} = \texttt{FiniteDifference}, however is suggested for all other options to provide faster computations.
In addition, when \texttt{Time.Implicit.MatrixVectorProduct} = \texttt{Exact}, it is suggested to turn on \texttt{Time.Implicit.ExactImplementation} = \texttt{New}.
\parskip 0ex

\texttt{Old} \\
\hind This triggers the old storage of an ROB and is the only option when \texttt{Time.Implicit.MatrixVectorProduct} = \texttt{FiniteDifference}.
\parskip \oparskip

\emph{fastdistance-flag} [\texttt{On}]: \\
\hind This flag is relevant only when a local subspace approximation is used, that is \path{NonlinearRomFilesystem.NumClusters} $>1$.
It controls whether to use pre-computed quantities for to perform fast distance comparisons and fast projections.
These quantities are expected to have been pre-computed during the preprocessing stage by specifying \texttt{NonlinearRomPreprocessing.ComputeROB.PreprocessForProjections} = \texttt{True}.

\texttt{On} \\
\hind Use pre-computed quantities for fast distance comparisons and fast projections.
\parskip 0ex

\texttt{Off} \\
\hind Do not use pre-computed quantities for fast distance comparisons and fast projections.
This option is only available for online nonlinear ROM simulations without hyperreduction, that is when \texttt{SystemApproximation} = \texttt{None}.
\parskip \oparskip

\end{document}
