Struct GeoModel

Source
pub struct GeoModel<'a> {
    pub name: &'static str,
    pub c_name: CString,
    /* private fields */
}
Expand description

An instance of the built-in geometry kernel.

Fields§

§name: &'static str

The model name.

§c_name: CString

The model name used to talk to C.

Implementations§

§

impl<'a> GeoModel<'a>

Autogenerated method implementations for the built-in geometry kernel

pub fn add_point(&mut self, x: f64, y: f64, z: f64) -> GmshResult<PointTag>

Add a point to the model by specifying its coordinates.

pub fn add_point_with_lc( &mut self, x: f64, y: f64, z: f64, lc: f64, ) -> GmshResult<PointTag>

Add a point to the model and specify a target mesh size lc there.

pub fn remove_point(&mut self, p: PointTag) -> GmshResult<()>

Delete a point from the Gmsh model.

pub fn add_line(&mut self, p1: PointTag, p2: PointTag) -> GmshResult<CurveTag>

Add a straight line between two points.

pub fn add_curve_loop(&mut self, curves: &[CurveTag]) -> GmshResult<WireTag>

Add a curve loop from a closed set of curves.

pub fn add_plane_surface(&mut self, boundary: WireTag) -> GmshResult<SurfaceTag>

Add a surface from a WireTag of a closed curve set.

pub fn curve_or_surface_op<T: Into<CurveOrSurface>>(&mut self, gen_entity: T)

A certain operation that only works for curves and surfaces.

pub fn add_plane_surface_with_holes( &mut self, boundary: WireTag, holes: &[WireTag], ) -> GmshResult<SurfaceTag>

Add a surface with holes.

Source§

impl<'a> GeoModel<'a>

Source

pub fn create(_: &'a Gmsh, name: &'static str) -> GmshResult<Self>

Create a new Gmsh model.

Source

pub fn remove(self) -> GmshResult<()>

Remove model from Gmsh.

Source

pub fn set_current(&self) -> GmshResult<()>

Set model to current model.

Source

pub fn synchronize(&mut self) -> GmshResult<()>

Synchronize the underlying CAD representation.

Source

pub fn generate_mesh(&mut self, dim: i32) -> GmshResult<()>

Mesh the model.

Auto Trait Implementations§

§

impl<'a> Freeze for GeoModel<'a>

§

impl<'a> RefUnwindSafe for GeoModel<'a>

§

impl<'a> Send for GeoModel<'a>

§

impl<'a> Sync for GeoModel<'a>

§

impl<'a> Unpin for GeoModel<'a>

§

impl<'a> UnwindSafe for GeoModel<'a>

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