Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
bitpit::Interface Class Reference

The Interface class defines the interfaces among cells. More...

Inheritance diagram for bitpit::Interface:
Inheritance graph
[legend]
Collaboration diagram for bitpit::Interface:
Collaboration graph
[legend]

Public Member Functions

 Interface ()
 
 Interface (long id, ElementType type, int connectSize=0)
 
 Interface (long id, ElementType type, std::unique_ptr< long[]> &&connectStorage)
 
 Interface (long id, ElementType type=ElementType::UNDEFINED)
 
void display (std::ostream &out, unsigned short int indent) const
 
long getNeigh () const
 
int getNeighFace () const
 
long getOwner () const
 
int getOwnerFace () const
 
std::array< long, 2 > getOwnerNeigh () const
 
void initialize (long id, ElementType type)
 
void initialize (long id, ElementType type, int connectSize)
 
void initialize (long id, ElementType type, std::unique_ptr< long[]> &&connectStorage)
 
bool isBorder () const
 
void setNeigh (long neigh, int neighFace)
 
void setOwner (long owner, int onwerFace)
 
void swap (Interface &other) noexcept
 
void unsetNeigh ()
 
void unsetOwner ()
 
- Public Member Functions inherited from bitpit::Element
 Element ()
 
 Element (const Element &other)
 
 Element (Element &&other)=default
 
 Element (long id, ElementType type, int connectSize=0)
 
 Element (long id, ElementType type, std::unique_ptr< long[]> &&connectStorage)
 
double evalArea (const std::array< double, 3 > *coordinates) const
 
std::array< double, 3 > evalCentroid (const std::array< double, 3 > *coordinates) const
 
double evalLength (const std::array< double, 3 > *coordinates) const
 
std::array< double, 3 > evalNormal (const std::array< double, 3 > *coordinates, const std::array< double, 3 > &orientation={{0., 0., 1.}}, const std::array< double, 3 > &point={{0.5, 0.5, 0.5}}) const
 
double evalPointDistance (const std::array< double, 3 > &point, const std::array< double, 3 > *coordinates) const
 
void evalPointProjection (const std::array< double, 3 > &point, const std::array< double, 3 > *coordinates, std::array< double, 3 > *projection, double *distance) const
 
double evalSize (const std::array< double, 3 > *coordinates) const
 
double evalVolume (const std::array< double, 3 > *coordinates) const
 
int findVertex (long vertexId) const
 
unsigned int getBinarySize () const
 
long * getConnect ()
 
const long * getConnect () const
 
int getConnectSize () const
 
int getDimension () const
 
ConstProxyVector< long > getEdgeConnect (int edge) const
 
int getEdgeCount () const
 
ConstProxyVector< int > getEdgeLocalConnect (int edge) const
 
ConstProxyVector< int > getEdgeLocalVertexIds (int edge) const
 
ElementType getEdgeType (int edge) const
 
int getEdgeVertexCount (int edge) const
 
long getEdgeVertexId (int edge, int vertex) const
 
ConstProxyVector< long > getEdgeVertexIds (int edge) const
 
ConstProxyVector< long > getFaceConnect (int face) const
 
int getFaceCount () const
 
ConstProxyVector< int > getFaceLocalConnect (int face) const
 
ConstProxyVector< int > getFaceLocalVertexIds (int face) const
 
std::vector< long > getFaceStream () const
 
int getFaceStreamPosition (int face) const
 
int getFaceStreamSize () const
 
ElementType getFaceType (int face) const
 
int getFaceVertexCount (int face) const
 
long getFaceVertexId (int face, int vertex) const
 
ConstProxyVector< long > getFaceVertexIds (int face) const
 
long getId () const
 
const ReferenceElementInfogetInfo () const
 
int getPID () const
 
ElementType getType () const
 
int getVertexCount () const
 
long getVertexId (int vertex) const
 
ConstProxyVector< long > getVertexIds () const
 
bool hasInfo () const
 
bool hasSameConnect (const Element &other) const
 
void initialize (long id, ElementType type, int connectSize=0)
 
void initialize (long id, ElementType type, std::unique_ptr< long[]> &&connectStorage)
 
bool isThreeDimensional () const
 
Elementoperator= (const Element &other)
 
Elementoperator= (Element &&other)=default
 
int renumberVertices (const std::unordered_map< long, long > &map)
 
void setConnect (std::unique_ptr< long[]> &&connect)
 
