Mesh¶
See mesh zonation for boundary labels, volume requirements, position direction, normalization, and the current single-cell-block assumption.
Zonation¶
Helpers for zonated meshes.
ZonationPatterns
¶
Definition of standard zonation patterns.
This calculates zonated variables based on the position of the mesh nodes.
random
staticmethod
¶
Draw random zonation using a local or caller-supplied generator.
linear_increase
staticmethod
¶
Linear increasing pattern in [min_value, max_value].
linear_decrease
staticmethod
¶
Linear decreasing pattern in [min_value, max_value].
exp_increase
staticmethod
¶
Exponential increasing pattern in [0, 1].
exp_decrease
staticmethod
¶
Exponential decreasing pattern in [0, 1].
only_periveneous
staticmethod
¶
Only periveneous pattern in [0, 1].
only_periportal
staticmethod
¶
Only periportal pattern in [0, 1].
sharp_periportal
staticmethod
¶
Sharp periportal pattern in [0, 1].
sharp_periveneous
staticmethod
¶
Sharp periveneous pattern in [0, 1].
ZonatedMesh
¶
Class for zonated meshes.
create_zonated_mesh_from_vtk
classmethod
¶
create_zonated_mesh_from_vtk(vtk_path, patterns=None, remove_point_data=True, remove_cell_data=True, copy_mesh=True, *, rng=None)
Return a zonated mesh; use rng for reproducible random patterns.
create_zonated_mesh
staticmethod
¶
Calculate positions using nearest boundary centers across all cell blocks.
cell_type labels interior, periportal, and perivenous cells as 0, 1,
and 2. Both boundary types are required. Supply finite nonnegative volumes
as volume or element_volume_point_TPM, with a positive total.
Geometry and fields are validated before modifying a mesh in place.
visualize_zonation_patterns
¶
visualize_zonation_patterns(mesh, results_path, image_name, data_layers, direction='horizontal', drange_type=None)
Visualize patterns with local ranges by default, importing rendering lazily.
example_mesh_zonation
¶
Export the zonation example, optionally rendering its patterns.
Serialization¶
These helpers serialize static meshes. Use the time-series conversion helpers in the data API for simulation time courses.