Appearance
fossil_remesh
Source: src/lib/fossil_remesh.f90
Dependencies
Contents
- isotropic_remesh
- run_split_only
- run_split_and_collapse
- run_split_collapse_flip
- run_full_pipeline
- collect_state
- materialize
- collect_state_for_edges
- build_edge_list
- qsort_he
- ensure_facet_capacity
- build_vertex_lock
- grow_lock
- apply_split_pass
- apply_collapse_pass
- build_v2f
- try_collapse_edge
- apply_flip_pass
- compute_valences
- apply_relax_pass
- build_edges_with_facets
- append_vertex
- replace_facet_with_split
- append_facet
- qsort_real
- count_unique_edges
- compute_median_edge_length
- facet_would_flip
- cross
- vertex_neighbor_of
- edge_exists
- flip_would_break
- facet_normal_uv
- facet_area
- facet_apex
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
MAX_VAL | integer(kind=I4P) | parameter | |
FEATURE_DIHEDRAL_DEG | real(kind=R8P) | parameter | |
REM_STATUS_OK | integer(kind=I4P) | parameter | |
REM_STATUS_BAD_INPUT | integer(kind=I4P) | parameter |
Subroutines
isotropic_remesh
fortran
subroutine isotropic_remesh(facet, target_length, iterations, preserve_features, reference_facet, reference_tree, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
facet | type(facet_object) | inout | allocatable | |
target_length | real(kind=R8P) | in | ||
iterations | integer(kind=I4P) | in | ||
preserve_features | logical | in | ||
reference_facet | type(facet_object) | in | target, optional | |
reference_tree | type(aabb_tree_object) | in | target, optional | |
status | integer(kind=I4P) | out | optional |
Call graph
run_split_only
fortran
subroutine run_split_only(facet, target_length, n_iterations)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
facet | type(facet_object) | inout | allocatable | |
target_length | real(kind=R8P) | in | ||
n_iterations | integer(kind=I4P) | in |
Call graph
run_split_and_collapse
fortran
subroutine run_split_and_collapse(facet, target_length, n_iterations)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
facet | type(facet_object) | inout | allocatable | |
target_length | real(kind=R8P) | in | ||
n_iterations | integer(kind=I4P) | in |
Call graph
run_split_collapse_flip
fortran
subroutine run_split_collapse_flip(facet, target_length, n_iterations)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
facet | type(facet_object) | inout | allocatable | |
target_length | real(kind=R8P) | in | ||
n_iterations | integer(kind=I4P) | in |
Call graph
run_full_pipeline
fortran
subroutine run_full_pipeline(facet, target_length, n_iterations, reference_facet, reference_tree)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
facet | type(facet_object) | inout | allocatable | |
target_length | real(kind=R8P) | in | ||
n_iterations | integer(kind=I4P) | in | ||
reference_facet | type(facet_object) | in | target | |
reference_tree | type(aabb_tree_object) | in | target |
Call graph
collect_state
fortran
subroutine collect_state(facet, f_v, vcoord, nv, st)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
facet | type(facet_object) | in | ||
f_v | integer(kind=I4P) | out | allocatable | |
vcoord | real(kind=R8P) | out | allocatable | |
nv | integer(kind=I4P) | out | ||
st | integer(kind=I4P) | out |
Call graph
materialize
fortran
subroutine materialize(facet, f_v, vcoord, facet_alive)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
facet | type(facet_object) | inout | allocatable | |
f_v | integer(kind=I4P) | in | ||
vcoord | real(kind=R8P) | in | ||
facet_alive | logical | in |
Call graph
collect_state_for_edges
fortran
subroutine collect_state_for_edges(facet, f_v, nv, st)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
facet | type(facet_object) | in | ||
f_v | integer(kind=I4P) | out | allocatable | |
nv | integer(kind=I4P) | out | ||
st | integer(kind=I4P) | out |
Call graph
build_edge_list
fortran
subroutine build_edge_list(f_v, e_v, ne)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f_v | integer(kind=I4P) | in | ||
e_v | integer(kind=I4P) | out | allocatable | |
ne | integer(kind=I4P) | out |
Call graph
qsort_he
Attributes: recursive
fortran
subroutine qsort_he(he_lo, he_hi, order, lo, hi)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
he_lo | integer(kind=I4P) | in | ||
he_hi | integer(kind=I4P) | in | ||
order | integer(kind=I4P) | inout | ||
lo | integer(kind=I4P) | in | ||
hi | integer(kind=I4P) | in |
Call graph
ensure_facet_capacity
fortran
subroutine ensure_facet_capacity(f_v, facet_alive, used, needed)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f_v | integer(kind=I4P) | inout | allocatable | |
facet_alive | logical | inout | allocatable | |
used | integer(kind=I4P) | in | ||
needed | integer(kind=I4P) | in |
Call graph
build_vertex_lock
fortran
subroutine build_vertex_lock(f_v, vcoord, nv, preserve_features, vertex_locked)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f_v | integer(kind=I4P) | in | ||
vcoord | real(kind=R8P) | in | ||
nv | integer(kind=I4P) | in | ||
preserve_features | logical | in | ||
vertex_locked | logical | out | allocatable |
Call graph
grow_lock
fortran
subroutine grow_lock(vertex_locked, new_size)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
vertex_locked | logical | inout | allocatable | |
new_size | integer(kind=I4P) | in |
Call graph
apply_split_pass
fortran
subroutine apply_split_pass(L, f_v, vcoord, facet_alive, nv, nf_alive)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
L | real(kind=R8P) | in | ||
f_v | integer(kind=I4P) | inout | allocatable | |
vcoord | real(kind=R8P) | inout | allocatable | |
facet_alive | logical | inout | allocatable | |
nv | integer(kind=I4P) | inout | ||
nf_alive | integer(kind=I4P) | inout |
Call graph
apply_collapse_pass
fortran
subroutine apply_collapse_pass(L, f_v, vcoord, facet_alive, nf_alive, vertex_locked)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
L | real(kind=R8P) | in | ||
f_v | integer(kind=I4P) | inout | allocatable | |
vcoord | real(kind=R8P) | inout | allocatable | |
facet_alive | logical | inout | allocatable | |
nf_alive | integer(kind=I4P) | inout | ||
vertex_locked | logical | in |
Call graph
build_v2f
fortran
subroutine build_v2f(f_v, facet_alive, v2f, v2f_count)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f_v | integer(kind=I4P) | in | ||
facet_alive | logical | in | ||
v2f | integer(kind=I4P) | inout | ||
v2f_count | integer(kind=I4P) | inout |
Call graph
try_collapse_edge
fortran
subroutine try_collapse_edge(va, vb, f1, f2, target, f_v, vcoord, facet_alive, v2f, v2f_count, nf_alive)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
va | integer(kind=I4P) | in | ||
vb | integer(kind=I4P) | in | ||
f1 | integer(kind=I4P) | in | ||
f2 | integer(kind=I4P) | in | ||
target | real(kind=R8P) | in | ||
f_v | integer(kind=I4P) | inout | ||
vcoord | real(kind=R8P) | inout | ||
facet_alive | logical | inout | ||
v2f | integer(kind=I4P) | in | ||
v2f_count | integer(kind=I4P) | in | ||
nf_alive | integer(kind=I4P) | inout |
Call graph
apply_flip_pass
fortran
subroutine apply_flip_pass(f_v, vcoord, facet_alive, vertex_locked)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f_v | integer(kind=I4P) | inout | ||
vcoord | real(kind=R8P) | in | ||
facet_alive | logical | inout | ||
vertex_locked | logical | in |
Call graph
compute_valences
fortran
subroutine compute_valences(e_v, ne, nv, valence)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
e_v | integer(kind=I4P) | in | ||
ne | integer(kind=I4P) | in | ||
nv | integer(kind=I4P) | in | ||
valence | integer(kind=I4P) | out | allocatable |
Call graph
apply_relax_pass
fortran
subroutine apply_relax_pass(f_v, vcoord, facet_alive, reference_facet, reference_tree, vertex_locked)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f_v | integer(kind=I4P) | in | ||
vcoord | real(kind=R8P) | inout | ||
facet_alive | logical | in | ||
reference_facet | type(facet_object) | in | ||
reference_tree | type(aabb_tree_object) | in | ||
vertex_locked | logical | in |
Call graph
build_edges_with_facets
fortran
subroutine build_edges_with_facets(f_v, facet_alive, e_v, e_facets, ne)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f_v | integer(kind=I4P) | in | ||
facet_alive | logical | in | ||
e_v | integer(kind=I4P) | out | allocatable | |
e_facets | integer(kind=I4P) | out | allocatable | |
ne | integer(kind=I4P) | out |
Call graph
append_vertex
fortran
subroutine append_vertex(vcoord, nv, x, y, z, v_idx)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
vcoord | real(kind=R8P) | inout | allocatable | |
nv | integer(kind=I4P) | inout | ||
x | real(kind=R8P) | in | ||
y | real(kind=R8P) | in | ||
z | real(kind=R8P) | in | ||
v_idx | integer(kind=I4P) | out |
Call graph
replace_facet_with_split
fortran
subroutine replace_facet_with_split(f_v, facet_alive, nf_alive, used, f_old, va, vb, vm, w)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f_v | integer(kind=I4P) | inout | allocatable | |
facet_alive | logical | inout | allocatable | |
nf_alive | integer(kind=I4P) | inout | ||
used | integer(kind=I4P) | inout | ||
f_old | integer(kind=I4P) | in | ||
va | integer(kind=I4P) | in | ||
vb | integer(kind=I4P) | in | ||
vm | integer(kind=I4P) | in | ||
w | integer(kind=I4P) | in |
Call graph
append_facet
fortran
subroutine append_facet(f_v, facet_alive, used, vrt, f_idx)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f_v | integer(kind=I4P) | inout | allocatable | |
facet_alive | logical | inout | allocatable | |
used | integer(kind=I4P) | inout | ||
vrt | integer(kind=I4P) | in | ||
f_idx | integer(kind=I4P) | out |
Call graph
qsort_real
Attributes: recursive
fortran
subroutine qsort_real(a, lo, hi)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | real(kind=R8P) | inout | ||
lo | integer(kind=I4P) | in | ||
hi | integer(kind=I4P) | in |
Call graph
Functions
count_unique_edges
Returns: integer(kind=I4P)
fortran
function count_unique_edges(facet) result(ne)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
facet | type(facet_object) | in |
Call graph
compute_median_edge_length
Returns: real(kind=R8P)
fortran
function compute_median_edge_length(facet) result(med)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
facet | type(facet_object) | in |
Call graph
facet_would_flip
Attributes: pure
Returns: logical
fortran
function facet_would_flip(f_v, vcoord, f, va, vb, target) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f_v | integer(kind=I4P) | in | ||
vcoord | real(kind=R8P) | in | ||
f | integer(kind=I4P) | in | ||
va | integer(kind=I4P) | in | ||
vb | integer(kind=I4P) | in | ||
target | real(kind=R8P) | in |
Call graph
cross
Attributes: pure
Returns: real(kind=R8P)
fortran
function cross(a, b) result(c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | real(kind=R8P) | in | ||
b | real(kind=R8P) | in |
Call graph
vertex_neighbor_of
Attributes: pure
Returns: logical
fortran
function vertex_neighbor_of(va, w, f_v, v2f, v2f_count, facet_alive, exclude1, exclude2) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
va | integer(kind=I4P) | in | ||
w | integer(kind=I4P) | in | ||
f_v | integer(kind=I4P) | in | ||
v2f | integer(kind=I4P) | in | ||
v2f_count | integer(kind=I4P) | in | ||
facet_alive | logical | in | ||
exclude1 | integer(kind=I4P) | in | ||
exclude2 | integer(kind=I4P) | in |
Call graph
edge_exists
Attributes: pure
Returns: logical
fortran
function edge_exists(e_v, ne, va, vb) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
e_v | integer(kind=I4P) | in | ||
ne | integer(kind=I4P) | in | ||
va | integer(kind=I4P) | in | ||
vb | integer(kind=I4P) | in |
Call graph
flip_would_break
Attributes: pure
Returns: logical
fortran
function flip_would_break(va, vb, w1, w2, f1, f2, f_v, vcoord) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
va | integer(kind=I4P) | in | ||
vb | integer(kind=I4P) | in | ||
w1 | integer(kind=I4P) | in | ||
w2 | integer(kind=I4P) | in | ||
f1 | integer(kind=I4P) | in | ||
f2 | integer(kind=I4P) | in | ||
f_v | integer(kind=I4P) | in | ||
vcoord | real(kind=R8P) | in |
Call graph
facet_normal_uv
Attributes: pure
Returns: real(kind=R8P)
fortran
function facet_normal_uv(f_v, vcoord, f) result(n)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f_v | integer(kind=I4P) | in | ||
vcoord | real(kind=R8P) | in | ||
f | integer(kind=I4P) | in |
Call graph
facet_area
Attributes: pure
Returns: real(kind=R8P)
fortran
function facet_area(f_v, vcoord, f) result(area)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f_v | integer(kind=I4P) | in | ||
vcoord | real(kind=R8P) | in | ||
f | integer(kind=I4P) | in |
Call graph
facet_apex
Attributes: pure
Returns: integer(kind=I4P)
fortran
function facet_apex(f_v, f, va, vb) result(w)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
f_v | integer(kind=I4P) | in | ||
f | integer(kind=I4P) | in | ||
va | integer(kind=I4P) | in | ||
vb | integer(kind=I4P) | in |
Call graph