Skip to content
Snippets Groups Projects

Update waves

Merged Boman Romain requested to merge adrien into master
10 files
+ 47
23
Compare changes
  • Side-by-side
  • Inline
Files
10
+ 0
19
@@ -8,7 +8,6 @@ Medium::Medium(std::shared_ptr<MshData> _msh, int no, Fct0 &_rho, Fct0 &_mach,
Fct0 &_cP, Fun0PosPhiInf &_phiInf) : Group(_msh, no), rho(_rho),
mach(_mach), cP(_cP), phiInf(_phiInf)
{
initialize();
createMap();
std::cout << "tag=" << *tag << std::endl;
}
@@ -17,28 +16,10 @@ Medium::Medium(std::shared_ptr<MshData> _msh, std::string const &name,
Fct0 &_rho, Fct0 &_mach, Fct0 &_cP, Fun0PosPhiInf &_phiInf) :
Group(_msh, name), rho(_rho), mach(_mach), cP(_cP), phiInf(_phiInf)
{
initialize();
createMap();
std::cout << "tag=" << *tag << std::endl;
}
/**
* @brief Compute volume and center of gravity for each elements
* @authors Adrien Crovato
*/
void Medium::initialize()
{
// Compute CG of current element
for (auto e : tag->elems) {
Pt cg(0,0,0);
for (auto n : e->nodes) {
cg += n->pos;
}
cg /= e->nodes.size();
cgE[e] = cg;
}
}
/**
* @brief Create data structure
*
Loading