Commit 972c5e48 authored by Tuelin Kaman's avatar Tuelin Kaman

SAAMG-smoothed aggregation (SA) based algebraic multigrid (AMG)

parent 6922d6ad
......@@ -38,7 +38,7 @@ FIND_PACKAGE (MPI REQUIRED)
# Handle options
OPTION (ENABLE_AMR_SOLVER "Enable BoxLib based AMR solver" OFF)
OPTION (ENABLE_ML_SOLVER "Enable iteartive SA-AMG-PCG self field solver" OFF)
OPTION (ENABLE_SAAMG_SOLVER "Enable iteartive SA-AMG-PCG self field solver" OFF)
OPTION (DBG_SCALARFIELD "Enable dump of scalar field rho_m" OFF)
OPTION (DBG_STENCIL "Dump stencil of iterative solver in matlab format" OFF)
......@@ -140,7 +140,7 @@ IF (NO_FIELD_ASSIGN_OPTIMIZATION)
)
ENDIF (NO_FIELD_ASSIGN_OPTIMIZATION)
IF (ENABLE_ML_SOLVER)
IF (ENABLE_SAAMG_SOLVER)
# Get Trilinos as one entity
FIND_PACKAGE(Trilinos REQUIRED HINTS $ENV{TRILINOS_PREFIX} $ENV{TRILINOS_DIR} $ENV{TRILINOS})
......@@ -168,7 +168,7 @@ IF (ENABLE_ML_SOLVER)
#SET(CMAKE_CXX_FLAGS "${Trilinos_CXX_COMPILER_FLAGS} ${CMAKE_CXX_FLAGS}")
#SET(CMAKE_C_FLAGS "${Trilinos_C_COMPILER_FLAGS} ${CMAKE_C_FLAGS}")
#SET(CMAKE_Fortran_FLAGS "${Trilinos_Fortran_COMPILER_FLAGS} ${CMAKE_Fortran_FLAGS}")
ENDIF (ENABLE_ML_SOLVER)
ENDIF (ENABLE_SAAMG_SOLVER)
MESSAGE (STATUS "Using C++ compiler: ${CMAKE_CXX_COMPILER}")
......
......@@ -29,11 +29,11 @@ set (CMAKE_CXX_FLAGS
"${IPPL_CMAKE_CXX_FLAGS} -DUSEH5FEDV2 -DPARALLEL_IO ${CMAKE_CXX_FLAGS}"
)
IF(ENABLE_ML_SOLVER)
IF(ENABLE_SAAMG_SOLVER)
set (CMAKE_CXX_FLAGS
"-DHAVE_ML_SOLVER ${CMAKE_CXX_FLAGS}"
"-DHAVE_SAAMG_SOLVER ${CMAKE_CXX_FLAGS}"
)
ENDIF(ENABLE_ML_SOLVER)
ENDIF(ENABLE_SAAMG_SOLVER)
IF(ENABLE_AMR_SOLVER)
set (CMAKE_CXX_FLAGS
......
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
#include <map>
#include <cmath>
#include <iostream>
......@@ -984,4 +984,4 @@ inline void ArbitraryDomain::crossProduct(double A[], double B[], double C[]) {
C[2] = A[0] * B[1] - A[1] * B[0];
}
#endif //#ifdef HAVE_ML_SOLVER
#endif //#ifdef HAVE_SAAMG_SOLVER
......@@ -4,7 +4,7 @@
#ifndef ARBITRARY_DOMAIN
#define ARBITRARY_DOMAIN
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
#include "IrregularDomain.h"
#include <mpi.h>
......@@ -106,5 +106,5 @@ private:
};
#endif //#ifdef HAVE_ML_SOLVER
#endif //#ifdef HAVE_SAAMG_SOLVER
#endif //#ifdef ARBITRARY_DOMAIN
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
#include <map>
#include <string>
#include <cmath>
......@@ -589,4 +589,4 @@ void BoxCornerDomain::QuadraticInterpolation(int x, int y, int z, double &W, dou
}
#endif //#ifdef HAVE_ML_SOLVER
#endif //#ifdef HAVE_SAAMG_SOLVER
#ifndef BOXCORNER_DOMAIN_H
#define BOXCORNER_DOMAIN_H
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
//#include <vector>
#include <map>
......@@ -221,5 +221,5 @@ private:
};
#endif //#ifdef HAVE_ML_SOLVER
#endif //#ifdef HAVE_SAAMG_SOLVER
#endif //#ifdef BOXCORNER_DOMAIN_H
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
#include <map>
#include <cmath>
#include <iostream>
......@@ -559,4 +559,4 @@ void EllipticDomain::QuadraticInterpolation(int x, int y, int z, double &W, doub
}
#endif //#ifdef HAVE_ML_SOLVER
#endif //#ifdef HAVE_SAAMG_SOLVER
#ifndef ELLIPTICAL_DOMAIN_H
#define ELLIPTICAL_DOMAIN_H
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
#include <vector>
#include <map>
......@@ -106,5 +106,5 @@ private:
};
#endif //#ifdef HAVE_ML_SOLVER
#endif //#ifdef HAVE_SAAMG_SOLVER
#endif //#ifdef ELLIPTICAL_DOMAIN_H
#ifndef IRREGULAR_DOMAIN_H
#define IRREGULAR_DOMAIN_H
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
#include <vector>
#include <string>
......@@ -107,5 +107,5 @@ protected:
double zMax_m;
};
#endif //#ifdef HAVE_ML_SOLVER
#endif //#ifdef HAVE_SAAMG_SOLVER
#endif //#ifndef IRREGULAR_DOMAIN_H
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
#define DBG_STENCIL
#include "Algorithms/PartBunch.h"
#include "MGPoissonSolver.h"
......@@ -525,4 +525,4 @@ Inform &MGPoissonSolver::print(Inform &os) const {
return os;
}
#endif /* HAVE_ML_SOLVER */
#endif /* HAVE_SAAMG_SOLVER */
......@@ -3,7 +3,7 @@
// space charge portion of the calculation.
////////////////////////////////////////////////////////////////////////////
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
#ifndef MG_POISSON_SOLVER_H_
#define MG_POISSON_SOLVER_H_
......@@ -338,4 +338,4 @@ int main(int argc, char *argv[]) {
#endif /* #ifndef MG_POISSON_SOLVER_H_ */
#endif /* #ifdef HAVE_ML_SOLVER */
#endif /* #ifdef HAVE_SAAMG_SOLVER */
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
#include "RectangularDomain.h"
......@@ -746,4 +746,4 @@ inline Epetra_CrsMatrix* MGPoissonSolver::Stencil3DLongitudinalNeumann(Vector_t
}
*/
#endif //#ifdef HAVE_ML_SOLVER
#endif //#ifdef HAVE_SAAMG_SOLVER
#ifndef RECTANGULAR_DOMAIN_H
#define RECTANGULAR_DOMAIN_H
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
#include <vector>
#include <string>
......@@ -77,5 +77,5 @@ private:
};
#endif //#ifdef HAVE_ML_SOLVER
#endif //#ifdef HAVE_SAAMG_SOLVER
#endif //#ifdef RECTANGULAR_DOMAIN_H
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
#include "TaperDomain.h"
......@@ -492,4 +492,4 @@ void TaperDomain::getNeighbours(int x, int y, int z, double &W, double &E, doubl
B = -1;
}
#endif //#ifdef HAVE_ML_SOLVER
#endif //#ifdef HAVE_SAAMG_SOLVER
#ifndef TAPER_DOMAIN_H
#define TAPER_DOMAIN_H
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
#include <vector>
#include "IrregularDomain.h"
......@@ -141,5 +141,5 @@ private:
};
#endif //#ifdef HAVE_ML_SOLVER
#endif //#ifdef HAVE_SAAMG_SOLVER
#endif //#ifdef ELLIPTICAL_DOMAIN_H
......@@ -19,7 +19,7 @@
#include "Structure/FieldSolver.h"
#include "Solvers/FFTPoissonSolver.h"
#include "Solvers/FFTBoxPoissonSolver.h"
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
#include "Solvers/MGPoissonSolver.h"
#endif
#include "AbstractObjects/Expressions.h"
......@@ -238,7 +238,7 @@ void FieldSolver::initSolver(PartBunch &b) {
}
} else if(Attributes::getString(itsAttr[FSTYPE]) == "MG") {
#ifdef HAVE_ML_SOLVER
#ifdef HAVE_SAAMG_SOLVER
//we go over all geometries and add the Geometry Elements to the geometry list
std::string geoms = Attributes::getString(itsAttr[GEOMETRY]);
std::string tmp = "";
......
......@@ -513,7 +513,7 @@ AC_LANG_PUSH([C++])
# only enable ML solver if all checks are ok
if test x$HAVE_MLS_ = xtrue ; then
CPPFLAGS="$CPPFLAGS -DnoHAVE_ML_SOLVER"
CPPFLAGS="$CPPFLAGS -DnoHAVE_SAAMG_SOLVER"
LIBS="$LIBS $MLLIB $GALERILIB $AMESOSLIB $IFPACKLIB $EPETRAEXTLIB $EPETRALIB $TEUCHOSLIB -l$BLASLIB -l$LAPACKLIB -lguide -lpthread $TRIUTILSLIB $AZTECOOLIB -lm $ADDLIBS"
else
AC_MSG_ERROR([Cannot enable ML solver due to missing dependencies!])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment