Skip to content

fossil_decimate

Source: src/lib/fossil_decimate.f90

Dependencies

Contents

Variables

NameTypeAttributesDescription
DEC_STATUS_OKinteger(kind=I4P)parameter
DEC_STATUS_BAD_INPUTinteger(kind=I4P)parameter
DEC_STATUS_NO_PROGRESSinteger(kind=I4P)parameter
QSIZEinteger(kind=I4P)parameter
NOT_IN_HEAPinteger(kind=I4P)parameter

Subroutines

decimate

fortran
subroutine decimate(facet, target_facets, status)

Arguments

NameTypeIntentAttributesDescription
facettype(facet_object)inoutallocatable
target_facetsinteger(kind=I4P)in
statusinteger(kind=I4P)outoptional

Call graph

collect_vertex_ids

fortran
subroutine collect_vertex_ids(facet, f_v, nv, st)

Arguments

NameTypeIntentAttributesDescription
facettype(facet_object)in
f_vinteger(kind=I4P)outallocatable
nvinteger(kind=I4P)out
stinteger(kind=I4P)out

Call graph

collect_vertex_coords

fortran
subroutine collect_vertex_coords(facet, f_v, vcoord)

Arguments

NameTypeIntentAttributesDescription
facettype(facet_object)in
f_vinteger(kind=I4P)in
vcoordreal(kind=R8P)inout

Call graph

build_v2f

fortran
subroutine build_v2f(f_v, nv, v2f_head, v2f_count, v2f_cap, v2f_val)

Arguments

NameTypeIntentAttributesDescription
f_vinteger(kind=I4P)in
nvinteger(kind=I4P)in
v2f_headinteger(kind=I4P)outallocatable
v2f_countinteger(kind=I4P)outallocatable
v2f_capinteger(kind=I4P)outallocatable
v2f_valinteger(kind=I4P)outallocatable

Call graph

v2x_append

fortran
subroutine v2x_append(head, count, cap, val, vertex, item)

Arguments

NameTypeIntentAttributesDescription
headinteger(kind=I4P)inoutallocatable
countinteger(kind=I4P)inout
capinteger(kind=I4P)inout
valinteger(kind=I4P)inoutallocatable
vertexinteger(kind=I4P)in
iteminteger(kind=I4P)in

Call graph

build_quadrics

fortran
subroutine build_quadrics(facet, f_v, vcoord, Q)

Arguments

NameTypeIntentAttributesDescription
facettype(facet_object)in
f_vinteger(kind=I4P)in
vcoordreal(kind=R8P)in
Qreal(kind=R8P)inout

Call graph

build_edges

fortran
subroutine build_edges(facet, f_v, e_v, ne)

Arguments

NameTypeIntentAttributesDescription
facettype(facet_object)in
f_vinteger(kind=I4P)in
e_vinteger(kind=I4P)outallocatable
neinteger(kind=I4P)out

Call graph

sort_he

fortran
subroutine sort_he(he_lo, he_hi, order)

Arguments

NameTypeIntentAttributesDescription
he_lointeger(kind=I4P)in
he_hiinteger(kind=I4P)in
orderinteger(kind=I4P)outallocatable

Call graph

qsort_he

Attributes: recursive

fortran
subroutine qsort_he(he_lo, he_hi, order, lo, hi)

Arguments

NameTypeIntentAttributesDescription
he_lointeger(kind=I4P)in
he_hiinteger(kind=I4P)in
orderinteger(kind=I4P)inout
lointeger(kind=I4P)in
hiinteger(kind=I4P)in

Call graph

build_v2e

fortran
subroutine build_v2e(e_v, ne, nv, v2e_head, v2e_count, v2e_cap, v2e_val)

Arguments

NameTypeIntentAttributesDescription
e_vinteger(kind=I4P)in
neinteger(kind=I4P)in
nvinteger(kind=I4P)in
v2e_headinteger(kind=I4P)outallocatable
v2e_countinteger(kind=I4P)outallocatable
v2e_capinteger(kind=I4P)outallocatable
v2e_valinteger(kind=I4P)outallocatable

Call graph

cost_all_edges

fortran
subroutine cost_all_edges(e_v, ne, vcoord, Q, e_target, e_cost)

Arguments

NameTypeIntentAttributesDescription
e_vinteger(kind=I4P)in
neinteger(kind=I4P)in
vcoordreal(kind=R8P)in
Qreal(kind=R8P)in
e_targetreal(kind=R8P)inout
e_costreal(kind=R8P)inout

Call graph

cost_one_edge

fortran
subroutine cost_one_edge(va, vb, vcoord, Q, target, cost)

Arguments

NameTypeIntentAttributesDescription
vainteger(kind=I4P)in
vbinteger(kind=I4P)in
vcoordreal(kind=R8P)in
Qreal(kind=R8P)in
targetreal(kind=R8P)out
costreal(kind=R8P)out

