ASPECT
rk_4.h
Go to the documentation of this file.
1 // ------------------------------------------------------
2 //
3 // SPDX-License-Identifier: GPL-2.0-or-later
4 //
5 // SPDX-FileCopyrightText: Copyright (C) 2015-2024 by the ASPECT authors.
6 //
7 // This file is part of ASPECT.
8 //
9 // Detailed license information governing the source code and
10 // contributions can be found in the folder LICENSES and in
11 // LICENSE and CONTRIBUTING.md at the top level directory.
12 //
13 // ------------------------------------------------------
14 
15 #ifndef _aspect_particle_integrator_rk_4_h
16 #define _aspect_particle_integrator_rk_4_h
17 
19 
20 namespace aspect
21 {
22  namespace Particle
23  {
24  namespace Integrator
25  {
33  template <int dim>
34  class RK4 : public Interface<dim>, public SimulatorAccess<dim>
35  {
36  public:
37  RK4();
38 
43  void
44  initialize () override;
45 
64  void
66  const typename ParticleHandler<dim>::particle_iterator &end_particle,
67  const std::vector<Tensor<1,dim>> &old_velocities,
68  const std::vector<Tensor<1,dim>> &velocities,
69  const double dt) override;
70 
81  bool new_integration_step() override;
82 
98  std::array<bool, 3> required_solution_vectors() const override;
99 
111  static constexpr unsigned int n_integrator_properties = 4*dim;
112 
113  private:
118  unsigned int integrator_substep;
119 
123  std::array<unsigned int,4> property_indices;
124  };
125  }
126  }
127 }
128 
129 #endif
void local_integrate_step(const typename ParticleHandler< dim >::particle_iterator &begin_particle, const typename ParticleHandler< dim >::particle_iterator &end_particle, const std::vector< Tensor< 1, dim >> &old_velocities, const std::vector< Tensor< 1, dim >> &velocities, const double dt) override
std::array< unsigned int, 4 > property_indices
Definition: rk_4.h:123
unsigned int integrator_substep
Definition: rk_4.h:118
static constexpr unsigned int n_integrator_properties
Definition: rk_4.h:111
std::array< bool, 3 > required_solution_vectors() const override
ParticleIterator< dim, spacedim > particle_iterator