Clippy lints
This commit is contained in:
parent
4d44b4a74a
commit
2d473b8255
|
@ -5,6 +5,7 @@ use super::GAMMA;
|
|||
use ndarray::{azip, ArrayView, ArrayViewMut, Dimension};
|
||||
|
||||
pub trait Evaluator<D: Dimension>: Send + Sync {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn evaluate(
|
||||
&self,
|
||||
t: Float,
|
||||
|
@ -55,6 +56,7 @@ pub trait EvaluatorPressure<D: Dimension>: Send + Sync {
|
|||
rho: ArrayView<Float, D>,
|
||||
out: ArrayViewMut<Float, D>,
|
||||
);
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn p(
|
||||
&self,
|
||||
t: Float,
|
||||
|
@ -70,6 +72,7 @@ pub trait EvaluatorPressure<D: Dimension>: Send + Sync {
|
|||
impl<'a, D: Dimension, BP: EvaluatorPressure<D>> Evaluator<D>
|
||||
for EvaluatorPressureWrapper<'a, D, BP>
|
||||
{
|
||||
#[allow(clippy::many_single_char_names)]
|
||||
fn evaluate(
|
||||
&self,
|
||||
t: Float,
|
||||
|
|
|
@ -330,6 +330,7 @@ impl Field {
|
|||
let (rho, rhou, rhov, e) = self.components_mut();
|
||||
vortex_param.evaluate(time, x, y, rho, rhou, rhov, e)
|
||||
}
|
||||
#[allow(clippy::erasing_op, clippy::identity_op)]
|
||||
fn iter(&self) -> impl ExactSizeIterator<Item = FieldValue> + '_ {
|
||||
let n = self.nx() * self.ny();
|
||||
let slice = self.0.as_slice().unwrap();
|
||||
|
|
|
@ -10,6 +10,7 @@ pub enum Evaluator {
|
|||
}
|
||||
|
||||
impl<D: Dimension> euler::eval::Evaluator<D> for Evaluator {
|
||||
#[allow(clippy::many_single_char_names)]
|
||||
fn evaluate(
|
||||
&self,
|
||||
t: Float,
|
||||
|
|
|
@ -79,6 +79,7 @@ pub struct EvaluatorConservation {
|
|||
}
|
||||
|
||||
impl<D: Dimension> euler::eval::Evaluator<D> for Evaluator {
|
||||
#[allow(clippy::many_single_char_names)]
|
||||
fn evaluate(
|
||||
&self,
|
||||
t: Float,
|
||||
|
@ -267,6 +268,7 @@ impl<D: Dimension> euler::eval::EvaluatorPressure<D> for EvaluatorPressure {
|
|||
})
|
||||
}
|
||||
|
||||
#[allow(clippy::many_single_char_names)]
|
||||
fn p(
|
||||
&self,
|
||||
t: Float,
|
||||
|
|
|
@ -77,12 +77,12 @@ fn main() {
|
|||
} = config.into_runtime();
|
||||
|
||||
let basesystem = system::BaseSystem::new(
|
||||
names.clone(),
|
||||
names,
|
||||
grids,
|
||||
0.0,
|
||||
operators,
|
||||
boundary_conditions,
|
||||
initial_conditions.clone(),
|
||||
initial_conditions,
|
||||
opt.output.clone(),
|
||||
);
|
||||
// System::new(grids, grid_connections, operators);
|
||||
|
|
|
@ -48,6 +48,7 @@ impl BaseSystem {
|
|||
output,
|
||||
}
|
||||
}
|
||||
#[allow(clippy::many_single_char_names)]
|
||||
pub fn create(self) -> System {
|
||||
let fnow = self
|
||||
.grids
|
||||
|
@ -134,7 +135,7 @@ impl BaseSystem {
|
|||
}
|
||||
}
|
||||
*/
|
||||
parsing::InitialConditions::Vortex(vortexparams) => sys.vortex(0.0, &vortexparams),
|
||||
parsing::InitialConditions::Vortex(vortexparams) => sys.vortex(0.0, vortexparams),
|
||||
parsing::InitialConditions::Expressions(expr) => {
|
||||
let t = 0.0;
|
||||
for (grid, field) in sys.grids.iter().zip(sys.fnow.iter_mut()) {
|
||||
|
@ -413,7 +414,7 @@ impl integrate::Integrable for SingleThreadedSystem {
|
|||
impl SingleThreadedSystem {
|
||||
pub fn vortex(&mut self, t: Float, vortex_params: &euler::VortexParameters) {
|
||||
for (f, g) in self.fnow.iter_mut().zip(&self.grids) {
|
||||
f.vortex(g.x(), g.y(), t, &vortex_params);
|
||||
f.vortex(g.x(), g.y(), t, vortex_params);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -281,6 +281,7 @@ pub(crate) fn diff_op_2d_fallback<const M: usize, const N: usize, const D: usize
|
|||
#[inline(always)]
|
||||
/// 2D diff when first axis is contiguous
|
||||
#[allow(unused)]
|
||||
#[allow(clippy::assign_op_pattern)]
|
||||
pub(crate) fn diff_op_2d_sliceable_y<const M: usize, const N: usize, const D: usize>(
|
||||
matrix: &BlockMatrix<Float, M, N, D>,
|
||||
optype: OperatorType,
|
||||
|
|
|
@ -215,7 +215,7 @@ pub fn integrate<BTableau: ButcherTableau, F: Integrable, RHS>(
|
|||
}
|
||||
};
|
||||
|
||||
rhs(&mut k[i], &fut, simtime);
|
||||
rhs(&mut k[i], fut, simtime);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue