Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120481460
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
Fri, Jul 4, 16:39
Size
759 B
Mime Type
text/x-c++
Expires
Sun, Jul 6, 16:39 (2 d)
Engine
blob
Format
Raw Data
Handle
27194981
Attached To
R9484 sp4e-homework-lars-bertil
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.;
// TEMPORARY:
Real G = 6.67384e-11 * 5.97219e24 * std::pow(60*60*24, 2) / std::pow(149597870.700*1e3, 3);
};
/* -------------------------------------------------------------------------- */
#endif //__COMPUTE_GRAVITY__HH__
Event Timeline
Log In to Comment