The Interface class defines the interfaces among cells. More...
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 ReferenceElementInfo & | getInfo () 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 |
Element & | operator= (const Element &other) |
Element & | operator= (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() |
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.
bitpit::Interface::Interface | ( | ) |
Default constructor.
Definition at line 47 of file interface.cpp.
bitpit::Interface::Interface | ( | long | id, |
ElementType | type = ElementType::UNDEFINED ) |
Creates a new interface.
id | is the id that will be assigned to the element |
type | is the type of the element |
Definition at line 59 of file interface.cpp.
bitpit::Interface::Interface | ( | long | id, |
ElementType | type, | ||
int | connectSize = 0 ) |
Creates a new interface.
id | is the id that will be assigned to the element |
type | is the type of the element |
connectSize | is 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.
bitpit::Interface::Interface | ( | long | id, |
ElementType | type, | ||
std::unique_ptr< long[]> && | connectStorage ) |
Creates a new interface.
id | is the id that will be assigned to the element |
type | is the type of the element |
connectStorage | is the storage the contains or will contain the connectivity of the element |
Definition at line 87 of file interface.cpp.
void bitpit::Interface::display | ( | std::ostream & | out, |
unsigned short int | indent ) const |
Displays interface information to an output stream
[in] | out | is the output stream |
[in] | indent | is the number of trailing spaces to prepend when writing the information |
Definition at line 390 of file interface.cpp.
|
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:
versor | is the versor that defines the coordinate system |
Definition at line 192 of file interface.cpp.
|
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.
R | the rotation matrix to transpose |
Definition at line 257 of file interface.cpp.
|
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.
versor | is the three-dimensional versor that defines the coordinate system |
Definition at line 243 of file interface.cpp.
|
static |
Evaluates the transpose of the specified rotation matrix.
R | the rotation matrix to transpose |
Definition at line 268 of file interface.cpp.
long bitpit::Interface::getNeigh | ( | ) | const |
Gets the neighbour of the interface.
Definition at line 357 of file interface.cpp.
int bitpit::Interface::getNeighFace | ( | ) | const |
Gets the face of the neighbour associated with the interface.
Definition at line 367 of file interface.cpp.
long bitpit::Interface::getOwner | ( | ) | const |
Gets the owner of the interface.
Definition at line 316 of file interface.cpp.
int bitpit::Interface::getOwnerFace | ( | ) | const |
Gets the face of the owner associated with the interface.
Definition at line 326 of file interface.cpp.
std::array< long, 2 > bitpit::Interface::getOwnerNeigh | ( | ) | const |
Gets both the owner and the neighbour of the interface.
Definition at line 378 of file interface.cpp.
void bitpit::Interface::initialize | ( | long | id, |
ElementType | type ) |
Initializes the data structures of the interface.
id | is the id of the element |
type | is the type of the element |
Definition at line 116 of file interface.cpp.
void bitpit::Interface::initialize | ( | long | id, |
ElementType | type, | ||
int | connectSize ) |
Initializes the data structures of the interface.
id | is the id of the element |
type | is the type of the element |
connectSize | is 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.
void bitpit::Interface::initialize | ( | long | id, |
ElementType | type, | ||
std::unique_ptr< long[]> && | connectStorage ) |
Initializes the data structures of the interface.
id | is the id of the element |
type | is the type of the element |
connectStorage | is the storage the contains or will contain the connectivity of the element |
Definition at line 146 of file interface.cpp.
bool bitpit::Interface::isBorder | ( | ) | const |
Checks whether the interface is a border.
Definition at line 285 of file interface.cpp.
void bitpit::Interface::setNeigh | ( | long | neigh, |
int | neighFace ) |
Sets the neighbour of the interface.
neigh | the neighbour of the interface |
neighFace | the neighbour's face adjacent to the interface |
Definition at line 337 of file interface.cpp.
void bitpit::Interface::setOwner | ( | long | owner, |
int | onwerFace ) |
Sets the owner of the interface.
owner | the owner of the interface |
onwerFace | the owner's face adjacent to the interface |
Definition at line 296 of file interface.cpp.
|
noexcept |
Exchanges the content of the interface by the content the specified other interface.
other | is another interface whose content is swapped with that of this interface |
Definition at line 100 of file interface.cpp.
void bitpit::Interface::unsetNeigh | ( | ) |
Deletes the neighbour of the interface.
Definition at line 346 of file interface.cpp.
void bitpit::Interface::unsetOwner | ( | ) |
Deletes the owner of the interface.
Definition at line 305 of file interface.cpp.