Skip to content
Snippets Groups Projects

Update master

Merged Boman Romain requested to merge mergeAdrien into master
10 files
+ 40
86
Compare changes
  • Side-by-side
  • Inline
Files
10
+ 5
22
@@ -2,9 +2,8 @@
#include <algorithm>
using namespace flow;
Kutta::Kutta(std::shared_ptr<MshData> _msh, int no0, int no1, int no2, int no3,
double _tolX, double _tolY, double _tolZ) : Link(_msh, no0, no1, no2, no3),
tolX(_tolX), tolY(_tolY), tolZ(_tolZ)
Kutta::Kutta(std::shared_ptr<MshData> _msh, int no0, int no1, int no2, int no3)
: Link(_msh, no0, no1, no2, no3)
{
if (tag0->elems.size() != tag1->elems.size()) {
std::ostringstream err;
@@ -17,9 +16,8 @@ Kutta::Kutta(std::shared_ptr<MshData> _msh, int no0, int no1, int no2, int no3,
}
Kutta::Kutta(std::shared_ptr<MshData> _msh, std::string const &name0,
std::string const &name1, std::string const &name2, std::string const &name3,
double _tolX, double _tolY, double _tolZ) : Link(_msh, name0, name1, name2, name3),
tolX(_tolX), tolY(_tolY), tolZ(_tolZ)
std::string const &name1, std::string const &name2,
std::string const &name3) : Link(_msh, name0, name1, name2, name3)
{
if (tag0->elems.size() != tag1->elems.size()) {
std::ostringstream err;
@@ -68,7 +66,7 @@ void Kutta::connectNodes()
//std::cout << "MASTER: " << nUp->pos.x[0] << ',' << nUp->pos.x[1] << ',' << nUp->pos.x[2] << std::endl;
for (auto nLw : nodesLw) {
//std::cout << " SLAVE: " << nLw->pos.x[0] << ',' << nLw->pos.x[1] << ',' << nLw->pos.x[2] << std::endl;
if (comparePos(nUp->pos, nLw->pos)) {
if (nUp->pos.compare(nLw->pos)) {
nodMap[i] = std::pair<Node *, Node *> (nUp, nLw);
break;
}
@@ -187,21 +185,6 @@ void Kutta::connectVolElements(std::vector<std::pair<Element *, Element *>> &sur
}
}
/**
* @brief Compare two positions
* @authors Adrien Crovato
*/
bool Kutta::comparePos(Pt posA, Pt posB) const
{
double deltaX = std::abs(posA.x[0] - posB.x[0]);
double deltaY = std::abs(posA.x[1] - posB.x[1]);
double deltaZ = std::abs(posA.x[2] - posB.x[2]);
if (deltaX <= tolX && deltaY <= tolY && deltaZ <= tolZ)
return true;
else
return false;
}
void Kutta::write(std::ostream &out) const
{
out << "flow::Kutta on " << *tag0 << " and " << *tag1 << "\n";
Loading