GraviDy  1.0
Gravitational Dynamics N-body integrator
Hermite4CPU.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016
3  *
4  * Cristián Maureira-Fredes <cmaureirafredes@gmail.com>
5  *
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in the
17  * documentation and/or other materials provided with the distribution.
18  *
19  * 3. The name of the author may not be used to endorse or promote
20  * products derived from this software without specific prior written
21  * permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
24  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
27  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
31  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
32  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
33  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34  *
35  */
36 #ifndef HERMITE4CPU_HPP
37 #define HERMITE4CPU_HPP
38 #include "../Hermite4.hpp"
39 
49 class Hermite4CPU : public Hermite4 {
50  public:
52  ~Hermite4CPU();
53 
54  void force_calculation(Predictor pi, Predictor pj, Forces &fi);
55  void init_acc_jrk();
56  void update_acc_jrk(unsigned int nact);
57  void predicted_pos_vel(double ITIME);
58  void correction_pos_vel(double ITIME, unsigned int nact);
59  void integration();
60 };
61 
62 #endif
Class in charge of all the logging system in the code.
Definition: Logger.hpp:60
Logger * logger
Logger object reference.
Definition: Hermite4.hpp:56
This structure contains the predicted information of a particle in some moment of the integration...
Definition: common.hpp:192
Class in charge of the general aspects of the N-body integrator.
Definition: NbodySystem.hpp:51
void update_acc_jrk(unsigned int nact)
Method that call the force_calculation method for every and particles interaction of the ones...
Definition: Hermite4CPU.cpp:103
Hermite4CPU(NbodySystem *ns, Logger *logger, NbodyUtils *nu)
Constructor that uses its parent constructor.
Definition: Hermite4CPU.cpp:40
void predicted_pos_vel(double ITIME)
Method that predict all the particles to the current integration time.
Definition: Hermite4CPU.cpp:130
void force_calculation(Predictor pi, Predictor pj, Forces &fi)
Method that calculate the gravitational interaction between two particles.
Definition: Hermite4CPU.cpp:55
~Hermite4CPU()
Destructor.
Definition: Hermite4CPU.cpp:48
Class which implements on the CPU the structure of the Hermite4 scheme.
Definition: Hermite4CPU.hpp:49
General class that define the structure to be follow by any implementation of the integrator (CPU...
Definition: Hermite4.hpp:48
void init_acc_jrk()
Method that initializes the acceleration and it first derivative.
Definition: Hermite4CPU.cpp:86
void integration()
Integration virtual method to be implemented.
Definition: Hermite4CPU_integration.cpp:38
Class in charge of the different properties of the system.
Definition: NbodyUtils.hpp:49
This structure contains the information of the Forces of a particle in some moment of the integration...
Definition: common.hpp:207
NbodySystem * ns
NbodySystem object reference.
Definition: Hermite4.hpp:54
void correction_pos_vel(double ITIME, unsigned int nact)
Method that correct the positions and velocities of the particles at the end of every integration ste...
Definition: Hermite4CPU.cpp:160
NbodyUtils * nu
NbodyUtils object reference.
Definition: Hermite4.hpp:58