Call graph

solve_3x3

Attributes: pure

fortran
subroutine solve_3x3(A, b, x, det)

Arguments

NameTypeIntentAttributesDescription
Areal(kind=R8P)in
breal(kind=R8P)in
xreal(kind=R8P)out
detreal(kind=R8P)out

Call graph

heap_build

fortran
subroutine heap_build(ne, e_alive, e_cost, heap, e_heappos, heap_size)

Arguments

NameTypeIntentAttributesDescription
neinteger(kind=I4P)in
e_alivelogicalin
e_costreal(kind=R8P)in
heapinteger(kind=I4P)inout
e_heapposinteger(kind=I4P)inout
heap_sizeinteger(kind=I4P)inout

Call graph

heap_decrease_key

fortran
subroutine heap_decrease_key(heap, e_heappos, e_cost, heap_size, e)

Arguments

NameTypeIntentAttributesDescription
heapinteger(kind=I4P)inout
e_heapposinteger(kind=I4P)inout
e_costreal(kind=R8P)in
heap_sizeinteger(kind=I4P)in
einteger(kind=I4P)in

Call graph

heap_increase_key

fortran
subroutine heap_increase_key(heap, e_heappos, e_cost, heap_size, e)

Arguments

NameTypeIntentAttributesDescription
heapinteger(kind=I4P)inout
e_heapposinteger(kind=I4P)inout
e_costreal(kind=R8P)in
heap_sizeinteger(kind=I4P)in
einteger(kind=I4P)in

Call graph

heap_insert

fortran
subroutine heap_insert(heap, e_heappos, e_cost, heap_size, e)

Arguments

NameTypeIntentAttributesDescription
heapinteger(kind=I4P)inout
e_heapposinteger(kind=I4P)inout
e_costreal(kind=R8P)in
heap_sizeinteger(kind=I4P)inout
einteger(kind=I4P)in

Call graph

heap_sift_up

fortran
subroutine heap_sift_up(heap, e_heappos, e_cost, heap_size, i)

Arguments

NameTypeIntentAttributesDescription
heapinteger(kind=I4P)inout
e_heapposinteger(kind=I4P)inout
e_costreal(kind=R8P)in
heap_sizeinteger(kind=I4P)in
iinteger(kind=I4P)in

Call graph

heap_sift_down

fortran
subroutine heap_sift_down(heap, e_heappos, e_cost, heap_size, i)

Arguments

NameTypeIntentAttributesDescription
heapinteger(kind=I4P)inout
e_heapposinteger(kind=I4P)inout
e_costreal(kind=R8P)in
heap_sizeinteger(kind=I4P)in
iinteger(kind=I4P)in

Call graph

gather_incidence

fortran
subroutine gather_incidence(head, count, val, vertex, out)

Arguments

NameTypeIntentAttributesDescription
headinteger(kind=I4P)inallocatable
countinteger(kind=I4P)in
valinteger(kind=I4P)inallocatable
vertexinteger(kind=I4P)in
outinteger(kind=I4P)outallocatable

Call graph

find_shared_facets

fortran
subroutine find_shared_facets(va, vb, f_v, facet_alive, shared_facets, n_shared)

Arguments

NameTypeIntentAttributesDescription
vainteger(kind=I4P)in
vbinteger(kind=I4P)in
f_vinteger(kind=I4P)in
facet_alivelogicalin
shared_facetsinteger(kind=I4P)out
n_sharedinteger(kind=I4P)out

Call graph

recost_va_edges

fortran
subroutine recost_va_edges(va, v2e_head, v2e_count, v2e_val, e_v, e_alive, vcoord, Q, e_target, e_cost, heap, e_heappos, heap_size)

Arguments

NameTypeIntentAttributesDescription
vainteger(kind=I4P)in
v2e_headinteger(kind=I4P)inallocatable
v2e_countinteger(kind=I4P)in
v2e_valinteger(kind=I4P)inallocatable
e_vinteger(kind=I4P)in
e_alivelogicalin
vcoordreal(kind=R8P)in
Qreal(kind=R8P)in
e_targetreal(kind=R8P)inout
e_costreal(kind=R8P)inout
heapinteger(kind=I4P)inout
e_heapposinteger(kind=I4P)inout
heap_sizeinteger(kind=I4P)inout

Call graph

materialize_output

fortran
subroutine materialize_output(facet, f_v, vcoord, facet_alive)

Arguments

NameTypeIntentAttributesDescription
facettype(facet_object)inoutallocatable
f_vinteger(kind=I4P)in
vcoordreal(kind=R8P)in
facet_alivelogicalin

Call graph

Functions

quadric_eval

Attributes: pure

Returns: real(kind=R8P)

fortran
function quadric_eval(Q, x) result(c)

Arguments

NameTypeIntentAttributesDescription
Qreal(kind=R8P)in
xreal(kind=R8P)in

