fossil_distance_field
Source: src/lib/fossil_distance_field.f90
Dependencies
Contents
- distance_field_object
- initialize
- destroy
- get_dims
- get_coordinates
- compute_band_surface
- compute_band_curve
- keep_band
- compute_signs_surface
- compute_signs_curve
- signs_core
- sweep
- sweep_once
- unlinear
- compute_surface
- compute_curve
- batch_distances
- batch_curve
- batch_query_surface
- batch_query_curve
- reset_closest
- keep_closest
- index_range
- gradient_diagnostic
- get_band_width
- get_band_cells
- get_is_2d
- default_band_surface
- default_band_curve
- godunov
- linear
- solve_quadratic
- is_valid_axis
- first_at_least
- last_at_most
- max_spacing
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
FAR_VALUE | real(kind=R8P) | parameter |
Derived Types
distance_field_object
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
ni | integer(kind=I4P) | ||
nj | integer(kind=I4P) | ||
nk | integer(kind=I4P) | ||
ng | integer(kind=I4P) | ||
ngk | integer(kind=I4P) | ||
is_2d | logical | ||
x | real(kind=R8P) | allocatable | |
y | real(kind=R8P) | allocatable | |
z | real(kind=R8P) | allocatable | |
band_width | real(kind=R8P) | ||
local_spacing | real(kind=R8P) | ||
sign_algorithm | integer(kind=I4P) | ||
use_device | logical | ||
band_cells | integer(kind=I4P) | ||
is_signed | logical | ||
phi | real(kind=R8P) | allocatable | |
in_band | logical | allocatable | |
closest | real(kind=R8P) | allocatable | |
closest_id | integer(kind=I4P) | allocatable | |
closest_normal | real(kind=R8P) | allocatable |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
initialize | pass(self) | |
destroy | pass(self) | |
compute_band | ||
compute_signs | ||
sweep | pass(self) | |
compute | ||
get_dims | pass(self) | |
get_band_width | pass(self) | |
get_band_cells | pass(self) | |
get_is_2d | pass(self) | |
get_coordinates | pass(self) | |
gradient_diagnostic | pass(self) | |
default_band | ||
compute_band_surface | pass(self) | |
compute_band_curve | pass(self) | |
compute_signs_surface | pass(self) | |
compute_signs_curve | pass(self) | |
compute_surface | pass(self) | |
compute_curve | pass(self) | |
default_band_surface | pass(self) | |
default_band_curve | pass(self) | |
keep_band | pass(self) | |
signs_core | pass(self) | |
linear | pass(self) | |
sweep_once | pass(self) | |
godunov | pass(self) | |
unlinear | pass(self) |
Subroutines
initialize
subroutine initialize(self, x, y, z, ng, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | inout | ||
x | real(kind=R8P) | in | ||
y | real(kind=R8P) | in | ||
z | real(kind=R8P) | in | optional | |
ng | integer(kind=I4P) | in | optional | |
status | integer(kind=I4P) | out | optional |
Call graph
destroy
Attributes: pure
subroutine destroy(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | inout |
Call graph
get_dims
Attributes: pure
subroutine get_dims(self, ni, nj, nk, ng)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | in | ||
ni | integer(kind=I4P) | out | ||
nj | integer(kind=I4P) | out | ||
nk | integer(kind=I4P) | out | ||
ng | integer(kind=I4P) | out | optional |
get_coordinates
Attributes: pure
subroutine get_coordinates(self, i, j, k, c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | in | ||
i | integer(kind=I4P) | in | ||
j | integer(kind=I4P) | in | ||
k | integer(kind=I4P) | in | ||
c | real(kind=R8P) | out |
compute_band_surface
subroutine compute_band_surface(self, surface, band, is_signed, sign_algorithm, use_device, store_closest, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | inout | ||
surface | type(surface_stl_object) | inout | target | |
band | real(kind=R8P) | in | optional | |
is_signed | logical | in | optional | |
sign_algorithm | integer(kind=I4P) | in | optional | |
use_device | logical | in | optional | |
store_closest | logical | in | optional | |
status | integer(kind=I4P) | out | optional |
Call graph
compute_band_curve
subroutine compute_band_curve(self, curve, band, is_signed, sign_algorithm, use_device, store_closest, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | inout | ||
curve | type(curve_object) | inout | target | |
band | real(kind=R8P) | in | optional | |
is_signed | logical | in | optional | |
sign_algorithm | integer(kind=I4P) | in | optional | |
use_device | logical | in | optional | |
store_closest | logical | in | optional | |
status | integer(kind=I4P) | out | optional |
Call graph
keep_band
Attributes: pure
subroutine keep_band(self, cell, d, band)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | inout | ||
cell | integer(kind=I4P) | in | ||
d | real(kind=R8P) | in | ||
band | real(kind=R8P) | in |
Call graph
compute_signs_surface
subroutine compute_signs_surface(self, surface, fallback_cells, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | inout | ||
surface | type(surface_stl_object) | inout | target | |
fallback_cells | integer(kind=I4P) | out | optional | |
status | integer(kind=I4P) | out | optional |
Call graph
compute_signs_curve
subroutine compute_signs_curve(self, curve, fallback_cells, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | inout | ||
curve | type(curve_object) | inout | target | |
fallback_cells | integer(kind=I4P) | out | optional | |
status | integer(kind=I4P) | out | optional |
Call graph
signs_core
subroutine signs_core(self, surface, curve, fallback_cells, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | inout | ||
surface | type(surface_stl_object) | inout | target, optional | |
curve | type(curve_object) | inout | target, optional | |
fallback_cells | integer(kind=I4P) | out | optional | |
status | integer(kind=I4P) | out | optional |
Call graph
sweep
subroutine sweep(self, tol, max_sweeps, sweeps, max_change, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | inout | ||
tol | real(kind=R8P) | in | optional | |
max_sweeps | integer(kind=I4P) | in | optional | |
sweeps | integer(kind=I4P) | out | optional | |
max_change | real(kind=R8P) | out | optional | |
status | integer(kind=I4P) | out | optional |
Call graph
sweep_once
subroutine sweep_once(self, dir, change)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | inout | ||
dir | integer(kind=I4P) | in | ||
change | real(kind=R8P) | out |
Call graph
unlinear
Attributes: pure
subroutine unlinear(self, l, i, j, k)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | in | ||
l | integer(kind=I4P) | in | ||
i | integer(kind=I4P) | out | ||
j | integer(kind=I4P) | out | ||
k | integer(kind=I4P) | out |
Call graph
compute_surface
subroutine compute_surface(self, surface, band, is_signed, sign_algorithm, use_device, tol, max_sweeps, sweeps, fallback_cells, store_closest, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | inout | ||
surface | type(surface_stl_object) | inout | target | |
band | real(kind=R8P) | in | optional | |
is_signed | logical | in | optional | |
sign_algorithm | integer(kind=I4P) | in | optional | |
use_device | logical | in | optional | |
tol | real(kind=R8P) | in | optional | |
max_sweeps | integer(kind=I4P) | in | optional | |
sweeps | integer(kind=I4P) | out | optional | |
fallback_cells | integer(kind=I4P) | out | optional | |
store_closest | logical | in | optional | |
status | integer(kind=I4P) | out | optional |
Call graph
compute_curve
subroutine compute_curve(self, curve, band, is_signed, sign_algorithm, use_device, tol, max_sweeps, sweeps, fallback_cells, store_closest, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | inout | ||
curve | type(curve_object) | inout | target | |
band | real(kind=R8P) | in | optional | |
is_signed | logical | in | optional | |
sign_algorithm | integer(kind=I4P) | in | optional | |
use_device | logical | in | optional | |
tol | real(kind=R8P) | in | optional | |
max_sweeps | integer(kind=I4P) | in | optional | |
sweeps | integer(kind=I4P) | out | optional | |
fallback_cells | integer(kind=I4P) | out | optional | |
store_closest | logical | in | optional | |
status | integer(kind=I4P) | out | optional |
Call graph
batch_distances
subroutine batch_distances(surface, points, d, is_signed, sign_algorithm, use_device, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
surface | type(surface_stl_object) | inout | target | |
points | type(vector_R8P) | in | ||
d | real(kind=R8P) | out | ||
is_signed | logical | in | ||
sign_algorithm | integer(kind=I4P) | in | ||
use_device | logical | in | ||
status | integer(kind=I4P) | out |
Call graph
batch_curve
subroutine batch_curve(curve, points, d, is_signed, sign_algorithm, use_device, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
curve | type(curve_object) | inout | target | |
points | real(kind=R8P) | in | ||
d | real(kind=R8P) | out | ||
is_signed | logical | in | ||
sign_algorithm | integer(kind=I4P) | in | ||
use_device | logical | in | ||
status | integer(kind=I4P) | out |
Call graph
batch_query_surface
subroutine batch_query_surface(surface, points, d, cp, id, nrm, is_signed, sign_algorithm, use_device, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
surface | type(surface_stl_object) | inout | target | |
points | type(vector_R8P) | in | ||
d | real(kind=R8P) | out | ||
cp | real(kind=R8P) | out | ||
id | integer(kind=I4P) | out | ||
nrm | real(kind=R8P) | out | ||
is_signed | logical | in | ||
sign_algorithm | integer(kind=I4P) | in | ||
use_device | logical | in | ||
status | integer(kind=I4P) | out |
Call graph
batch_query_curve
subroutine batch_query_curve(curve, points, d, cp, id, nrm, is_signed, sign_algorithm, use_device, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
curve | type(curve_object) | inout | target | |
points | real(kind=R8P) | in | ||
d | real(kind=R8P) | out | ||
cp | real(kind=R8P) | out | ||
id | integer(kind=I4P) | out | ||
nrm | real(kind=R8P) | out | ||
is_signed | logical | in | ||
sign_algorithm | integer(kind=I4P) | in | ||
use_device | logical | in | ||
status | integer(kind=I4P) | out |
Call graph
reset_closest
Attributes: pure
subroutine reset_closest(self, store)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | type(distance_field_object) | inout | ||
store | logical | in |
Call graph
keep_closest
Attributes: pure
subroutine keep_closest(self, cell, d, band, cp, id, nrm)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | type(distance_field_object) | inout | ||
cell | integer(kind=I4P) | in | ||
d | real(kind=R8P) | in | ||
band | real(kind=R8P) | in | ||
cp | real(kind=R8P) | in | ||
id | integer(kind=I4P) | in | ||
nrm | real(kind=R8P) | in |
Call graph
index_range
Attributes: pure
subroutine index_range(c, ng, lo, hi, ilo, ihi)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
c | real(kind=R8P) | in | ||
ng | integer(kind=I4P) | in | ||
lo | real(kind=R8P) | in | ||
hi | real(kind=R8P) | in | ||
ilo | integer(kind=I4P) | out | ||
ihi | integer(kind=I4P) | out |
Call graph
gradient_diagnostic
subroutine gradient_diagnostic(self, q, flagged, threshold, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | in | ||
q | real(kind=R8P) | out | ||
flagged | integer(kind=I4P) | out | ||
threshold | real(kind=R8P) | in | optional | |
status | integer(kind=I4P) | out | optional |
Call graph
Functions
get_band_width
Attributes: pure
Returns: real(kind=R8P)
function get_band_width(self) result(band)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | in |
get_band_cells
Attributes: pure
Returns: integer(kind=I4P)
function get_band_cells(self) result(n)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | in |
get_is_2d
Attributes: pure
Returns: logical
function get_is_2d(self) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | in |
default_band_surface
Returns: real(kind=R8P)
function default_band_surface(self, surface) result(band)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | in | ||
surface | type(surface_stl_object) | in |
Call graph
default_band_curve
Returns: real(kind=R8P)
function default_band_curve(self, curve) result(band)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | in | ||
curve | type(curve_object) | in |
Call graph
godunov
Attributes: pure
Returns: real(kind=R8P)
function godunov(self, i, j, k) result(u)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | in | ||
i | integer(kind=I4P) | in | ||
j | integer(kind=I4P) | in | ||
k | integer(kind=I4P) | in |
Call graph
linear
Attributes: pure
Returns: integer(kind=I4P)
function linear(self, i, j, k) result(l)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(distance_field_object) | in | ||
i | integer(kind=I4P) | in | ||
j | integer(kind=I4P) | in | ||
k | integer(kind=I4P) | in |
Call graph
solve_quadratic
Attributes: pure
Returns: real(kind=R8P)
function solve_quadratic(a, h) result(u)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | real(kind=R8P) | in | ||
h | real(kind=R8P) | in |
Call graph
is_valid_axis
Attributes: pure
Returns: logical
function is_valid_axis(c, ng) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
c | real(kind=R8P) | in | ||
ng | integer(kind=I4P) | in |
Call graph
first_at_least
Attributes: pure
Returns: integer(kind=I4P)
function first_at_least(c, v) result(i)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
c | real(kind=R8P) | in | ||
v | real(kind=R8P) | in |
Call graph
last_at_most
Attributes: pure
Returns: integer(kind=I4P)
function last_at_most(c, v) result(i)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
c | real(kind=R8P) | in | ||
v | real(kind=R8P) | in |
Call graph
max_spacing
Attributes: pure
Returns: real(kind=R8P)
function max_spacing(c, lo, hi) result(h)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
c | real(kind=R8P) | in | ||
lo | real(kind=R8P) | in | ||
hi | real(kind=R8P) | in |
Call graph