Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
MeshPlane.h
Go to the documentation of this file.
1/* This file is part of MoDELib, the Mechanics Of Defects Evolution Library.
2 *
3 *
4 * MoDELib is distributed without any warranty under the
5 * GNU General Public License (GPL) v2 <http://www.gnu.org/licenses/>.
6 */
7
8#ifndef model_MeshPlane_H_
9#define model_MeshPlane_H_
10
11
12#include <cfloat>
13#include <tuple>
14#include <vector>
15#include <Eigen/Dense>
16#include <SimplicialMesh.h>
17#include <Polyhedron.h>
18#include <Plane.h>
19#include <StaticID.h>
22#include <MeshBoundarySegment.h>
24//#include <EmbeddedPolygonTriangulation.h>
25
26namespace model
27{
28
29
30 template <int dim>
31 struct MeshPlane : public StaticID<MeshPlane<dim>>
32 /* */,public Plane<dim>
33 {
34
35 typedef std::array<long int,dim+3> MeshPlaneKeyType;
36 typedef Eigen::Matrix<double,dim,1> VectorDim;
37 typedef Eigen::Matrix<double,dim-1,1> VectorLowerDim;
38 typedef Eigen::Matrix<double,dim,dim> MatrixDim;
39 typedef std::pair<VectorDim,const Simplex<dim,1>* const> RootType;
40 typedef std::deque<RootType> RootContainerType;
41
44
45
46 const std::pair<int,int> regionIDs;
48
50 const size_t& rID,
51 const VectorDim& p,
52 const VectorDim& n);
54 const size_t& rID1,
55 const size_t& rID2);
56 };
57
58 template <int dim,class T>
59 T& operator << (T& os, const MeshPlane<dim>& gp)
60 {
61 for (const auto& x : gp.meshIntersections)
62 {
63 os<<gp.sID<<" "<<*x;
64 }
65 return os;
66 }
67
68}
69#endif
const size_t sID
The static ID of this.
Definition StaticID.h:41
x
Definition int_R.m:12
T & operator<<(T &os, const PeriodicPlanePatchIO< dim > &ds)
std::array< long int, dim+3 > MeshPlaneKeyType
Definition MeshPlane.h:35
MeshPlane(const SimplicialMesh< dim > &mesh, const size_t &rID, const VectorDim &p, const VectorDim &n)
Definition MeshPlane.cpp:57
Eigen::Matrix< double, dim, dim > MatrixDim
Definition MeshPlane.h:38
const std::pair< int, int > regionIDs
Definition MeshPlane.h:46
static BoundingMeshSegments< dim > getFaceBoundary(const Polyhedron< dim, dim-1 > &face)
Definition MeshPlane.cpp:25
std::deque< RootType > RootContainerType
Definition MeshPlane.h:40
static void checkPlaneIntersections(const BoundingMeshSegments< dim > &temp)
Definition MeshPlane.cpp:38
const BoundingMeshSegments< dim > meshIntersections
Definition MeshPlane.h:47
Eigen::Matrix< double, dim, 1 > VectorDim
Definition MeshPlane.h:36
std::pair< VectorDim, const Simplex< dim, 1 > *const > RootType
Definition MeshPlane.h:39
Eigen::Matrix< double, dim-1, 1 > VectorLowerDim
Definition MeshPlane.h:37
Plane(const VectorDim &p, const VectorDim &n)
Definition Plane.cpp:20
vertex p[3]
vertex temp