void setId (long id)
 
void setPID (int pid)
 
void setType (ElementType type)
 
void swap (Element &other) noexcept
 
void unsetConnect ()
 

Static Public Member Functions

static std::array< std::array< double, 3 >, 3 > evalRotationFromCartesian (std::array< double, 3 > &versor)
 
static std::array< std::array< double, 3 >, 3 > evalRotationInverse (const std::array< std::array< double, 3 >, 3 > &R)
 
static std::array< std::array< double, 3 >, 3 > evalRotationToCartesian (std::array< double, 3 > &versor)
 
static std::array< std::array< double, 3 >, 3 > evalRotationTranspose (const std::array< std::array< double, 3 >, 3 > &R)
 
- Static Public Member Functions inherited from bitpit::Element
static int getDimension (ElementType type)
 
static int getFaceStreamPosition (const long *connectivity, int face)
 
static ConstProxyVector< long > getVertexIds (ElementType type, const long *connectivity)
 
static bool isThreeDimensional (ElementType type)
 
static void renumberFaceStream (const PiercedStorage< long, long > &map, std::vector< long > *faceStream)
 

Additional Inherited Members

- Static Public Attributes inherited from bitpit::Element
static BITPIT_PUBLIC_API const long NULL_ID = std::numeric_limits<long>::min()
 

Detailed Description

The Interface class defines the interfaces among cells.

Interface is class that defines the interfaces among cells.

Definition at line 37 of file interface.hpp.

Constructor & Destructor Documentation

◆ Interface() [1/4]

bitpit::Interface::Interface ( )

Default constructor.

Definition at line 47 of file interface.cpp.

◆ Interface() [2/4]

bitpit::Interface::Interface ( long id,
ElementType type = ElementType::UNDEFINED )

Creates a new interface.

Parameters
idis the id that will be assigned to the element
typeis the type of the element

Definition at line 59 of file interface.cpp.

◆ Interface() [3/4]

bitpit::Interface::Interface ( long id,
ElementType type,
int connectSize = 0 )

Creates a new interface.

Parameters
idis the id that will be assigned to the element
typeis the type of the element
connectSizeis the size of the connectivity, this is only used if the element is not associated to a reference element

Definition at line 73 of file interface.cpp.

◆ Interface() [4/4]

bitpit::Interface::Interface ( long id,
ElementType type,
std::unique_ptr< long[]> && connectStorage )

Creates a new interface.

Parameters
idis the id that will be assigned to the element
typeis the type of the element
connectStorageis the storage the contains or will contain the connectivity of the element

Definition at line 87 of file interface.cpp.

Member Function Documentation

◆ display()

void bitpit::Interface::display ( std::ostream & out,
unsigned short int indent ) const

Displays interface information to an output stream

Parameters
[in]outis the output stream
[in]indentis the number of trailing spaces to prepend when writing the information

Definition at line 390 of file interface.cpp.

◆ evalRotationFromCartesian()

std::array< std::array< double, 3 >, 3 > bitpit::Interface::evalRotationFromCartesian ( std::array< double, 3 > & versor)
static

Evaluates the rotation matrix from the Cartesian coordinate system to a coordinate system build starting from the specified versor.

Evaluates the rotation matrix that needs to be applied to the Cartesian coordinate system to make it coincide with the coordinates system defined starting from the specified versor. The axes of the coordinate system are defined as follows:

  • the x axis is aligned with the versor;
  • the y axis is normal to the plane where the axis x-versor and z-Cartesian lay, or, if this two vectors are aligned, to the plane where the axis x-versor and x-Cartesian lay;
  • the z axis is obtained evaluating the cross product of the axis x-versor and y-versor.
Parameters
versoris the versor that defines the coordinate system
Returns
The rotation matrix from the Cartesian coordinate system to a coordinate system build starting from the specified versor.

Definition at line 192 of file interface.cpp.

◆ evalRotationInverse()

std::array< std::array< double, 3 >, 3 > bitpit::Interface::evalRotationInverse ( const std::array< std::array< double, 3 >, 3 > & R)
static

Evaluates the inverse of the specified rotation matrix.

Rotation matrices are orthogonal matrices, hence the inverse of a rotation matrix is equal to its transpose.

Parameters
Rthe rotation matrix to transpose
Returns
The inverse of the rotation matrix.

Definition at line 257 of file interface.cpp.

◆ evalRotationToCartesian()

