PLaSK library
|
Rectilinear mesh in 3D space. More...
#include <plask/mesh/rectilinear3d.hpp>
Classes | |
class | Element |
Represent FEM-like element in Rectilinear. More... | |
struct | ElementMesh |
Element mesh class. More... | |
struct | Elements |
Wrapper to Rectilinear which allow to access to FEM-like elements. More... | |
Public Types | |
enum | IterationOrder { ORDER_012 , ORDER_021 , ORDER_102 , ORDER_120 , ORDER_201 , ORDER_210 } |
Iteration orders: Every other order is proper permutation of indices. More... | |
Public Types inherited from plask::RectangularMeshBase3D | |
typedef plask::Boundary< RectangularMeshBase3D > | Boundary |
Boundary type. | |
Public Types inherited from plask::MeshD< 3 > | |
enum | |
Number of dimensions. More... | |
typedef Primitive< DIM >::DVec | LocalCoords |
Type of vector representing coordinates in local space. | |
typedef IndexedIterator< const MeshD< dimension >, LocalCoords > | const_iterator |
Random access iterator type which allow iterate over all points in this mesh, in order appointed by operator[]. | |
typedef const_iterator | iterator |
typedef const_iterator | Iterator |
Public Member Functions | |
Elements | elements () const |
Accessor to FEM-like elements. | |
Elements | getElements () const |
Element | element (std::size_t i0, std::size_t i1, std::size_t i2) const |
Element | getElement (std::size_t i0, std::size_t i1, std::size_t i2) const |
Element | element (std::size_t i) const |
Get an element with a given index i . | |
Element | getElement (std::size_t i) const |
Get an element with a given index i . | |
Box3D | getElementBox (std::size_t index0, std::size_t index1, std::size_t index2) const |
Get element as box. | |
void | setIterationOrder (IterationOrder order) |
Choose iteration order. | |
IterationOrder | getIterationOrder () const |
Get iteration order. | |
const char * | getIterationOrderAsArray () const |
Get iteration order as an array, e.g. | |
const char * | getAxisToIterationOrder () const |
Similar to getIterationOrderAsArray but the resulted array has exchanged indexes with values. | |
bool | isChangeSlower (std::size_t axis_index1, std::size_t axis_index2) const |
Check if axis with index axis_index1 changes slower than one with index axis_index2 when the mesh is changed by 1. | |
void | setOptimalIterationOrder () |
Set iteration order to the shortest axis changes fastest. | |
RectilinearMesh3D (IterationOrder iterationOrder=ORDER_012) | |
Construct mesh which has all axes of type OrderedAxis and all are empty. | |
RectilinearMesh3D (shared_ptr< MeshAxis > mesh0, shared_ptr< MeshAxis > mesh1, shared_ptr< MeshAxis > mesh2, IterationOrder iterationOrder=ORDER_012) | |
Construct mesh with is based on given 1D meshes. | |
void | reset (shared_ptr< MeshAxis > mesh0, shared_ptr< MeshAxis > mesh1, shared_ptr< MeshAxis > mesh2, IterationOrder iterationOrder=ORDER_012) |
Change axes and iteration order of this mesh. | |
RectilinearMesh3D (const RectilinearMesh3D &src, bool clone_axes=false) | |
Copy constructor. | |
void | reset (const RectilinearMesh3D &src, bool clone_axes=false) |
Change axes and iteration order of this mesh to the ones from src . | |
RectilinearMesh3D & | operator= (const RectilinearMesh3D &src) |
RectilinearMesh3D & | operator= (RectilinearMesh3D &&src) |
~RectilinearMesh3D () | |
void | setAxis (std::size_t axis_nr, shared_ptr< MeshAxis > new_val, bool fireResized=true) |
Change axis. | |
const shared_ptr< MeshAxis > | getAxis0 () const |
void | setAxis0 (shared_ptr< MeshAxis > a0) |
const shared_ptr< MeshAxis > | getAxis1 () const |
void | setAxis1 (shared_ptr< MeshAxis > a1) |
const shared_ptr< MeshAxis > | getAxis2 () const |
void | setAxis2 (shared_ptr< MeshAxis > a2) |
const shared_ptr< MeshAxis > & | getAxis (size_t n) const |
Get numbered axis. | |
const shared_ptr< MeshAxis > | majorAxis () const |
std::size_t | majorAxisIndex () const |
const shared_ptr< MeshAxis > | mediumAxis () const |
std::size_t | mediumAxisIndex () const |
const shared_ptr< MeshAxis > | minorAxis () const |
std::size_t | minorAxisIndex () const |
bool | operator== (const RectilinearMesh3D &to_compare) const |
Compare meshes. | |
bool | operator!= (const RectilinearMesh3D &to_compare) const |
std::size_t | size () const override |
Get number of points in the mesh. | |
bool | empty () const override |
virtual Vec< 3, double > | at (std::size_t index0, std::size_t index1, std::size_t index2) const =0 |
Get point with given mesh indices. | |
Vec< 3, double > | at (std::size_t index) const override |
Get point with given mesh index. | |
Vec< 3, double > | operator[] (std::size_t index) const |
Get point with given mesh index. | |
Vec< 3, double > | operator() (std::size_t index0, std::size_t index1, std::size_t index2) const |
Get point with given x and y indexes. | |
double | getElementMidpoint0 (std::size_t index0) const |
Get first coordinate of point in center of Elements. | |
double | getElementMidpoint1 (std::size_t index1) const |
Get second coordinate of point in center of Elements. | |
double | getElementMidpoint2 (std::size_t index2) const |
Get second coordinate of point in center of Elements. | |
virtual Vec< 3, double > | getElementMidpoint (std::size_t index0, std::size_t index1, std::size_t index2) const =0 |
Get point in center of Elements. | |
std::size_t | index (std::size_t c0_index, std::size_t c1_index, std::size_t c2_index) const |
Calculate this mesh index using indexes of c0, c1 and c2. | |
std::size_t | index (const Vec< 3, std::size_t > &indexes) const |
Calculate this mesh index using indexes of axis[0], axis[1] and axis[2]. | |
std::size_t | index0 (std::size_t mesh_index) const |
Calculate index of c0 using this mesh index. | |
std::size_t | index1 (std::size_t mesh_index) const |
Calculate index of c1 using this mesh index. | |
std::size_t | index2 (std::size_t mesh_index) const |
Calculate index of c2 using this mesh index. | |
template<std::size_t axis_nr> | |
std::size_t | index_axis (std::size_t mesh_index) const |
Calculate index of c<axis_nr> using this mesh index. | |
Vec< 3, std::size_t > | indexes (std::size_t mesh_index) const |
Calculate indexes of axes. | |
std::size_t | majorIndex (std::size_t mesh_index) const |
Calculate index of major axis using given mesh index. | |
std::size_t | middleIndex (std::size_t mesh_index) const |
Calculate index of middle axis using given mesh index. | |
std::size_t | minorIndex (std::size_t mesh_index) const |
Calculate index of minor axis using given mesh index. | |
std::size_t | getElementsCount0 () const |
Get number of elements (for FEM method) in the first direction. | |
std::size_t | getElementsCount1 () const |
Get number of elements (for FEM method) in the second direction. | |
size_t | getElementsCount2 () const |
Get number of elements (for FEM method) in the third direction. | |
size_t | getElementsCount () const |
Get number of elements (for FEM method). | |
std::size_t | getElementMeshLowIndex (std::size_t element_index) const |
Convert element index to mesh index of bottom, left, front element corner. | |
std::size_t | getElementIndexFromLowIndexes (std::size_t axis0_index, std::size_t axis1_index, std::size_t axis2_index) const |
Convert mesh indexes of a bottom-left corner of an element to the index of this element. | |
bool | isLowIndexOfElement (std::size_t meshIndex) const |
Check if mesh index is at the bottom, left, front corner of an element. | |
std::size_t | getElementIndexFromLowIndex (std::size_t mesh_index_of_el_bottom_left) const |
Convert mesh index of bottom, left, front element corner to this element index. | |
std::size_t | getElementIndexFromLowIndex (std::size_t axis0_index, std::size_t axis1_index, std::size_t axis2_index) const |
Convert indexes of mesh axes of lower (along all axes) element corner to index of this element. | |
Vec< 3, std::size_t > | getElementMeshLowIndexes (std::size_t element_index) const |
Convert element index to mesh indexes of bottom left element corner. | |
template<typename RandomAccessContainer > | |
auto | interpolateLinear (const RandomAccessContainer &data, const Vec< 3 > &point, const InterpolationFlags &flags) const -> typename std::remove_reference< decltype(data[0])>::type |
Calculate (using linear interpolation) value of data in point using data in points describe by this mesh. | |
template<typename RandomAccessContainer > | |
auto | interpolateNearestNeighbor (const RandomAccessContainer &data, Vec< 3 > point, const InterpolationFlags &flags) const -> typename std::remove_reference< decltype(data[0])>::type |
Calculate (using nearest neighbor interpolation) value of data in point using data in points describe by this mesh. | |
BoundaryNodeSet | createIndex0BoundaryAtLine (std::size_t line_nr_axis0) const override |
Create a node set which includes one plane in mesh, which has 0 coordinate equals to line_nr_axis0 . | |
BoundaryNodeSet | createBackBoundary () const override |
Create a node set which includes a whole back plane (face) of mesh. | |
BoundaryNodeSet | createFrontBoundary () const override |
Create a node set which includes a whole front plane (face) of mesh. | |
BoundaryNodeSet | createIndex1BoundaryAtLine (std::size_t line_nr_axis1) const override |
Create a node set which includes one plane in mesh, which has 1 coordinate equals to line_nr_axis1 . | |
BoundaryNodeSet | createLeftBoundary () const override |
Create a node set which includes a whole left plane (face) of mesh. | |
BoundaryNodeSet | createRightBoundary () const override |
Create a node set which includes a whole right plane (face) of mesh. | |
BoundaryNodeSet | createIndex2BoundaryAtLine (std::size_t line_nr_axis2) const override |
Create a node set which includes one plane in mesh, which has 2 coordinate equals to line_nr_axis2 . | |
BoundaryNodeSet | createBottomBoundary () const override |
Create a node set which shows a whole bottom plane (face) of mesh. | |
BoundaryNodeSet | createTopBoundary () const override |
Create a node set which shows a whole top plane (face) of mesh. | |
BoundaryNodeSet | createIndex0BoundaryAtLine (std::size_t line_nr_axis0, std::size_t index1Begin, std::size_t index1End, std::size_t index2Begin, std::size_t index2End) const override |
Create a node set which includes a rectangle in plane of mesh, which has 0 coordinate equals to line_nr_axis0 . | |
BoundaryNodeSet | createBackOfBoundary (const Box3D &box) const override |
Create a node set which has fixed index at axis 0 direction and lies on back of the box (at nearest plane inside the box). | |
BoundaryNodeSet | createFrontOfBoundary (const Box3D &box) const override |
Create a node set which has fixed index at axis 0 direction and lies on front of the box (at nearest plane inside the box). | |
BoundaryNodeSet | createIndex1BoundaryAtLine (std::size_t line_nr_axis1, std::size_t index0Begin, std::size_t index0End, std::size_t index2Begin, std::size_t index2End) const override |
Create a node set which includes a rectangle in plane of mesh, which has 0 coordinate equals to line_nr_axis1 . | |
BoundaryNodeSet | createLeftOfBoundary (const Box3D &box) const override |
Create a node set which has fixed index at axis 1 direction and lies on left face of the box (at nearest plane inside the box). | |
BoundaryNodeSet | createRightOfBoundary (const Box3D &box) const override |
Create a node set which has fixed index at axis 1 direction and lies on right face of the box (at nearest plane inside the box). | |
BoundaryNodeSet | createIndex2BoundaryAtLine (std::size_t line_nr_axis2, std::size_t index0Begin, std::size_t index0End, std::size_t index1Begin, std::size_t index1End) const override |
Create a node set which includes a rectangle in plane of mesh, which has 2 coordinate equals to line_nr_axis2 . | |
BoundaryNodeSet | createBottomOfBoundary (const Box3D &box) const override |
Create a node set which has fixed index at axis 2 direction and lies on bottom face of the box (at nearest plane inside the box). | |
BoundaryNodeSet | createTopOfBoundary (const Box3D &box) const override |
Create a node set which has fixed index at axis 2 direction and lies on top face of the box (at nearest plane inside the box). | |
Public Member Functions inherited from plask::MeshD< 3 > | |
LocalCoords | operator[] (std::size_t index) const |
Get point with given mesh index. | |
const_iterator | begin () const |
const_iterator | end () const |
MeshD (const MeshD &PLASK_UNUSED(to_copy)) | |
Initialize this to be the same as to_copy but don't copy any changes observer. | |
MeshD () | |
MeshD & | operator= (const MeshD &PLASK_UNUSED(to_copy)) |
Set this to be the same as to_copy but doesn't changed changes observer. | |
bool | operator== (const MeshD &to_compare) const |
Check if this mesh and to_compare represent the same sequence of points (have exactly the same points in the same order). | |
bool | operator!= (const MeshD &to_compare) const |
Check if this mesh and to_compare represent different sequences of points. | |
void | print (std::ostream &out) const override |
Print this to stream out . | |
Public Member Functions inherited from plask::Mesh | |
template<typename ClassT , typename methodT > | |
boost::signals2::connection | changedConnectMethod (ClassT *obj, methodT method, boost::signals2::connect_position at=boost::signals2::at_back) |
Connect a method to changed signal. | |
template<typename ClassT , typename methodT > | |
void | changedDisconnectMethod (ClassT *obj, methodT method) |
template<typename EventT = Event, typename ... Args> | |
void | fireChanged (Args &&... event_constructor_params_without_source) |
Call changed with this as event source. | |
void | fireResized () |
This method is called when the mesh is resized. | |
virtual void | writeXML (XMLElement &object) const |
Write mesh to XML. | |
virtual | ~Mesh () |
Public Member Functions inherited from plask::Printable | |
virtual | ~Printable () |
std::string | str () const |
Get string representation of this using print method. | |
Public Member Functions inherited from plask::MeshBase | |
virtual | ~MeshBase () |
Public Attributes | |
const shared_ptr< MeshAxis > | axis [3] |
First, second and third coordinates of points in this mesh. | |
Public Attributes inherited from plask::Mesh | |
boost::signals2::signal< void(Event &)> | changed |
Changed signal, fired when mesh was changed. | |
Protected Member Functions | |
bool | hasSameNodes (const MeshD< 3 > &to_compare) const override |
Protected Member Functions inherited from plask::MeshD< 3 > | |
virtual bool | hasSameNodes (const MeshD< dimension > &to_compare) const |
Check if this mesh and to_compare represent the same sequence of points (have exactly the same points in the same order). | |
Protected Member Functions inherited from plask::Mesh | |
virtual void | onChange (const Event &evt) |
This method is called when the mesh is changed, just before changed signal. | |
Additional Inherited Members | |
Static Public Member Functions inherited from plask::RectangularMeshBase3D | |
template<typename Predicate > | |
static Boundary | getBoundary (Predicate predicate) |
static Boundary | getIndex0BoundaryAtLine (std::size_t line_nr_axis0) |
Get boundary which shows one plane in mesh, which has 0 coordinate equals to line_nr_axis0 . | |
static Boundary | getIndex0BoundaryAtLine (std::size_t line_nr_axis0, std::size_t index1Begin, std::size_t index1End, std::size_t index2Begin, std::size_t index2End) |
Get boundary which shows a rectangle in plane of mesh, which has 0 coordinate equals to line_nr_axis0 . | |
static Boundary | getIndex1BoundaryAtLine (std::size_t line_nr_axis1) |
Get boundary which shows one plane in mesh, which has 1 coordinate equals to line_nr_axis1 . | |
static Boundary | getIndex1BoundaryAtLine (std::size_t line_nr_axis1, std::size_t index0Begin, std::size_t index0End, std::size_t index2Begin, std::size_t index2End) |
Get boundary which shows a rectangle in plane of mesh, which has 1 coordinate equals to line_nr_axis1 . | |
static Boundary | getIndex2BoundaryAtLine (std::size_t line_nr_axis2) |
Get boundary which shows one plane in mesh, which has 2 coordinate equals to line_nr_axis2 . | |
static Boundary | getIndex2BoundaryAtLine (std::size_t line_nr_axis2, std::size_t index0Begin, std::size_t index0End, std::size_t index1Begin, std::size_t index1End) |
Get boundary which shows a rectangle in plane of mesh, which has 2 coordinate equals to line_nr_axis2 . | |
static Boundary | getBackBoundary () |
Get boundary which show a whole back plane (face) of mesh. | |
static Boundary | getBackOfBoundary (const Box3D &box) |
Get a boundary which has fixed index at axis 0 direction and lies on back of the box (at nearest plane inside the box). | |
static Boundary | getFrontBoundary () |
Get boundary which show a whole front plane (face) of mesh. | |
static Boundary | getFrontOfBoundary (const Box3D &box) |
Get a boundary which has fixed index at axis 0 direction and lies on front of the box (at nearest plane inside the box). | |
static Boundary | getLeftBoundary () |
Get boundary which show a whole left plane (face) of mesh. | |
static Boundary | getLeftOfBoundary (const Box3D &box) |
Get a boundary which has fixed index at axis 1 direction and lies on left face of the box (at nearest plane inside the box). | |
static Boundary | getRightBoundary () |
Get boundary which show a whole right plane (face) of mesh. | |
static Boundary | getRightOfBoundary (const Box3D &box) |
Get a boundary which has fixed index at axis 1 direction and lies on right face of the box (at nearest plane inside the box). | |
static Boundary | getTopBoundary () |
Get boundary which show a whole top plane (face) of mesh. | |
static Boundary | getTopOfBoundary (const Box3D &box) |
Get a boundary which has fixed index at axis 2 direction and lies on top face of the box (at nearest plane inside the box). | |
static Boundary | getBottomBoundary () |
Get boundary which show a whole bottom plane (face) of mesh. | |
static Boundary | getBottomOfBoundary (const Box3D &box) |
Get a boundary which has fixed index at axis 2 direction and lies on top bottom of the box (at nearest plane inside the box). | |
static Boundary | getLeftOfBoundary (shared_ptr< const GeometryObject > object, const PathHints &path) |
Get boundary which lies on left faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getLeftOfBoundary (shared_ptr< const GeometryObject > object, const PathHints *path) |
Get boundary which lies on left faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getLeftOfBoundary (shared_ptr< const GeometryObject > object) |
Get boundary which lies on left faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getRightOfBoundary (shared_ptr< const GeometryObject > object, const PathHints &path) |
Get boundary which lies on right faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getRightOfBoundary (shared_ptr< const GeometryObject > object, const PathHints *path) |
Get boundary which lies on right faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getRightOfBoundary (shared_ptr< const GeometryObject > object) |
Get boundary which lies on right faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getBottomOfBoundary (shared_ptr< const GeometryObject > object, const PathHints &path) |
Get boundary which lies on bottom faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getBottomOfBoundary (shared_ptr< const GeometryObject > object, const PathHints *path) |
Get boundary which lies on bottom faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getBottomOfBoundary (shared_ptr< const GeometryObject > object) |
Get boundary which lies on bottom faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getTopOfBoundary (shared_ptr< const GeometryObject > object, const PathHints &path) |
Get boundary which lies on top faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getTopOfBoundary (shared_ptr< const GeometryObject > object) |
Get boundary which lies on top faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getTopOfBoundary (shared_ptr< const GeometryObject > object, const PathHints *path) |
Get boundary which lies on top faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getBackOfBoundary (shared_ptr< const GeometryObject > object, const PathHints &path) |
Get boundary which lies on back faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getBackOfBoundary (shared_ptr< const GeometryObject > object) |
Get boundary which lies on back faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getBackOfBoundary (shared_ptr< const GeometryObject > object, const PathHints *path) |
Get boundary which lies on back of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getFrontOfBoundary (shared_ptr< const GeometryObject > object, const PathHints &path) |
Get boundary which lies on front faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getFrontOfBoundary (shared_ptr< const GeometryObject > object) |
Get boundary which lies on front faces of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getFrontOfBoundary (shared_ptr< const GeometryObject > object, const PathHints *path) |
Get boundary which lies on front of bounding-boxes of objects (in geometry coordinates). | |
static Boundary | getBoundary (const std::string &boundary_desc) |
static Boundary | getBoundary (XMLReader &boundary_desc, Manager &manager) |
Rectilinear mesh in 3D space.
Includes three 1d rectilinear meshes:
Definition at line 39 of file rectilinear3d.hpp.
Iteration orders: Every other order is proper permutation of indices.
They mean ORDER_major,medium,minor, i.e. the last index changes fastest
Enumerator | |
---|---|
ORDER_012 | |
ORDER_021 | |
ORDER_102 | |
ORDER_120 | |
ORDER_201 | |
ORDER_210 |
Definition at line 349 of file rectilinear3d.hpp.
|
explicit |
Construct mesh which has all axes of type OrderedAxis and all are empty.
iterationOrder | iteration order |
Definition at line 92 of file rectilinear3d.cpp.
plask::RectilinearMesh3D::RectilinearMesh3D | ( | shared_ptr< MeshAxis > | mesh0, |
shared_ptr< MeshAxis > | mesh1, | ||
shared_ptr< MeshAxis > | mesh2, | ||
IterationOrder | iterationOrder = ORDER_012 |
||
) |
Construct mesh with is based on given 1D meshes.
mesh0 | mesh for the first coordinate |
mesh1 | mesh for the second coordinate |
mesh2 | mesh for the third coordinate |
iterationOrder | iteration order |
Definition at line 100 of file rectilinear3d.cpp.
plask::RectilinearMesh3D::RectilinearMesh3D | ( | const RectilinearMesh3D & | src, |
bool | clone_axes = false |
||
) |
Copy constructor.
src | mesh to copy |
clone_axes | whether axes of the src should be cloned (if true) or shared (if false; default) |
Definition at line 116 of file rectilinear3d.cpp.
plask::RectilinearMesh3D::~RectilinearMesh3D | ( | ) |
Definition at line 136 of file rectilinear3d.cpp.
Get point with given mesh index.
index | index of point, from 0 to size()-1 |
index
Implements plask::MeshD< 3 >.
Definition at line 550 of file rectilinear3d.hpp.
|
pure virtual |
Get point with given mesh indices.
index0 | index of point in axis0 |
index1 | index of point in axis1 |
index2 | index of point in axis2 |
index
Implemented in plask::EquilateralMesh3D, plask::RectangularMesh3D, and plask::RectangularMesh3D.
|
overridevirtual |
Create a node set which includes a whole back plane (face) of mesh.
Implements plask::RectangularMeshBase3D.
Definition at line 157 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which has fixed index at axis 0 direction and lies on back of the box
(at nearest plane inside the box).
box | box in which boundary should lie |
box
Implements plask::RectangularMeshBase3D.
Definition at line 204 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which shows a whole bottom plane (face) of mesh.
Implements plask::RectangularMeshBase3D.
Definition at line 187 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which has fixed index at axis 2 direction and lies on bottom face of the box
(at nearest plane inside the box).
box | box in which boundary should lie |
box
Implements plask::RectangularMeshBase3D.
Definition at line 264 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which includes a whole front plane (face) of mesh.
Implements plask::RectangularMeshBase3D.
Definition at line 161 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which has fixed index at axis 0 direction and lies on front of the box
(at nearest plane inside the box).
box | box in which boundary should lie |
box
Implements plask::RectangularMeshBase3D.
Definition at line 214 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which includes one plane in mesh, which has 0 coordinate equals to line_nr_axis0
.
line_nr_axis0 | index of axis[0] mesh |
Implements plask::RectangularMeshBase3D.
Definition at line 150 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which includes a rectangle in plane of mesh, which has 0 coordinate equals to line_nr_axis0
.
line_nr_axis0 | index of axis[0] mesh |
index1Begin,index1End,index2Begin,index2End | indexes which showes rectangle [index1Begin, index1End) x [index2Begin, index2End) |
Implements plask::RectangularMeshBase3D.
Definition at line 195 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which includes one plane in mesh, which has 1 coordinate equals to line_nr_axis1
.
line_nr_axis0 | index of axis[1] mesh |
Implements plask::RectangularMeshBase3D.
Definition at line 165 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which includes a rectangle in plane of mesh, which has 0 coordinate equals to line_nr_axis1
.
line_nr_axis1 | index of axis[1] mesh |
index0Begin,index0End,index2Begin,index2End | indexes which showes rectangle [index0Begin, index0End) x [index2Begin, index2End) |
Implements plask::RectangularMeshBase3D.
Definition at line 224 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which includes one plane in mesh, which has 2 coordinate equals to line_nr_axis2
.
line_nr_axis2 | index of axis[2] mesh |
Implements plask::RectangularMeshBase3D.
Definition at line 180 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which includes a rectangle in plane of mesh, which has 2 coordinate equals to line_nr_axis2
.
line_nr_axis2 | index of axis[2] mesh |
index0Begin,index0End,index1Begin,index1End | indexes which showes rectangle [index0Begin, index0End) x [index1Begin, index1End) |
Implements plask::RectangularMeshBase3D.
Definition at line 254 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which includes a whole left plane (face) of mesh.
Implements plask::RectangularMeshBase3D.
Definition at line 172 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which has fixed index at axis 1 direction and lies on left face of the box
(at nearest plane inside the box).
box | box in which boundary should lie |
box
Implements plask::RectangularMeshBase3D.
Definition at line 234 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which includes a whole right plane (face) of mesh.
Implements plask::RectangularMeshBase3D.
Definition at line 176 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which has fixed index at axis 1 direction and lies on right face of the box
(at nearest plane inside the box).
box | box in which boundary should lie |
box
Implements plask::RectangularMeshBase3D.
Definition at line 244 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which shows a whole top plane (face) of mesh.
Implements plask::RectangularMeshBase3D.
Definition at line 191 of file rectilinear3d.cpp.
|
overridevirtual |
Create a node set which has fixed index at axis 2 direction and lies on top face of the box
(at nearest plane inside the box).
box | box in which boundary should lie |
box
Implements plask::RectangularMeshBase3D.
Definition at line 274 of file rectilinear3d.cpp.
|
inline |
Get an element with a given index i
.
i | index of the element |
Definition at line 324 of file rectilinear3d.hpp.
|
inline |
Definition at line 316 of file rectilinear3d.hpp.
|
inline |
Accessor to FEM-like elements.
Definition at line 313 of file rectilinear3d.hpp.
|
inlineoverridevirtual |
Reimplemented from plask::Mesh.
Definition at line 534 of file rectilinear3d.hpp.
Definition at line 452 of file rectilinear3d.hpp.
Definition at line 456 of file rectilinear3d.hpp.
Definition at line 460 of file rectilinear3d.hpp.
Similar to getIterationOrderAsArray but the resulted array has exchanged indexes with values.
Resulted array is indexed by axis number (0, 1, 2) and the bigger value means that the index of the axis changes faster when index of the mesh is changed by 1.
Definition at line 381 of file rectilinear3d.hpp.
|
inline |
Get an element with a given index i
.
i | index of the element |
Definition at line 331 of file rectilinear3d.hpp.
|
inline |
Definition at line 317 of file rectilinear3d.hpp.
|
inline |
Get element as box.
index0,index1,index2 | index of element |
Definition at line 338 of file rectilinear3d.hpp.
|
inline |
Convert indexes of mesh axes of lower (along all axes) element corner to index of this element.
axis0_index,axis1_index,axis2_index | indexes of corner |
Definition at line 780 of file rectilinear3d.hpp.
|
inline |
Convert mesh index of bottom, left, front element corner to this element index.
mesh_index_of_el_bottom_left | mesh index |
Definition at line 769 of file rectilinear3d.hpp.
|
inline |
Convert mesh indexes of a bottom-left corner of an element to the index of this element.
axis0_index,axis1_index,axis2_index | indexs of the lower corner along the axis[0, 1 and 2] |
Definition at line 751 of file rectilinear3d.hpp.
|
inline |
Convert element index to mesh index of bottom, left, front element corner.
element_index | index of element, from 0 to getElementsCount()-1 |
Definition at line 739 of file rectilinear3d.hpp.
|
inline |
Convert element index to mesh indexes of bottom left element corner.
element_index | index of element, from 0 to getElementsCount()-1 |
Definition at line 790 of file rectilinear3d.hpp.
|
pure virtual |
Get point in center of Elements.
index0,index1,index2 | index of Elements |
Implemented in plask::EquilateralMesh3D, and plask::RectangularMesh3D.
|
inline |
Get first coordinate of point in center of Elements.
index0 | index of Elements (axis0 index) |
Definition at line 580 of file rectilinear3d.hpp.
|
inline |
Get second coordinate of point in center of Elements.
index1 | index of Elements (axis1 index) |
Definition at line 587 of file rectilinear3d.hpp.
|
inline |
Get second coordinate of point in center of Elements.
index2 | index of Elements (axis2 index) |
Definition at line 594 of file rectilinear3d.hpp.
|
inline |
Definition at line 314 of file rectilinear3d.hpp.
|
inline |
Get number of elements (for FEM method).
Definition at line 730 of file rectilinear3d.hpp.
|
inline |
Get number of elements (for FEM method) in the first direction.
Definition at line 703 of file rectilinear3d.hpp.
|
inline |
Get number of elements (for FEM method) in the second direction.
Definition at line 712 of file rectilinear3d.hpp.
|
inline |
Get number of elements (for FEM method) in the third direction.
Definition at line 721 of file rectilinear3d.hpp.
RectilinearMesh3D::IterationOrder plask::RectilinearMesh3D::getIterationOrder | ( | ) | const |
Get iteration order.
Definition at line 65 of file rectilinear3d.cpp.
Get iteration order as an array, e.g.
[1, 0, 2] is returned for ORDER_102.
Definition at line 369 of file rectilinear3d.hpp.
|
inlineoverrideprotected |
Definition at line 863 of file rectilinear3d.hpp.
Calculate this mesh index using indexes of axis[0], axis[1] and axis[2].
indexes | index of axis[0], axis[1] and axis[2] |
Definition at line 619 of file rectilinear3d.hpp.
|
inline |
Calculate this mesh index using indexes of c0, c1 and c2.
c0_index | index of c0, from 0 to c0.size()-1 |
c1_index | index of c1, from 0 to c1.size()-1 |
c2_index | index of c2, from 0 to c2.size()-1 |
Definition at line 610 of file rectilinear3d.hpp.
|
inline |
Calculate index of c0 using this mesh index.
mesh_index | this mesh index, from 0 to size()-1 |
Definition at line 628 of file rectilinear3d.hpp.
|
inline |
Calculate index of c1 using this mesh index.
mesh_index | this mesh index, from 0 to size()-1 |
Definition at line 637 of file rectilinear3d.hpp.
|
inline |
Calculate index of c2 using this mesh index.
mesh_index | this mesh index, from 0 to size()-1 |
Definition at line 646 of file rectilinear3d.hpp.
|
inline |
Calculate index of c<axis_nr> using this mesh index.
mesh_index | this mesh index, from 0 to size()-1 |
Definition at line 656 of file rectilinear3d.hpp.
|
inline |
Calculate indexes of axes.
mesh_index | this mesh index, from 0 to size()-1 |
Definition at line 668 of file rectilinear3d.hpp.
|
inline |
Calculate (using linear interpolation) value of data in point using data in points describe by this mesh.
data | values of data in points describe by this mesh |
point | point in which value should be calculate |
point
Definition at line 802 of file rectilinear3d.hpp.
|
inline |
Calculate (using nearest neighbor interpolation) value of data in point using data in points describe by this mesh.
data | values of data in points describe by this mesh |
point | point in which value should be calculate |
point
Definition at line 853 of file rectilinear3d.hpp.
|
inline |
Check if axis with index axis_index1
changes slower than one with index axis_index2
when the mesh is changed by 1.
array_index1,array_index2 | indexes of axes, 0, 1, or 2 |
axis_index1
changes slower than one with index axis_index2
Definition at line 391 of file rectilinear3d.hpp.
|
inline |
Check if mesh index is at the bottom, left, front corner of an element.
meshIndex | mesh index |
meshIndex
is at the bottom, left, front corner of an element Definition at line 760 of file rectilinear3d.hpp.
Definition at line 474 of file rectilinear3d.hpp.
|
inline |
Definition at line 479 of file rectilinear3d.hpp.
|
inline |
Calculate index of major axis using given mesh index.
mesh_index | this mesh index, from 0 to size()-1 |
Definition at line 677 of file rectilinear3d.hpp.
Definition at line 486 of file rectilinear3d.hpp.
|
inline |
Definition at line 491 of file rectilinear3d.hpp.
|
inline |
Calculate index of middle axis using given mesh index.
mesh_index | this mesh index, from 0 to size()-1 |
Definition at line 686 of file rectilinear3d.hpp.
Definition at line 498 of file rectilinear3d.hpp.
|
inline |
Definition at line 503 of file rectilinear3d.hpp.
|
inline |
Calculate index of minor axis using given mesh index.
mesh_index | this mesh index, from 0 to size()-1 |
Definition at line 695 of file rectilinear3d.hpp.
|
inline |
Definition at line 523 of file rectilinear3d.hpp.
|
inline |
Get point with given x and y indexes.
index0 | index of point in axis0 |
index1 | index of point in axis1 |
index2 | index of point in axis2 |
Definition at line 571 of file rectilinear3d.hpp.
|
inline |
Definition at line 438 of file rectilinear3d.hpp.
|
inline |
Definition at line 440 of file rectilinear3d.hpp.
|
inline |
Compare meshes.
to_compare | mesh to compare |
true
only if this mesh and to_compare
represents the same sequence of points Definition at line 514 of file rectilinear3d.hpp.
Get point with given mesh index.
Points are in order: (c0[0], c1[0], c2[0]), (c0[1], c1[0], c2[0]), ..., (c0[c0.size-1], c1[0], c2[0]), (c0[0], c1[1], c2[0]), ..., (c0[c0.size()-1], c1[c1.size()-1], c2[c2.size()-1])
index | index of point, from 0 to size()-1 |
index
Definition at line 560 of file rectilinear3d.hpp.
void plask::RectilinearMesh3D::reset | ( | const RectilinearMesh3D & | src, |
bool | clone_axes = false |
||
) |
Change axes and iteration order of this mesh to the ones from src
.
src | mesh to copy |
Definition at line 128 of file rectilinear3d.cpp.
void plask::RectilinearMesh3D::reset | ( | shared_ptr< MeshAxis > | mesh0, |
shared_ptr< MeshAxis > | mesh1, | ||
shared_ptr< MeshAxis > | mesh2, | ||
RectilinearMesh3D::IterationOrder | iterationOrder = ORDER_012 |
||
) |
Change axes and iteration order of this mesh.
mesh0 | mesh for the first coordinate |
mesh1 | mesh for the second coordinate |
mesh2 | mesh for the third coordinate |
iterationOrder | iteration order |
Definition at line 109 of file rectilinear3d.cpp.
void plask::RectilinearMesh3D::setAxis | ( | std::size_t | axis_nr, |
shared_ptr< MeshAxis > | new_val, | ||
bool | fireResized = true |
||
) |
Change axis.
axis_nr | number of axis to change |
new_val | new value for axis |
fireResized | whether to call fireResized() |
Definition at line 142 of file rectilinear3d.cpp.
Definition at line 454 of file rectilinear3d.hpp.
Definition at line 458 of file rectilinear3d.hpp.
Definition at line 462 of file rectilinear3d.hpp.
void plask::RectilinearMesh3D::setIterationOrder | ( | IterationOrder | order | ) |
Choose iteration order.
order | iteration order to use |
Definition at line 43 of file rectilinear3d.cpp.
void plask::RectilinearMesh3D::setOptimalIterationOrder | ( | ) |
Set iteration order to the shortest axis changes fastest.
Definition at line 74 of file rectilinear3d.cpp.
|
inlineoverridevirtual |
Get number of points in the mesh.
Implements plask::Mesh.
Definition at line 531 of file rectilinear3d.hpp.
First, second and third coordinates of points in this mesh.
Definition at line 310 of file rectilinear3d.hpp.