Skip to content

Commit 6ce680c

Browse files
committed
Move enum
1 parent f5db51b commit 6ce680c

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

splashsurf/src/cli.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -80,26 +80,6 @@ impl Switch {
8080
}
8181
}
8282

83-
/// An enum for specifying the wanted kernel type in the CLI
84-
#[derive(Copy, Clone, Debug, PartialEq, Eq, clap::ValueEnum)]
85-
pub(crate) enum KernelType {
86-
CubicSpline,
87-
Poly6,
88-
Spiky,
89-
WendlandQuinticC2,
90-
}
91-
92-
impl KernelType {
93-
pub(crate) fn into_lib_enum(self) -> splashsurf_lib::kernel::KernelType {
94-
match self {
95-
KernelType::CubicSpline => splashsurf_lib::kernel::KernelType::CubicSpline,
96-
KernelType::Poly6 => splashsurf_lib::kernel::KernelType::Poly6,
97-
KernelType::Spiky => splashsurf_lib::kernel::KernelType::Spiky,
98-
KernelType::WendlandQuinticC2 => splashsurf_lib::kernel::KernelType::WendlandQuinticC2,
99-
}
100-
}
101-
}
102-
10383
/// Runs the splashsurf CLI with the provided command line arguments.
10484
///
10585
/// This function behaves like the binary `splashsurf` command line tool including output to stdout

splashsurf/src/reconstruct.rs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Implementation of the `reconstruct` subcommand of the splashsurf CLI.
22
3-
use crate::cli::{KernelType, Switch};
3+
use crate::cli::Switch;
44
use crate::reconstruct::arguments::*;
55
use crate::{io, logging};
66
use anyhow::{Context, anyhow};
@@ -388,6 +388,26 @@ pub(crate) struct ReconstructSubcommandArgs {
388388
pub check_mesh_debug: Switch,
389389
}
390390

391+
/// An enum for specifying the SPH kernel type used in the reconstruction
392+
#[derive(Copy, Clone, Debug, PartialEq, Eq, clap::ValueEnum)]
393+
pub(crate) enum KernelType {
394+
CubicSpline,
395+
Poly6,
396+
Spiky,
397+
WendlandQuinticC2,
398+
}
399+
400+
impl KernelType {
401+
pub(crate) fn into_lib_enum(self) -> splashsurf_lib::kernel::KernelType {
402+
match self {
403+
KernelType::CubicSpline => splashsurf_lib::kernel::KernelType::CubicSpline,
404+
KernelType::Poly6 => splashsurf_lib::kernel::KernelType::Poly6,
405+
KernelType::Spiky => splashsurf_lib::kernel::KernelType::Spiky,
406+
KernelType::WendlandQuinticC2 => splashsurf_lib::kernel::KernelType::WendlandQuinticC2,
407+
}
408+
}
409+
}
410+
391411
/// Executes the `reconstruct` subcommand
392412
pub(crate) fn reconstruct_subcommand(
393413
cmd_args: &ReconstructSubcommandArgs,

0 commit comments

Comments
 (0)