* 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.
* 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.
}
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))
}
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))
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),
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)
{
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)
{
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)
{
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)
{
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)
{