Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F69431057
compute_gravity.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Jul 1, 18:47
Size
741 B
Mime Type
text/x-c++
Expires
Wed, Jul 3, 18:47 (2 d)
Engine
blob
Format
Raw Data
Handle
18707526
Attached To
R9482 SP4E_Homework_Ashtari_Sieber
compute_gravity.hh
View Options
#ifndef __COMPUTE_GRAVITY__HH__
#define __COMPUTE_GRAVITY__HH__
/* -------------------------------------------------------------------------- */
#include "compute_interaction.hh"
//! Compute Newton gravity interaction
class ComputeGravity : public ComputeInteraction {
// Virtual implementation
public:
//! Newton gravity implementation
void compute(System& system) override;
// Accessors
public:
//! set the gravitational constant
void setG(Real G);
// Members
private:
//! newton constant
//Real G = 1.;
Real G = 6.67384e-11*5.97219e24*std::pow(60.0*60.0*24.0,2)/std::pow(149597870.7*1000.0,3);
};
/* -------------------------------------------------------------------------- */
#endif //__COMPUTE_GRAVITY__HH__
Event Timeline
Log In to Comment