ASPECT
rk_2.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-2026 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_2_h
16 #define _aspect_particle_integrator_rk_2_h
17 
19 
21 
22 
23 namespace aspect
24 {
25  namespace Particle
26  {
27  namespace Integrator
28  {
35  template <int dim>
36  class RK2 : public Interface<dim>, public SimulatorAccess<dim>
37  {
38  public:
39  RK2();
40 
45  void
46  initialize () override;
47 
65  void
67  const typename ParticleHandler<dim>::particle_iterator &end_particle,
68  const std::vector<Tensor<1,dim>> &old_velocities,
69  const std::vector<Tensor<1,dim>> &velocities,
70  const double dt) override;
71 
82  bool new_integration_step() override;
83 
98  std::array<bool, 3> required_solution_vectors() const override;
99 
103  static
104  void
106 
110  void
111  parse_parameters (ParameterHandler &prm) override;
112 
124  static constexpr unsigned int n_integrator_properties = dim;
125 
126  private:
131  unsigned int integrator_substep;
132 
137 
146  };
147 
148  }
149  }
150 }
151 
152 #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< bool, 3 > required_solution_vectors() const override
unsigned int property_index_old_location
Definition: rk_2.h:136
unsigned int integrator_substep
Definition: rk_2.h:131
static constexpr unsigned int n_integrator_properties
Definition: rk_2.h:124
static void declare_parameters(ParameterHandler &prm)
ParticleIterator< dim, spacedim > particle_iterator
void parse_parameters(ParameterHandler &prm) override