std::array< std::array< double, 3 >, 3 > bitpit::Interface::evalRotationToCartesian ( std::array< double, 3 > & versor)
static

Evaluates the rotation matrix from the coordinate system build starting from the specified versor to the Cartesian coordinate system.

Evaluates the rotation matrix that needs to be applied to the coordinates system defined starting from the specified versor to make it coincide with the Cartesian coordinates system. This matrix can be evaluated as the inverse of the rotation matrix from the Cartesian coordinate system to the versor coordinate system.

Parameters
versoris the three-dimensional versor that defines the coordinate system
Returns
The rotation matrix from the coordinate system build starting from the specified versor to the Cartesian coordinate system.

Definition at line 243 of file interface.cpp.

◆ evalRotationTranspose()

std::array< std::array< double, 3 >, 3 > bitpit::Interface::evalRotationTranspose ( const std::array< std::array< double, 3 >, 3 > & R)
static

Evaluates the transpose of the specified rotation matrix.

Parameters
Rthe rotation matrix to transpose
Returns
The transposed rotation matrix.

Definition at line 268 of file interface.cpp.

◆ getNeigh()

long bitpit::Interface::getNeigh ( ) const

Gets the neighbour of the interface.

Returns
The neighbour of the nterface

Definition at line 357 of file interface.cpp.

◆ getNeighFace()

int bitpit::Interface::getNeighFace ( ) const

Gets the face of the neighbour associated with the interface.

Returns
The face of the neighbour associated with the interface

Definition at line 367 of file interface.cpp.

◆ getOwner()

long bitpit::Interface::getOwner ( ) const

Gets the owner of the interface.

Returns
The owner of the nterface

Definition at line 316 of file interface.cpp.

◆ getOwnerFace()

int bitpit::Interface::getOwnerFace ( ) const

Gets the face of the owner associated with the interface.

Returns
The face of the owner associated with the interface

Definition at line 326 of file interface.cpp.

◆ getOwnerNeigh()

std::array< long, 2 > bitpit::Interface::getOwnerNeigh ( ) const

Gets both the owner and the neighbour of the interface.

Returns
An array containing the owner and the neighbour of the interface.

Definition at line 378 of file interface.cpp.

◆ initialize() [1/3]

void bitpit::Interface::initialize ( long id,
ElementType type )

Initializes the data structures of the interface.

Parameters
idis the id of the element
typeis the type of the element

Definition at line 116 of file interface.cpp.

◆ initialize() [2/3]

void bitpit::Interface::initialize ( long id,
ElementType type,
int connectSize )

Initializes the data structures of the interface.

Parameters
idis the id of the element
typeis the type of the element
connectSizeis the size of the connectivity, this is only used if the element is not associated to a reference element

Definition at line 131 of file interface.cpp.

◆ initialize() [3/3]

void bitpit::Interface::initialize ( long id,
ElementType type,
std::unique_ptr< long[]> && connectStorage )

Initializes the data structures of the interface.

Parameters
idis the id of the element
typeis the type of the element
connectStorageis the storage the contains or will contain the connectivity of the element

Definition at line 146 of file interface.cpp.

◆ isBorder()

bool bitpit::Interface::isBorder ( ) const

Checks whether the interface is a border.

Returns
Returns true if the interface is a border, false otherwise.

Definition at line 285 of file interface.cpp.

◆ setNeigh()

void bitpit::Interface::setNeigh ( long neigh,
int neighFace )

Sets the neighbour of the interface.

Parameters
neighthe neighbour of the interface
neighFacethe neighbour's face adjacent to the interface

Definition at line 337 of file interface.cpp.

◆ setOwner()

void bitpit::Interface::setOwner ( long owner,
int onwerFace )

Sets the owner of the interface.

Parameters
ownerthe owner of the interface
onwerFacethe owner's face adjacent to the interface

Definition at line 296 of file interface.cpp.

◆ swap()

void bitpit::Interface::swap ( Interface & other)
noexcept

Exchanges the content of the interface by the content the specified other interface.

Parameters
otheris another interface whose content is swapped with that of this interface

Definition at line 100 of file interface.cpp.

◆ unsetNeigh()

void bitpit::Interface::unsetNeigh ( )

Deletes the neighbour of the interface.

Definition at line 346 of file interface.cpp.

◆ unsetOwner()

void bitpit::Interface::unsetOwner ( )

Deletes the owner of the interface.

Definition at line 305 of file interface.cpp.


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