Loading...
Searching...
No Matches
n_gradient.c File Reference
`#include <grass/N_pde.h>`
Include dependency graph for n_gradient.c:

Go to the source code of this file.

## Functions

N_gradient_2d * | N_alloc_gradient_2d (void)
| Allocate a N_gradient_2d structure.
void | N_free_gradient_2d (N_gradient_2d *grad)
| Free's a N_gradient_2d structure.
N_gradient_2d * | N_create_gradient_2d (double NC, double SC, double WC, double EC)
| allocate and initialize a N_gradient_2d structure
int | N_copy_gradient_2d (N_gradient_2d *source, N_gradient_2d *target)
| copy a N_gradient_2d structure
N_gradient_2d * | N_get_gradient_2d (N_gradient_field_2d *field, N_gradient_2d *gradient, int col, int row)
| Return a N_gradient_2d structure calculated from the input gradient field at position [row][col].
N_gradient_3d * | N_alloc_gradient_3d (void)
| Allocate a N_gradient_3d structure.
void | N_free_gradient_3d (N_gradient_3d *grad)
| Free's a N_gradient_3d structure.
N_gradient_3d * | N_create_gradient_3d (double NC, double SC, double WC, double EC, double TC, double BC)
| allocate and initialize a N_gradient_3d structure
int | N_copy_gradient_3d (N_gradient_3d *source, N_gradient_3d *target)
| copy a N_gradient_3d structure
N_gradient_3d * | N_get_gradient_3d (N_gradient_field_3d *field, N_gradient_3d *gradient, int col, int row, int depth)
| Return a N_gradient_3d structure calculated from the input gradient field at position [depth][row][col].
N_gradient_neighbours_x * | N_alloc_gradient_neighbours_x (void)
| Allocate a N_gradient_neighbours_x structure.
void | N_free_gradient_neighbours_x (N_gradient_neighbours_x *grad)
| Free's a N_gradient_neighbours_x structure.
N_gradient_neighbours_x * | N_create_gradient_neighbours_x (double NWN, double NEN, double WC, double EC, double SWS, double SES)
| Allocate and initialize a N_gradient_neighbours_x structure.
int | N_copy_gradient_neighbours_x (N_gradient_neighbours_x *source, N_gradient_neighbours_x *target)
| copy a N_gradient_neighbours_x structure
N_gradient_neighbours_y * | N_alloc_gradient_neighbours_y (void)
| Allocate a N_gradient_neighbours_y structure.
void | N_free_gradient_neighbours_y (N_gradient_neighbours_y *grad)
| Free's a N_gradient_neighbours_y structure.
N_gradient_neighbours_y * | N_create_gradient_neighbours_y (double NWW, double NEE, double NC, double SC, double SWW, double SEE)
| Allocate and initialize a N_gradient_neighbours_y structure.
int | N_copy_gradient_neighbours_y (N_gradient_neighbours_y *source, N_gradient_neighbours_y *target)
| copy a N_gradient_neighbours_y structure
N_gradient_neighbours_z * | N_alloc_gradient_neighbours_z (void)
| Allocate a N_gradient_neighbours_z structure.
void | N_free_gradient_neighbours_z (N_gradient_neighbours_z *grad)
| Free's a N_gradient_neighbours_z structure.
N_gradient_neighbours_z * | N_create_gradient_neighbours_z (double NWZ, double NZ, double NEZ, double WZ, double CZ, double EZ, double SWZ, double SZ, double SEZ)
| Allocate and initialize a N_gradient_neighbours_z structure.
int | N_copy_gradient_neighbours_z (N_gradient_neighbours_z *source, N_gradient_neighbours_z *target)
| copy a N_gradient_neighbours_z structure
N_gradient_neighbours_2d * | N_alloc_gradient_neighbours_2d (void)
| Allocate a N_gradient_neighbours_2d structure.
void | N_free_gradient_neighbours_2d (N_gradient_neighbours_2d *grad)
| Free's a N_gradient_neighbours_2d structure.
N_gradient_neighbours_2d * | N_create_gradient_neighbours_2d (N_gradient_neighbours_x *x, N_gradient_neighbours_y *y)
| Allocate and initialize a N_gradient_neighbours_2d structure.
int | N_copy_gradient_neighbours_2d (N_gradient_neighbours_2d *source, N_gradient_neighbours_2d *target)
| copy a N_gradient_neighbours_2d structure
N_gradient_neighbours_2d * | N_get_gradient_neighbours_2d (N_gradient_field_2d *field, N_gradient_neighbours_2d *gradient, int col, int row)
| Return a N_gradient_neighbours_2d structure calculated from the input gradient field at position [row][col].
N_gradient_neighbours_3d * | N_alloc_gradient_neighbours_3d (void)
| Allocate a N_gradient_neighbours_3d structure.
void | N_free_gradient_neighbours_3d (N_gradient_neighbours_3d *grad)
| Free's a N_gradient_neighbours_3d structure.
N_gradient_neighbours_3d * | N_create_gradient_neighbours_3d (N_gradient_neighbours_x *xt, N_gradient_neighbours_x *xc, N_gradient_neighbours_x *xb, N_gradient_neighbours_y *yt, N_gradient_neighbours_y *yc, N_gradient_neighbours_y *yb, N_gradient_neighbours_z *zt, N_gradient_neighbours_z *zb)
| Allocate and initialize a N_gradient_neighbours_3d structure.
int | N_copy_gradient_neighbours_3d (N_gradient_neighbours_3d *source, N_gradient_neighbours_3d *target)
| copy a N_gradient_neighbours_3d structure
N_gradient_field_2d * | N_alloc_gradient_field_2d (int cols, int rows)
| Allocate a N_gradient_field_2d.
void | N_free_gradient_field_2d (N_gradient_field_2d *field)
| Free's a N_gradient_neighbours_2d structure.
int | N_copy_gradient_field_2d (N_gradient_field_2d *source, N_gradient_field_2d *target)
| Copy N_gradient_field_2d structure from source to target.
void | N_print_gradient_field_2d_info (N_gradient_field_2d *field)
| Print gradient field information to stdout.
N_gradient_field_3d * | N_alloc_gradient_field_3d (int cols, int rows, int depths)
| Allocate a N_gradient_field_3d.
void | N_free_gradient_field_3d (N_gradient_field_3d *field)
| Free's a N_gradient_neighbours_3d structure.
int | N_copy_gradient_field_3d (N_gradient_field_3d *source, N_gradient_field_3d *target)
| Copy N_gradient_field_3d structure from source to target.
void | N_print_gradient_field_3d_info (N_gradient_field_3d *field)
| Print gradient field information to stdout.

## Function Documentation

## N_alloc_gradient_2d()

N_gradient_2d * N_alloc_gradient_2d | ( | void |  | ) |

Allocate a N_gradient_2d structure.

Returns
  N_gradient_2d *

Definition at line 26 of file n_gradient.c.

Referenced by N_create_gradient_2d().

## N_alloc_gradient_3d()

N_gradient_3d * N_alloc_gradient_3d | ( | void |  | ) |

Allocate a N_gradient_3d structure.

Returns
  N_gradient_3d *

Definition at line 149 of file n_gradient.c.

Referenced by N_create_gradient_3d().

## N_alloc_gradient_field_2d()

N_gradient_field_2d * N_alloc_gradient_field_2d | ( | int | cols,
|  | int | rows )

Allocate a N_gradient_field_2d.

The field arrays are of type DCELL.

Parameters

  rows | - number of rows of the 2d array from which the gradient should be calculated
  cols | - number of cols of the 2d array from which the gradient should be calculated

Returns
  N_gradient_field_2d *

Definition at line 896 of file n_gradient.c.

References N_gradient_field_2d::cols, G_debug(), N_alloc_array_2d(), N_gradient_field_2d::rows, N_gradient_field_2d::x_array, and N_gradient_field_2d::y_array.

Referenced by N_alloc_solute_transport_data2d(), and N_compute_gradient_field_2d().

## N_alloc_gradient_field_3d()

N_gradient_field_3d * N_alloc_gradient_field_3d | ( | int | cols,
|  | int | rows,
|  | int | depths )

Allocate a N_gradient_field_3d.

The field arrays are always of type DCELL_TYPE.

Parameters

  cols | - number of cols of the 3d array from which the gradient should be calculated
  rows | - number of rows of the 3d array from which the gradient should be calculated
  depths | - number of depths of the 3d array from which the gradient should be calculated

Returns
  N_gradient_field_3d *

Definition at line 993 of file n_gradient.c.

References N_gradient_field_3d::cols, N_gradient_field_3d::depths, G_debug(), N_alloc_array_3d(), N_gradient_field_3d::rows, N_gradient_field_3d::x_array, N_gradient_field_3d::y_array, and N_gradient_field_3d::z_array.

Referenced by N_alloc_solute_transport_data3d(), and N_compute_gradient_field_3d().

## N_alloc_gradient_neighbours_2d()

N_gradient_neighbours_2d * N_alloc_gradient_neighbours_2d | ( | void |  | ) |

Allocate a N_gradient_neighbours_2d structure.

This structure contains all neighbour gradients in all directions of one cell in a 2d raster layer

Returns
  N_gradient_neighbours_2d *

Definition at line 577 of file n_gradient.c.

References N_alloc_gradient_neighbours_x(), N_alloc_gradient_neighbours_y(), N_gradient_neighbours_2d::x, and N_gradient_neighbours_2d::y.

Referenced by N_create_gradient_neighbours_2d().

## N_alloc_gradient_neighbours_3d()

N_gradient_neighbours_3d * N_alloc_gradient_neighbours_3d | ( | void |  | ) |

Allocate a N_gradient_neighbours_3d structure.

This structure contains all neighbour gradients in all directions of one cell in a 3d raster layer

Returns
  N_gradient_neighbours_3d *

Definition at line 752 of file n_gradient.c.

References N_alloc_gradient_neighbours_x(), N_alloc_gradient_neighbours_y(), N_alloc_gradient_neighbours_z(), N_gradient_neighbours_3d::xb, N_gradient_neighbours_3d::xc, N_gradient_neighbours_3d::xt, N_gradient_neighbours_3d::yb, N_gradient_neighbours_3d::yc, N_gradient_neighbours_3d::yt, N_gradient_neighbours_3d::zb, and N_gradient_neighbours_3d::zt.

Referenced by N_create_gradient_neighbours_3d().

## N_alloc_gradient_neighbours_x()

N_gradient_neighbours_x * N_alloc_gradient_neighbours_x | ( | void |  | ) |

Allocate a N_gradient_neighbours_x structure.

This structure contains all neighbour gradients in x direction of one cell

Returns
  N_gradient_neighbours_x *

Definition at line 289 of file n_gradient.c.

Referenced by N_alloc_gradient_neighbours_2d(), N_alloc_gradient_neighbours_3d(), and N_create_gradient_neighbours_x().

## N_alloc_gradient_neighbours_y()

N_gradient_neighbours_y * N_alloc_gradient_neighbours_y | ( | void |  | ) |

Allocate a N_gradient_neighbours_y structure.

This structure contains all neighbour gradients in y direction of one cell

Returns
  N_gradient_neighbours_y *

Definition at line 381 of file n_gradient.c.

Referenced by N_alloc_gradient_neighbours_2d(), N_alloc_gradient_neighbours_3d(), and N_create_gradient_neighbours_y().

## N_alloc_gradient_neighbours_z()

N_gradient_neighbours_z * N_alloc_gradient_neighbours_z | ( | void |  | ) |

Allocate a N_gradient_neighbours_z structure.

This structure contains all neighbour gradients in z direction of one cell

Returns
  N_gradient_neighbours_z *

Definition at line 473 of file n_gradient.c.

Referenced by N_alloc_gradient_neighbours_3d(), and N_create_gradient_neighbours_z().

## N_copy_gradient_2d()

int N_copy_gradient_2d | ( | N_gradient_2d * | source,
|  | N_gradient_2d * | target )

copy a N_gradient_2d structure

Parameters

  source | - the source N_gradient_2d struct
  target | - the target N_gradient_2d struct

Returns
  int - 1 success, 0 failure while copying

Definition at line 83 of file n_gradient.c.

References N_gradient_2d::EC, G_debug(), N_gradient_2d::NC, N_gradient_2d::SC, and N_gradient_2d::WC.

## N_copy_gradient_3d()

int N_copy_gradient_3d | ( | N_gradient_3d * | source,
|  | N_gradient_3d * | target )

copy a N_gradient_3d structure

Parameters

  source | - the source N_gradient_3d struct
  target | - the target N_gradient_3d struct

Returns
  int - 1 success, 0 failure while copying

Definition at line 211 of file n_gradient.c.

References N_gradient_3d::BC, N_gradient_3d::EC, G_debug(), N_gradient_3d::NC, N_gradient_3d::SC, N_gradient_3d::TC, and N_gradient_3d::WC.

## N_copy_gradient_field_2d()

int N_copy_gradient_field_2d | ( | N_gradient_field_2d * | source,
|  | N_gradient_field_2d * | target )

Copy N_gradient_field_2d structure from source to target.

Parameters

  source | - the source N_gradient_field_2d struct
  target | - the target N_gradient_field_2d struct

Returns
  int - 1 success, 0 failure while copying

Definition at line 941 of file n_gradient.c.

References G_debug(), N_copy_array_2d(), N_gradient_field_2d::x_array, and N_gradient_field_2d::y_array.

## N_copy_gradient_field_3d()

int N_copy_gradient_field_3d | ( | N_gradient_field_3d * | source,
|  | N_gradient_field_3d * | target )

Copy N_gradient_field_3d structure from source to target.

Parameters

  source | - the source N_gradient_field_3d struct
  target | - the target N_gradient_field_3d struct

Returns
  int - 1 success, 0 failure while copying

Definition at line 1041 of file n_gradient.c.

References G_debug(), N_copy_array_3d(), N_gradient_field_3d::x_array, N_gradient_field_3d::y_array, and N_gradient_field_3d::z_array.

## N_copy_gradient_neighbours_2d()

int N_copy_gradient_neighbours_2d | ( | N_gradient_neighbours_2d * | source,
|  | N_gradient_neighbours_2d * | target )

copy a N_gradient_neighbours_2d structure

Parameters

  source | - the source N_gradient_neighbours_2d struct
  target | - the target N_gradient_neighbours_2d struct

Returns
  int - 1 success, 0 failure while copying

Definition at line 650 of file n_gradient.c.

References G_debug(), N_copy_gradient_neighbours_x(), N_copy_gradient_neighbours_y(), N_gradient_neighbours_2d::x, and N_gradient_neighbours_2d::y.

Referenced by N_get_gradient_neighbours_2d().

## N_copy_gradient_neighbours_3d()

int N_copy_gradient_neighbours_3d | ( | N_gradient_neighbours_3d * | source,
|  | N_gradient_neighbours_3d * | target )

copy a N_gradient_neighbours_3d structure

Parameters

  source | - the source N_gradient_neighbours_3d struct
  target | - the target N_gradient_neighbours_3d struct

Returns
  int - 1 success, 0 failure while copying

Definition at line 852 of file n_gradient.c.

References G_debug(), N_copy_gradient_neighbours_x(), N_copy_gradient_neighbours_y(), N_copy_gradient_neighbours_z(), N_gradient_neighbours_3d::xb, N_gradient_neighbours_3d::xc, N_gradient_neighbours_3d::xt, N_gradient_neighbours_3d::yb, N_gradient_neighbours_3d::yc, N_gradient_neighbours_3d::yt, N_gradient_neighbours_3d::zb, and N_gradient_neighbours_3d::zt.

## N_copy_gradient_neighbours_x()

int N_copy_gradient_neighbours_x | ( | N_gradient_neighbours_x * | source,
|  | N_gradient_neighbours_x * | target )

copy a N_gradient_neighbours_x structure

Parameters

  source | - the source N_gradient_neighbours_x struct
  target | - the target N_gradient_neighbours_x struct

Returns
  int - 1 success, 0 failure while copying

Definition at line 355 of file n_gradient.c.

References N_gradient_neighbours_x::EC, G_debug(), N_gradient_neighbours_x::NEN, N_gradient_neighbours_x::NWN, N_gradient_neighbours_x::SES, N_gradient_neighbours_x::SWS, and N_gradient_neighbours_x::WC.

Referenced by N_copy_gradient_neighbours_2d(), N_copy_gradient_neighbours_3d(), N_create_gradient_neighbours_2d(), and N_create_gradient_neighbours_3d().

## N_copy_gradient_neighbours_y()

int N_copy_gradient_neighbours_y | ( | N_gradient_neighbours_y * | source,
|  | N_gradient_neighbours_y * | target )

copy a N_gradient_neighbours_y structure

Parameters

  source | - the source N_gradient_neighbours_y struct
  target | - the target N_gradient_neighbours_y struct

Returns
  int - 1 success, 0 failure while copying

Definition at line 447 of file n_gradient.c.

References G_debug(), N_gradient_neighbours_y::NC, N_gradient_neighbours_y::NEE, N_gradient_neighbours_y::NWW, N_gradient_neighbours_y::SC, N_gradient_neighbours_y::SEE, and N_gradient_neighbours_y::SWW.

Referenced by N_copy_gradient_neighbours_2d(), N_copy_gradient_neighbours_3d(), N_create_gradient_neighbours_2d(), and N_create_gradient_neighbours_3d().

## N_copy_gradient_neighbours_z()

int N_copy_gradient_neighbours_z | ( | N_gradient_neighbours_z * | source,
|  | N_gradient_neighbours_z * | target )

copy a N_gradient_neighbours_z structure

Parameters

  source | - the source N_gradient_neighbours_z struct
  target | - the target N_gradient_neighbours_z struct

Returns
  int - 1 success, 0 failure while copying

Definition at line 547 of file n_gradient.c.

References N_gradient_neighbours_z::CZ, N_gradient_neighbours_z::EZ, G_debug(), N_gradient_neighbours_z::NEZ, N_gradient_neighbours_z::NWZ, N_gradient_neighbours_z::NZ, N_gradient_neighbours_z::SEZ, N_gradient_neighbours_z::SWZ, N_gradient_neighbours_z::SZ, and N_gradient_neighbours_z::WZ.

Referenced by N_copy_gradient_neighbours_3d(), and N_create_gradient_neighbours_3d().

## N_create_gradient_2d()

N_gradient_2d * N_create_gradient_2d | ( | double | NC,
|  | double | SC,
|  | double | WC,
|  | double | EC )

allocate and initialize a N_gradient_2d structure

Parameters

  NC | double - the gradient between northern and center cell
  SC | double - the gradient between southern and center cell
  WC | double - the gradient between western and center cell
  EC | double - the gradient between eastern and center cell

Returns
  N_gradient_2d *

Definition at line 59 of file n_gradient.c.

References N_gradient_2d::EC, G_debug(), N_alloc_gradient_2d(), N_gradient_2d::NC, N_gradient_2d::SC, and N_gradient_2d::WC.

Referenced by N_get_gradient_2d().

## N_create_gradient_3d()

N_gradient_3d * N_create_gradient_3d | ( | double | NC,
|  | double | SC,
|  | double | WC,
|  | double | EC,
|  | double | TC,
|  | double | BC )

allocate and initialize a N_gradient_3d structure

Parameters

  NC | double - the gradient between northern and center cell
  SC | double - the gradient between southern and center cell
  WC | double - the gradient between western and center cell
  EC | double - the gradient between eastern and center cell
  TC | double - the gradient between top and center cell
  BC | double - the gradient between bottom and center cell

Returns
  N_gradient_3d *

Definition at line 184 of file n_gradient.c.

References N_gradient_3d::BC, N_gradient_3d::EC, G_debug(), N_alloc_gradient_3d(), N_gradient_3d::NC, N_gradient_3d::SC, N_gradient_3d::TC, and N_gradient_3d::WC.

Referenced by N_get_gradient_3d().

## N_create_gradient_neighbours_2d()

N_gradient_neighbours_2d * N_create_gradient_neighbours_2d | ( | N_gradient_neighbours_x * | x,
|  | N_gradient_neighbours_y * | y )

Allocate and initialize a N_gradient_neighbours_2d structure.

The parameter N_gradient_neighbours x and y are copied into the new allocated structure and can be deleted after the initializing

Returns
  N_gradient_neighbours_2d * – if failure NULL is returned

Definition at line 618 of file n_gradient.c.

References G_debug(), N_alloc_gradient_neighbours_2d(), N_copy_gradient_neighbours_x(), N_copy_gradient_neighbours_y(), N_free_gradient_neighbours_2d(), NULL, N_gradient_neighbours_2d::x, x, and N_gradient_neighbours_2d::y.

Referenced by N_get_gradient_neighbours_2d().

## N_create_gradient_neighbours_3d()

N_gradient_neighbours_3d * N_create_gradient_neighbours_3d | ( | N_gradient_neighbours_x * | xt,
|  | N_gradient_neighbours_x * | xc,
|  | N_gradient_neighbours_x * | xb,
|  | N_gradient_neighbours_y * | yt,
|  | N_gradient_neighbours_y * | yc,
|  | N_gradient_neighbours_y * | yb,
|  | N_gradient_neighbours_z * | zt,
|  | N_gradient_neighbours_z * | zb )

Allocate and initialize a N_gradient_neighbours_3d structure.

The parameter N_gradient_neighbours x(tcb) and y(tcb) and z(tb) are copied into the new allocated structure and can be deleted after the initializing

Returns
  N_gradient_neighbours_3d * – if failure NULL is returned

Definition at line 806 of file n_gradient.c.

