Commit 3ee74cf1 authored by frey_m's avatar frey_m Committed by frey_m

Resolve "compiler errors with AMR / SAAMG enabled"

parent a1d2c53b
...@@ -51,6 +51,11 @@ add_compile_options (-Werror) ...@@ -51,6 +51,11 @@ add_compile_options (-Werror)
add_compile_options (-funroll-loops) add_compile_options (-funroll-loops)
add_compile_options (-fstrict-aliasing) add_compile_options (-fstrict-aliasing)
# An error in Trilinos/12.18.1 causes
# -Waggressive-loop-optimizations with -O3 optimization.
# See issue 587 and corresponding merge request 415.
add_compile_options (-fno-aggressive-loop-optimizations)
option (USE_STATIC_LIBRARIES "Link with static libraries if available" ON) option (USE_STATIC_LIBRARIES "Link with static libraries if available" ON)
if (NOT ${USE_STATIC_LIBRARIES}) if (NOT ${USE_STATIC_LIBRARIES})
add_compile_options (-fPIE -fPIC) add_compile_options (-fPIE -fPIC)
...@@ -106,6 +111,9 @@ if (CMAKE_Fortran_COMPILER) ...@@ -106,6 +111,9 @@ if (CMAKE_Fortran_COMPILER)
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
set (Fortran_LIBS "-lgfortran") set (Fortran_LIBS "-lgfortran")
endif () endif ()
# CMake issue. Missing library libmpi_mpifh in MPI_Fortran_LINRARIES.
# See issue 587 and corresponding merge request 415.
set (Fortran_LIBS "${Fortran_LIBS} -lmpi_mpifh")
else () else ()
message (STATUS "No Fortran compiler found (optional)") message (STATUS "No Fortran compiler found (optional)")
if (ENABLE_AMR) if (ENABLE_AMR)
......
...@@ -41,7 +41,7 @@ void Amesos2BottomSolver<Level>::solve(const Teuchos::RCP<mv_t>& x, ...@@ -41,7 +41,7 @@ void Amesos2BottomSolver<Level>::solve(const Teuchos::RCP<mv_t>& x,
template <class Level> template <class Level>
void Amesos2BottomSolver<Level>::setOperator(const Teuchos::RCP<matrix_t>& A, void Amesos2BottomSolver<Level>::setOperator(const Teuchos::RCP<matrix_t>& A,
Level* level_p) Level* /*level_p*/)
{ {
try { try {
solver_mp = Amesos2::create<matrix_t, mv_t>(solvertype_m, A); solver_mp = Amesos2::create<matrix_t, mv_t>(solvertype_m, A);
......
...@@ -43,7 +43,7 @@ public: ...@@ -43,7 +43,7 @@ public:
umap_t& map, umap_t& map,
const scalar_t& value, const scalar_t& value,
Level* mglevel, Level* mglevel,
const go_t* nr); const go_t* /*nr*/);
}; };
...@@ -53,7 +53,7 @@ void AmrDirichletBoundary<Level>::apply(const AmrIntVect_t& iv, ...@@ -53,7 +53,7 @@ void AmrDirichletBoundary<Level>::apply(const AmrIntVect_t& iv,
umap_t& map, umap_t& map,
const scalar_t& value, const scalar_t& value,
Level* mglevel, Level* mglevel,
const go_t* nr) const go_t* /*nr*/)
{ {
// find interior neighbour cell // find interior neighbour cell
AmrIntVect_t niv = iv; AmrIntVect_t niv = iv;
......
...@@ -51,6 +51,7 @@ public: ...@@ -51,6 +51,7 @@ public:
/*! /*!
* Get the stencil to interpolate a value from coarse to fine level * Get the stencil to interpolate a value from coarse to fine level
* @param iv is the fine cell where we want to have the interpolated value * @param iv is the fine cell where we want to have the interpolated value
* @param fab cells
* @param map with global matrix indices of coarse level cells and * @param map with global matrix indices of coarse level cells and
* matrix entries of coarse level cells (coefficients) * matrix entries of coarse level cells (coefficients)
* @param scale to apply to matrix values * @param scale to apply to matrix values
...@@ -74,7 +75,7 @@ public: ...@@ -74,7 +75,7 @@ public:
* @param shift is either -1 or 1. If the refined coarse cell is on the left / lower / front * @param shift is either -1 or 1. If the refined coarse cell is on the left / lower / front
* side, shift is equal to -1, otherwise the interface is on the right / upper / back side * side, shift is equal to -1, otherwise the interface is on the right / upper / back side
* and the value is 1. * and the value is 1.
* @param ba contains all coarse cells that got refined * @param rfab contains all coarse cells that got refined
* @param riv is the fine cell at the interface * @param riv is the fine cell at the interface
* @param mglevel used to get the global indices and refinement ratio among levels, * @param mglevel used to get the global indices and refinement ratio among levels,
* and boundary values at physical domain, e.g. Dirichlet, open BC * and boundary values at physical domain, e.g. Dirichlet, open BC
...@@ -98,15 +99,15 @@ public: ...@@ -98,15 +99,15 @@ public:
* @param shift is either -1 or 1. If the refined coarse cell is on the left / lower / front * @param shift is either -1 or 1. If the refined coarse cell is on the left / lower / front
* side, shift is equal to -1, otherwise the interface is on the right / upper / back side * side, shift is equal to -1, otherwise the interface is on the right / upper / back side
* and the value is 1. * and the value is 1.
* @param ba contains all coarse cells that got refined * @param fab contains all coarse cells that got refined
* @param mglevel used to get the global indices and refinement ratio among levels, * @param mglevel used to get the global indices and refinement ratio among levels,
* and boundary avlues at physical domain, e.g. Dirichlet, open BC * and boundary avlues at physical domain, e.g. Dirichlet, open BC
*/ */
virtual void fine(const AmrIntVect_t& iv, virtual void fine(const AmrIntVect_t& /*iv*/,
umap_t& map, umap_t& /*map*/,
const scalar_t& scale, const scalar_t& /*scale*/,
lo_t dir, lo_t shift, const basefab_t& fab, lo_t /*dir*/, lo_t /*shift*/, const basefab_t& /*fab*/,
Level* mglevel) Level* /*mglevel*/)
{ }; { };
/*! /*!
...@@ -124,11 +125,11 @@ public: ...@@ -124,11 +125,11 @@ public:
* @param mglevel used to get the global indices and refinement ratio among levels, * @param mglevel used to get the global indices and refinement ratio among levels,
* and boundary avlues at physical domain, e.g. Dirichlet, open BC * and boundary avlues at physical domain, e.g. Dirichlet, open BC
*/ */
virtual void fine(const AmrIntVect_t& iv, virtual void fine(const AmrIntVect_t& /*iv*/,
umap_t& map, umap_t& /*map*/,
const scalar_t& scale, const scalar_t& /*scale*/,
lo_t dir, lo_t shift, lo_t /*dir*/, lo_t /*shift*/,
Level* mglevel) Level* /*mglevel*/)
{ }; { };
protected: protected:
......
...@@ -93,11 +93,11 @@ AmrLagrangeInterpolater<Level>::AmrLagrangeInterpolater(Order order) ...@@ -93,11 +93,11 @@ AmrLagrangeInterpolater<Level>::AmrLagrangeInterpolater(Order order)
template <class Level> template <class Level>
void AmrLagrangeInterpolater<Level>::stencil( void AmrLagrangeInterpolater<Level>::stencil(
const AmrIntVect_t& iv, const AmrIntVect_t& /*iv*/,
const basefab_t& fab, const basefab_t& /*fab*/,
typename Level::umap_t& map, typename Level::umap_t& /*map*/,
const typename Level::scalar_t& scale, const typename Level::scalar_t& /*scale*/,
Level* mglevel) Level* /*mglevel*/)
{ {
} }
...@@ -198,7 +198,7 @@ void AmrLagrangeInterpolater<Level>::crseLinear_m( ...@@ -198,7 +198,7 @@ void AmrLagrangeInterpolater<Level>::crseLinear_m(
const AmrIntVect_t& iv, const AmrIntVect_t& iv,
typename Level::umap_t& map, typename Level::umap_t& map,
const typename Level::scalar_t& scale, const typename Level::scalar_t& scale,
lo_t dir, lo_t shift, const basefab_t& rfab, lo_t dir, lo_t /*shift*/, const basefab_t& rfab,
const AmrIntVect_t& riv, const AmrIntVect_t& riv,
Level* mglevel) Level* mglevel)
{ {
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "AbstractObjects/OpalData.h" #include "AbstractObjects/OpalData.h"
#include "Utilities/OpalException.h" #include "Utilities/OpalException.h"
#include "Utilities/Timer.h" #include "Utilities/Timer.h"
#include "Utilities/Util.h"
#include <AMReX_ParallelDescriptor.H> #include <AMReX_ParallelDescriptor.H>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
...@@ -67,8 +68,6 @@ AmrMultiGrid::AmrMultiGrid(AmrBoxLib* itsAmrObject_p, ...@@ -67,8 +68,6 @@ AmrMultiGrid::AmrMultiGrid(AmrBoxLib* itsAmrObject_p,
, fname_m(OpalData::getInstance()->getInputBasename() + std::string(".solver")) , fname_m(OpalData::getInstance()->getInputBasename() + std::string(".solver"))
, flag_m(std::ios::out) , flag_m(std::ios::out)
{ {
node_mp = KokkosClassic::Details::getNode<amr::node_t>(); //KokkosClassic::DefaultNode::getDefaultNode();
#if AMR_MG_TIMER #if AMR_MG_TIMER
this->initTimer_m(); this->initTimer_m();
#endif #endif
...@@ -93,7 +92,7 @@ AmrMultiGrid::AmrMultiGrid(AmrBoxLib* itsAmrObject_p, ...@@ -93,7 +92,7 @@ AmrMultiGrid::AmrMultiGrid(AmrBoxLib* itsAmrObject_p,
// preconditioner // preconditioner
const Preconditioner precond = this->convertToEnumPreconditioner_m(prec); const Preconditioner precond = this->convertToEnumPreconditioner_m(prec);
this->initPrec_m(precond, rebalance, reuse); this->initPrec_m(precond, reuse);
// base level solver // base level solver
const BaseSolver solver = this->convertToEnumBaseSolver_m(bsolver); const BaseSolver solver = this->convertToEnumBaseSolver_m(bsolver);
...@@ -164,10 +163,6 @@ void AmrMultiGrid::solve(AmrScalarFieldContainer_t &rho, ...@@ -164,10 +163,6 @@ void AmrMultiGrid::solve(AmrScalarFieldContainer_t &rho,
void AmrMultiGrid::setNumberOfSweeps(const std::size_t& nSweeps) { void AmrMultiGrid::setNumberOfSweeps(const std::size_t& nSweeps) {
if ( nSweeps < 0 )
throw OpalException("AmrMultiGrid::setNumberOfSweeps()",
"The number of smoothing sweeps needs to be non-negative!");
nSweeps_m = nSweeps; nSweeps_m = nSweeps;
} }
...@@ -258,8 +253,7 @@ void AmrMultiGrid::initLevels_m(const amrex::Vector<AmrField_u>& rho, ...@@ -258,8 +253,7 @@ void AmrMultiGrid::initLevels_m(const amrex::Vector<AmrField_u>& rho,
geom[ilev], geom[ilev],
rr, rr,
bc_m, bc_m,
comm_mp, comm_mp));
node_mp));
} else { } else {
mglevel_m[lev]->buildLevelMask(); mglevel_m[lev]->buildLevelMask();
} }
...@@ -844,10 +838,10 @@ void AmrMultiGrid::buildMultiLevel_m(const amrex::Vector<AmrField_u>& rho, ...@@ -844,10 +838,10 @@ void AmrMultiGrid::buildMultiLevel_m(const amrex::Vector<AmrField_u>& rho,
cfab, invdx2); cfab, invdx2);
this->buildFineBoundaryMatrix_m(lev, gidx, iv, this->buildFineBoundaryMatrix_m(lev, gidx, iv,
mfab, rfab, cfab); mfab, rfab);
this->buildCompositePoissonMatrix_m(lev, gidx, iv, mfab, this->buildCompositePoissonMatrix_m(lev, gidx, iv, mfab,
rfab, cfab, invdx2); rfab, invdx2);
if (lev > lbase_m || (lev == lbase_m && !solver_mp->hasOperator())) { if (lev > lbase_m || (lev == lbase_m && !solver_mp->hasOperator())) {
this->buildNoFinePoissonMatrix_m(lev, gidx, iv, mfab, invdx2); this->buildNoFinePoissonMatrix_m(lev, gidx, iv, mfab, invdx2);
...@@ -1119,7 +1113,6 @@ void AmrMultiGrid::buildCompositePoissonMatrix_m(const lo_t& level, ...@@ -1119,7 +1113,6 @@ void AmrMultiGrid::buildCompositePoissonMatrix_m(const lo_t& level,
const AmrIntVect_t& iv, const AmrIntVect_t& iv,
const basefab_t& mfab, const basefab_t& mfab,
const basefab_t& rfab, const basefab_t& rfab,
const basefab_t& cfab,
const scalar_t* invdx2) const scalar_t* invdx2)
{ {
/* /*
...@@ -1431,8 +1424,7 @@ void AmrMultiGrid::buildFineBoundaryMatrix_m(const lo_t& level, ...@@ -1431,8 +1424,7 @@ void AmrMultiGrid::buildFineBoundaryMatrix_m(const lo_t& level,
const go_t& gidx, const go_t& gidx,
const AmrIntVect_t& iv, const AmrIntVect_t& iv,
const basefab_t& mfab, const basefab_t& mfab,
const basefab_t& rfab, const basefab_t& rfab)
const basefab_t& cfab)
{ {
/* fine: level + 1 /* fine: level + 1
* coarse (this): level * coarse (this): level
...@@ -1455,8 +1447,7 @@ void AmrMultiGrid::buildFineBoundaryMatrix_m(const lo_t& level, ...@@ -1455,8 +1447,7 @@ void AmrMultiGrid::buildFineBoundaryMatrix_m(const lo_t& level,
auto fill = [&](umap_t& map, auto fill = [&](umap_t& map,
D_DECL(int ii, int jj, int kk), D_DECL(int ii, int jj, int kk),
int* begin, int* end, int d, int* begin, int* end, int d,
const AmrIntVect_t& iv, int shift, const AmrIntVect_t& iv, int shift)
int sign)
{ {
for (int iref = ii - begin[0]; iref <= ii + end[0]; ++iref) { for (int iref = ii - begin[0]; iref <= ii + end[0]; ++iref) {
for (int jref = jj - begin[1]; jref <= jj + end[1]; ++jref) { for (int jref = jj - begin[1]; jref <= jj + end[1]; ++jref) {
...@@ -1539,7 +1530,7 @@ void AmrMultiGrid::buildFineBoundaryMatrix_m(const lo_t& level, ...@@ -1539,7 +1530,7 @@ void AmrMultiGrid::buildFineBoundaryMatrix_m(const lo_t& level,
// iterate over all fine cells at the interface // iterate over all fine cells at the interface
// start with lower cells --> cover coarse neighbour // start with lower cells --> cover coarse neighbour
// cell // cell
fill(map, D_DECL(ii, jj, kk), &begin[0], &end[0], d, iv, shift, 1.0); fill(map, D_DECL(ii, jj, kk), &begin[0], &end[0], d, iv, shift);
break; break;
} }
case 1: case 1:
...@@ -1551,7 +1542,7 @@ void AmrMultiGrid::buildFineBoundaryMatrix_m(const lo_t& level, ...@@ -1551,7 +1542,7 @@ void AmrMultiGrid::buildFineBoundaryMatrix_m(const lo_t& level,
#if AMREX_SPACEDIM == 3 #if AMREX_SPACEDIM == 3
int kk = covered[2] << 1; // refinemet in z int kk = covered[2] << 1; // refinemet in z
#endif #endif
fill(map, D_DECL(ii, jj, kk), &begin[0], &end[0], d, iv, shift, 1.0); fill(map, D_DECL(ii, jj, kk), &begin[0], &end[0], d, iv, shift);
break; break;
} }
} }
...@@ -1768,7 +1759,7 @@ void AmrMultiGrid::smooth_m(const lo_t& level, ...@@ -1768,7 +1759,7 @@ void AmrMultiGrid::smooth_m(const lo_t& level,
#endif #endif
// base level has no smoother --> l - 1 // base level has no smoother --> l - 1
smoother_m[level-1]->smooth(e, mglevel_m[level]->Anf_p, r); smoother_m[level-1]->smooth(e, r);
#if AMR_MG_TIMER #if AMR_MG_TIMER
IpplTimings::stopTimer(smoothTimer_m); IpplTimings::stopTimer(smoothTimer_m);
...@@ -1985,7 +1976,6 @@ void AmrMultiGrid::initBaseSolver_m(const BaseSolver& solver, ...@@ -1985,7 +1976,6 @@ void AmrMultiGrid::initBaseSolver_m(const BaseSolver& solver,
void AmrMultiGrid::initPrec_m(const Preconditioner& prec, void AmrMultiGrid::initPrec_m(const Preconditioner& prec,
const bool& rebalance,
const std::string& reuse) const std::string& reuse)
{ {
switch ( prec ) { switch ( prec ) {
...@@ -2001,7 +1991,7 @@ void AmrMultiGrid::initPrec_m(const Preconditioner& prec, ...@@ -2001,7 +1991,7 @@ void AmrMultiGrid::initPrec_m(const Preconditioner& prec,
case Preconditioner::SA: case Preconditioner::SA:
{ {
std::string muelu = MueLuPreconditioner_t::convertToMueLuReuseOption(reuse); std::string muelu = MueLuPreconditioner_t::convertToMueLuReuseOption(reuse);
prec_mp.reset( new MueLuPreconditioner_t(rebalance, muelu) ); prec_mp.reset( new MueLuPreconditioner_t(muelu) );
break; break;
} }
case Preconditioner::NONE: case Preconditioner::NONE:
......
...@@ -410,7 +410,6 @@ private: ...@@ -410,7 +410,6 @@ private:
const AmrIntVect_t& iv, const AmrIntVect_t& iv,
const basefab_t& mfab, const basefab_t& mfab,
const basefab_t& rfab, const basefab_t& rfab,
const basefab_t& cfab,
const scalar_t* invdx2); const scalar_t* invdx2);
/*! /*!
...@@ -473,18 +472,17 @@ private: ...@@ -473,18 +472,17 @@ private:
* x^{(l)} = B_{fine}\cdot x^{(l+1)} * x^{(l)} = B_{fine}\cdot x^{(l+1)}
* \f] * \f]
* Dirichlet boundary condition. Flux matching. * Dirichlet boundary condition. Flux matching.
* @param iv is the current cell
* @param cells all coarse cells that are at the crse-fine interface but are
* not refined
* @param crse_fine_ba coarse cells that got refined
* @param level the finest level is omitted * @param level the finest level is omitted
* @param gidx the global index
* @param iv is the current cell
* @param mfab is the mask (internal cell, boundary cell, ...) of that level
* @param rfab is the mask between levels
*/ */
void buildFineBoundaryMatrix_m(const lo_t& level, void buildFineBoundaryMatrix_m(const lo_t& level,
const go_t& gidx, const go_t& gidx,
const AmrIntVect_t& iv, const AmrIntVect_t& iv,
const basefab_t& mfab, const basefab_t& mfab,
const basefab_t& rfab, const basefab_t& rfab);
const basefab_t& cfab);
/*! /*!
* Copy data from AMReX to Trilinos * Copy data from AMReX to Trilinos
...@@ -601,11 +599,9 @@ private: ...@@ -601,11 +599,9 @@ private:
/*! /*!
* Instantiate a preconditioner for the bottom solver * Instantiate a preconditioner for the bottom solver
* @param precond type * @param precond type
* @param rebalance preconditioner (SA only)
* @param reuse types of SA hierarchy * @param reuse types of SA hierarchy
*/ */
void initPrec_m(const Preconditioner& prec, void initPrec_m(const Preconditioner& prec,
const bool& rebalance,
const std::string& reuse); const std::string& reuse);
/*! /*!
...@@ -665,7 +661,6 @@ private: ...@@ -665,7 +661,6 @@ private:
private: private:
Teuchos::RCP<comm_t> comm_mp; ///< communicator Teuchos::RCP<comm_t> comm_mp; ///< communicator
Teuchos::RCP<amr::node_t> node_mp; ///< kokkos node
/// interpolater without coarse-fine interface /// interpolater without coarse-fine interface
std::unique_ptr<AmrInterpolater<AmrMultiGridLevel_t> > interp_mp; std::unique_ptr<AmrInterpolater<AmrMultiGridLevel_t> > interp_mp;
......
...@@ -53,7 +53,6 @@ public: ...@@ -53,7 +53,6 @@ public:
typedef amr::comm_t comm_t; typedef amr::comm_t comm_t;
typedef amr::dmap_t dmap_t; typedef amr::dmap_t dmap_t;
typedef amr::node_t node_t;
typedef amr::global_ordinal_t go_t; typedef amr::global_ordinal_t go_t;
typedef amr::scalar_t scalar_t; typedef amr::scalar_t scalar_t;
typedef amr::local_ordinal_t lo_t; typedef amr::local_ordinal_t lo_t;
...@@ -96,7 +95,6 @@ public: ...@@ -96,7 +95,6 @@ public:
* @param rr refinement ratio * @param rr refinement ratio
* @param bc physical boundaries (x, y, z) * @param bc physical boundaries (x, y, z)
* @param comm MPI communicator * @param comm MPI communicator
* @param node Kokkos node type (Serial, OpenMP, CUDA)
*/ */
AmrMultiGridLevel(const Vector_t& meshScaling, AmrMultiGridLevel(const Vector_t& meshScaling,
const amrex::BoxArray& _grids, const amrex::BoxArray& _grids,
...@@ -104,8 +102,7 @@ public: ...@@ -104,8 +102,7 @@ public:
const AmrGeometry_t& _geom, const AmrGeometry_t& _geom,
const AmrIntVect_t& rr, const AmrIntVect_t& rr,
const boundary_t* bc, const boundary_t* bc,
const Teuchos::RCP<comm_t>& comm, const Teuchos::RCP<comm_t>& comm);
const Teuchos::RCP<node_t>& node);
~AmrMultiGridLevel(); ~AmrMultiGridLevel();
...@@ -198,10 +195,8 @@ private: ...@@ -198,10 +195,8 @@ private:
/*! /*!
* Build Tpetra::Map of this level * Build Tpetra::Map of this level
* @param comm MPI communicator * @param comm MPI communicator
* @param node Kokkos node type
*/ */
void buildMap(const Teuchos::RCP<comm_t>& comm, void buildMap(const Teuchos::RCP<comm_t>& comm);
const Teuchos::RCP<node_t>& node);
public: public:
const amrex::BoxArray& grids; ///< boxes of this level const amrex::BoxArray& grids; ///< boxes of this level
......
...@@ -30,8 +30,7 @@ AmrMultiGridLevel<MatrixType, ...@@ -30,8 +30,7 @@ AmrMultiGridLevel<MatrixType,
const AmrGeometry_t& _geom, const AmrGeometry_t& _geom,
const AmrIntVect_t& rr, const AmrIntVect_t& rr,
const boundary_t* bc, const boundary_t* bc,
const Teuchos::RCP<comm_t>& comm, const Teuchos::RCP<comm_t>& comm)
const Teuchos::RCP<node_t>& node)
: grids(_grids), : grids(_grids),
dmap(_dmap), dmap(_dmap),
geom(_geom), geom(_geom),
...@@ -71,7 +70,7 @@ AmrMultiGridLevel<MatrixType, ...@@ -71,7 +70,7 @@ AmrMultiGridLevel<MatrixType,
this->buildLevelMask(); this->buildLevelMask();
this->buildMap(comm, node); this->buildMap(comm);
residual_p = Teuchos::rcp( new vector_t(map_p, false) ); residual_p = Teuchos::rcp( new vector_t(map_p, false) );
...@@ -216,8 +215,7 @@ bool AmrMultiGridLevel<MatrixType, VectorType>::isValid(const AmrIntVect_t& iv) ...@@ -216,8 +215,7 @@ bool AmrMultiGridLevel<MatrixType, VectorType>::isValid(const AmrIntVect_t& iv)
template <class MatrixType, class VectorType> template <class MatrixType, class VectorType>
void AmrMultiGridLevel<MatrixType, VectorType>::buildMap(const Teuchos::RCP<comm_t>& comm, void AmrMultiGridLevel<MatrixType, VectorType>::buildMap(const Teuchos::RCP<comm_t>& comm)
const Teuchos::RCP<node_t>& node)
{ {
go_t localNumElements = 0; go_t localNumElements = 0;
...@@ -263,5 +261,5 @@ void AmrMultiGridLevel<MatrixType, VectorType>::buildMap(const Teuchos::RCP<comm ...@@ -263,5 +261,5 @@ void AmrMultiGridLevel<MatrixType, VectorType>::buildMap(const Teuchos::RCP<comm
// numGlobalElements == N // numGlobalElements == N
go_t N = grids.numPts(); go_t N = grids.numPts();
map_p = Teuchos::rcp( new dmap_t(N, globalindices, baseIndex, comm, node) ); map_p = Teuchos::rcp( new dmap_t(N, globalindices, baseIndex, comm) );
} }
...@@ -42,12 +42,12 @@ void AmrPCInterpolater<Level>::stencil( ...@@ -42,12 +42,12 @@ void AmrPCInterpolater<Level>::stencil(
template <class Level> template <class Level>
void AmrPCInterpolater<Level>::coarse( void AmrPCInterpolater<Level>::coarse(
const AmrIntVect_t& iv, const AmrIntVect_t& /*iv*/,
umap_t& map, umap_t& /*map*/,
const scalar_t& scale, const scalar_t& /*scale*/,
lo_t dir, lo_t shift, const basefab_t& rfab, lo_t /*dir*/, lo_t /*shift*/, const basefab_t& /*rfab*/,
const AmrIntVect_t& riv, const AmrIntVect_t& /*riv*/,
Level* mglevel) Level* /*mglevel*/)
{ {
// do nothing // do nothing
} }
...@@ -58,7 +58,7 @@ void AmrPCInterpolater<Level>::fine( ...@@ -58,7 +58,7 @@ void AmrPCInterpolater<Level>::fine(
const AmrIntVect_t& iv, const AmrIntVect_t& iv,
umap_t& map, umap_t& map,
const scalar_t& scale, const scalar_t& scale,
lo_t dir, lo_t shift, const basefab_t& fab, lo_t /*dir*/, lo_t /*shift*/, const basefab_t& fab,
Level* mglevel) Level* mglevel)
{ {
/* /*
......
...@@ -52,7 +52,6 @@ AmrSmoother::~AmrSmoother() { ...@@ -52,7 +52,6 @@ AmrSmoother::~AmrSmoother() {
void AmrSmoother::smooth(const Teuchos::RCP<vector_t>& x, void AmrSmoother::smooth(const Teuchos::RCP<vector_t>& x,
const Teuchos::RCP<matrix_t>& A,
const Teuchos::RCP<vector_t>& b) const Teuchos::RCP<vector_t>& b)
{ {
prec_mp->apply(*b, *x, Teuchos::NO_TRANS, prec_mp->apply(*b, *x, Teuchos::NO_TRANS,
...@@ -128,4 +127,4 @@ void AmrSmoother::initParameter_m(const Smoother& smoother, ...@@ -128,4 +127,4 @@ void AmrSmoother::initParameter_m(const Smoother& smoother,
params_mp->set("relaxation: fix tiny diagonal entries", fix.first); params_mp->set("relaxation: fix tiny diagonal entries", fix.first);
params_mp->set("relaxation: min diagonal value", fix.second); params_mp->set("relaxation: min diagonal value", fix.second);
params_mp->set("relaxation: check diagonal entries", check); params_mp->set("relaxation: check diagonal entries", check);
} }
\ No newline at end of file
...@@ -65,11 +65,9 @@ public: ...@@ -65,11 +65,9 @@ public:
/*! /*!
* Perform one smoothing step * Perform one smoothing step
* @param x right-hand side * @param x right-hand side
* @param A system matrix
* @param b right-hand side * @param b right-hand side
*/ */
void smooth(const Teuchos::RCP<vector_t>& x, void smooth(const Teuchos::RCP<vector_t>& x,
const Teuchos::RCP<matrix_t>& A,
const Teuchos::RCP<vector_t>& b); const Teuchos::RCP<vector_t>& b);
/*! /*!
......
...@@ -116,12 +116,12 @@ void AmrTrilinearInterpolater<Level>::stencil( ...@@ -116,12 +116,12 @@ void AmrTrilinearInterpolater<Level>::stencil(
template <class Level> template <class Level>
void AmrTrilinearInterpolater<Level>::coarse( void AmrTrilinearInterpolater<Level>::coarse(
const AmrIntVect_t& iv, const AmrIntVect_t& /*iv*/,
umap_t& map, umap_t& /*map*/,
const scalar_t& scale, const scalar_t& /*scale*/,
lo_t dir, lo_t shift, const basefab_t& rfab, lo_t /*dir*/, lo_t /*shift*/, const basefab_t& /*rfab*/,
const AmrIntVect_t& riv, const AmrIntVect_t& /*riv*/,
Level* mglevel) Level* /*mglevel*/)
{ {
// do nothing // do nothing
} }
...@@ -132,7 +132,7 @@ void AmrTrilinearInterpolater<Level>::fine( ...@@ -132,7 +132,7 @@ void AmrTrilinearInterpolater<Level>::fine(
const AmrIntVect_t& iv, const AmrIntVect_t& iv,
umap_t& map, umap_t& map,
const scalar_t& scale, const scalar_t& scale,
lo_t dir,