Skip to content
Snippets Groups Projects
Commit f1314444 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Pyramid4: simplify computation of zcom

parent 187b7df0
No related branches found
No related tags found
1 merge request!1187adapt to changes in libff: factory functions moved to ff/Make
......@@ -57,7 +57,7 @@ std::string Pyramid4::validate() const
double b = a * (1 - r);
// center of mass
double zcom = m_height * (1. / 4) * (6 - 8 * r + 3 * r * r) / (3 - 3 * r + r * r);
double zcom = m_height / 4 * (a * a + 2 * a * b + 3 * b * b) / (a * a + a * b + b * b);
setPolyhedron(topology, -zcom,
{// base:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment