GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <grass/N_pde.h>
Go to the source code of this file.
N_gradient_2d* N_alloc_gradient_2d | ( | void | ) |
Allocate a N_gradient_2d structure.
Definition at line 27 of file N_gradient.c.
Referenced by N_create_gradient_2d().
N_gradient_3d* N_alloc_gradient_3d | ( | void | ) |
Allocate a N_gradient_3d structure.
Definition at line 152 of file N_gradient.c.
Referenced by N_create_gradient_3d().
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.
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 |
Definition at line 928 of file N_gradient.c.
References N_gradient_field_2d::cols, dialogs::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_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.
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 |
Definition at line 1026 of file N_gradient.c.
References N_gradient_field_3d::cols, dialogs::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_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
Definition at line 589 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_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
Definition at line 776 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_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
Definition at line 292 of file N_gradient.c.
Referenced by N_alloc_gradient_neighbours_2d(), N_alloc_gradient_neighbours_3d(), and N_create_gradient_neighbours_x().
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
Definition at line 388 of file N_gradient.c.
Referenced by N_alloc_gradient_neighbours_2d(), N_alloc_gradient_neighbours_3d(), and N_create_gradient_neighbours_y().
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
Definition at line 483 of file N_gradient.c.
Referenced by N_alloc_gradient_neighbours_3d(), and N_create_gradient_neighbours_z().
int N_copy_gradient_2d | ( | N_gradient_2d * | source, |
N_gradient_2d * | target | ||
) |
copy a N_gradient_2d structure
source | - the source N_gradient_2d struct |
target | - the target N_gradient_2d struct |
Definition at line 85 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.
int N_copy_gradient_3d | ( | N_gradient_3d * | source, |
N_gradient_3d * | target | ||
) |
copy a N_gradient_3d structure
source | - the source N_gradient_3d struct |
target | - the target N_gradient_3d struct |
Definition at line 215 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.
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.
source | - the source N_gradient_field_2d struct |
target | - the target N_gradient_field_2d struct |
Definition at line 974 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.
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.
source | - the source N_gradient_field_3d struct |
target | - the target N_gradient_field_3d struct |
Definition at line 1077 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.
int N_copy_gradient_neighbours_2d | ( | N_gradient_neighbours_2d * | source, |
N_gradient_neighbours_2d * | target | ||
) |
copy a N_gradient_neighbours_2d structure
source | - the source N_gradient_neighbours_2d struct |
target | - the target N_gradient_neighbours_2d struct |
Definition at line 666 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().
int N_copy_gradient_neighbours_3d | ( | N_gradient_neighbours_3d * | source, |
N_gradient_neighbours_3d * | target | ||
) |
copy a N_gradient_neighbours_3d structure
source | - the source N_gradient_neighbours_3d struct |
target | - the target N_gradient_neighbours_3d struct |
Definition at line 883 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.
int N_copy_gradient_neighbours_x | ( | N_gradient_neighbours_x * | source, |
N_gradient_neighbours_x * | target | ||
) |
copy a N_gradient_neighbours_x structure
source | - the source N_gradient_neighbours_x struct |
target | - the target N_gradient_neighbours_x struct |
Definition at line 362 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().
int N_copy_gradient_neighbours_y | ( | N_gradient_neighbours_y * | source, |
N_gradient_neighbours_y * | target | ||
) |
copy a N_gradient_neighbours_y structure
source | - the source N_gradient_neighbours_y struct |
target | - the target N_gradient_neighbours_y struct |
Definition at line 457 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().
int N_copy_gradient_neighbours_z | ( | N_gradient_neighbours_z * | source, |
N_gradient_neighbours_z * | target | ||
) |
copy a N_gradient_neighbours_z structure
source | - the source N_gradient_neighbours_z struct |
target | - the target N_gradient_neighbours_z struct |
Definition at line 559 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_gradient_2d* N_create_gradient_2d | ( | double | NC, |
double | SC, | ||
double | WC, | ||
double | EC | ||
) |
allocate and initialize a N_gradient_2d structure
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 |
Definition at line 60 of file N_gradient.c.
References N_gradient_2d::EC, G_debug(), N_alloc_gradient_2d(), N_gradient_2d::NC, wxgui::SC, N_gradient_2d::SC, and N_gradient_2d::WC.
Referenced by N_get_gradient_2d().
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
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 |
Definition at line 188 of file N_gradient.c.
References N_gradient_3d::BC, N_gradient_3d::EC, G_debug(), N_alloc_gradient_3d(), N_gradient_3d::NC, wxgui::SC, N_gradient_3d::SC, N_gradient_3d::TC, and N_gradient_3d::WC.
Referenced by N_get_gradient_3d().
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
Definition at line 632 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, and N_gradient_neighbours_2d::y.
Referenced by N_get_gradient_neighbours_2d().
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
Definition at line 832 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_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.
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 |
Definition at line 331 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_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.
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 |
Definition at line 426 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, wxgui::SC, N_gradient_neighbours_y::SC, N_gradient_neighbours_y::SEE, and N_gradient_neighbours_y::SWW.
Referenced by N_get_gradient_neighbours_2d().
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.
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 |
Definition at line 524 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.
void N_free_gradient_2d | ( | N_gradient_2d * | grad | ) |
void N_free_gradient_3d | ( | N_gradient_3d * | grad | ) |
void N_free_gradient_field_2d | ( | N_gradient_field_2d * | field | ) |
Free's a N_gradient_neighbours_2d structure.
Definition at line 952 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.
void N_free_gradient_field_3d | ( | N_gradient_field_3d * | field | ) |
Free's a N_gradient_neighbours_3d structure.
Definition at line 1053 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.
void N_free_gradient_neighbours_2d | ( | N_gradient_neighbours_2d * | grad | ) |
Free's a N_gradient_neighbours_2d structure.
Definition at line 610 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().
void N_free_gradient_neighbours_3d | ( | N_gradient_neighbours_3d * | grad | ) |
Free's a N_gradient_neighbours_3d structure.
Definition at line 803 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.
void N_free_gradient_neighbours_x | ( | N_gradient_neighbours_x * | grad | ) |
Free's a N_gradient_neighbours_x structure.
Definition at line 309 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().
void N_free_gradient_neighbours_y | ( | N_gradient_neighbours_y * | grad | ) |
Free's a N_gradient_neighbours_y structure.
Definition at line 405 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().
void N_free_gradient_neighbours_z | ( | N_gradient_neighbours_z * | grad | ) |
Free's a N_gradient_neighbours_z structure.
Definition at line 500 of file N_gradient.c.
References G_free(), and NULL.
Referenced by N_free_gradient_neighbours_3d().
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. Returend is a new structure of type N_gradient_2d.
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 |
Definition at line 115 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, wxgui::SC, 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_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.
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 |
Definition at line 249 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, wxgui::SC, 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_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. Returend is a pointer to a structure of type N_gradient_neighbours_2d.
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 |
Definition at line 705 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, wxgui::SC, N_gradient_field_2d::x_array, and N_gradient_field_2d::y_array.
void N_print_gradient_field_2d_info | ( | N_gradient_field_2d * | field | ) |
Print gradient field information to stdout.
field | N_gradient_2d_field * |
Definition at line 994 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.
void N_print_gradient_field_3d_info | ( | N_gradient_field_3d * | field | ) |
Print gradient field information to stdout.
field | N_gradient_3d_field * |
Definition at line 1098 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.