mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Tag Unused Parameter as [[maybe_unused]]
Suppresses warnings about unused arguments. While here, also split a long line for readability and include a number of standard headers that were missing before.
This commit is contained in:
parent
11c0e085f9
commit
171a591659
@ -24,6 +24,7 @@
|
|||||||
#include <opm/simulators/linalg/bda/BdaResult.hpp>
|
#include <opm/simulators/linalg/bda/BdaResult.hpp>
|
||||||
#include <opm/simulators/linalg/bda/BlockedMatrix.hpp>
|
#include <opm/simulators/linalg/bda/BlockedMatrix.hpp>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
@ -18,15 +18,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <sstream>
|
|
||||||
|
#include <opm/simulators/linalg/bda/amgclSolverBackend.hpp>
|
||||||
|
|
||||||
|
#include <opm/simulators/linalg/bda/BdaResult.hpp>
|
||||||
|
|
||||||
#include <opm/common/OpmLog/OpmLog.hpp>
|
#include <opm/common/OpmLog/OpmLog.hpp>
|
||||||
#include <opm/common/ErrorMacros.hpp>
|
#include <opm/common/ErrorMacros.hpp>
|
||||||
#include <dune/common/timer.hh>
|
#include <dune/common/timer.hh>
|
||||||
|
|
||||||
#include <opm/simulators/linalg/bda/BdaResult.hpp>
|
|
||||||
#include <opm/simulators/linalg/bda/amgclSolverBackend.hpp>
|
|
||||||
|
|
||||||
#include <boost/property_tree/json_parser.hpp>
|
#include <boost/property_tree/json_parser.hpp>
|
||||||
|
|
||||||
#if HAVE_VEXCL
|
#if HAVE_VEXCL
|
||||||
@ -34,6 +34,18 @@
|
|||||||
#include <amgcl/backend/vexcl_static_matrix.hpp>
|
#include <amgcl/backend/vexcl_static_matrix.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <fstream>
|
||||||
|
#include <ios>
|
||||||
|
#include <ostream>
|
||||||
|
#include <memory>
|
||||||
|
#include <mutex>
|
||||||
|
#include <sstream>
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <string>
|
||||||
|
#include <tuple>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
namespace Accelerator
|
namespace Accelerator
|
||||||
@ -43,8 +55,13 @@ using Opm::OpmLog;
|
|||||||
using Dune::Timer;
|
using Dune::Timer;
|
||||||
|
|
||||||
template <unsigned int block_size>
|
template <unsigned int block_size>
|
||||||
amgclSolverBackend<block_size>::amgclSolverBackend(int verbosity_, int maxit_, double tolerance_, unsigned int platformID_, unsigned int deviceID_) : BdaSolver<block_size>(verbosity_, maxit_, tolerance_, platformID_, deviceID_) {}
|
amgclSolverBackend<block_size>::amgclSolverBackend(const int verbosity_,
|
||||||
|
const int maxit_,
|
||||||
|
const double tolerance_,
|
||||||
|
const unsigned int platformID_,
|
||||||
|
const unsigned int deviceID_)
|
||||||
|
: BdaSolver<block_size>(verbosity_, maxit_, tolerance_, platformID_, deviceID_)
|
||||||
|
{}
|
||||||
|
|
||||||
template <unsigned int block_size>
|
template <unsigned int block_size>
|
||||||
amgclSolverBackend<block_size>::~amgclSolverBackend() {}
|
amgclSolverBackend<block_size>::~amgclSolverBackend() {}
|
||||||
@ -360,10 +377,10 @@ void amgclSolverBackend<block_size>::get_result(double *x_) {
|
|||||||
|
|
||||||
template <unsigned int block_size>
|
template <unsigned int block_size>
|
||||||
SolverStatus amgclSolverBackend<block_size>::solve_system(std::shared_ptr<BlockedMatrix> matrix,
|
SolverStatus amgclSolverBackend<block_size>::solve_system(std::shared_ptr<BlockedMatrix> matrix,
|
||||||
double *b,
|
double *b,
|
||||||
[[maybe_unused]] std::shared_ptr<BlockedMatrix> jacMatrix,
|
[[maybe_unused]] std::shared_ptr<BlockedMatrix> jacMatrix,
|
||||||
[[maybe_unused]] WellContributions& wellContribs,
|
[[maybe_unused]] WellContributions& wellContribs,
|
||||||
BdaResult &res)
|
BdaResult &res)
|
||||||
{
|
{
|
||||||
if (initialized == false) {
|
if (initialized == false) {
|
||||||
initialize(matrix->Nb, matrix->nnzbs);
|
initialize(matrix->Nb, matrix->nnzbs);
|
||||||
@ -375,20 +392,13 @@ SolverStatus amgclSolverBackend<block_size>::solve_system(std::shared_ptr<Blocke
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
SolverStatus amgclSolverBackend<1>::solve_system(std::shared_ptr<BlockedMatrix> matrix,
|
SolverStatus amgclSolverBackend<1>::solve_system([[maybe_unused]] std::shared_ptr<BlockedMatrix> matrix,
|
||||||
double *b,
|
[[maybe_unused]] double *b,
|
||||||
[[maybe_unused]] std::shared_ptr<BlockedMatrix> jacMatrix,
|
[[maybe_unused]] std::shared_ptr<BlockedMatrix> jacMatrix,
|
||||||
[[maybe_unused]] WellContributions& wellContribs,
|
[[maybe_unused]] WellContributions& wellContribs,
|
||||||
BdaResult &res)
|
[[maybe_unused]] BdaResult &res)
|
||||||
{
|
{
|
||||||
OPM_THROW(std::logic_error, "amgclSolverBackend not implemented for sz 1");
|
OPM_THROW(std::logic_error, "amgclSolverBackend not implemented for sz 1");
|
||||||
// if (initialized == false) {
|
|
||||||
// initialize(matrix->Nb, matrix->nnzbs);
|
|
||||||
// convert_sparsity_pattern(matrix->rowPointers, matrix->colIndices);
|
|
||||||
// }
|
|
||||||
// convert_data(matrix->nnzValues, matrix->rowPointers);
|
|
||||||
// solve_system(b, res);
|
|
||||||
// return SolverStatus::BDA_SOLVER_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
#ifndef OPM_AMGCLSOLVER_BACKEND_HEADER_INCLUDED
|
#ifndef OPM_AMGCLSOLVER_BACKEND_HEADER_INCLUDED
|
||||||
#define OPM_AMGCLSOLVER_BACKEND_HEADER_INCLUDED
|
#define OPM_AMGCLSOLVER_BACKEND_HEADER_INCLUDED
|
||||||
|
|
||||||
#include <mutex>
|
|
||||||
|
|
||||||
#include <opm/simulators/linalg/bda/BdaResult.hpp>
|
#include <opm/simulators/linalg/bda/BdaResult.hpp>
|
||||||
#include <opm/simulators/linalg/bda/BdaSolver.hpp>
|
#include <opm/simulators/linalg/bda/BdaSolver.hpp>
|
||||||
#include <opm/simulators/linalg/bda/WellContributions.hpp>
|
#include <opm/simulators/linalg/bda/WellContributions.hpp>
|
||||||
@ -38,6 +36,10 @@
|
|||||||
#include <amgcl/preconditioner/runtime.hpp>
|
#include <amgcl/preconditioner/runtime.hpp>
|
||||||
#include <amgcl/value_type/static_matrix.hpp>
|
#include <amgcl/value_type/static_matrix.hpp>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include <mutex>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
namespace Accelerator
|
namespace Accelerator
|
||||||
|
Loading…
Reference in New Issue
Block a user