Skip to content

File InitEvolv.h

FileList > src > InitEvolv.h

Go to the source code of this file

  • #include "General.h"
  • #include "Param.h"
  • #include "Forcing.h"
  • #include "MemManagement.h"
  • #include "Util_CPU.h"
  • #include "Arrays.h"
  • #include "Write_txtlog.h"
  • #include "GridManip.h"
  • #include "Read_netcdf.h"
  • #include "ReadForcing.h"
  • #include "Updateforcing.h"

Public Functions

Type Name
int AddZSoffset (Param XParam, BlockP< T > XBlock, EvolvingP< T > & XEv, T * zb)
Add offset to surface elevation (zs) and update water depth (h).
int coldstart (Param XParam, BlockP< T > XBlock, T * zb, EvolvingP< T > & XEv)
Cold start initialization of evolving variables.
void initevolv (Param XParam, BlockP< T > XBlock, Forcing< float > XForcing, EvolvingP< T > & XEv, T *& zb)
Initialize evolving variables for the simulation.
int readhotstartfile (Param XParam, BlockP< T > XBlock, EvolvingP< T > & XEv, T *& zb)
Read hotstart file and initialize evolving variables and bathymetry.
void warmstart (Param XParam, Forcing< float > XForcing, BlockP< T > XBlock, T * zb, EvolvingP< T > & XEv)
Warm start initialization using boundary conditions and interpolation.

Public Functions Documentation

function AddZSoffset

Add offset to surface elevation (zs) and update water depth (h).

template<class T>
int AddZSoffset (
    Param XParam,
    BlockP < T > XBlock,
    EvolvingP < T > & XEv,
    T * zb
) 

Applies zsoffset to zs and updates h for all blocks where h > eps.

Template parameters:

  • T Data type

Parameters:

  • XParam Simulation parameters
  • XBlock Block parameters
  • XEv Evolving variables (input/output)
  • zb Bathymetry array

Returns:

Success flag (1 if successful)


function coldstart

Cold start initialization of evolving variables.

template<class T>
int coldstart (
    Param XParam,
    BlockP < T > XBlock,
    T * zb,
    EvolvingP < T > & XEv
) 

Sets initial water level, velocity, and bathymetry arrays for all blocks using specified zsinit and zsoffset.

Template parameters:

  • T Data type

Parameters:

  • XParam Simulation parameters
  • XBlock Block parameters
  • zb Bathymetry array
  • XEv Evolving variables (output)

Returns:

Success flag (1 if successful)


function initevolv

Initialize evolving variables for the simulation.

template<class T>
void initevolv (
    Param XParam,
    BlockP < T > XBlock,
    Forcing < float > XForcing,
    EvolvingP < T > & XEv,
    T *& zb
) 

Handles hotstart, coldstart, and warmstart initialization of water level, velocity, and bathymetry arrays. Applies offsets and boundary conditions as needed.

Template parameters:

  • T Data type (float or double)

Parameters:

  • XParam Simulation parameters
  • XBlock Block parameters
  • XForcing Forcing/boundary conditions
  • XEv Evolving variables (output)
  • zb Bathymetry array (input/output)

function readhotstartfile

Read hotstart file and initialize evolving variables and bathymetry.

template<class T>
int readhotstartfile (
    Param XParam,
    BlockP < T > XBlock,
    EvolvingP < T > & XEv,
    T *& zb
) 

Reads NetCDF hotstart file, extracts variables, and fills arrays for all blocks. Handles missing variables and applies edge corrections.

Template parameters:

  • T Data type

Parameters:

  • XParam Simulation parameters
  • XBlock Block parameters
  • XEv Evolving variables (output)
  • zb Bathymetry array (output)

Returns:

Success flag (1 if successful, 0 if fallback to cold start)


function warmstart

Warm start initialization using boundary conditions and interpolation.

template<class T>
void warmstart (
    Param XParam,
    Forcing < float > XForcing,
    BlockP < T > XBlock,
    T * zb,
    EvolvingP < T > & XEv
) 

Sets initial water level, velocity, and bathymetry arrays for all blocks using boundary segments and atmospheric pressure forcing.

Template parameters:

  • T Data type

Parameters:

  • XParam Simulation parameters
  • XForcing Forcing/boundary conditions
  • XBlock Block parameters
  • zb Bathymetry array
  • XEv Evolving variables (output)


The documentation for this class was generated from the following file src/InitEvolv.h