File Mesh.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 "Poly.h"
Public Functions
| Type | Name |
|---|---|
| int | CalcInitnblk (Param XParam, Forcing< float > XForcing) Calculates the initial number of blocks for the mesh. |
| int | CalcMaskblk (Param XParam, BlockP< T > XBlock) Calculates the number of blocks with masked neighbors (for boundary handling). |
| void | FindMaskblk (Param XParam, BlockP< T > & XBlock) Identifies and stores blocks with masked sides for boundary processing. |
| void | InitBlockInfo (Param & XParam, Forcing< float > & XForcing, BlockP< T > & XBlock) Initializes block information (active status, level, coordinates, neighbors). |
| void | InitBlockadapt (Param & XParam, BlockP< T > XBlock, AdaptP & XAdap) Initializes block adaptation arrays for mesh refinement/coarsening. |
| void | InitBlockneighbours (Param & XParam, Forcing< float > & XForcing, BlockP< T > & XBlock) Initializes neighbor relationships for each block in a uniform mesh. |
| void | InitBlockxoyo (Param XParam, Forcing< float > XForcing, BlockP< T > & XBlock) Initializes block coordinates and active status for the mesh. |
| void | InitMesh (Param & XParam, Forcing< float > & XForcing, Model< T > & XModel) Initializes the mesh and allocates memory for blocks. |
Public Functions Documentation
function CalcInitnblk
Calculates the initial number of blocks for the mesh.
Parameters:
XParamModel parameters (resolution, block size, etc.)XForcingForcing data (bathymetry, AOI polygon, etc.)
Returns:
Number of blocks to allocate for the mesh.
This function divides the domain into uniform blocks, checks masking and AOI, and counts blocks that are active for computation.
function CalcMaskblk
Calculates the number of blocks with masked neighbors (for boundary handling).
Template parameters:
TData type
Parameters:
XParamModel parametersXBlockBlock data structure
Returns:
Number of blocks with masked neighbors.
function FindMaskblk
Identifies and stores blocks with masked sides for boundary processing.
Template parameters:
TData type
Parameters:
XParamModel parametersXBlockBlock data structure
Populates mask arrays for blocks with masked sides for later boundary condition handling.
function InitBlockInfo
Initializes block information (active status, level, coordinates, neighbors).
template<class T>
void InitBlockInfo (
Param & XParam,
Forcing < float > & XForcing,
BlockP < T > & XBlock
)
Template parameters:
TData type
Parameters:
function InitBlockadapt
Initializes block adaptation arrays for mesh refinement/coarsening.
Template parameters:
TData type
Parameters:
XParamModel parametersXBlockBlock data structureXAdapAdaptation data structure
function InitBlockneighbours
Initializes neighbor relationships for each block in a uniform mesh.
template<class T>
void InitBlockneighbours (
Param & XParam,
Forcing < float > & XForcing,
BlockP < T > & XBlock
)
Template parameters:
TData type
Parameters:
Sets up neighbor indices for each block (left, right, top, bottom, corners).
function InitBlockxoyo
Initializes block coordinates and active status for the mesh.
template<class T>
void InitBlockxoyo (
Param XParam,
Forcing < float > XForcing,
BlockP < T > & XBlock
)
Template parameters:
TData type (float or double)
Parameters:
Sets block coordinates and marks active blocks based on mask and AOI polygon. Loops over all blocks, checks if each block is inside the area of interest (AOI), and if the mask threshold is met, sets the block as active and stores its coordinates.
function InitMesh
Initializes the mesh and allocates memory for blocks.
template<class T>
void InitMesh (
Param & XParam,
Forcing < float > & XForcing,
Model < T > & XModel
)
Template parameters:
TData type (float or double)
Parameters:
Allocates memory, initializes block info, adaptation info, and boundary masks.
The documentation for this class was generated from the following file src/Mesh.h