References G_debug(), N_alloc_gradient_neighbours_3d(), N_copy_gradient_neighbours_x(), N_copy_gradient_neighbours_y(), N_copy_gradient_neighbours_z(), NULL, N_gradient_neighbours_3d::xb, N_gradient_neighbours_3d::xc, N_gradient_neighbours_3d::xt, N_gradient_neighbours_3d::yb, N_gradient_neighbours_3d::yc, N_gradient_neighbours_3d::yt, N_gradient_neighbours_3d::zb, and N_gradient_neighbours_3d::zt.

## N_create_gradient_neighbours_x()

N_gradient_neighbours_x * N_create_gradient_neighbours_x | ( | double | NWN,
|  | double | NEN,
|  | double | WC,
|  | double | EC,
|  | double | SWS,
|  | double | SES )

Allocate and initialize a N_gradient_neighbours_x structure.

Parameters

  NWN | double - the gradient between north-west and northern cell
  NEN | double - the gradient between north-east and northern cell
  WC | double - the gradient between western and center cell
  EC | double - the gradient between eastern and center cell
  SWS | double - the gradient between south-west and southern cell
  SES | double - the gradient between south-east and southern cell

Returns
  N_gradient_neighbours_x *

Definition at line 326 of file n_gradient.c.

References N_gradient_neighbours_x::EC, G_debug(), N_alloc_gradient_neighbours_x(), N_gradient_neighbours_x::NEN, N_gradient_neighbours_x::NWN, N_gradient_neighbours_x::SES, N_gradient_neighbours_x::SWS, and N_gradient_neighbours_x::WC.

Referenced by N_get_gradient_neighbours_2d().

## N_create_gradient_neighbours_y()

N_gradient_neighbours_y * N_create_gradient_neighbours_y | ( | double | NWW,
|  | double | NEE,
|  | double | NC,
|  | double | SC,
|  | double | SWW,
|  | double | SEE )

Allocate and initialize a N_gradient_neighbours_y structure.

Parameters

  NWW | double - the gradient between north-west and western cell
  NEE | double - the gradient between north-east and eastern cell
  NC | double - the gradient between northern and center cell
  SC | double - the gradient between southern and center cell
  SWW | double - the gradient between south-west and western cell
  SEE | double - the gradient between south-east and eastern cell

Returns
  N_gradient_neighbours_y *

Definition at line 418 of file n_gradient.c.

References G_debug(), N_alloc_gradient_neighbours_y(), N_gradient_neighbours_y::NC, N_gradient_neighbours_y::NEE, N_gradient_neighbours_y::NWW, N_gradient_neighbours_y::SC, N_gradient_neighbours_y::SEE, and N_gradient_neighbours_y::SWW.

Referenced by N_get_gradient_neighbours_2d().

## N_create_gradient_neighbours_z()

N_gradient_neighbours_z * N_create_gradient_neighbours_z | ( | double | NWZ,
|  | double | NZ,
|  | double | NEZ,
|  | double | WZ,
|  | double | CZ,
|  | double | EZ,
|  | double | SWZ,
|  | double | SZ,
|  | double | SEZ )

Allocate and initialize a N_gradient_neighbours_z structure.

Parameters

  NWZ | double - the gradient between upper and lower north-western cells
  NZ | double - the gradient between upper and lower northern cells
  NEZ | double - the gradient between upper and lower north-eastern cells
  WZ | double - the gradient between upper and lower western cells
  CZ | double - the gradient between upper and lower center cells
  EZ | double - the gradient between upper and lower eastern cells
  SWZ | double - the gradient between upper and lower south-western cells
  SZ | double - the gradient between upper and lower southern cells
  SEZ | double - the gradient between upper and lower south-eastern cells

Returns
  N_gradient_neighbours_z *

Definition at line 513 of file n_gradient.c.

References N_gradient_neighbours_z::CZ, N_gradient_neighbours_z::EZ, G_debug(), N_alloc_gradient_neighbours_z(), N_gradient_neighbours_z::NEZ, N_gradient_neighbours_z::NWZ, N_gradient_neighbours_z::NZ, N_gradient_neighbours_z::SEZ, N_gradient_neighbours_z::SWZ, N_gradient_neighbours_z::SZ, and N_gradient_neighbours_z::WZ.

## N_free_gradient_2d()

void N_free_gradient_2d | ( | N_gradient_2d * | grad | ) |

Free's a N_gradient_2d structure.

Returns
  void

