Merge pull request #12 from bska/master
Coding Style and Diagnostics Clean-up.
This commit is contained in:
commit
d89395f486
10
m4/agmg.m4
10
m4/agmg.m4
@ -11,10 +11,14 @@ AC_DEFUN([OPM_AGMG],dnl
|
||||
[AS_IF([test -f "$with_agmg/dagmg.f90"],dnl
|
||||
[AC_SUBST([AGMG_SRCDIR], [$with_agmg])[]dnl
|
||||
AC_DEFINE([HAVE_AGMG], [1],dnl
|
||||
[Define to `1' if Notay's AGMG solver is included])[]dnl
|
||||
[Define to 1 if Notay's AGMG solver is included.])[]dnl
|
||||
build_agmg="yes"],dnl
|
||||
[build_agmg="no"])],dnl
|
||||
[build_agmg="no"])[]dnl
|
||||
[AC_DEFINE([HAVE_AGMG], [0],dnl
|
||||
[Define to 0 if Notay's AGMG solver is unavailable.])[]dnl
|
||||
build_agmg="no"])],dnl
|
||||
[AC_DEFINE([HAVE_AGMG], [0],dnl
|
||||
[Define to 0 if Notay's AGMG solver is unwanted.])[]dnl
|
||||
build_agmg="no"])[]dnl
|
||||
|
||||
AS_IF([test x"$build_agmg" = x"yes"],dnl
|
||||
[AC_PROG_FC_C_O[]dnl
|
||||
|
@ -31,7 +31,9 @@ AC_DEFUN([AX_DUNE_ISTL],
|
||||
"x$ax_cv_dune_common_available" = "xyes"],dnl
|
||||
[AC_DEFINE([HAVE_DUNE_ISTL], [1],dnl
|
||||
[Define to 1 if `dune-istl' is available])
|
||||
])[]dnl
|
||||
],dnl
|
||||
[AC_DEFINE([HAVE_DUNE_ISTL], [0],dnl
|
||||
[Define to 0 if `dune-istl' is unavailable.])])[]dnl
|
||||
|
||||
AM_CONDITIONAL([DUNE_ISTL],
|
||||
[test "x$ax_cv_dune_istl_available" = "xyes" -a \
|
||||
|
@ -269,8 +269,6 @@ fill_cart_topology_3d(struct UnstructuredGrid *G)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
fnodes = G->face_nodes;
|
||||
fnodepos = G->face_nodepos;
|
||||
fcells = G->face_cells;
|
||||
|
@ -66,6 +66,7 @@ namespace Opm
|
||||
is_spd_(is_spd)
|
||||
{
|
||||
}
|
||||
|
||||
LinearSolverAGMG::LinearSolverAGMG(const parameter::ParameterGroup& param)
|
||||
: max_it_(100) ,
|
||||
rtol_ (1.0e-6),
|
||||
@ -76,11 +77,8 @@ namespace Opm
|
||||
is_spd_ = param.getDefault("is_spd", is_spd_);
|
||||
}
|
||||
|
||||
|
||||
LinearSolverAGMG::~LinearSolverAGMG() {}
|
||||
|
||||
|
||||
|
||||
LinearSolverInterface::LinearSolverReport
|
||||
LinearSolverAGMG::solve(const int size ,
|
||||
const int nonzeros,
|
||||
|
@ -44,7 +44,6 @@
|
||||
|
||||
#include <opm/core/linalg/LinearSolverInterface.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -63,26 +62,30 @@ namespace Opm
|
||||
LinearSolverAGMG(const int max_it = 100 ,
|
||||
const double rtol = 1.0e-6,
|
||||
const bool is_spd = false);
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* \param[in] param ParameterGroup object contianing the fields
|
||||
* max_it,rtol,is_spd as used in the constructor
|
||||
* \param[in] param ParameterGroup object containing the fields
|
||||
* max_it,rtol,is_spd as used in the constructor.
|
||||
*/
|
||||
LinearSolverAGMG(const parameter::ParameterGroup& param);
|
||||
/// Destructor.
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
*/
|
||||
virtual ~LinearSolverAGMG();
|
||||
|
||||
using LinearSolverInterface::solve;
|
||||
|
||||
/// Solve a linear system, with a matrix given in compressed
|
||||
/// sparse row format.
|
||||
/// \param[in] size Number of rows (and colums).
|
||||
/// \param[in] size Number of rows (and columns).
|
||||
/// \param[in] nonzeros Number of (structural) non-zeros.
|
||||
/// \param[in] ia Row pointers.
|
||||
/// \param[in] ja Column indices.
|
||||
/// \param[in] sa (structurally) non-zero elements.
|
||||
/// \param[in] rhs System right-hand side.
|
||||
/// \param[inout] solution System solution.
|
||||
/// \param[in,out] solution System solution.
|
||||
/// \return Solver meta-data concerning most recent system solve.
|
||||
virtual LinearSolverInterface::LinearSolverReport
|
||||
solve(const int size, const int nonzeros,
|
||||
|
@ -30,6 +30,7 @@
|
||||
#if HAVE_DUNE_ISTL
|
||||
#include <opm/core/linalg/LinearSolverIstl.hpp>
|
||||
#endif
|
||||
|
||||
#if HAVE_AGMG
|
||||
#include <opm/core/linalg/LinearSolverAGMG.hpp>
|
||||
#endif
|
||||
@ -73,11 +74,13 @@ namespace Opm
|
||||
solver_.reset(new LinearSolverIstl(param));
|
||||
#endif
|
||||
}
|
||||
|
||||
else if (ls == "agmg") {
|
||||
#if HAVE_AGMG
|
||||
solver_.reset(new LinearSolverAGMG(param));
|
||||
#endif
|
||||
}
|
||||
|
||||
else {
|
||||
THROW("Linear solver " << ls << " is unknown.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user