Model: datum points, drawn as a small cross; each definition's users are public

Datum::Point joins planes and axes (checked like them, refused by
partitions with the kind named). The users each remove_* refuses with
(sets, materials, boundary conditions, loads, reference points, fluid
domains, datums) are public functions, so a caller can list them before
deleting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-14 23:51:01 -04:00
1 parent c1fd58c6ce
commit 0bf150633c
9 files changed
+104 -30

No files matched your search

+7 -3
View File
@@ -423,9 +423,13 @@ impl Model {
replace_existing(&mut self.fluid_domains, "fluid domain", name, domain)
}
/// The steps that solve a fluid domain, as `step \`name\`` strings.
pub fn fluid_domain_users(&self, name: &str) -> Vec<String> {
self.steps.iter().filter(|s| s.procedure.fluid_domain() == Some(name)).map(|s| format!("step `{}`", s.name)).collect()
}
pub fn remove_fluid_domain(&mut self, name: &str) -> Result<()> {
let users = self.steps.iter().filter(|s| s.procedure.fluid_domain() == Some(name)).map(|s| format!("step `{}`", s.name)).collect();
not_in_use("fluid domain", name, users)?;
not_in_use("fluid domain", name, self.fluid_domain_users(name))?;
remove_existing(&mut self.fluid_domains, "fluid domain", name).map(|_| ())
}
@@ -437,7 +441,7 @@ impl Model {
}
/// The fluid domains that use a material.
pub(crate) fn fluid_domain_users(&self, material: &str) -> impl Iterator<Item = &str> {
pub(crate) fn fluid_domains_of_material(&self, material: &str) -> impl Iterator<Item = &str> {
self.fluid_domains.iter().filter(move |(_, d)| d.material == material).map(|(n, _)| n.as_str())
}
}