Definition at line 41 of file n_gradient.c.

References G_free(), and NULL.

## N_free_gradient_3d()

void N_free_gradient_3d | ( | N_gradient_3d * | grad | ) |

Free's a N_gradient_3d structure.

Returns
  void

Definition at line 164 of file n_gradient.c.

References G_free(), and NULL.

## N_free_gradient_field_2d()

void N_free_gradient_field_2d | ( | N_gradient_field_2d * | field | ) |

Free's a N_gradient_neighbours_2d structure.

Returns
  void

Definition at line 920 of file n_gradient.c.

References G_free(), N_free_array_2d(), NULL, N_gradient_field_2d::x_array, and N_gradient_field_2d::y_array.

## N_free_gradient_field_3d()

void N_free_gradient_field_3d | ( | N_gradient_field_3d * | field | ) |

Free's a N_gradient_neighbours_3d structure.

Returns
  void

Definition at line 1019 of file n_gradient.c.

References G_free(), N_free_array_3d(), NULL, N_gradient_field_3d::x_array, N_gradient_field_3d::y_array, and N_gradient_field_3d::z_array.

## N_free_gradient_neighbours_2d()

void N_free_gradient_neighbours_2d | ( | N_gradient_neighbours_2d * | grad | ) |

Free's a N_gradient_neighbours_2d structure.

Returns
  void

Definition at line 596 of file n_gradient.c.

References G_free(), N_free_gradient_neighbours_x(), N_free_gradient_neighbours_y(), NULL, N_gradient_neighbours_2d::x, and N_gradient_neighbours_2d::y.

Referenced by N_create_gradient_neighbours_2d(), and N_get_gradient_neighbours_2d().

## N_free_gradient_neighbours_3d()

void N_free_gradient_neighbours_3d | ( | N_gradient_neighbours_3d * | grad | ) |

Free's a N_gradient_neighbours_3d structure.

Returns
  void

Definition at line 777 of file n_gradient.c.

References G_free(), N_free_gradient_neighbours_x(), N_free_gradient_neighbours_y(), N_free_gradient_neighbours_z(), NULL, N_gradient_neighbours_3d::xb, N_gradient_neighbours_3d::xc, N_gradient_neighbours_3d::xt, N_gradient_neighbours_3d::yb, N_gradient_neighbours_3d::yc, N_gradient_neighbours_3d::yt, N_gradient_neighbours_3d::zb, and N_gradient_neighbours_3d::zt.

## N_free_gradient_neighbours_x()

void N_free_gradient_neighbours_x | ( | N_gradient_neighbours_x * | grad | ) |

Free's a N_gradient_neighbours_x structure.

Returns
  void

Definition at line 305 of file n_gradient.c.

References G_free(), and NULL.

Referenced by N_free_gradient_neighbours_2d(), N_free_gradient_neighbours_3d(), and N_get_gradient_neighbours_2d().

## N_free_gradient_neighbours_y()

void N_free_gradient_neighbours_y | ( | N_gradient_neighbours_y * | grad | ) |

Free's a N_gradient_neighbours_y structure.

Returns
  void

Definition at line 397 of file n_gradient.c.

References G_free(), and NULL.

Referenced by N_free_gradient_neighbours_2d(), N_free_gradient_neighbours_3d(), and N_get_gradient_neighbours_2d().

## N_free_gradient_neighbours_z()

void N_free_gradient_neighbours_z | ( | N_gradient_neighbours_z * | grad | ) |

Free's a N_gradient_neighbours_z structure.

Returns
  void

Definition at line 489 of file n_gradient.c.

References G_free(), and NULL.

Referenced by N_free_gradient_neighbours_3d().

## N_get_gradient_2d()

N_gradient_2d * N_get_gradient_2d | ( | N_gradient_field_2d * | field,
|  | N_gradient_2d * | gradient,
|  | int | col,
|  | int | row )

Return a N_gradient_2d structure calculated from the input gradient field at position [row][col].

This function returns the gradient of a cell at position [row][col] from the input gradient field. Returned is a new structure of type N_gradient_2d.

Parameters

  field | N_gradient_field_2d * - A two dimensional gradient field
  gradient | N_gradient_2d * - the gradient structure which should be filled with data, if a NULL pointer is given, a new structure will be created
  col | int
  row | int

Returns
  N_gradient_2d * - the new or filled gradient structure

Definition at line 114 of file n_gradient.c.

