]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Switched order of arguments in SUNDIALS::* constructors. 5166/head
authorLuca Heltai <luca.heltai@sissa.it>
Thu, 28 Sep 2017 07:59:56 +0000 (09:59 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Thu, 28 Sep 2017 07:59:56 +0000 (09:59 +0200)
include/deal.II/sundials/arkode.h
include/deal.II/sundials/ida.h
source/sundials/arkode.cc
source/sundials/ida.cc
tests/sundials/harmonic_oscillator_01.cc
tests/sundials/harmonic_oscillator_02.cc
tests/sundials/harmonic_oscillator_03.cc
tests/sundials/harmonic_oscillator_04.cc
tests/sundials/harmonic_oscillator_05.cc
tests/sundials/harmonic_oscillator_06.cc

index 0ed5c85419fb875d79ac59f0188806ef5789ea72..3f19773b6b47b1907f0f61c2c1c9eb59e0f7adab 100644 (file)
@@ -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.
index a3a7c3a8b4ea27d43e4ac5c27158a2ddcc04d189..d705b250c0d65f113cf391504e968fedcd09e7c1 100644 (file)
@@ -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.
index 759bfe8cee9b3a092e4cf1ca95e8d412f53ca58b..d3a488229c1303b65453212bbb2d79774b915963 100644 (file)
@@ -208,7 +208,7 @@ namespace SUNDIALS
   }
 
   template <typename VectorType>
-  ARKode<VectorType>::ARKode(const MPI_Comm mpi_comm, const AdditionalData &data) :
+  ARKode<VectorType>::ARKode(const AdditionalData &data, const MPI_Comm mpi_comm) :
     data(data),
     arkode_mem(nullptr),
     communicator(Utilities::MPI::duplicate_communicator(mpi_comm))
index e7b259162884f29be629a0b91d01facdcbe897c0..114b7dd2317920a72ce0be076de09494a925c7ef 100644 (file)
@@ -138,7 +138,7 @@ namespace SUNDIALS
   }
 
   template <typename VectorType>
-  IDA<VectorType>::IDA(const MPI_Comm mpi_comm, const AdditionalData &data) :
+  IDA<VectorType>::IDA(const AdditionalData &data, const MPI_Comm mpi_comm) :
     data(data),
     ida_mem(nullptr),
     communicator(Utilities::MPI::duplicate_communicator(mpi_comm))
index 1b609761ae6ca687767034ac116dc11793cdb9a8..cfdf6369b33ac3b938e4648ff138af089d94ac39 100644 (file)
@@ -56,7 +56,7 @@ class HarmonicOscillator
 
 public:
   HarmonicOscillator(double _kappa, const typename SUNDIALS::IDA<Vector<double>>::AdditionalData &data) :
-    time_stepper(MPI_COMM_WORLD, data),
+    time_stepper(data),
     y(2),
     y_dot(2),
     J(2,2),
index 194cd2ca5f18b64b839b93c000e2d41f4ec145de..7c839d58c6e3cfa8b3f2525a51285435a177769a 100644 (file)
@@ -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<VectorType> ode(MPI_COMM_WORLD,data);
+  SUNDIALS::ARKode<VectorType> ode(data);
 
   ode.reinit_vector = [&] (VectorType&v)
   {
index b418602a7c29e78482aa18fbadbb1163b37a1b63..eb5a4a4048d1cd8db5f469fcad9ceb71d00cf22d 100644 (file)
@@ -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<VectorType> ode(MPI_COMM_WORLD,data);
+  SUNDIALS::ARKode<VectorType> ode(data);
 
   ode.reinit_vector = [&] (VectorType&v)
   {
index dc6fcb59d08f8c8ab983cdd7026250cc9e68affc..b3cc67cab1a2f84e2d85a9ee88ea44bc457bbf67 100644 (file)
@@ -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<VectorType> ode(MPI_COMM_WORLD,data);
+  SUNDIALS::ARKode<VectorType> ode(data);
 
   ode.reinit_vector = [&] (VectorType&v)
   {
index 09005c66bafb1934443cabdefe086cf067035e7c..bd7a09d3e83232ec5264eb07a0f9242b09f980b5 100644 (file)
@@ -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<VectorType> ode(MPI_COMM_WORLD,data);
+  SUNDIALS::ARKode<VectorType> ode(data);
 
   ode.reinit_vector = [&] (VectorType&v)
   {
index b25620c60c8375b7148754a5f16b4d944a631bff..01e0c9e820ef9550ab42e976d55c8d83e86ed356 100644 (file)
@@ -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<VectorType> ode(MPI_COMM_WORLD,data);
+  SUNDIALS::ARKode<VectorType> ode(data);
 
   ode.reinit_vector = [&] (VectorType&v)
   {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.