Expand description
Plot3D utilities for mesh connectivity, periodicity detection, and I/O.
The crate deliberately mirrors the structure of the legacy Python tooling. For a walkthrough of
the rotational periodicity workflow refer to the integration test
tests/test_rotational_periodicity.rs::rotational_periodicity_test, which doubles as a usage
example in the generated documentation (cargo doc --open).
§Diagonal Convention (FaceRecord)
FaceRecord uses il/jl/kl and ih/jh/kh to describe the two diagonal
corners of a face on a block. These are not guaranteed to satisfy
il <= ih; the ordering encodes orientation. When il > ih, the
I-axis is reversed on that face relative to the matching face on the
other block.
This matches the GridPro/GlennHT connectivity convention where
IMIN,JMIN,KMIN → IMAX,JMAX,KMAX are diagonal corners and reversed
indices encode face orientation.
Use the normalized accessors i_lo()/i_hi() when you need min/max values
for range iteration or face reconstruction.
§Orientation & Permutation System
When two block faces meet at an interface, their parametric (u, v) coordinate systems may be flipped, transposed, or both. The crate encodes all 8 valid orientations as a 3-bit index:
permutation_index = u_reversed | (v_reversed << 1) | (swapped << 2)The constant PERMUTATION_MATRICES holds the corresponding 2x2
matrices (one per index, 0 through 7). Each matrix transforms face2’s
parametric coordinates to align with face1’s.
Orientation stores the index together with an OrientationPlane
tag indicating whether the match is in-plane (same constant axis)
or cross-plane (different constant axes, requiring a swap). The
connectivity pipeline populates FaceMatch::orientation automatically
so downstream code can reconstruct the exact node-to-node mapping
without re-sampling block coordinates.
See the face_record module documentation for the full table and
usage examples.
Re-exports§
pub use block::Block;pub use block::FaceData;pub use block_analysis::block_connection_matrix;pub use block_analysis::build_connectivity_graph;pub use block_analysis::calculate_outward_normals;pub use block_analysis::check_collinearity;pub use block_analysis::find_bounding_faces;pub use block_analysis::find_closest_block;pub use block_analysis::get_outer_bounds;pub use block_analysis::standardize_block_orientation;pub use block_analysis::BlockConnectionOptions;pub use block_face_functions::create_face_from_diagonals;pub use block_face_functions::full_face_match;pub use block_face_functions::full_face_match_transformed;pub use block_face_functions::get_outer_faces;pub use block_face_functions::reduce_blocks;pub use block_face_functions::rotate_block;pub use block_face_functions::Face;pub use connectivity::align_face_orientations;pub use connectivity::connectivity;pub use connectivity::connectivity_fast;pub use connectivity::face_matches_to_dict;pub use connectivity::get_face_intersection;pub use cylindrical::find_angular_bounding_faces;pub use cylindrical::to_radius;pub use cylindrical::to_theta;pub use differencing::find_edges;pub use differencing::find_face_edges;pub use differencing::BlockDiff;pub use differencing::FaceDiff;pub use face_record::FaceKey;pub use face_record::FaceMatch;pub use face_record::FaceMatchPrinter;pub use face_record::FaceRecord;pub use face_record::FaceRecordTraits;pub use face_record::MatchPoint;pub use face_record::Orientation;pub use face_record::OrientationPlane;pub use face_record::PeriodicPair;pub use face_record::PERMUTATION_MATRICES;pub use graph::build_weighted_graph_from_face_matches;pub use graph::write_ddcmp;pub use graph::BlockGraph;pub use graph::WeightAggregate;pub use merge_blocks::combine_2_blocks_mixed_pairing;pub use merge_blocks::combine_blocks_mixed_pairs;pub use merge_blocks::combine_nxnxn_cubes_mixed_pairs;pub use point_match::point_match;pub use read::read_ap_nasa;pub use read::read_plot3d_ascii;pub use read::read_plot3d_binary;pub use read::BinaryFormat;pub use read::FloatPrecision;pub use rotational_periodicity::create_rotation_matrix;pub use rotational_periodicity::rotate_block_with_matrix;pub use rotational_periodicity::rotated_periodicity;pub use rotational_periodicity::rotational_periodicity;pub use serialization::face_match_to_diagonal_json;pub use serialization::face_match_to_json;pub use serialization::face_record_to_diagonal_json;pub use serialization::face_record_to_json;pub use serialization::permutation_matrices_json;pub use split_block::split_blocks;pub use split_block::SplitDirection;pub use translational_periodicity::translational_periodicity;pub use utils::apply_rotation;pub use utils::compute_min_gcd;pub use utils::Endian;pub use verification::apply_permutation;pub use verification::determine_plane;pub use verification::extract_canonical_grid;pub use verification::try_all_permutations;pub use verification::verify_connectivity;pub use verification::verify_match;pub use verification::verify_partial_match;pub use verification::verify_periodicity;pub use write::write_plot3d;
Modules§
- block
- block_
analysis - Block-level analysis: connectivity graphs, orientation standardization, bounding face detection, and outward normal computation.
- block_
face_ functions - connectivity
- Block-to-block face connectivity detection.
- cylindrical
- Cylindrical coordinate transforms and angular bounding face detection.
- differencing
- Forward and backward differencing for structured grid edges.
- face_
pool - Cylindrical-coordinate face pool and edge matching utilities for rotational periodicity detection.
- face_
record - Core data types for face connectivity:
FaceRecord,FaceMatch,MatchPoint, andOrientation. - graph
- Graph partitioning utilities for structured multi-block grids.
- merge_
blocks - point_
match - Point matching utilities for structured grid faces.
- read
- rotational_
periodicity - Utilities for detecting rotational periodicity in structured multi-block grids.
- serialization
- JSON serialization for face records and face matches.
- split_
block - Block splitting utilities that preserve multi-grid compatibility.
- translational_
periodicity - Translational periodicity detection for structured multi-block grids.
- utils
- verification
- Gold-standard verification for connectivity and periodicity.
- write
Constants§
Type Aliases§
- Float
- Floating-point precision type used throughout the crate.
Defaults to
f64; enable thef32Cargo feature for single precision.