use serde::{Deserialize, Serialize};
use crate::types::Velocity;
use std::fmt;
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
pub enum BoundaryCell {
Inflow { velocity: Velocity },
Outflow,
NoSlip,
}
impl fmt::Display for BoundaryCell {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
pub enum Cell {
Fluid,
Boundary(BoundaryCell),
}
impl fmt::Display for Cell {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}