PLaSK library
|
Instance of this class allows for adding triangles to the mesh effectively. More...
#include <plask/mesh/triangular2d.hpp>
Public Member Functions | |
Builder (TriangularMesh2D &mesh) | |
Construct builder which will add triangles to the given mesh . | |
Builder (TriangularMesh2D &mesh, std::size_t predicted_number_of_elements, std::size_t predicted_number_of_nodes) | |
Construct builder which will add triangles to the given mesh . | |
Builder (TriangularMesh2D &mesh, std::size_t predicted_number_of_elements) | |
Construct builder which will add triangles to the given mesh . | |
~Builder () | |
Shrink to fit both: elements and nodes vectors of destination mesh. | |
Builder & | add (LocalCoords p1, LocalCoords p2, LocalCoords p3) |
Add a triangle to the mesh. | |
Builder & | add (const Element &e) |
Add a triangle to the mesh. | |
Builder & | add (const std::array< LocalCoords, 3 > &points) |
Add a triangle to the mesh. | |
Public Attributes | |
std::map< LocalCoords, std::size_t > | indexOfNode |
map nodes to their indexes in mesh.nodes vector | |
TriangularMesh2D & | mesh |
destination mesh | |
Instance of this class allows for adding triangles to the mesh effectively.
Definition at line 192 of file triangular2d.hpp.
|
explicit |
Construct builder which will add triangles to the given mesh
.
mesh | triangles destination |
Definition at line 52 of file triangular2d.cpp.
|
explicit |
Construct builder which will add triangles to the given mesh
.
This constructor preallocate extra space for elements and nodes in mesh
, which usually improves performance.
mesh | triangles destination |
predicted_number_of_elements | predicted (maximal) number of elements (triangles) to be added |
predicted_number_of_elements | predicted (maximal) number of nodes to be added |
Definition at line 57 of file triangular2d.cpp.
|
inlineexplicit |
Construct builder which will add triangles to the given mesh
.
This constructor preallocate extra space for elements and nodes (3*predicted_number_of_elements) in mesh
, which usually improves performance.
mesh | triangles destination |
predicted_number_of_elements | predicted (maximal) number of elements to be added |
Definition at line 221 of file triangular2d.hpp.
plask::TriangularMesh2D::Builder::~Builder | ( | ) |
Shrink to fit both: elements and nodes vectors of destination mesh.
Definition at line 64 of file triangular2d.cpp.
Add a triangle to the mesh.
e | a triangular element (from another mesh) which defines the triangle to add |
*this
Definition at line 239 of file triangular2d.hpp.
|
inline |
Add a triangle to the mesh.
points | a coordinates of vertices of the triangle to add |
*this
Definition at line 246 of file triangular2d.hpp.
Builder & plask::TriangularMesh2D::Builder::add | ( | LocalCoords | p1, |
LocalCoords | p2, | ||
LocalCoords | p3 | ||
) |
Add a triangle to the mesh.
p1,p2,p3 | coordinates of vertices of the triangle to add |
*this
std::map<LocalCoords, std::size_t> plask::TriangularMesh2D::Builder::indexOfNode |
map nodes to their indexes in mesh.nodes vector
Definition at line 193 of file triangular2d.hpp.
TriangularMesh2D& plask::TriangularMesh2D::Builder::mesh |
destination mesh
Definition at line 194 of file triangular2d.hpp.