Commit e2e8fd92 authored by Janek Kozicki's avatar Janek Kozicki
Browse files

Rename CentralGravityEngine → CentralConstantAccelerationEngine, because this...

Rename CentralGravityEngine → CentralConstantAccelerationEngine, because this engine has nothing to do with gravity: it ignores the Newton's inverse distance squared law.
parent a96a7d31
......@@ -14,7 +14,7 @@
namespace yade { // Cannot have #include directive inside.
YADE_PLUGIN((GravityEngine)(CentralGravityEngine)(AxialGravityEngine)(HdapsGravityEngine));
YADE_PLUGIN((GravityEngine)(CentralConstantAccelerationEngine)(AxialGravityEngine)(HdapsGravityEngine));
CREATE_LOGGER(GravityEngine);
void GravityEngine::action()
......@@ -37,7 +37,7 @@ void GravityEngine::action()
YADE_PARALLEL_FOREACH_BODY_END();
}
void CentralGravityEngine::action()
void CentralConstantAccelerationEngine::action()
{
const Vector3r& centralPos = Body::byId(centralBody)->state->pos;
for (const auto& b : *scene->bodies) {
......
......@@ -29,11 +29,11 @@ REGISTER_SERIALIZABLE(GravityEngine);
*
* @todo This code has not been yet tested at all.
*/
class CentralGravityEngine : public FieldApplier {
class CentralConstantAccelerationEngine : public FieldApplier {
public:
void action() override;
// clang-format off
YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(CentralGravityEngine,FieldApplier,"Engine applying acceleration to all bodies, towards a central body.",
YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(CentralConstantAccelerationEngine,FieldApplier,"Engine applying constant acceleration to all bodies, towards a central body. Ignoring the distance between them.",
((Body::id_t,centralBody,Body::ID_NONE,,"The :yref:`body<Body>` towards which all other bodies are attracted."))
((Real,accel,0,,"Acceleration magnitude [kgms⁻²]"))
((bool,reciprocal,false,,"If true, acceleration will be applied on the central body as well."))
......@@ -42,7 +42,7 @@ public:
);
// clang-format on
};
REGISTER_SERIALIZABLE(CentralGravityEngine);
REGISTER_SERIALIZABLE(CentralConstantAccelerationEngine);
/*! Apply acceleration (independent of distance) directed towards an axis.
*
......
......@@ -83,6 +83,7 @@ _deprecated={
'Ig2_Sphere_Sphere_L3Geom_Inc':'Ig2_Sphere_Sphere_L3Geom', # Sun Dec 26 11:11:05 2010, vaclav@flux
'Ig2_Wall_Sphere_L3Geom_Inc':'Ig2_Wall_Sphere_L3Geom', # Sun Dec 26 11:11:30 2010, vaclav@flux
'Ig2_Sphere_Sphere_L6Geom_Inc':'Ig2_Sphere_Sphere_L6Geom', # Sun Dec 26 11:11:53 2010, vaclav@flux
'CentralGravityEngine':'CentralConstantAccelerationEngine', # Wed, 31 mar 2021, 23:08:16, Janek
### END_RENAMED_CLASSES_LIST ### (do not delete this line; scripts/rename-class.py uses it
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment