diff --git a/FileIO/MeshIO.cpp b/FileIO/MeshIO.cpp index ca1931a5aa73f5bdf1a768e0b0245951841fdea4..6b12458ccc7a8ff54a4cc9e17591de6ada932042 100644 --- a/FileIO/MeshIO.cpp +++ b/FileIO/MeshIO.cpp @@ -203,7 +203,7 @@ int MeshIO::write(std::ostream &out) out << n_nodes << std::endl; for (size_t i(0); i < n_nodes; i++) { - double const* const coords (_mesh->nod_vector[i]->getData()); + double const* const coords (_mesh->nod_vector[i]->getCoords()); out << i << " " << coords[0] << " " << coords[1] << " " << coords[2] << std::endl; } diff --git a/GeoLib/GEOObjects.cpp b/GeoLib/GEOObjects.cpp index 6fd77f767680992e2de20c2f3adaf51589c8b859..6a1dd20d08caac9e37cc6cc19f4cf149ba84ac99 100644 --- a/GeoLib/GEOObjects.cpp +++ b/GeoLib/GEOObjects.cpp @@ -376,7 +376,7 @@ void GEOObjects::mergeGeometries (std::vector<std::string> const & geo_names, st if (dynamic_cast<GEOLIB::Station*>((*pnts)[0]) == NULL) { nPoints = pnts->size(); for (size_t k(0); k<nPoints; k++) { - merged_points->push_back (new GEOLIB::Point (((*pnts)[k])->getData())); + merged_points->push_back (new GEOLIB::Point (((*pnts)[k])->getCoords())); } } if (geo_names.size()-1 > j) diff --git a/GeoLib/Polygon.cpp b/GeoLib/Polygon.cpp index 6fcbcbd6d573d8bd5b6837d8c5ce188328fd3b05..e769a71dae28547f631e448ccecd96a047c0d56a 100644 --- a/GeoLib/Polygon.cpp +++ b/GeoLib/Polygon.cpp @@ -380,7 +380,7 @@ GEOLIB::Polygon* createPolygonFromCircle (GEOLIB::Point const& middle_pnt, doubl // create points double angle (2.0 * M_PI / resolution); for (size_t k(0); k<resolution; k++) { - GEOLIB::Point *pnt (new GEOLIB::Point(middle_pnt.getData())); + GEOLIB::Point *pnt (new GEOLIB::Point(middle_pnt.getCoords())); (*pnt)[0] += radius * cos (k*angle); (*pnt)[1] += radius * sin (k*angle); pnts.push_back (pnt); diff --git a/GeoLib/QuadTree.h b/GeoLib/QuadTree.h index b13af3d4a7207bb661ed100348541605c418a1b2..83b5eb319e16775d25e612634db0a3c0cd057ded 100644 --- a/GeoLib/QuadTree.h +++ b/GeoLib/QuadTree.h @@ -92,7 +92,7 @@ public: bool pnt_in_quadtree (false); double equal_pnt_dist (MathLib::fastpow(2, _depth) * fabs(_ll[0] - _ur[0]) * 1e-6); for (size_t k(0); k<_pnts.size() && !pnt_in_quadtree; k++) { - const double sqr_dist (MathLib::sqrDist(_pnts[k]->getData(), pnt->getData())); + const double sqr_dist (MathLib::sqrDist(_pnts[k]->getCoords(), pnt->getCoords())); if (sqr_dist < equal_pnt_dist) { pnt_in_quadtree = true; } diff --git a/GeoLib/TemplatePoint.h b/GeoLib/TemplatePoint.h index 41667d8d26e4136d3512bf16ce36978e66bae1f2..dd8ff541103b440912bc5e4267bbca5c1811b99b 100644 --- a/GeoLib/TemplatePoint.h +++ b/GeoLib/TemplatePoint.h @@ -63,7 +63,7 @@ public: } /** returns an array containing the coordinates of the point */ - const T* getData () const { return _x; } + const T* getCoords () const { return _x; } /** write point coordinates into stream (used from operator<<) * \param os a standard output stream diff --git a/GeoLib/Triangle.h b/GeoLib/Triangle.h index 48a1028ac34c221e588d88aa05a7fa11444003de..2541ba5d6437237e7b91a7635651474bb25e5343 100644 --- a/GeoLib/Triangle.h +++ b/GeoLib/Triangle.h @@ -72,7 +72,7 @@ public: bool containsPoint (const Point &pnt) const { - return containsPoint (pnt.getData()); + return containsPoint (pnt.getCoords()); } /** diff --git a/MathLib/AnalyticalGeometry.cpp b/MathLib/AnalyticalGeometry.cpp index efcf96bf5de5dd517031f67e47501c83488052bb..108f6d094df20e51bedde9f50227b1bd708a19fc 100644 --- a/MathLib/AnalyticalGeometry.cpp +++ b/MathLib/AnalyticalGeometry.cpp @@ -142,7 +142,7 @@ bool isPointInTriangle (const double p[3], const double a[3], const double b[3], bool isPointInTriangle (const GEOLIB::Point* p, const GEOLIB::Point* a, const GEOLIB::Point* b, const GEOLIB::Point* c) { - return isPointInTriangle (p->getData(), a->getData(), b->getData(), c->getData()); + return isPointInTriangle (p->getCoords(), a->getCoords(), b->getCoords(), c->getCoords()); } // NewellPlane from book Real-Time Collision detection p. 494 @@ -199,13 +199,13 @@ void rotatePointsToXY(Vector &plane_normal, double *tmp (NULL); size_t n_pnts(pnts.size()); for (size_t k(0); k < n_pnts; k++) { - tmp = rot_mat * pnts[k]->getData(); + tmp = rot_mat * pnts[k]->getCoords(); for (size_t j(0); j < 3; j++) (*(pnts[k]))[j] = tmp[j]; delete [] tmp; } - tmp = rot_mat * plane_normal.getData(); + tmp = rot_mat * plane_normal.getCoords(); for (size_t j(0); j < 3; j++) plane_normal[j] = tmp[j]; diff --git a/MathLib/LinAlg/Dense/Matrix.h b/MathLib/LinAlg/Dense/Matrix.h index d0a97fb5e087667095f0ad33ef878c8337e09bd3..86b282039d36bc2696d3c1d89dbf0b7747d88ed3 100644 --- a/MathLib/LinAlg/Dense/Matrix.h +++ b/MathLib/LinAlg/Dense/Matrix.h @@ -87,7 +87,7 @@ public: */ void write (std::ostream& out) const; - T const* getData () { return data; } + T const* getCoords () { return data; } private: // zero based addressing, but Fortran storage layout diff --git a/MathLib/MathTools.cpp b/MathLib/MathTools.cpp index 88cebe7fae95aa091a8bab3dde0902433c6840fb..d916c8a524fa1af09ac587fe9395d0e630cbf343 100644 --- a/MathLib/MathTools.cpp +++ b/MathLib/MathTools.cpp @@ -52,7 +52,7 @@ double calcProjPntToLineAndDists(const double p[3], const double a[3], double sqrNrm2 (const GEOLIB::Point* p0) { - return scpr (p0->getData(), p0->getData(), 3); + return scpr (p0->getCoords(), p0->getCoords(), 3); } double sqrDist (const GEOLIB::Point* p0, const GEOLIB::Point* p1) diff --git a/MathLib/Vector3.h b/MathLib/Vector3.h index dd59d36f8567724555003068ecfb000f8ca0261f..c7d173f63f682f0f51895b9d5893034057d14d60 100644 --- a/MathLib/Vector3.h +++ b/MathLib/Vector3.h @@ -121,7 +121,7 @@ public: /// Returns the squared length double LenSqr(void) const { - return scpr (this->getData (), this->getData (), 3); + return scpr (this->getCoords (), this->getCoords (), 3); } /// Returns the length diff --git a/MeshLib/Elements/Edge.cpp b/MeshLib/Elements/Edge.cpp index 5ebed85fae226e872e2c7b842e94623f17b0dda6..7b27c132ff18eea1e7508b27249ac263f9b4bf10 100644 --- a/MeshLib/Elements/Edge.cpp +++ b/MeshLib/Elements/Edge.cpp @@ -44,7 +44,7 @@ Edge::~Edge() double Edge::computeLength() { - return sqrt(MathLib::sqrDist(_nodes[0]->getData(), _nodes[1]->getData())); + return sqrt(MathLib::sqrDist(_nodes[0]->getCoords(), _nodes[1]->getCoords())); } } diff --git a/MeshLib/Elements/Element.cpp b/MeshLib/Elements/Element.cpp index d0d33a6e108b18fac39de5ddddda49e068b06a96..77e8c4a9253909c39b2221694c0ab30050a1575c 100644 --- a/MeshLib/Elements/Element.cpp +++ b/MeshLib/Elements/Element.cpp @@ -48,7 +48,7 @@ void Element::computeSqrEdgeLengthRange(double &min, double &max) const unsigned nEdges (this->getNEdges()); for (unsigned i=0; i<nEdges; i++) { - double dist (MathLib::sqrDist(getEdgeNode(i,0)->getData(), getEdgeNode(i,1)->getData())); + double dist (MathLib::sqrDist(getEdgeNode(i,0)->getCoords(), getEdgeNode(i,1)->getCoords())); min = (dist<min) ? dist : min; max = (dist>max) ? dist : max; } diff --git a/MeshLib/Elements/Hex.cpp b/MeshLib/Elements/Hex.cpp index 2bdb60288165ccb7f244d1808001e9ae8c101530..55ef9a299cce451fdc1daa7df78312a01a4cd26c 100644 --- a/MeshLib/Elements/Hex.cpp +++ b/MeshLib/Elements/Hex.cpp @@ -87,12 +87,12 @@ Hex::~Hex() double Hex::computeVolume() { - return MathLib::calcTetrahedronVolume(_nodes[4]->getData(), _nodes[7]->getData(), _nodes[5]->getData(), _nodes[0]->getData()) - + MathLib::calcTetrahedronVolume(_nodes[5]->getData(), _nodes[3]->getData(), _nodes[1]->getData(), _nodes[0]->getData()) - + MathLib::calcTetrahedronVolume(_nodes[5]->getData(), _nodes[7]->getData(), _nodes[3]->getData(), _nodes[0]->getData()) - + MathLib::calcTetrahedronVolume(_nodes[5]->getData(), _nodes[7]->getData(), _nodes[6]->getData(), _nodes[2]->getData()) - + MathLib::calcTetrahedronVolume(_nodes[1]->getData(), _nodes[3]->getData(), _nodes[5]->getData(), _nodes[2]->getData()) - + MathLib::calcTetrahedronVolume(_nodes[3]->getData(), _nodes[7]->getData(), _nodes[5]->getData(), _nodes[2]->getData()); + return MathLib::calcTetrahedronVolume(_nodes[4]->getCoords(), _nodes[7]->getCoords(), _nodes[5]->getCoords(), _nodes[0]->getCoords()) + + MathLib::calcTetrahedronVolume(_nodes[5]->getCoords(), _nodes[3]->getCoords(), _nodes[1]->getCoords(), _nodes[0]->getCoords()) + + MathLib::calcTetrahedronVolume(_nodes[5]->getCoords(), _nodes[7]->getCoords(), _nodes[3]->getCoords(), _nodes[0]->getCoords()) + + MathLib::calcTetrahedronVolume(_nodes[5]->getCoords(), _nodes[7]->getCoords(), _nodes[6]->getCoords(), _nodes[2]->getCoords()) + + MathLib::calcTetrahedronVolume(_nodes[1]->getCoords(), _nodes[3]->getCoords(), _nodes[5]->getCoords(), _nodes[2]->getCoords()) + + MathLib::calcTetrahedronVolume(_nodes[3]->getCoords(), _nodes[7]->getCoords(), _nodes[5]->getCoords(), _nodes[2]->getCoords()); } const Element* Hex::getFace(unsigned i) const diff --git a/MeshLib/Elements/Prism.cpp b/MeshLib/Elements/Prism.cpp index a90386e1f2e48b5a75a53d58f5ebe7ee86eecd2f..e75aac59ced33a7db51fe1d1f5f860749863d683 100644 --- a/MeshLib/Elements/Prism.cpp +++ b/MeshLib/Elements/Prism.cpp @@ -83,9 +83,9 @@ Prism::~Prism() double Prism::computeVolume() { - return MathLib::calcTetrahedronVolume(_nodes[0]->getData(), _nodes[1]->getData(), _nodes[2]->getData(), _nodes[3]->getData()) - + MathLib::calcTetrahedronVolume(_nodes[1]->getData(), _nodes[4]->getData(), _nodes[2]->getData(), _nodes[3]->getData()) - + MathLib::calcTetrahedronVolume(_nodes[2]->getData(), _nodes[4]->getData(), _nodes[5]->getData(), _nodes[3]->getData()); + return MathLib::calcTetrahedronVolume(_nodes[0]->getCoords(), _nodes[1]->getCoords(), _nodes[2]->getCoords(), _nodes[3]->getCoords()) + + MathLib::calcTetrahedronVolume(_nodes[1]->getCoords(), _nodes[4]->getCoords(), _nodes[2]->getCoords(), _nodes[3]->getCoords()) + + MathLib::calcTetrahedronVolume(_nodes[2]->getCoords(), _nodes[4]->getCoords(), _nodes[5]->getCoords(), _nodes[3]->getCoords()); } const Element* Prism::getFace(unsigned i) const diff --git a/MeshLib/Elements/Pyramid.cpp b/MeshLib/Elements/Pyramid.cpp index cb3ba05b958ce7d23b9967a26187488b021f65c8..994d4403b31de37d325aeb00918d2d85b8e0f232 100644 --- a/MeshLib/Elements/Pyramid.cpp +++ b/MeshLib/Elements/Pyramid.cpp @@ -83,8 +83,8 @@ Pyramid::~Pyramid() double Pyramid::computeVolume() { - return MathLib::calcTetrahedronVolume(_nodes[0]->getData(), _nodes[1]->getData(), _nodes[2]->getData(), _nodes[4]->getData()) - + MathLib::calcTetrahedronVolume(_nodes[2]->getData(), _nodes[3]->getData(), _nodes[0]->getData(), _nodes[4]->getData()); + return MathLib::calcTetrahedronVolume(_nodes[0]->getCoords(), _nodes[1]->getCoords(), _nodes[2]->getCoords(), _nodes[4]->getCoords()) + + MathLib::calcTetrahedronVolume(_nodes[2]->getCoords(), _nodes[3]->getCoords(), _nodes[0]->getCoords(), _nodes[4]->getCoords()); } const Element* Pyramid::getFace(unsigned i) const diff --git a/MeshLib/Elements/Quad.cpp b/MeshLib/Elements/Quad.cpp index 573a738abacc3078c42d59e2c77a166335022eaa..f909f4ae1e5c39ead4cbc15d1e53165a8fbca8cb 100644 --- a/MeshLib/Elements/Quad.cpp +++ b/MeshLib/Elements/Quad.cpp @@ -65,8 +65,8 @@ Quad::~Quad() double Quad::computeArea() { - return MathLib::calcTriangleArea(_nodes[0]->getData(), _nodes[1]->getData(), _nodes[2]->getData()) - + MathLib::calcTriangleArea(_nodes[2]->getData(), _nodes[3]->getData(), _nodes[0]->getData()); + return MathLib::calcTriangleArea(_nodes[0]->getCoords(), _nodes[1]->getCoords(), _nodes[2]->getCoords()) + + MathLib::calcTriangleArea(_nodes[2]->getCoords(), _nodes[3]->getCoords(), _nodes[0]->getCoords()); } } diff --git a/MeshLib/Elements/Tet.cpp b/MeshLib/Elements/Tet.cpp index 3da481e49aa7c30c5b3671d2ec1eda60a7444fcc..c3878998e590a1f9d9f9c041788feb4ab42c7473 100644 --- a/MeshLib/Elements/Tet.cpp +++ b/MeshLib/Elements/Tet.cpp @@ -84,7 +84,7 @@ Tet::~Tet() double Tet::computeVolume() { - return MathLib::calcTetrahedronVolume(_nodes[0]->getData(), _nodes[1]->getData(), _nodes[2]->getData(), _nodes[3]->getData()); + return MathLib::calcTetrahedronVolume(_nodes[0]->getCoords(), _nodes[1]->getCoords(), _nodes[2]->getCoords(), _nodes[3]->getCoords()); } const Element* Tet::getFace(unsigned i) const diff --git a/MeshLib/Elements/Tri.cpp b/MeshLib/Elements/Tri.cpp index ebb911d39291118a47b6ffd10c52c4eab25d9b82..ea8c987cfe9a0c4b99cb3068ed4cdd12918e1acd 100644 --- a/MeshLib/Elements/Tri.cpp +++ b/MeshLib/Elements/Tri.cpp @@ -63,7 +63,7 @@ Tri::~Tri() double Tri::computeArea() { - return MathLib::calcTriangleArea(_nodes[0]->getData(), _nodes[1]->getData(), _nodes[2]->getData()); + return MathLib::calcTriangleArea(_nodes[0]->getCoords(), _nodes[1]->getCoords(), _nodes[2]->getCoords()); } } diff --git a/MeshLib/FemNode.cpp b/MeshLib/FemNode.cpp index fc82b38493c39cd9bafa54f8e9573d0259377e1f..93c458c2dbbc0007757fc230d7f54ff04794121e 100644 --- a/MeshLib/FemNode.cpp +++ b/MeshLib/FemNode.cpp @@ -20,12 +20,12 @@ FemNode::FemNode(double x, double y, double z, unsigned id) } FemNode::FemNode(const Node &node) - : Node(node.getData(), node.getID()) + : Node(node.getCoords(), node.getID()) { } FemNode::FemNode(const FemNode &node) - : Node(node.getData(), node.getID()) + : Node(node.getCoords(), node.getID()) { } diff --git a/MeshLib/Node.cpp b/MeshLib/Node.cpp index c300b2c3f091439836e13be4ca0149fd9dbfb3ad..ed3a2fd33e888c5ac74bfa4376a572cc7f27cf03 100644 --- a/MeshLib/Node.cpp +++ b/MeshLib/Node.cpp @@ -20,7 +20,7 @@ Node::Node(double x, double y, double z, unsigned id) } Node::Node(const Node &node) - : GEOLIB::PointWithID(node.getData(), node.getID()) + : GEOLIB::PointWithID(node.getCoords(), node.getID()) { }