References N_gradient_2d::EC, G_debug(), N_create_gradient_2d(), N_get_array_2d_d_value(), N_gradient_2d::NC, N_gradient_2d::SC, N_gradient_2d::WC, N_gradient_field_2d::x_array, and N_gradient_field_2d::y_array.

Referenced by N_calc_solute_transport_disptensor_2d(), N_calc_solute_transport_transmission_2d(), N_callback_solute_transport_2d(), and N_compute_gradient_field_components_2d().

## N_get_gradient_3d()

N_gradient_3d * N_get_gradient_3d | ( | N_gradient_field_3d * | field,
|  | N_gradient_3d * | gradient,
|  | int | col,
|  | int | row,
|  | int | depth )

Return a N_gradient_3d structure calculated from the input gradient field at position [depth][row][col].

This function returns the gradient of a 3d cell at position [depth][row][col] from the input gradient field. Returned is a new structure of type N_gradient_3d.

Parameters

  field | N_gradient_field_3d * - A three dimensional gradient field
  gradient | N_gradient_3d * - an existing gradient structure or a NULL pointer, if a NULL pointer is providet a new structure will be returned
  col | int
  row | int
  depth | int

Returns
  N_gradient_3d *

Definition at line 246 of file n_gradient.c.

References N_gradient_3d::BC, N_gradient_3d::EC, G_debug(), N_create_gradient_3d(), N_get_array_3d_d_value(), N_gradient_3d::NC, N_gradient_3d::SC, N_gradient_3d::TC, N_gradient_3d::WC, N_gradient_field_3d::x_array, N_gradient_field_3d::y_array, and N_gradient_field_3d::z_array.

Referenced by N_calc_solute_transport_disptensor_3d(), N_callback_solute_transport_3d(), and N_compute_gradient_field_components_3d().

## N_get_gradient_neighbours_2d()

N_gradient_neighbours_2d * N_get_gradient_neighbours_2d | ( | N_gradient_field_2d * | field,
|  | N_gradient_neighbours_2d * | gradient,
|  | int | col,
|  | int | row )

Return a N_gradient_neighbours_2d structure calculated from the input gradient field at position [row][col].

This function returns the gradient neighbours in x and y dierection of a cell at position [row][col] from the input gradient field. Returned is a pointer to a structure of type N_gradient_neighbours_2d.

Parameters

  field | N_gradient_field_2d * - A two dimensional gradient field
  gradient | N_gradient_neighbours_2d * - the gradient structure which should be filled with data, if a NULL pointer is given, a new structure will be created
  col | int
  row | int

Returns
  N_gradient_neighbours_2d * - the new or filled gradient structure

Definition at line 689 of file n_gradient.c.

References G_debug(), N_copy_gradient_neighbours_2d(), N_create_gradient_neighbours_2d(), N_create_gradient_neighbours_x(), N_create_gradient_neighbours_y(), N_free_gradient_neighbours_2d(), N_free_gradient_neighbours_x(), N_free_gradient_neighbours_y(), N_get_array_2d_d_value(), NULL, N_gradient_field_2d::x_array, and N_gradient_field_2d::y_array.

## N_print_gradient_field_2d_info()

void N_print_gradient_field_2d_info | ( | N_gradient_field_2d * | field | ) |

Print gradient field information to stdout.

Parameters

  field | N_gradient_2d_field *

Returns
  void

Definition at line 961 of file n_gradient.c.

References N_gradient_field_2d::cols, N_gradient_field_2d::max, N_gradient_field_2d::mean, N_gradient_field_2d::min, N_print_array_2d_info(), N_gradient_field_2d::nonull, N_gradient_field_2d::rows, N_gradient_field_2d::sum, N_gradient_field_2d::x_array, and N_gradient_field_2d::y_array.

## N_print_gradient_field_3d_info()

void N_print_gradient_field_3d_info | ( | N_gradient_field_3d * | field | ) |

Print gradient field information to stdout.

Parameters

  field | N_gradient_3d_field *

Returns
  void

Definition at line 1062 of file n_gradient.c.

References N_gradient_field_3d::cols, N_gradient_field_3d::depths, N_gradient_field_3d::max, N_gradient_field_3d::mean, N_gradient_field_3d::min, N_print_array_3d_info(), N_gradient_field_3d::nonull, N_gradient_field_3d::rows, N_gradient_field_3d::sum, N_gradient_field_3d::x_array, N_gradient_field_3d::y_array, and N_gradient_field_3d::z_array.