Call graph

heap_pop

Returns: integer(kind=I4P)

fortran
function heap_pop(heap, e_heappos, e_cost, heap_size) result(top)

Arguments

NameTypeIntentAttributesDescription
heapinteger(kind=I4P)inout
e_heapposinteger(kind=I4P)inout
e_costreal(kind=R8P)in
heap_sizeinteger(kind=I4P)inout

Call graph

try_collapse

Returns: logical

fortran
function try_collapse(va, vb, target, f_v, vcoord, vertex_alive, facet_alive, v2f_head, v2f_count, v2f_cap, v2f_val, v2e_head, v2e_count, v2e_cap, v2e_val, e_v, e_alive, Q, nf_alive, e_target, e_cost, heap, e_heappos, heap_size) result(accepted)

Arguments

NameTypeIntentAttributesDescription
vainteger(kind=I4P)in
vbinteger(kind=I4P)in
targetreal(kind=R8P)in
f_vinteger(kind=I4P)inout
vcoordreal(kind=R8P)inout
vertex_alivelogicalinout
facet_alivelogicalinout
v2f_headinteger(kind=I4P)inoutallocatable
v2f_countinteger(kind=I4P)inoutallocatable
v2f_capinteger(kind=I4P)inoutallocatable
v2f_valinteger(kind=I4P)inoutallocatable
v2e_headinteger(kind=I4P)inoutallocatable
v2e_countinteger(kind=I4P)inoutallocatable
v2e_capinteger(kind=I4P)inoutallocatable
v2e_valinteger(kind=I4P)inoutallocatable
e_vinteger(kind=I4P)inout
e_alivelogicalinout
Qreal(kind=R8P)inout
nf_aliveinteger(kind=I4P)inout
e_targetreal(kind=R8P)inout
e_costreal(kind=R8P)inout
heapinteger(kind=I4P)inout
e_heapposinteger(kind=I4P)inout
heap_sizeinteger(kind=I4P)inout

Call graph

check_normal_flip

Returns: logical

fortran
function check_normal_flip(va, vb, target, facets_b, n_b, shared_facets, n_shared, f_v, vcoord, facet_alive) result(would_flip)

Arguments

NameTypeIntentAttributesDescription
vainteger(kind=I4P)in
vbinteger(kind=I4P)in
targetreal(kind=R8P)in
facets_binteger(kind=I4P)in
n_binteger(kind=I4P)in
shared_facetsinteger(kind=I4P)in
n_sharedinteger(kind=I4P)in
f_vinteger(kind=I4P)in
vcoordreal(kind=R8P)in
facet_alivelogicalin

Call graph

check_normal_flip_around_va

Returns: logical

fortran
function check_normal_flip_around_va(va, vb, target, v2f_head, v2f_count, v2f_val, shared_facets, n_shared, f_v, vcoord, facet_alive) result(would_flip)

Arguments

NameTypeIntentAttributesDescription
vainteger(kind=I4P)in
vbinteger(kind=I4P)in
targetreal(kind=R8P)in
v2f_headinteger(kind=I4P)inallocatable
v2f_countinteger(kind=I4P)in
v2f_valinteger(kind=I4P)inallocatable
shared_facetsinteger(kind=I4P)in
n_sharedinteger(kind=I4P)in
f_vinteger(kind=I4P)in
vcoordreal(kind=R8P)in
facet_alivelogicalin

Call graph

cross

Attributes: pure

Returns: real(kind=R8P)

fortran
function cross(a, b) result(c)

Arguments

NameTypeIntentAttributesDescription
areal(kind=R8P)in
breal(kind=R8P)in

Call graph

check_nonmanifold

Returns: logical

fortran
function check_nonmanifold(va, vb, v2e_head, v2e_count, v2e_val, e_v, e_alive, shared_facets, n_shared, f_v) result(would_nonmanifold)

Arguments

NameTypeIntentAttributesDescription
vainteger(kind=I4P)in
vbinteger(kind=I4P)in
v2e_headinteger(kind=I4P)inallocatable
v2e_countinteger(kind=I4P)in
v2e_valinteger(kind=I4P)inallocatable
e_vinteger(kind=I4P)in
e_alivelogicalin
shared_facetsinteger(kind=I4P)in
n_sharedinteger(kind=I4P)in
f_vinteger(kind=I4P)in

Call graph

find_edge

Returns: integer(kind=I4P)

fortran
function find_edge(va, vw, v2e_head, v2e_count, v2e_val, e_v, e_alive) result(e_found)

Arguments

NameTypeIntentAttributesDescription
vainteger(kind=I4P)in
vwinteger(kind=I4P)in
v2e_headinteger(kind=I4P)inallocatable
v2e_countinteger(kind=I4P)in
v2e_valinteger(kind=I4P)inallocatable
e_vinteger(kind=I4P)in
e_alivelogicalin

Call graph