@@ -492,17 +492,31 @@ class CGeometry {
492492 * \brief Get the edge index from using the nodes of the edge.
493493 * \param[in] first_point - First point of the edge.
494494 * \param[in] second_point - Second point of the edge.
495+ * \param[in] error - Throw error if edge does not exist.
495496 * \return Index of the edge.
496497 */
497- long FindEdge (unsigned long first_point, unsigned long second_point) const ;
498+ inline long FindEdge (unsigned long first_point, unsigned long second_point, bool error = true ) const {
499+ for (unsigned short iNode = 0 ; iNode < nodes->GetnPoint (first_point); iNode++) {
500+ auto iPoint = nodes->GetPoint (first_point, iNode);
501+ if (iPoint == second_point) return nodes->GetEdge (first_point, iNode);
502+ }
503+ if (error) {
504+ char buf[100 ];
505+ SPRINTF (buf, " Can't find the edge that connects %lu and %lu." , first_point, second_point);
506+ SU2_MPI::Error (buf, CURRENT_FUNCTION);
507+ }
508+ return -1 ;
509+ }
498510
499511 /* !
500512 * \brief Get the edge index from using the nodes of the edge.
501513 * \param[in] first_point - First point of the edge.
502514 * \param[in] second_point - Second point of the edge.
503515 * \return Index of the edge.
504516 */
505- bool CheckEdge (unsigned long first_point, unsigned long second_point) const ;
517+ inline bool CheckEdge (unsigned long first_point, unsigned long second_point) const {
518+ return FindEdge (first_point, second_point, false ) >= 0 ;
519+ }
506520
507521 /* !
508522 * \brief Get the distance between a plane (defined by three point) and a point.
@@ -684,11 +698,6 @@ class CGeometry {
684698 */
685699 inline virtual void GatherInOutAverageValues (CConfig *config, bool allocate) {}
686700
687- /* !
688- * \brief Sets CG coordinates.
689- */
690- inline virtual void SetCoord_CG (void ) {}
691-
692701 /* !
693702 * \brief Set max length.
694703 * \param[in] config - Definition of the particular problem.
@@ -705,9 +714,8 @@ class CGeometry {
705714 /* !
706715 * \brief A virtual member.
707716 * \param[in] config - Definition of the particular problem.
708- * \param[in] action - Allocate or not the new elements.
709717 */
710- inline virtual void VisualizeControlVolume (CConfig *config, unsigned short action) {}
718+ inline virtual void VisualizeControlVolume (const CConfig *config) const {}
711719
712720 /* !
713721 * \brief A virtual member.
@@ -732,7 +740,7 @@ class CGeometry {
732740 * \param[in] config - Definition of the particular problem.
733741 * \param[in] action - Allocate or not the new elements.
734742 */
735- inline virtual void SetBoundControlVolume (CConfig *config, unsigned short action) {}
743+ inline virtual void SetBoundControlVolume (const CConfig *config, unsigned short action) {}
736744
737745 /* !
738746 * \brief A virtual member.
@@ -1589,10 +1597,9 @@ class CGeometry {
15891597 const su2double *cg_elem, vector<long > &neighbours, vector<bool > &is_neighbor) const ;
15901598
15911599 /* !
1592- * \brief Compute and store the volume of the elements.
1593- * \param[in] config - Problem configuration.
1600+ * \brief Compute and store the volume of the primal elements.
15941601 */
1595- void SetElemVolume (CConfig *config );
1602+ void SetElemVolume ();
15961603
15971604 /* !
15981605 * \brief Set the multigrid index for the current geometry object.
@@ -1610,7 +1617,7 @@ class CGeometry {
16101617 * \brief A virtual member.
16111618 * \param config - Config
16121619 */
1613- inline virtual void ComputeMeshQualityStatistics (CConfig *config) {}
1620+ inline virtual void ComputeMeshQualityStatistics (const CConfig *config) {}
16141621
16151622 /* !
16161623 * \brief Get the sparse pattern of "type" with given level of fill.
0 commit comments