Commit d9d6bb63 authored by Pierre Kraemer's avatar Pierre Kraemer

orbit as template -> linear solving

parent ef19be46
...@@ -40,43 +40,43 @@ template <typename PFP, typename ATTR_TYPE> ...@@ -40,43 +40,43 @@ template <typename PFP, typename ATTR_TYPE>
ATTR_TYPE computeLaplacianTopoVertex( ATTR_TYPE computeLaplacianTopoVertex(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart d, Dart d,
const AttributeHandler<ATTR_TYPE>& attr) ; const AttributeHandler<ATTR_TYPE, VERTEX>& attr) ;
template <typename PFP, typename ATTR_TYPE> template <typename PFP, typename ATTR_TYPE>
ATTR_TYPE computeLaplacianCotanVertex( ATTR_TYPE computeLaplacianCotanVertex(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart d, Dart d,
const typename PFP::TREAL& edgeWeight, const AttributeHandler<typename PFP::REAL, EDGE>& edgeWeight,
const typename PFP::TREAL& vertexArea, const AttributeHandler<typename PFP::REAL, VERTEX>& vertexArea,
const AttributeHandler<ATTR_TYPE>& attr) ; const AttributeHandler<ATTR_TYPE, VERTEX>& attr) ;
template <typename PFP, typename ATTR_TYPE> template <typename PFP, typename ATTR_TYPE>
void computeLaplacianTopoVertices( void computeLaplacianTopoVertices(
typename PFP::MAP& map, typename PFP::MAP& map,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
AttributeHandler<ATTR_TYPE>& laplacian, AttributeHandler<ATTR_TYPE, VERTEX>& laplacian,
const FunctorSelect& select = allDarts) ; const FunctorSelect& select = allDarts) ;
template <typename PFP, typename ATTR_TYPE> template <typename PFP, typename ATTR_TYPE>
void computeLaplacianCotanVertices( void computeLaplacianCotanVertices(
typename PFP::MAP& map, typename PFP::MAP& map,
const typename PFP::TREAL& edgeWeight, const AttributeHandler<typename PFP::REAL, EDGE>& edgeWeight,
const typename PFP::TREAL& vertexArea, const AttributeHandler<typename PFP::REAL, VERTEX>& vertexArea,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
AttributeHandler<ATTR_TYPE>& laplacian, AttributeHandler<ATTR_TYPE, VERTEX>& laplacian,
const FunctorSelect& select = allDarts) ; const FunctorSelect& select = allDarts) ;
template <typename PFP> template <typename PFP>
typename PFP::REAL computeCotanWeightEdge( typename PFP::REAL computeCotanWeightEdge(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart d, Dart d,
const typename PFP::TVEC3& position) ; const AttributeHandler<typename PFP::VEC3, VERTEX>& position) ;
template <typename PFP> template <typename PFP>
void computeCotanWeightEdges( void computeCotanWeightEdges(
typename PFP::MAP& map, typename PFP::MAP& map,
const typename PFP::TVEC3& position, const AttributeHandler<typename PFP::VEC3, VERTEX>& position,
typename PFP::TREAL& edgeWeight, AttributeHandler<typename PFP::REAL, EDGE>& edgeWeight,
const FunctorSelect& select = allDarts) ; const FunctorSelect& select = allDarts) ;
} // namespace Geoemtry } // namespace Geoemtry
......
...@@ -39,7 +39,7 @@ template <typename PFP, typename ATTR_TYPE> ...@@ -39,7 +39,7 @@ template <typename PFP, typename ATTR_TYPE>
ATTR_TYPE computeLaplacianTopoVertex( ATTR_TYPE computeLaplacianTopoVertex(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart d, Dart d,
const AttributeHandler<ATTR_TYPE>& attr) const AttributeHandler<ATTR_TYPE, VERTEX>& attr)
{ {
ATTR_TYPE l(0) ; ATTR_TYPE l(0) ;
ATTR_TYPE value = attr[d] ; ATTR_TYPE value = attr[d] ;
...@@ -60,9 +60,9 @@ template <typename PFP, typename ATTR_TYPE> ...@@ -60,9 +60,9 @@ template <typename PFP, typename ATTR_TYPE>
ATTR_TYPE computeLaplacianCotanVertex( ATTR_TYPE computeLaplacianCotanVertex(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart d, Dart d,
const typename PFP::TREAL& edgeWeight, const AttributeHandler<typename PFP::REAL, EDGE>& edgeWeight,
const typename PFP::TREAL& vertexArea, const AttributeHandler<typename PFP::REAL, VERTEX>& vertexArea,
const AttributeHandler<ATTR_TYPE>& attr) const AttributeHandler<ATTR_TYPE, VERTEX>& attr)
{ {
ATTR_TYPE l(0) ; ATTR_TYPE l(0) ;
typename PFP::REAL vArea = vertexArea[d] ; typename PFP::REAL vArea = vertexArea[d] ;
...@@ -84,8 +84,8 @@ ATTR_TYPE computeLaplacianCotanVertex( ...@@ -84,8 +84,8 @@ ATTR_TYPE computeLaplacianCotanVertex(
template <typename PFP, typename ATTR_TYPE> template <typename PFP, typename ATTR_TYPE>
void computeLaplacianTopoVertices( void computeLaplacianTopoVertices(
typename PFP::MAP& map, typename PFP::MAP& map,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
AttributeHandler<ATTR_TYPE>& laplacian, AttributeHandler<ATTR_TYPE, VERTEX>& laplacian,
const FunctorSelect& select) const FunctorSelect& select)
{ {
TraversorV<typename PFP::MAP> t(map, select) ; TraversorV<typename PFP::MAP> t(map, select) ;
...@@ -96,10 +96,10 @@ void computeLaplacianTopoVertices( ...@@ -96,10 +96,10 @@ void computeLaplacianTopoVertices(
template <typename PFP, typename ATTR_TYPE> template <typename PFP, typename ATTR_TYPE>
void computeLaplacianCotanVertices( void computeLaplacianCotanVertices(
typename PFP::MAP& map, typename PFP::MAP& map,
const typename PFP::TREAL& edgeWeight, const AttributeHandler<typename PFP::REAL, EDGE>& edgeWeight,
const typename PFP::TREAL& vertexArea, const AttributeHandler<typename PFP::REAL, VERTEX>& vertexArea,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
AttributeHandler<ATTR_TYPE>& laplacian, AttributeHandler<ATTR_TYPE, VERTEX>& laplacian,
const FunctorSelect& select) const FunctorSelect& select)
{ {
TraversorV<typename PFP::MAP> t(map, select) ; TraversorV<typename PFP::MAP> t(map, select) ;
...@@ -111,7 +111,7 @@ template <typename PFP> ...@@ -111,7 +111,7 @@ template <typename PFP>
typename PFP::REAL computeCotanWeightEdge( typename PFP::REAL computeCotanWeightEdge(
typename PFP::MAP& map, typename PFP::MAP& map,
Dart d, Dart d,
const typename PFP::TVEC3& position) const AttributeHandler<typename PFP::VEC3, VERTEX>& position)
{ {
if(map.isBoundaryEdge(d)) if(map.isBoundaryEdge(d))
{ {
...@@ -138,8 +138,8 @@ typename PFP::REAL computeCotanWeightEdge( ...@@ -138,8 +138,8 @@ typename PFP::REAL computeCotanWeightEdge(
template <typename PFP> template <typename PFP>
void computeCotanWeightEdges( void computeCotanWeightEdges(
typename PFP::MAP& map, typename PFP::MAP& map,
const typename PFP::TVEC3& position, const AttributeHandler<typename PFP::VEC3, VERTEX>& position,
typename PFP::TREAL& edgeWeight, AttributeHandler<typename PFP::REAL, EDGE>& edgeWeight,
const FunctorSelect& select) const FunctorSelect& select)
{ {
TraversorE<typename PFP::MAP> t(map, select) ; TraversorE<typename PFP::MAP> t(map, select) ;
......
...@@ -65,25 +65,25 @@ template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS> ...@@ -65,25 +65,25 @@ template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
void setupVariables( void setupVariables(
typename PFP::MAP& m, typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int, VERTEX>& index,
CellMarker& lm, CellMarker<VERTEX>& lm,
const AttributeHandler<ATTR_TYPE>& attr) const AttributeHandler<ATTR_TYPE, VERTEX>& attr)
{ {
FunctorMeshToSolver_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> fmts(s, index, lm, attr) ; FunctorMeshToSolver_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> fmts(s, index, lm, attr) ;
m.foreach_orbit(VERTEX, fmts) ; m.template foreach_orbit<VERTEX>(fmts) ;
} }
template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS> template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
void setupVariables( void setupVariables(
typename PFP::MAP& m, typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int, VERTEX>& index,
CellMarker& lm, CellMarker<VERTEX>& lm,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
unsigned int coord) unsigned int coord)
{ {
FunctorMeshToSolver_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> fmts(s, index, lm, attr, coord) ; FunctorMeshToSolver_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> fmts(s, index, lm, attr, coord) ;
m.foreach_orbit(VERTEX, fmts) ; m.template foreach_orbit<VERTEX>(fmts) ;
} }
/******************************************************************************* /*******************************************************************************
...@@ -104,50 +104,50 @@ template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS> ...@@ -104,50 +104,50 @@ template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
void addRowsRHS_Equality( void addRowsRHS_Equality(
typename PFP::MAP& m, typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int, VERTEX>& index,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
const AttributeHandler<typename PFP::REAL>& weight) const AttributeHandler<typename PFP::REAL, VERTEX>& weight)
{ {
FunctorEquality_PerVertexWeight_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> ec(s, index, attr, weight) ; FunctorEquality_PerVertexWeight_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> ec(s, index, attr, weight) ;
m.foreach_orbit(VERTEX, ec) ; m.template foreach_orbit<VERTEX>(ec) ;
} }
template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS> template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
void addRowsRHS_Equality( void addRowsRHS_Equality(
typename PFP::MAP& m, typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int, VERTEX>& index,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
float weight) float weight)
{ {
FunctorEquality_UniformWeight_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> ec(s, index, attr, weight) ; FunctorEquality_UniformWeight_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> ec(s, index, attr, weight) ;
m.foreach_orbit(VERTEX, ec) ; m.template foreach_orbit<VERTEX>(ec) ;
} }
template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS> template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
void addRowsRHS_Equality( void addRowsRHS_Equality(
typename PFP::MAP& m, typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int, VERTEX>& index,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
const AttributeHandler<typename PFP::REAL>& weight, const AttributeHandler<typename PFP::REAL, VERTEX>& weight,
unsigned int coord) unsigned int coord)
{ {
FunctorEquality_PerVertexWeight_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> ec(s, index, attr, weight, coord) ; FunctorEquality_PerVertexWeight_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> ec(s, index, attr, weight, coord) ;
m.foreach_orbit(VERTEX, ec) ; m.template foreach_orbit<VERTEX>(ec) ;
} }
template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS> template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
void addRowsRHS_Equality( void addRowsRHS_Equality(
typename PFP::MAP& m, typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int, VERTEX>& index,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
float weight, float weight,
unsigned int coord) unsigned int coord)
{ {
FunctorEquality_UniformWeight_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> ec(s, index, attr, weight, coord) ; FunctorEquality_UniformWeight_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> ec(s, index, attr, weight, coord) ;
m.foreach_orbit(VERTEX, ec) ; m.template foreach_orbit<VERTEX>(ec) ;
} }
/******************************************************************************* /*******************************************************************************
...@@ -158,33 +158,33 @@ template <typename PFP, class SOLVER_TRAITS> ...@@ -158,33 +158,33 @@ template <typename PFP, class SOLVER_TRAITS>
void addRows_Laplacian_Topo( void addRows_Laplacian_Topo(
typename PFP::MAP& m, typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index) const AttributeHandler<unsigned int, VERTEX> index)
{ {
FunctorLaplacianTopo<PFP, SOLVER_TRAITS> flt(m, s, index) ; FunctorLaplacianTopo<PFP, SOLVER_TRAITS> flt(m, s, index) ;
m.foreach_orbit(VERTEX, flt) ; m.template foreach_orbit<VERTEX>(flt) ;
} }
template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS> template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
void addRowsRHS_Laplacian_Topo( void addRowsRHS_Laplacian_Topo(
typename PFP::MAP& m, typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int, VERTEX> index,
const AttributeHandler<ATTR_TYPE>& attr) const AttributeHandler<ATTR_TYPE, VERTEX>& attr)
{ {
FunctorLaplacianTopoRHS_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> flt(m, s, index, attr) ; FunctorLaplacianTopoRHS_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> flt(m, s, index, attr) ;
m.foreach_orbit(VERTEX, flt) ; m.template foreach_orbit<VERTEX>(flt) ;
} }
template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS> template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
void addRowsRHS_Laplacian_Topo( void addRowsRHS_Laplacian_Topo(
typename PFP::MAP& m, typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int, VERTEX> index,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
unsigned int coord) unsigned int coord)
{ {
FunctorLaplacianTopoRHS_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> flt(m, s, index, attr, coord) ; FunctorLaplacianTopoRHS_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> flt(m, s, index, attr, coord) ;
m.foreach_orbit(VERTEX, flt) ; m.template foreach_orbit<VERTEX>(flt) ;
} }
/******************************************************************************* /*******************************************************************************
...@@ -195,39 +195,39 @@ template <typename PFP, class SOLVER_TRAITS> ...@@ -195,39 +195,39 @@ template <typename PFP, class SOLVER_TRAITS>
void addRows_Laplacian_Cotan( void addRows_Laplacian_Cotan(
typename PFP::MAP& m, typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int, VERTEX> index,
const typename PFP::TREAL& edgeWeight, const AttributeHandler<typename PFP::REAL, EDGE>& edgeWeight,
const typename PFP::TREAL& vertexArea) const AttributeHandler<typename PFP::REAL, VERTEX>& vertexArea)
{ {
FunctorLaplacianCotan<PFP, SOLVER_TRAITS> flc(m, s, index, edgeWeight, vertexArea) ; FunctorLaplacianCotan<PFP, SOLVER_TRAITS> flc(m, s, index, edgeWeight, vertexArea) ;
m.foreach_orbit(VERTEX, flc) ; m.template foreach_orbit<VERTEX>(flc) ;
} }
template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS> template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
void addRowsRHS_Laplacian_Cotan( void addRowsRHS_Laplacian_Cotan(
typename PFP::MAP& m, typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int, VERTEX> index,
const typename PFP::TREAL& edgeWeight, const AttributeHandler<typename PFP::REAL, EDGE>& edgeWeight,
const typename PFP::TREAL& vertexArea, const AttributeHandler<typename PFP::REAL, VERTEX>& vertexArea,
const AttributeHandler<ATTR_TYPE>& attr) const AttributeHandler<ATTR_TYPE, VERTEX>& attr)
{ {
FunctorLaplacianCotanRHS_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> flc(m, s, index, edgeWeight, vertexArea, attr) ; FunctorLaplacianCotanRHS_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> flc(m, s, index, edgeWeight, vertexArea, attr) ;
m.foreach_orbit(VERTEX, flc) ; m.template foreach_orbit<VERTEX>(flc) ;
} }
template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS> template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
void addRowsRHS_Laplacian_Cotan( void addRowsRHS_Laplacian_Cotan(
typename PFP::MAP& m, typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int, VERTEX> index,
const typename PFP::TREAL& edgeWeight, const AttributeHandler<typename PFP::REAL, EDGE>& edgeWeight,
const typename PFP::TREAL& vertexArea, const AttributeHandler<typename PFP::REAL, VERTEX>& vertexArea,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
unsigned int coord) unsigned int coord)
{ {
FunctorLaplacianCotanRHS_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> flc(m, s, index, edgeWeight, vertexArea, attr, coord) ; FunctorLaplacianCotanRHS_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> flc(m, s, index, edgeWeight, vertexArea, attr, coord) ;
m.foreach_orbit(VERTEX, flc) ; m.template foreach_orbit<VERTEX>(flc) ;
} }
/******************************************************************************* /*******************************************************************************
...@@ -268,23 +268,23 @@ template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS> ...@@ -268,23 +268,23 @@ template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
void getResult( void getResult(
typename PFP::MAP& m, typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int, VERTEX> index,
AttributeHandler<ATTR_TYPE>& attr) AttributeHandler<ATTR_TYPE, VERTEX>& attr)
{ {
FunctorSolverToMesh_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> fstm(s, index, attr) ; FunctorSolverToMesh_Scalar<PFP, ATTR_TYPE, SOLVER_TRAITS> fstm(s, index, attr) ;
m.foreach_orbit(VERTEX, fstm) ; m.template foreach_orbit<VERTEX>(fstm) ;
} }
template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS> template <typename PFP, typename ATTR_TYPE, class SOLVER_TRAITS>
void getResult( void getResult(
typename PFP::MAP& m, typename PFP::MAP& m,
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int> index, const AttributeHandler<unsigned int, VERTEX> index,
AttributeHandler<ATTR_TYPE>& attr, AttributeHandler<ATTR_TYPE, VERTEX>& attr,
unsigned int coord) unsigned int coord)
{ {
FunctorSolverToMesh_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> fstm(s, index, attr, coord) ; FunctorSolverToMesh_Vector<PFP, ATTR_TYPE, SOLVER_TRAITS> fstm(s, index, attr, coord) ;
m.foreach_orbit(VERTEX, fstm) ; m.template foreach_orbit<VERTEX>(fstm) ;
} }
} // namespace LinearSolving } // namespace LinearSolving
......
...@@ -40,16 +40,16 @@ class FunctorEquality_PerVertexWeight_Scalar : public FunctorType ...@@ -40,16 +40,16 @@ class FunctorEquality_PerVertexWeight_Scalar : public FunctorType
{ {
protected: protected:
LinearSolver<SOLVER_TRAITS>* solver ; LinearSolver<SOLVER_TRAITS>* solver ;
const AttributeHandler<unsigned int>& indexTable ; const AttributeHandler<unsigned int, VERTEX>& indexTable ;
const AttributeHandler<ATTR_TYPE>& attrTable ; const AttributeHandler<ATTR_TYPE, VERTEX>& attrTable ;
const AttributeHandler<typename PFP::REAL>& weightTable ; const AttributeHandler<typename PFP::REAL, VERTEX>& weightTable ;
public: public:
FunctorEquality_PerVertexWeight_Scalar( FunctorEquality_PerVertexWeight_Scalar(
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int>& index, const AttributeHandler<unsigned int, VERTEX>& index,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
const AttributeHandler<typename PFP::REAL>& weight const AttributeHandler<typename PFP::REAL, VERTEX>& weight
) : solver(s), indexTable(index), attrTable(attr), weightTable(weight) ) : solver(s), indexTable(index), attrTable(attr), weightTable(weight)
{} {}
...@@ -69,15 +69,15 @@ class FunctorEquality_UniformWeight_Scalar : public FunctorType ...@@ -69,15 +69,15 @@ class FunctorEquality_UniformWeight_Scalar : public FunctorType
{ {
protected: protected:
LinearSolver<SOLVER_TRAITS>* solver ; LinearSolver<SOLVER_TRAITS>* solver ;
const AttributeHandler<unsigned int>& indexTable ; const AttributeHandler<unsigned int, VERTEX>& indexTable ;
const AttributeHandler<ATTR_TYPE>& attrTable ; const AttributeHandler<ATTR_TYPE, VERTEX>& attrTable ;
float weight ; float weight ;
public: public:
FunctorEquality_UniformWeight_Scalar( FunctorEquality_UniformWeight_Scalar(
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int>& index, const AttributeHandler<unsigned int, VERTEX>& index,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
float w float w
) : solver(s), indexTable(index), attrTable(attr), weight(w) ) : solver(s), indexTable(index), attrTable(attr), weight(w)
{} {}
...@@ -102,17 +102,17 @@ class FunctorEquality_PerVertexWeight_Vector : public FunctorType ...@@ -102,17 +102,17 @@ class FunctorEquality_PerVertexWeight_Vector : public FunctorType
{ {
protected: protected:
LinearSolver<SOLVER_TRAITS>* solver ; LinearSolver<SOLVER_TRAITS>* solver ;
const AttributeHandler<unsigned int>& indexTable ; const AttributeHandler<unsigned int, VERTEX>& indexTable ;
const AttributeHandler<ATTR_TYPE>& attrTable ; const AttributeHandler<ATTR_TYPE, VERTEX>& attrTable ;
const AttributeHandler<typename PFP::REAL>& weightTable ; const AttributeHandler<typename PFP::REAL, VERTEX>& weightTable ;
unsigned int coord ; unsigned int coord ;
public: public:
FunctorEquality_PerVertexWeight_Vector( FunctorEquality_PerVertexWeight_Vector(
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int>& index, const AttributeHandler<unsigned int, VERTEX>& index,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
const AttributeHandler<typename PFP::REAL>& weight, const AttributeHandler<typename PFP::REAL, VERTEX>& weight,
unsigned int c unsigned int c
) : solver(s), indexTable(index), attrTable(attr), weightTable(weight), coord(c) ) : solver(s), indexTable(index), attrTable(attr), weightTable(weight), coord(c)
{} {}
...@@ -133,16 +133,16 @@ class FunctorEquality_UniformWeight_Vector : public FunctorType ...@@ -133,16 +133,16 @@ class FunctorEquality_UniformWeight_Vector : public FunctorType
{ {
protected: protected:
LinearSolver<SOLVER_TRAITS>* solver ; LinearSolver<SOLVER_TRAITS>* solver ;
const AttributeHandler<unsigned int>& indexTable ; const AttributeHandler<unsigned int, VERTEX>& indexTable ;
const AttributeHandler<ATTR_TYPE>& attrTable ; const AttributeHandler<ATTR_TYPE, VERTEX>& attrTable ;
float weight ; float weight ;
unsigned int coord ; unsigned int coord ;
public: public:
FunctorEquality_UniformWeight_Vector( FunctorEquality_UniformWeight_Vector(
LinearSolver<SOLVER_TRAITS>* s, LinearSolver<SOLVER_TRAITS>* s,
const AttributeHandler<unsigned int>& index, const AttributeHandler<unsigned int, VERTEX>& index,
const AttributeHandler<ATTR_TYPE>& attr, const AttributeHandler<ATTR_TYPE, VERTEX>& attr,
float w, float w,
unsigned int c unsigned int c
) : solver(s), indexTable(index), attrTable(attr), weight(w), coord(c)