hexed 0.4.0
 
Loading...
Searching...
No Matches
hexed::next::Mesh_blocks Class Reference

Stores all the Blocks for an entire mesh. More...

#include <Block.hpp>

Public Member Functions

 Mesh_blocks (int n_dim, const Basis &)
 Creates a Mesh_blocks with n_dim physical dimensions.
 
Sequence< Vertex & > verts ()
 List of all vertices.
 
Sequence< Vertex & > boundary_verts ()
 Access the list of all vertices which are on the surface boundary.
 
Sequence< Vertex & > interior_verts ()
 Access the list of all vertices which are not on the surface boundary.
 
Sequence< Edge & > edges_2d ()
 If 2D, obtains the list of surface edges.
 
Sequence< Surface_face & > faces_3d ()
 If 3D, obtains the list of surface faces.
 
Sequence< Boundary_block & > boundary_sides ()
 returns edges_2d or faces_3d, as appropriate
 
Element_shape create_element (Mat< 3 > pos, double size, int boundary_face=no_face)
 Constructs an element and returns it (you now own it).
 
Element_shape create_element (Mat< 3 > pos, Mat< 3 > shape, int boundary_face=no_face)
 
Int n_actual_verts () const
 

Public Attributes

const int n_dim
 number of dimensions (physical and topological)
 
const Basisbasis
 Basis used by all Blocks in this mesh.
 

Static Public Attributes

static const int no_face = -1
 Passed to create_element to indicate that no faces are on the surface boundary.
 

Detailed Description

Stores all the Blocks for an entire mesh.

To use, simply create elements with create_element() and connect them with Element_shape::connect. create_element() will automatically allocate any lower-dimensional entities (Vertex, Surface_face, Edge) necessary. Destroying elements will automatically free them (although they may not actually be destroyed until the relevant entity sequence is accessed).

Member Function Documentation

◆ boundary_verts()

Sequence< Vertex & > hexed::next::Mesh_blocks::boundary_verts ( )

Access the list of all vertices which are on the surface boundary.

Does not include vertices on the extremal boundaries.

◆ create_element()

Element_shape hexed::next::Mesh_blocks::create_element ( Mat< 3 > pos,
double size,
int boundary_face = no_face )

Constructs an element and returns it (you now own it).

Vertex 0 of the element has position pos. The element is initially Cartesian with side length size. If boundary_face is not Mesh_blocks::no_face, then the boundary_faceth face of the element is stipulated to be on the surface boundary and thus will have a Boundary_block associated with it. The vertices and Boundary_block (if any) of the element can be accessed in the lower-dimensional entity sequence access functions.

◆ edges_2d()

Sequence< Edge & > hexed::next::Mesh_blocks::edges_2d ( )

If 2D, obtains the list of surface edges.

If not 2D, returns an empty sequence.

◆ faces_3d()

Sequence< Surface_face & > hexed::next::Mesh_blocks::faces_3d ( )

If 3D, obtains the list of surface faces.

If not 3D, returns an empty sequence.

◆ interior_verts()

Sequence< Vertex & > hexed::next::Mesh_blocks::interior_verts ( )

Access the list of all vertices which are not on the surface boundary.

Includes vertices on the extremal boundaries.


The documentation for this class was generated from the following files: