Syntax
[VLi,TLi]=TLFLneighbors(TL,FL,[fi])
Input Parameter
TL : | | tetrahedron list nx4 |
FL : | | facet list nx3 |
fi : | | optional selection list for FL; default is 1:end |
Output Parameter
VLi : | | cell array of the vertex indices attached to the facets |
TLi : | | Tetrahedron indices attached to the facets |
Copyright 2014-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This algorithm is designed to find the vertex indices of a tetrahedron list that are attached to a given facet list. It is implemented in a MATLAB function called TLFLneighbors
. Below is a detailed explanation of the algorithm and its parameters.
Input Parameters
- TL: A matrix representing the tetrahedron list, where each row contains four vertex indices that form a tetrahedron. The size of this matrix is
n x 4
.
- FL: A matrix representing the facet list, where each row contains three vertex indices that form a facet. The size of this matrix is
n x 3
.
- fi (optional): A vector specifying a selection of facets from the facet list
FL
. If not provided, the default is to consider all facets, i.e., 1:end
.
Output Results
- VLi: A cell array where each cell contains the vertex indices of the tetrahedrons that are attached to the corresponding facet in
FL
.
- TLi: A cell array where each cell contains the indices of the tetrahedrons that are attached to the corresponding facet in
FL
.
Algorithm Steps
- Initialize the selection of facets
fi
to all facets if not provided. If fi
is provided, update FL
to include only the selected facets.
- Create two cell arrays,
VLi
and TLi
, with the same number of rows as FL
. These will store the vertex and tetrahedron indices, respectively.
- Iterate over each facet in
FL
:
- For each facet, find the indices of tetrahedrons in
TL
that share exactly three vertices with the facet. This is done using the ismember
function to check membership of each vertex in the facet.
- Store the indices of these tetrahedrons in the corresponding cell of
TLi
.
- If any tetrahedrons are found, compute the set difference between the vertices of these tetrahedrons and the facet vertices to find the additional vertex. Store these vertices in the corresponding cell of
VLi
.
Algorithm explaination created using ChatGPT on 2025-08-19 01:41. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21