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>
impl<T: Scalar, E: MappedFiniteElement<CellType = ReferenceCellType, T = T>> SingleElementGrid<T, E>
Sourcepub fn new(
topology: SingleTypeTopology,
geometry: SingleElementGeometry<T, E>,
) -> Self
pub fn new( topology: SingleTypeTopology, geometry: SingleElementGeometry<T, E>, ) -> Self
Create new
Source§impl<T: Scalar> SingleElementGrid<T, CiarletElement<T, IdentityMap, T>>
impl<T: Scalar> SingleElementGrid<T, CiarletElement<T, IdentityMap, T>>
Sourcepub fn new_from_raw_data(
coordinates: &[T],
gdim: usize,
cells: &[usize],
cell_type: ReferenceCellType,
geometry_degree: usize,
) -> Self
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>
impl<T: Debug + Scalar, E: Debug + MappedFiniteElement<CellType = ReferenceCellType, T = T>> Debug for SingleElementGrid<T, E>
Source§impl<T: Scalar + Equivalence, E: MappedFiniteElement<CellType = ReferenceCellType, T = T>> DistributableGrid for SingleElementGrid<T, E>
Available on crate feature mpi only.
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>>>
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>
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>
impl<T: Scalar, E: MappedFiniteElement<CellType = ReferenceCellType, T = T>> Grid for SingleElementGrid<T, E>
Source§type Entity<'a> = SingleElementGridEntity<'a, T, E>
where
Self: 'a
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
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 EntityDescriptor = ReferenceCellType
Type used as identifier of different entity types
Source§type EntityIter<'a> = SingleElementGridEntityIter<'a, T, E>
where
Self: 'a
type EntityIter<'a> = SingleElementGridEntityIter<'a, T, E> where Self: 'a
Iterator over sub-entities
Source§fn geometry_dim(&self) -> usize
fn geometry_dim(&self) -> usize
Dimension of the geometry of this grid
Source§fn topology_dim(&self) -> usize
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<'_>>
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]
fn entity_types(&self, dim: usize) -> &[ReferenceCellType]
The entity types of topological dimension
dim contained in this gridSource§fn entity_count(&self, entity_type: ReferenceCellType) -> usize
fn entity_count(&self, entity_type: ReferenceCellType) -> usize
Number of entities of type
entity_typeSource§fn entity_iter(&self, entity_type: ReferenceCellType) -> Self::EntityIter<'_>
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<'_>>
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>>
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
fn cell_count(&self) -> usize
Number of cells in the grid
Source§fn cell_types(&self) -> &[Self::EntityDescriptor]
fn cell_types(&self) -> &[Self::EntityDescriptor]
Return the cell types in the grid
Source§fn owned_cell_count(&self) -> usize
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>where
E: RefUnwindSafe,
T: RefUnwindSafe,
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>
impl<T, E> UnwindSafe for SingleElementGrid<T, E>where
E: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
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 Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
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,
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.
Source§impl<G> GmshExport for Gwhere
G: Grid<EntityDescriptor = ReferenceCellType>,
impl<G> GmshExport for Gwhere
G: Grid<EntityDescriptor = ReferenceCellType>,
Source§fn to_gmsh_string(&self) -> String
fn to_gmsh_string(&self) -> String
Generate the Gmsh string for a grid
Source§fn export_as_gmsh(&self, filename: &str)
fn export_as_gmsh(&self, filename: &str)
Export as Gmsh
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<G> RONExport for Gwhere
G: Grid + ConvertToSerializable,
impl<G> RONExport for Gwhere
G: Grid + ConvertToSerializable,
Source§fn to_ron_string(&self) -> String
fn to_ron_string(&self) -> String
Generate the RON string for a grid
Source§fn export_as_ron(&self, filename: &str)
fn export_as_ron(&self, filename: &str)
Export as RON
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
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
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.§impl<Src> TryFrom<Src> for Src
impl<Src> TryFrom<Src> for Src
§impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
§impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
§fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
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 Srcwhere
Dst: ValueFrom<Src>,
impl<Src, Dst> ValueInto<Dst> for Srcwhere
Dst: ValueFrom<Src>,
§fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
Convert the subject into an exactly equivalent representation.