forked from 1b-agent/fieldcraft-upstream
engine: a prescribed displacement or temperature satisfies the loads stage (#356)
The setup checklist asked for a load on rubber-seal, driven only by a prescribed displacement, while model.check called it ready. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
febcffefd6
commit
8819ff787c
2 files changed
+24
-1
No files matched your search
@@ -172,6 +172,16 @@ impl BoundaryCondition {
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether it drives the model on its own, as a load does: a non-zero prescribed
|
||||
/// displacement or a non-zero prescribed temperature (a support only holds).
|
||||
pub fn drives(&self) -> bool {
|
||||
match self {
|
||||
BoundaryCondition::Displacement { values, .. } => values.iter().flatten().any(|v| *v != 0.0),
|
||||
BoundaryCondition::Temperature { value, .. } => *value != 0.0,
|
||||
BoundaryCondition::Fixed { .. } | BoundaryCondition::Symmetry { .. } => false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether it prescribes temperatures (rather than motion).
|
||||
pub fn is_thermal(&self) -> bool {
|
||||
matches!(self, BoundaryCondition::Temperature { .. })
|
||||
|
||||
Reference in new issue
Block a user