Routines to calculate surface gradients and curvatures
Function to calculate the double derivatives of a 2D array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8), | intent(in), | dimension(1:nx, 1:ny) | :: | tab |
input 2D array |
|
integer(kind=I4), | intent(in) | :: | nx |
number of pixels along x |
||
integer(kind=I4), | intent(in) | :: | ny |
number of pixels along x |
||
real(kind=R8), | intent(in) | :: | dx |
x lag |
||
real(kind=R8), | intent(in) | :: | dy |
y lag |
||
real(kind=R8), | intent(out), | dimension(1:nx, 1:ny) | :: | gradxx |
double derivative along x, x 2D array |
|
real(kind=R8), | intent(out), | dimension(1:nx, 1:ny) | :: | gradyy |
double derivative along y, y 2D array |
Function to calculate the gaussian curvature of a 2D array, its mean quadratic value and the gradient mean quadratic value
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8), | intent(in), | dimension(1:nx, 1:ny) | :: | tab |
input 2D array |
|
integer(kind=I4), | intent(in) | :: | nx |
number of pixels along x |
||
integer(kind=I4), | intent(in) | :: | ny |
number of pixels along x |
||
real(kind=R8), | intent(in) | :: | dx |
x lag |
||
real(kind=R8), | intent(in) | :: | dy |
y lag |
||
real(kind=R8), | intent(out) | :: | S_param_grad |
mean quadratic gradient value |
||
real(kind=R8), | intent(out) | :: | S_param_curv |
mean quadratic curvature value |
||
real(kind=R8), | intent(out), | dimension(1:nx, 1:ny) | :: | gcurvt |
gaussian curvature 2D array |
Function to provide the interpolation functions of a QU9 element, as well as its derivatives
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8), | intent(in) | :: | x |
abscissa between -1 and +1 |
||
real(kind=R8), | intent(in) | :: | y |
ordinate between -1 and +1 |
||
real(kind=R8), | intent(out), | dimension(1:9, 1:6) | :: | mat_d |
array containing N, dN/di, d2N/di2 |
Function to calculate the double derivatives of a 2D array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8), | intent(in), | dimension(1:nx, 1:ny) | :: | gradx |
derivative along x 2D array |
|
real(kind=R8), | intent(in), | dimension(1:nx, 1:ny) | :: | grady |
derivative along y 2D array |
|
integer(kind=I4), | intent(in) | :: | nx |
number of pixels along x |
||
integer(kind=I4), | intent(in) | :: | ny |
number of pixels along x |
||
real(kind=R8), | intent(in) | :: | dx |
x lag |
||
real(kind=R8), | intent(in) | :: | dy |
y lag |
||
real(kind=R8), | intent(out), | dimension(1:nx, 1:ny) | :: | gradxx |
double derivative along x, x 2D array |
|
real(kind=R8), | intent(out), | dimension(1:nx, 1:ny) | :: | gradyy |
double derivative along y, y 2D array |
|
real(kind=R8), | intent(out), | dimension(1:nx, 1:ny) | :: | gradxy |
double derivative along x, y 2D array |
Function to calculate the gradient of a 2D array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8), | intent(in), | dimension(1:nx, 1:ny) | :: | tab |
Input 2D array |
|
integer(kind=I4), | intent(in) | :: | nx |
number of pixels along x |
||
integer(kind=I4), | intent(in) | :: | ny |
number of pixels along x |
||
real(kind=R8), | intent(in) | :: | dx |
x lag |
||
real(kind=R8), | intent(in) | :: | dy |
y lag |
||
real(kind=R8), | intent(out), | dimension(1:nx, 1:ny) | :: | gradx |
derivative along x 2D array |
|
real(kind=R8), | intent(out), | dimension(1:nx, 1:ny) | :: | grady |
derivative along y 2D array |
Function that gives the nodal height gradients
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8), | intent(in), | dimension(1:3, 1:3) | :: | hgt |
local height 2D array |
|
real(kind=R8), | intent(out), | dimension(1:3) | :: | gdx |
nodal x gradient |
|
real(kind=R8), | intent(out), | dimension(1:3) | :: | gdy |
nodal x gradient |
Function to output the extrema of a 2D array, as peaks, valleys or saddles.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8), | intent(in), | dimension(1:nx, 1:ny) | :: | tab |
input 2D array |
|
integer(kind=I4), | intent(in) | :: | nx |
number of pixels along x |
||
integer(kind=I4), | intent(in) | :: | ny |
number of pixels along y |
||
integer(kind=I4), | intent(out), | dimension(:,:), allocatable | :: | valleys |
list of valley coordinates |
|
integer(kind=I4), | intent(out), | dimension(:,:), allocatable | :: | peaks |
list of peaks coordinates |
|
integer(kind=I4), | intent(out), | dimension(:,:), allocatable | :: | saddles |
list of saddles coordinates |
|
integer(kind=I4), | intent(out), | dimension(1:3) | :: | nb_summits |
number of extrema of each kind |
Function to label a point as: peak, valley, saddle or nothing particular
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8), | intent(in), | dimension(1:3, 1:3) | :: | height |
nodal height values as a 2D array |
|
character(len=1), | intent(out) | :: | label |
kind of point |
||
real(kind=R8), | intent(out), | optional | :: | x |
coordinates of the extremum found |
|
real(kind=R8), | intent(out), | optional | :: | y |
coordinates of the extremum found |
Function to calculate and output the peaks and pits curvatures as well as then mean quadratic gradient value and the mean quadratic curvature value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8), | intent(in), | dimension(1:nx, 1:ny) | :: | heights |
input 2D array |
|
integer(kind=I4), | intent(in) | :: | nx |
number of pixels along x |
||
integer(kind=I4), | intent(in) | :: | ny |
number of pixels along x |
||
real(kind=R8), | intent(in) | :: | dx |
x lag |
||
real(kind=R8), | intent(in) | :: | dy |
y lag |
||
real(kind=R8), | intent(out) | :: | S_param_grad |
mean quadratic gradient value |
||
real(kind=R8), | intent(out) | :: | S_param_curv |
mean quadratic curvature value |
||
real(kind=R8), | intent(out) | :: | peak_curv |
3 first peaks mean curvature |
||
real(kind=R8), | intent(out) | :: | pits_curv |
3 first pits mean curvature |
Function to test the capicity in detecting peaks, pits and saddles in a simple double sinus surface.
Function to test the function “labelize_point” on a QU9 domain with a 2nd order polynomial along x and y
Function to test the function “peaks_and_pits_curvatures” on a real rough surface. Outputs surface gradients and curvatures as 2D arrays or single values.