MeshPart: modernize C++: replace 'typedef' with 'using'
This commit is contained in:
@@ -932,9 +932,9 @@ void MeshProjection::projectParallelToMesh (const TopoDS_Shape &aShape, const Ba
|
||||
std::vector<Base::Vector3f> points;
|
||||
discretize(aEdge, points, 5);
|
||||
|
||||
typedef std::pair<Base::Vector3f, MeshCore::FacetIndex> HitPoint;
|
||||
using HitPoint = std::pair<Base::Vector3f, MeshCore::FacetIndex>;
|
||||
std::vector<HitPoint> hitPoints;
|
||||
typedef std::pair<HitPoint, HitPoint> HitPoints;
|
||||
using HitPoints = std::pair<HitPoint, HitPoint>;
|
||||
std::vector<HitPoints> hitPointPairs;
|
||||
for (auto it : points) {
|
||||
Base::Vector3f result;
|
||||
@@ -977,9 +977,9 @@ void MeshProjection::projectParallelToMesh (const std::vector<PolyLine> &aEdges,
|
||||
for (const auto& it : aEdges) {
|
||||
std::vector<Base::Vector3f> points = it.points;
|
||||
|
||||
typedef std::pair<Base::Vector3f, MeshCore::FacetIndex> HitPoint;
|
||||
using HitPoint = std::pair<Base::Vector3f, MeshCore::FacetIndex>;
|
||||
std::vector<HitPoint> hitPoints;
|
||||
typedef std::pair<HitPoint, HitPoint> HitPoints;
|
||||
using HitPoints = std::pair<HitPoint, HitPoint>;
|
||||
std::vector<HitPoints> hitPointPairs;
|
||||
for (auto it : points) {
|
||||
Base::Vector3f result;
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::map<TopoDS_Edge, std::vector<FaceSplitEdge>,TopoDSLess<TopoDS_Edge> > result_type;
|
||||
using result_type = std::map<TopoDS_Edge, std::vector<FaceSplitEdge>,TopoDSLess<TopoDS_Edge> >;
|
||||
|
||||
|
||||
result_type &result() {return mvEdgeSplitPoints;}
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
#include <vector>
|
||||
|
||||
|
||||
typedef Eigen::Vector3d Vector3;
|
||||
typedef Eigen::Vector2d Vector2;
|
||||
using Vector3 = Eigen::Vector3d;
|
||||
using Vector2 = Eigen::Vector2d;
|
||||
|
||||
template <typename type, unsigned int size>
|
||||
using ColMat = Eigen::Matrix<type, Eigen::Dynamic, size>;
|
||||
@@ -52,8 +52,8 @@ template <typename type, unsigned int size>
|
||||
using RowMat = Eigen::Matrix<type, size, Eigen::Dynamic>;
|
||||
|
||||
|
||||
typedef Eigen::Triplet<double> trip;
|
||||
typedef Eigen::SparseMatrix<double> spMat;
|
||||
using trip = Eigen::Triplet<double>;
|
||||
using spMat = Eigen::SparseMatrix<double>;
|
||||
|
||||
|
||||
std::vector<ColMat<double, 3>> getBoundaries(ColMat<double, 3> vertices, ColMat<long, 3> tris);
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
namespace lscmrelax
|
||||
{
|
||||
|
||||
typedef Eigen::Triplet<double> trip;
|
||||
typedef Eigen::SparseMatrix<double> spMat;
|
||||
using trip = Eigen::Triplet<double>;
|
||||
using spMat = Eigen::SparseMatrix<double>;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <Eigen/Geometry>
|
||||
#include <Eigen/IterativeLinearSolvers>
|
||||
|
||||
typedef Eigen::SparseMatrix<double> spMat;
|
||||
using spMat = Eigen::SparseMatrix<double>;
|
||||
|
||||
namespace lscmrelax
|
||||
{
|
||||
@@ -57,18 +57,18 @@ class NullSpaceProjector: public Eigen::IdentityPreconditioner
|
||||
|
||||
template<typename Rhs>
|
||||
inline Rhs solve(Rhs& b) const {
|
||||
return b - this->null_space_1 * (this->null_space_2 * b);
|
||||
return b - this->null_space_1 * (this->null_space_2 * b);
|
||||
}
|
||||
|
||||
void setNullSpace(Eigen::MatrixXd null_space) {
|
||||
// normalize + orthogonalize the nullspace
|
||||
this->null_space_1 = null_space * ((null_space.transpose() * null_space).inverse());
|
||||
this->null_space_2 = null_space.transpose();
|
||||
// normalize + orthogonalize the nullspace
|
||||
this->null_space_1 = null_space * ((null_space.transpose() * null_space).inverse());
|
||||
this->null_space_2 = null_space.transpose();
|
||||
}
|
||||
};
|
||||
|
||||
typedef Eigen::Vector3d Vector3;
|
||||
typedef Eigen::Vector2d Vector2;
|
||||
using Vector3 = Eigen::Vector3d;
|
||||
using Vector2 = Eigen::Vector2d;
|
||||
|
||||
class LscmRelax{
|
||||
private:
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
|
||||
namespace nurbs{
|
||||
|
||||
typedef Eigen::Triplet<double> trip;
|
||||
typedef Eigen::SparseMatrix<double> spMat;
|
||||
using trip = Eigen::Triplet<double>;
|
||||
using spMat = Eigen::SparseMatrix<double>;
|
||||
|
||||
struct NurbsBase2D
|
||||
{
|
||||
//
|
||||
NurbsBase2D(){;};
|
||||
NurbsBase2D(){}
|
||||
NurbsBase2D(Eigen::VectorXd u_knots, Eigen::VectorXd v_knots,
|
||||
Eigen::VectorXd weights,
|
||||
int degree_u=3, int degree_v=3);
|
||||
@@ -83,7 +83,7 @@ struct NurbsBase2D
|
||||
|
||||
struct NurbsBase1D
|
||||
{
|
||||
NurbsBase1D(){;};
|
||||
NurbsBase1D(){}
|
||||
NurbsBase1D(Eigen::VectorXd u_knots, Eigen::VectorXd weights, int degree_u=3);
|
||||
int degree_u;
|
||||
Eigen::VectorXd u_knots;
|
||||
|
||||
Reference in New Issue
Block a user