IncidentField

Enum IncidentField 

Source
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

§direction: [f64; 3]

Direction of propagation (unit vector)

§amplitude: Complex64

Complex amplitude

§

PointSource

Point source (monopole): p = A * exp(ikr) / (4πr)

Fields

§position: [f64; 3]

Source position

§strength: Complex64

Source strength (volume velocity amplitude)

§

MultiplePlaneWaves(Vec<([f64; 3], Complex64)>)

Multiple plane waves

§

MultiplePointSources(Vec<([f64; 3], Complex64)>)

Multiple point sources

Implementations§

Source§

impl IncidentField

Source

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).

Source

pub fn plane_wave_neg_z() -> Self

Create a plane wave with unit amplitude traveling in -z direction

Source

pub fn plane_wave(direction: [f64; 3], amplitude: f64) -> Self

Create a plane wave with specified direction and amplitude

Source

pub fn point_source(position: [f64; 3], strength: f64) -> Self

Create a point source at given position

Source

pub fn evaluate_pressure( &self, points: &Array2<f64>, physics: &PhysicsParams, ) -> Array1<Complex64>

Evaluate incident pressure at given points

§Arguments
  • points - Evaluation points (N × 3 array)
  • physics - Physical parameters (contains wave number k)
§Returns

Complex pressure values at each point

Source

pub fn evaluate_normal_derivative( &self, points: &Array2<f64>, normals: &Array2<f64>, physics: &PhysicsParams, ) -> Array1<Complex64>

Evaluate incident velocity (∂p/∂n) at given points with normals

§Arguments
  • points - Evaluation points (N × 3 array)
  • normals - Unit normal vectors at each point (N × 3 array)
  • physics - Physical parameters
§Returns

Complex normal velocity values (actually ∂p/∂n, not v_n)

Source

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

Source

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

Source§

fn clone(&self) -> IncidentField

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IncidentField

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V