Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
PyGlideSolver.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_PyGlideSolver_h_
9#define model_PyGlideSolver_h_
10
11//#include <PlanarDislocationNode.h>
12
13
14#ifndef NDEBUG
15#define VerbosePyGlideSolver(N,x) if(verbosePyGlideSolver>=N){std::cout<<x;}
16#else
17#define VerbosePyGlideSolver(N,x)
18#endif
19
20#include <iostream>
21
24
25#ifdef _MODEL_PYBIND11_
26#include <pybind11/embed.h>
27#include <pybind11/eigen.h>
28#include <pybind11/stl.h>
29#endif
30
31namespace model
32{
33 template<int dim> class DislocationNetwork;
34
35 template <int dim>
37 {
38 typedef typename DislocationNetwork<dim>::VectorDim VectorDim;
39 typedef typename DislocationNetwork<dim>::MatrixDim MatrixDim;
40 typedef typename DislocationNetwork<dim>::NetworkNodeType NetworkNodeType;
41 typedef typename DislocationNetwork<dim>::LoopNodeType LoopNodeType;
42 typedef typename DislocationNetwork<dim>::LoopType LoopType;
43 constexpr static int NdofXnode=NetworkNodeType::NdofXnode;
44
45 public:
46
47 const std::string pyModuleName;
48
49#ifdef _MODEL_PYBIND11_
50 pybind11::module pyModule;
51#endif
52
53 Eigen::MatrixXd updateUnconnectedNodePythonVelocity(const Eigen::MatrixXd& nodePythonVelocity, const std::map<size_t, size_t>& removedNodeIDmap) const;
54
56 Eigen::VectorXd getNodeVelocities() const override;
57
58 };
59
60}
61#endif
TraitsType::VectorDim VectorDim
TraitsType::LoopType LoopType
TraitsType::LoopNodeType LoopNodeType
TraitsType::NetworkNodeType NetworkNodeType
TraitsType::MatrixDim MatrixDim
Eigen::VectorXd getNodeVelocities() const override
Eigen::MatrixXd updateUnconnectedNodePythonVelocity(const Eigen::MatrixXd &nodePythonVelocity, const std::map< size_t, size_t > &removedNodeIDmap) const
const std::string pyModuleName
pybind11::module pyModule
PyGlideSolver(const DislocationNetwork< dim > &)
DislocationGlideSolverBase(const DislocationNetwork< dim > &)