salvus.mesh.data_structures.salvus_mesh.algorithms.comparison
salvus.mesh.data_structures.salvus_mesh.algorithms.comparison salvus mesh data_structures salvus_mesh algorithms comparison Comparison functionality for meshes.
Functions
blocks_are_equal()
blocks_are_equal()def blocks_are_equal(
block_a: MeshBlock,
block_b: typing.Any,
raise_with_error_if_not_equal: bool = False,
expand_scalar_nodal_fields: bool = False,
) -> bool: ...Compare two mesh blocks for equality.
Parameters
block_aMeshBlock — First block to compare.block_btyping.Any — Second block to compare.raise_with_error_if_not_equalbool — If True, raise an error with a detailed report if the blocks are not equal.expand_scalar_nodal_fieldsbool — If True, consider scalar nodal fields equal to non-scalar nodal fields if the non-scalar field is constant and equal to the scalar value.
Returns bool — True if the blocks are equal, False otherwise.
meshes_are_equal()
meshes_are_equal()def meshes_are_equal(
mesh_a: Mesh,
mesh_b: typing.Any,
raise_with_error_if_not_equal: bool = False,
compare_migration_data: bool = False,
expand_scalar_nodal_fields: bool = False,
) -> bool: ...Compare two meshes for equality.
Parameters
mesh_aMesh — First mesh to compare.mesh_btyping.Any — Second mesh to compare.raise_with_error_if_not_equalbool — If True, raise an error with a detailed report if the meshes are not equal.compare_migration_databool — If True, compare the migration data of the meshes as well.expand_scalar_nodal_fieldsbool — If True, consider scalar nodal fields equal to non-scalar nodal fields if the non-scalar field is constant and equal to the scalar value.
Returns bool