forked from 1b-agent/fieldcraft-upstream
Add the modelcraft-decks crate (empty: error type only) (#19)
So the Abaqus, Nastran and LS-DYNA writer tasks add their modules in parallel. Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm Co-authored-by: jyviko <2501648+jyviko@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
4 files changed
+42
No files matched your search
Generated
+8
@@ -1841,6 +1841,14 @@ dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "modelcraft-decks"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"modelcraft-model",
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "modelcraft-engine"
|
||||
version = "0.1.0"
|
||||
|
||||
@@ -15,6 +15,7 @@ repository = "https://github.com/jyviko/modelcraft"
|
||||
modelcraft-model = { path = "crates/model" }
|
||||
modelcraft-geometry = { path = "crates/geometry" }
|
||||
modelcraft-mesh = { path = "crates/mesh" }
|
||||
modelcraft-decks = { path = "crates/decks" }
|
||||
modelcraft-engine = { path = "crates/engine" }
|
||||
modelcraft-testkit = { path = "crates/testkit" }
|
||||
modelcraft-render = { path = "crates/render" }
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "modelcraft-decks"
|
||||
description = "ModelCraft's solver decks: Abaqus input, Nastran bulk data and LS-DYNA keyword writers (and later readers)"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
modelcraft-model = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
@@ -0,0 +1,20 @@
|
||||
//! Solver decks: the solver-neutral model written as Abaqus input, Nastran bulk data and LS-DYNA
|
||||
//! keyword files. Each format is its own module (`abaqus`, `nastran`, `lsdyna`), written from the
|
||||
//! vendor's public reference manual in our own words; examples and expected files are our own.
|
||||
//! Writers read [`modelcraft_model::Model`] and its `resolve()` result, never another format.
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, thiserror::Error)]
|
||||
pub enum Error {
|
||||
/// The model has something this format cannot express (named, with the format).
|
||||
#[error("not supported by {format}: {what}")]
|
||||
Unsupported { format: &'static str, what: String },
|
||||
/// The model is not ready to write (its check failed).
|
||||
#[error(transparent)]
|
||||
Model(#[from] modelcraft_model::Error),
|
||||
#[error("limit reached: {0}")]
|
||||
Limit(String),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
Reference in new issue
Block a user