Skip to main content

mesh_sieve/data/
mod.rs

1//! Data module: section and atlas
2#![warn(missing_docs)]
3
4pub mod atlas;
5pub mod bc;
6pub mod bundle;
7pub mod closure;
8pub mod constrained_section;
9pub mod coordinate_dm;
10pub mod coordinates;
11pub mod discretization;
12pub mod global_map;
13pub mod hanging_node_constraints;
14pub mod mixed_section;
15pub mod multi_section;
16pub mod section;
17pub mod section_layout;
18pub mod slice_storage;
19pub mod storage;
20#[cfg(feature = "wgpu")]
21pub mod wgpu;
22
23mod _debug_invariants;
24pub mod refine;
25
26#[allow(deprecated)]
27pub use crate::debug_invariants::DebugInvariants;
28
29pub use bc::{
30    CoastalBoundaryAssembly, CoastalBoundaryAssemblyError, CoastalBoundaryFaceSets,
31    FieldDofIndices, LabelQuery, apply_dirichlet_to_constrained_section,
32    apply_dirichlet_to_constrained_section_fields, apply_dirichlet_to_section,
33    apply_dirichlet_to_section_fields, coastal_boundary_face_sets, map_coastal_boundary_conditions,
34    resolve_coastal_boundary_assembly,
35};
36pub use closure::{
37    ClosureIndex, ClosureIndexCache, ClosureIndexKey, ClosureOrder, ClosurePointIndex,
38    FnSectionSym, IdentitySectionSym, SectionSym, TableSectionSym, TopologyVersion, add_closure,
39    build_closure_index, build_closure_index_unoriented, get_closure, get_closure_oriented,
40    set_closure,
41};
42pub use constrained_section::{
43    ConstrainedSection, ConstraintSet, DofConstraint, LabelConstraintSpec,
44    apply_constraints_to_section,
45};
46pub use coordinate_dm::{CoordinateDM, CoordinateNumbering};
47pub use discretization::{Discretization, DiscretizationMetadata, FieldDiscretization, RegionKey};
48pub use global_map::{LocalToGlobalMap, global_vector_for_map};
49pub use hanging_node_constraints::{
50    HangingDofConstraint, HangingNodeConstraints, LinearConstraintTerm,
51    apply_hanging_constraints_to_section, constraints_from_topological_anchors,
52};
53pub use mixed_section::{
54    MixedScalar, MixedSectionStore, ScalarType, TaggedSection, TaggedSectionBuffer,
55};
56pub use multi_section::{FieldSection, MultiSection, constrained_section_from_label_specs};
57pub use section::Section;
58pub use section_layout::{
59    DofLayout, build_layout_with, constrained_dof_len, layout_for_multi_section_with_periodic,
60    layout_for_section_with_constraints_and_periodic, local_vector_for_layout,
61    local_vector_for_section, multi_section_dof_len_with_constraints,
62};
63pub use slice_storage::SliceStorage;
64pub use storage::{Storage, VecStorage};
65#[cfg(feature = "wgpu")]
66pub use wgpu::WgpuStorage;
67
68/// Alias for the common Vec-backed section.
69pub type CpuSection<V> = section::Section<V, VecStorage<V>>;
70
71/// Coordinate storage wrapper with an attached dimension.
72pub use coordinates::Coordinates;
73/// Higher-order coordinate storage wrapper.
74pub use coordinates::HighOrderCoordinates;
75/// Velocity storage wrapper aligned with coordinate dimensions.
76pub use coordinates::MeshVelocity;
77
78/// Alias for the common Vec-backed coordinates bundle.
79pub type CpuCoordinates<V> = coordinates::Coordinates<V, VecStorage<V>>;
80/// Alias for the common Vec-backed velocity bundle.
81pub type CpuMeshVelocity<V> = coordinates::MeshVelocity<V, VecStorage<V>>;
82
83/// Alias for the common Vec-backed coordinate data manager.
84pub type CpuCoordinateDM<V> = coordinate_dm::CoordinateDM<V, VecStorage<V>>;
85
86/// Section alias for storing `CellType` data over points.
87pub type CellTypeSection<S> = section::Section<crate::topology::cell_type::CellType, S>;