SingleElementGrid

Struct SingleElementGrid 

Source
pub struct SingleElementGrid<T: Scalar, E: MappedFiniteElement<CellType = ReferenceCellType, T = T>> { /* private fields */ }
Expand description

Serial single element grid

Implementations§

Source§

impl<T: Scalar, E: MappedFiniteElement<CellType = ReferenceCellType, T = T>> SingleElementGrid<T, E>

Source

pub fn new( topology: SingleTypeTopology, geometry: SingleElementGeometry<T, E>, ) -> Self

Create new

Source§

impl<T: Scalar> SingleElementGrid<T, CiarletElement<T, IdentityMap, T>>

Source

pub fn new_from_raw_data( coordinates: &[T], gdim: usize, cells: &[usize], cell_type: ReferenceCellType, geometry_degree: usize, ) -> Self

Create new from raw data

Trait Implementations§

Source§

impl<T: Debug + Scalar, E: Debug + MappedFiniteElement<CellType = ReferenceCellType, T = T>> Debug for SingleElementGrid<T, E>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T: Scalar + Equivalence, E: MappedFiniteElement<CellType = ReferenceCellType, T = T>> DistributableGrid for SingleElementGrid<T, E>

Available on crate feature mpi only.
Source§

type ParallelGrid<'a, C: Communicator + 'a> = ParallelGridImpl<'a, C, SingleElementGrid<T, CiarletElement<T, IdentityMap, T>>>

Parallel grid type when distrubuted
Source§

fn distribute<'a, C: Communicator>( &self, comm: &'a C, partitioner: GraphPartitioner, ) -> Self::ParallelGrid<'a, C>

Distribute this grid in parallel
Source§

impl<T: Scalar, E: MappedFiniteElement<CellType = ReferenceCellType, T = T>> Grid for SingleElementGrid<T, E>

Source§

type T = T

Scalar type
Source§

type Entity<'a> = SingleElementGridEntity<'a, T, E> where Self: 'a

Type used as identifier of different entity types
Source§

type GeometryMap<'a> = GeometryMap<'a, T, BaseArray<VectorContainer<T>, 2>, BaseArray<VectorContainer<usize>, 2>> where Self: 'a

Geometry map type
Source§

type EntityDescriptor = ReferenceCellType

Type used as identifier of different entity types
Source§

type EntityIter<'a> = SingleElementGridEntityIter<'a, T, E> where Self: 'a

Iterator over sub-entities
Source§

fn geometry_dim(&self) -> usize

Dimension of the geometry of this grid
Source§

fn topology_dim(&self) -> usize

Dimension of the topology of this grid
Source§

fn entity( &self, entity_type: ReferenceCellType, local_index: usize, ) -> Option<Self::Entity<'_>>

An entity in this grid
Source§

fn entity_types(&self, dim: usize) -> &[ReferenceCellType]

The entity types of topological dimension dim contained in this grid
Source§

fn entity_count(&self, entity_type: ReferenceCellType) -> usize

Number of entities of type entity_type
Source§

fn entity_iter(&self, entity_type: ReferenceCellType) -> Self::EntityIter<'_>

Iterator over entities
Source§

fn entity_from_id( &self, entity_type: ReferenceCellType, id: usize, ) -> Option<Self::Entity<'_>>

An entity in this grid from an insertion id
Source§

fn geometry_map( &self, entity_type: ReferenceCellType, geometry_degree: usize, points: &[T], ) -> GeometryMap<'_, T, BaseArray<VectorContainer<T>, 2>, BaseArray<VectorContainer<usize>, 2>>

Geometry map from reference entity to physical entities at the given points Read more
Source§

fn cell_count(&self) -> usize

Number of cells in the grid
Source§

fn cell_types(&self) -> &[Self::EntityDescriptor]

Return the cell types in the grid
Source§

fn owned_cell_count(&self) -> usize

Owned cell count Read more

Auto Trait Implementations§

§

impl<T, E> Freeze for SingleElementGrid<T, E>

§

impl<T, E> RefUnwindSafe for SingleElementGrid<T, E>

§

impl<T, E> Send for SingleElementGrid<T, E>
where E: Send,

§

impl<T, E> Sync for SingleElementGrid<T, E>
where E: Sync,

§

impl<T, E> Unpin for SingleElementGrid<T, E>
where E: Unpin, T: Unpin,

§

impl<T, E> UnwindSafe for SingleElementGrid<T, E>
where E: UnwindSafe, T: UnwindSafe,

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
§

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src
where Scheme: ApproxScheme,

§

type Err = NoError

The error type produced by a failed conversion.
§

fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>

Convert the given value into an approximately equivalent representation.
§

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src
where Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,

§

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.
§

fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>

Convert the subject into an approximately equivalent representation.
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
§

impl<T, Dst> ConvAsUtil<Dst> for T

§

fn approx(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject with the default scheme.
§

fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject with a specific scheme.
§

impl<T> ConvUtil for T

§

fn approx_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject to a given type with the default scheme.
§

fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject to a given type with a specific scheme.
§

fn into_as<Dst>(self) -> Dst
where Self: Sized + Into<Dst>,

Convert the subject to a given type.
§

fn try_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + TryInto<Dst>,

Attempt to convert the subject to a given type.
§

fn value_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ValueInto<Dst>,

Attempt a value conversion of the subject to a given type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<G> GmshExport for G
where G: Grid<EntityDescriptor = ReferenceCellType>,

Source§

fn to_gmsh_string(&self) -> String

Generate the Gmsh string for a grid
Source§

fn export_as_gmsh(&self, filename: &str)

Export as Gmsh
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<G> RONExport for G
where G: Grid + ConvertToSerializable,

Source§

fn to_ron_string(&self) -> String

Generate the RON string for a grid
Source§

fn export_as_ron(&self, filename: &str)

Export as RON
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
§

impl<Src> TryFrom<Src> for Src

§

type Err = NoError

The error type produced by a failed conversion.
§

fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>

Convert the given value into the subject type.
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.
§

impl<Src, Dst> TryInto<Dst> for Src
where Dst: TryFrom<Src>,

§

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.
§

fn try_into(self) -> Result<Dst, <Src as TryInto<Dst>>::Err>

Convert the subject into the destination type.
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.
§

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

§

fn vzip(self) -> V

§

impl<Src> ValueFrom<Src> for Src

§

type Err = NoError

The error type produced by a failed conversion.
§

fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>

Convert the given value into an exactly equivalent representation.
§

impl<Src, Dst> ValueInto<Dst> for Src
where Dst: ValueFrom<Src>,

§

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.
§

fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>

Convert the subject into an exactly equivalent representation.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T, U> Imply<T> for U