pub enum IncidentField {
PlaneWave {
direction: [f64; 3],
amplitude: Complex64,
},
PointSource {
position: [f64; 3],
strength: Complex64,
},
MultiplePlaneWaves(Vec<([f64; 3], Complex64)>),
MultiplePointSources(Vec<([f64; 3], Complex64)>),
}Expand description
Incident field source type
Variants§
PlaneWave
Plane wave: p = A * exp(i k·x)
Fields
PointSource
Point source (monopole): p = A * exp(ikr) / (4πr)
Fields
MultiplePlaneWaves(Vec<([f64; 3], Complex64)>)
Multiple plane waves
MultiplePointSources(Vec<([f64; 3], Complex64)>)
Multiple point sources
Implementations§
Source§impl IncidentField
impl IncidentField
Sourcepub fn plane_wave_z() -> Self
pub fn plane_wave_z() -> Self
Create a plane wave with unit amplitude traveling in +z direction
This matches the standard convention for Mie scattering theory where the incident wave travels toward +z (positive z direction).
Sourcepub fn plane_wave_neg_z() -> Self
pub fn plane_wave_neg_z() -> Self
Create a plane wave with unit amplitude traveling in -z direction
Sourcepub fn plane_wave(direction: [f64; 3], amplitude: f64) -> Self
pub fn plane_wave(direction: [f64; 3], amplitude: f64) -> Self
Create a plane wave with specified direction and amplitude
Sourcepub fn point_source(position: [f64; 3], strength: f64) -> Self
pub fn point_source(position: [f64; 3], strength: f64) -> Self
Create a point source at given position
Sourcepub fn evaluate_pressure(
&self,
points: &Array2<f64>,
physics: &PhysicsParams,
) -> Array1<Complex64>
pub fn evaluate_pressure( &self, points: &Array2<f64>, physics: &PhysicsParams, ) -> Array1<Complex64>
Sourcepub fn evaluate_normal_derivative(
&self,
points: &Array2<f64>,
normals: &Array2<f64>,
physics: &PhysicsParams,
) -> Array1<Complex64>
pub fn evaluate_normal_derivative( &self, points: &Array2<f64>, normals: &Array2<f64>, physics: &PhysicsParams, ) -> Array1<Complex64>
Sourcepub fn compute_rhs(
&self,
element_centers: &Array2<f64>,
element_normals: &Array2<f64>,
physics: &PhysicsParams,
use_burton_miller: bool,
) -> Array1<Complex64>
pub fn compute_rhs( &self, element_centers: &Array2<f64>, element_normals: &Array2<f64>, physics: &PhysicsParams, use_burton_miller: bool, ) -> Array1<Complex64>
Compute the right-hand side vector for BEM
For exterior Neumann problem (rigid scatterer) using DIRECT formulation where the unknown is the total surface pressure p:
The RHS comes from the incident field contribution to the integral equation. From NumCalc NC_IncidentWaveRHS: RHS = -(γp_inc + βτ*∂p_inc/∂n)
For exterior problems: τ = +1, γ = 1 For interior problems: τ = -1
Sourcepub fn compute_rhs_with_beta(
&self,
element_centers: &Array2<f64>,
element_normals: &Array2<f64>,
physics: &PhysicsParams,
beta: Complex64,
) -> Array1<Complex64>
pub fn compute_rhs_with_beta( &self, element_centers: &Array2<f64>, element_normals: &Array2<f64>, physics: &PhysicsParams, beta: Complex64, ) -> Array1<Complex64>
Compute RHS with custom Burton-Miller coupling parameter
From NumCalc NC_IncidentWaveRHS: RHS = -(γp_inc + βτ*∂p_inc/∂n)
This formula matches the C++ implementation for proper BEM assembly.
Trait Implementations§
Source§impl Clone for IncidentField
impl Clone for IncidentField
Source§fn clone(&self) -> IncidentField
fn clone(&self) -> IncidentField
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for IncidentField
impl RefUnwindSafe for IncidentField
impl Send for IncidentField
impl Sync for IncidentField
impl Unpin for IncidentField
impl UnwindSafe for IncidentField
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more