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

A 1-dimensional Block connecting 2 Vertexs. More...

#include <Block.hpp>

Inheritance diagram for hexed::next::Edge:
hexed::next::Boundary_block hexed::next::Block hexed::Mortal hexed::mutual::Multiple< void, void > hexed::mutual::Base< void, void >

Public Member Functions

 Edge (Vertex &vertex0, Vertex &vertex1, const Basis &)
 Constructs an Edge with endpoints vertex0 and vertex1.
 
Vertexvertex (int i_vert)
 access the vertices (index 0 or 1)
 
const Vertexvertex (int i_vert) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
std::vector< Element_shape * > dependent_elements ()
 Obtains all the Element_shapes whose point() depends on this
 
std::vector< int > element_coords (std::vector< int >) const override
 Transforms node coordinates from the space of the Block to its Element_shape
 
std::vector< Vertex * > vertices () override
 
void reset () override
 sets interior() to linear interpolation between vertices
 
void set_points (Array< double > points) override
 Sets the interior, edge, and vertex points to points.
 
void glue (Edge &that, int half=no, bool reverse=false)
 Glues the edge to another edge (or half of it).
 
void unglue ()
 If this edge is currently glue()d, unglue it.
 
bool glued () const
 true iff this is currently glue()d to another edge
 
std::vector< Element_shape * > contacted_elements ()
 
Edgeglued_to ()
 
const Edgeglued_to () const
 
int glued_half () const
 
- Public Member Functions inherited from hexed::next::Boundary_block
 Boundary_block (int n_dim, const Basis &basis)
 
const Basisbasis () const
 
bool alive () const
 true iff this currently has an Element_shape referencing it.
 
void pair (mutual::Base< Element_shape, Boundary_block > &elem)
 sets elem to point to this
 
Element_shapeelement ()
 Get the element this is pair()d with (nullptr if not paired).
 
const Element_shapeelement () const
 
Array< double > interior ()
 A modifiable view of the interior points.
 
- Public Member Functions inherited from hexed::next::Block
 Block (int n_dim, int row_size)
 
int n_dim () const
 number of topological dimensions.
 
int row_size () const
 number nodes along each dimension
 
Mat< 3 > point (const std::vector< int > &node_coords, Int recursion_depth=0) const
 Obtains the node with array indices specified by node_coords.
 
Mat< 3 > point (int i_point, Int recursion_depth=0) const
 Obtains the node with flat index i_point
 
virtual Array< double > points () const
 Obtains all the nodes as a multidimensional array.
 
void visualize (std::string format, std::string file_name, double time=0.) const
 Visualizes the nodes of a single Block.
 
- Public Member Functions inherited from hexed::mutual::Multiple< void, void >
 Multiple (const Multiple &)=delete
 
 Multiple (Multiple &&that)
 steals all of that's partners, leaving that unconnected
 
Multipleoperator= (const Multiple &)=delete
 
Multipleoperator= (Multiple &&that)
 steals all of that's partners, leaving that unconnected
 
next::Sequence< Base< void, void > & > partners ()
 provides access to the list of partners
 
next::Sequence< const Base< void, void > & > partners () const
 provides access to the list of partners
 
- Public Member Functions inherited from hexed::mutual::Base< void, void >
virtual void * _mine ()
 
virtual const void * _mine () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Public Attributes

Int snapped_edge
 
- Public Attributes inherited from hexed::next::Boundary_block
bool snapping_problem
 

Static Public Attributes

static const int no = -1
 Used in glue() to indicate that you are not gluing to either half of the target edge.
 
- Static Public Attributes inherited from hexed::next::Block
static constexpr Int max_recursion_depth = 100
 

Additional Inherited Members

- Static Public Member Functions inherited from hexed::next::Block
static void visualize (std::string format, std::string file_name, next::Sequence< const Block & >, double time=0.)
 Visualizes the nodes of a set of Blocks.
 
- Protected Member Functions inherited from hexed::mutual::Base< void, void >
void _connect (Base< void, void > &that)
 may be overridden by derived classes to provide partners to data of some arbitrary type T
 
void _disconnect (Base< void, void > &that)
 mutually disconnects this and that by calling both of their _unset() member functions
 
- Static Protected Member Functions inherited from hexed::mutual::Base< void, void >
static void * _yours (Base< void, void > &that)
 Accesses the _mine() of that
 
static const void * _yours (const Base< void, void > &that)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
- Protected Attributes inherited from hexed::next::Boundary_block
Array< double > _interior
 storage for the interior points
 
- Protected Attributes inherited from hexed::mutual::Base< void, void >
Lock _lock
 

Detailed Description

A 1-dimensional Block connecting 2 Vertexs.

This class is only used to represent boundary edges, since interior edges are not free (their position is always determined by linear interpolation between the vertices). Both 2D and 3D meshes have Edges, but their role is different. In 3D, boundary Edges form the interfaces between boundary Surface_faces. In 2D, boundary Edges are the boundary faces (or boundary sides might be a better term).

Constructor & Destructor Documentation

◆ Edge()

hexed::next::Edge::Edge ( Vertex & vertex0,
Vertex & vertex1,
const Basis & b )

Constructs an Edge with endpoints vertex0 and vertex1.

point({0}) will return vertex0.point({}) and point({row_size() - 1}) will return vertex1.point({}). Vertex::eat can redirect these to point to different vertices.

Member Function Documentation

◆ dependent_elements()

std::vector< Element_shape * > hexed::next::Edge::dependent_elements ( )
virtual

Obtains all the Element_shapes whose point() depends on this

Implements hexed::next::Boundary_block.

◆ element_coords()

std::vector< int > hexed::next::Edge::element_coords ( std::vector< int > coords) const
overridevirtual

Transforms node coordinates from the space of the Block to its Element_shape

That is, element()->point(elemement_coords(coords)) should give the same result as point(coords).

Implements hexed::next::Boundary_block.

◆ glue()

void hexed::next::Edge::glue ( Edge & that,
int half = no,
bool reverse = false )

Glues the edge to another edge (or half of it).

Once this is called, the Block::interior() becomes irrelevant, and the Block::points are determine from that as follows:

  • If half == no, this->point returns the same as that.point
  • If half == 0, the points are interpolated to the first half ( \( \xi \in [0, 0.5] \)) of that.
  • If half == 1, the points are interpolated to the second half ( \( \xi \in [0.5, 1] \)) of that.
  • Any other values of half are illegal.

If that is destroyed, this edge is no longer glued and Block::point once again respects interior(). Unlike in the case of Vertex::glue, interior() is not updated to match the latest value of point().

◆ reset()

void hexed::next::Edge::reset ( )
overridevirtual

sets interior() to linear interpolation between vertices

Implements hexed::next::Boundary_block.

◆ set_points()

void hexed::next::Edge::set_points ( Array< double > points)
overridevirtual

Sets the interior, edge, and vertex points to points.

The interior(), as well as any connected Edges and Vertexs will be modified. After calling set_points(p), points() and p should be equal. The points provided as the argument must have the same shape as points().

Implements hexed::next::Boundary_block.

◆ vertices()

std::vector< Vertex * > hexed::next::Edge::vertices ( )
overridevirtual

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