From: Luca Heltai Date: Thu, 28 Sep 2017 07:59:56 +0000 (+0200) Subject: Switched order of arguments in SUNDIALS::* constructors. X-Git-Tag: v9.0.0-rc1~1020^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5166%2Fhead;p=dealii.git Switched order of arguments in SUNDIALS::* constructors. --- diff --git a/include/deal.II/sundials/arkode.h b/include/deal.II/sundials/arkode.h index 0ed5c85419..3f19773b6b 100644 --- a/include/deal.II/sundials/arkode.h +++ b/include/deal.II/sundials/arkode.h @@ -482,11 +482,11 @@ namespace SUNDIALS * passing an AdditionalData() object that sets all of the solver * parameters. * - * @param mpi_comm MPI communicator * @param data ARKode configuration data + * @param mpi_comm MPI communicator */ - ARKode(const MPI_Comm mpi_comm = MPI_COMM_WORLD, - const AdditionalData &data=AdditionalData()); + ARKode(const AdditionalData &data=AdditionalData(), + const MPI_Comm mpi_comm = MPI_COMM_WORLD); /** * Destructor. diff --git a/include/deal.II/sundials/ida.h b/include/deal.II/sundials/ida.h index a3a7c3a8b4..d705b250c0 100644 --- a/include/deal.II/sundials/ida.h +++ b/include/deal.II/sundials/ida.h @@ -557,11 +557,11 @@ namespace SUNDIALS * consistent. Then you can choose how these are made consistent, using the same three * options that you used for the initial conditions in `reset_type`. * - * @param mpi_comm MPI communicator * @param data IDA configuration data + * @param mpi_comm MPI communicator */ - IDA(const MPI_Comm mpi_comm = MPI_COMM_WORLD, - const AdditionalData &data=AdditionalData()); + IDA(const AdditionalData &data=AdditionalData(), + const MPI_Comm mpi_comm = MPI_COMM_WORLD); /** * Destructor. diff --git a/source/sundials/arkode.cc b/source/sundials/arkode.cc index 759bfe8cee..d3a488229c 100644 --- a/source/sundials/arkode.cc +++ b/source/sundials/arkode.cc @@ -208,7 +208,7 @@ namespace SUNDIALS } template - ARKode::ARKode(const MPI_Comm mpi_comm, const AdditionalData &data) : + ARKode::ARKode(const AdditionalData &data, const MPI_Comm mpi_comm) : data(data), arkode_mem(nullptr), communicator(Utilities::MPI::duplicate_communicator(mpi_comm)) diff --git a/source/sundials/ida.cc b/source/sundials/ida.cc index e7b2591628..114b7dd231 100644 --- a/source/sundials/ida.cc +++ b/source/sundials/ida.cc @@ -138,7 +138,7 @@ namespace SUNDIALS } template - IDA::IDA(const MPI_Comm mpi_comm, const AdditionalData &data) : + IDA::IDA(const AdditionalData &data, const MPI_Comm mpi_comm) : data(data), ida_mem(nullptr), communicator(Utilities::MPI::duplicate_communicator(mpi_comm)) diff --git a/tests/sundials/harmonic_oscillator_01.cc b/tests/sundials/harmonic_oscillator_01.cc index 1b609761ae..cfdf6369b3 100644 --- a/tests/sundials/harmonic_oscillator_01.cc +++ b/tests/sundials/harmonic_oscillator_01.cc @@ -56,7 +56,7 @@ class HarmonicOscillator public: HarmonicOscillator(double _kappa, const typename SUNDIALS::IDA>::AdditionalData &data) : - time_stepper(MPI_COMM_WORLD, data), + time_stepper(data), y(2), y_dot(2), J(2,2), diff --git a/tests/sundials/harmonic_oscillator_02.cc b/tests/sundials/harmonic_oscillator_02.cc index 194cd2ca5f..7c839d58c6 100644 --- a/tests/sundials/harmonic_oscillator_02.cc +++ b/tests/sundials/harmonic_oscillator_02.cc @@ -70,7 +70,7 @@ int main (int argc, char **argv) std::ifstream ifile(SOURCE_DIR "/harmonic_oscillator_02.prm"); prm.parse_input(ifile); - SUNDIALS::ARKode ode(MPI_COMM_WORLD,data); + SUNDIALS::ARKode ode(data); ode.reinit_vector = [&] (VectorType&v) { diff --git a/tests/sundials/harmonic_oscillator_03.cc b/tests/sundials/harmonic_oscillator_03.cc index b418602a7c..eb5a4a4048 100644 --- a/tests/sundials/harmonic_oscillator_03.cc +++ b/tests/sundials/harmonic_oscillator_03.cc @@ -63,7 +63,7 @@ int main (int argc, char **argv) std::ifstream ifile(SOURCE_DIR "/harmonic_oscillator_02.prm"); prm.parse_input(ifile); - SUNDIALS::ARKode ode(MPI_COMM_WORLD,data); + SUNDIALS::ARKode ode(data); ode.reinit_vector = [&] (VectorType&v) { diff --git a/tests/sundials/harmonic_oscillator_04.cc b/tests/sundials/harmonic_oscillator_04.cc index dc6fcb59d0..b3cc67cab1 100644 --- a/tests/sundials/harmonic_oscillator_04.cc +++ b/tests/sundials/harmonic_oscillator_04.cc @@ -65,7 +65,7 @@ int main (int argc, char **argv) std::ifstream ifile(SOURCE_DIR "/harmonic_oscillator_04.prm"); prm.parse_input(ifile); - SUNDIALS::ARKode ode(MPI_COMM_WORLD,data); + SUNDIALS::ARKode ode(data); ode.reinit_vector = [&] (VectorType&v) { diff --git a/tests/sundials/harmonic_oscillator_05.cc b/tests/sundials/harmonic_oscillator_05.cc index 09005c66ba..bd7a09d3e8 100644 --- a/tests/sundials/harmonic_oscillator_05.cc +++ b/tests/sundials/harmonic_oscillator_05.cc @@ -65,7 +65,7 @@ int main (int argc, char **argv) std::ifstream ifile(SOURCE_DIR "/harmonic_oscillator_05.prm"); prm.parse_input(ifile); - SUNDIALS::ARKode ode(MPI_COMM_WORLD,data); + SUNDIALS::ARKode ode(data); ode.reinit_vector = [&] (VectorType&v) { diff --git a/tests/sundials/harmonic_oscillator_06.cc b/tests/sundials/harmonic_oscillator_06.cc index b25620c60c..01e0c9e820 100644 --- a/tests/sundials/harmonic_oscillator_06.cc +++ b/tests/sundials/harmonic_oscillator_06.cc @@ -65,7 +65,7 @@ int main (int argc, char **argv) std::ifstream ifile(SOURCE_DIR "/harmonic_oscillator_06.prm"); prm.parse_input(ifile); - SUNDIALS::ARKode ode(MPI_COMM_WORLD,data); + SUNDIALS::ARKode ode(data); ode.reinit_vector = [&] (VectorType&v) {