pub struct SpectralElementMesh2D {
pub elements: Vec<QuadElement>,
pub nodes: Vec<(f64, f64)>,
pub global_to_local: Vec<Vec<(usize, usize, usize)>>,
pub boundary_nodes: Vec<(usize, BoundaryConditionType)>,
pub order: (usize, usize),
pub num_nodes: usize,
}Expand description
Spectral element mesh for 2D problems
Fields§
§elements: Vec<QuadElement>Elements in the mesh
nodes: Vec<(f64, f64)>Global node coordinates (x, y)
global_to_local: Vec<Vec<(usize, usize, usize)>>Global-to-local mapping for nodes
boundary_nodes: Vec<(usize, BoundaryConditionType)>Boundary nodes with condition info
order: (usize, usize)Polynomial order in each direction
num_nodes: usizeTotal number of nodes in the mesh
Implementations§
Source§impl SpectralElementMesh2D
impl SpectralElementMesh2D
Sourcepub fn rectangular(
x_range: [f64; 2],
y_range: [f64; 2],
nx: usize,
ny: usize,
order: usize,
) -> PDEResult<Self>
pub fn rectangular( x_range: [f64; 2], y_range: [f64; 2], nx: usize, ny: usize, order: usize, ) -> PDEResult<Self>
Create a new rectangular spectral element mesh
§Arguments
x_range- Range for the x-coordinate domain [x_min, x_max]y_range- Range for the y-coordinate domain [y_min, y_max]nx- Number of elements in the x directionny- Number of elements in the y directionorder- Polynomial order in each element (p, p)
§Returns
- A structured rectangular mesh of quadrilateral elements
Sourcepub fn set_boundary_conditions(
&mut self,
boundary_conditions: &[BoundaryCondition<f64>],
) -> PDEResult<()>
pub fn set_boundary_conditions( &mut self, boundary_conditions: &[BoundaryCondition<f64>], ) -> PDEResult<()>
Trait Implementations§
Source§impl Clone for SpectralElementMesh2D
impl Clone for SpectralElementMesh2D
Source§fn clone(&self) -> SpectralElementMesh2D
fn clone(&self) -> SpectralElementMesh2D
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SpectralElementMesh2D
impl RefUnwindSafe for SpectralElementMesh2D
impl Send for SpectralElementMesh2D
impl Sync for SpectralElementMesh2D
impl Unpin for SpectralElementMesh2D
impl UnwindSafe for SpectralElementMesh2D
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
Mutably borrows from an owned value. Read more
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>
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 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>
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