Skip to content

Commit 1a84301

Browse files
authored
Merge pull request #1346 from su2code/fix_slidingmesh_reconstructboundary_pr2
Fix the neighbor-finding in `CInterpolator::ReconstructBoundary`
2 parents 8e7bd69 + 24d81f5 commit 1a84301

10 files changed

Lines changed: 332 additions & 387 deletions

File tree

Common/include/interface_interpolation/CInterpolator.hpp

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828

2929
#include "../../include/basic_types/datatype_structure.hpp"
3030
#include "../../include/containers/C2DContainer.hpp"
31+
#include "../../include/containers/container_decorators.hpp"
3132
#include <vector>
33+
#include <algorithm>
3234

3335
class CConfig;
3436
class CGeometry;
@@ -53,17 +55,21 @@ class CInterpolator {
5355
Buffer_Send_nVertex_Donor[1], /*!< \brief Buffer to send number of vertices on the local processor. */
5456
*Buffer_Receive_nVertex_Donor; /*!< \brief Buffer to store the number of vertices per processor on the Donor domain. */
5557

56-
long *Buffer_Send_GlobalPoint, /*!< \brief Buffer to send global point indices. */
57-
*Buffer_Receive_GlobalPoint; /*!< \brief Buffer to receive global point indices. */
58+
su2vector<unsigned long> Buffer_Send_GlobalPoint; /*!< \brief Buffer to send global point indices. */
59+
su2vector<unsigned long> Buffer_Receive_GlobalPoint; /*!< \brief Buffer to receive global point indices. */
5860

59-
su2double *Buffer_Send_Coord, /*!< \brief Buffer to send coordinate values. */
60-
*Buffer_Receive_Coord; /*!< \brief Buffer to receive coordinate values. */
61+
su2activematrix Buffer_Send_Coord; /*!< \brief Buffer to send coordinate values. */
62+
su2activematrix Buffer_Receive_Coord; /*!< \brief Buffer to receive coordinate values. */
6163

62-
unsigned long
63-
*Buffer_Receive_nLinkedNodes, /*!< \brief Buffer to receive the number of edges connected to each node. */
64-
*Buffer_Receive_LinkedNodes, /*!< \brief Buffer to receive the list of notes connected to the nodes through an edge. */
65-
*Buffer_Receive_StartLinkedNodes, /*!< \brief Buffer to receive the index of the Receive_LinkedNodes buffer where corresponding list of linked nodes begins. */
66-
*Buffer_Receive_Proc; /*!< \brief Buffer to receive the thread that owns the node. */
64+
/*! \brief Buffer to receive the number of surface-connected edges, for each vertex. */
65+
su2vector<unsigned long> Buffer_Receive_nLinkedNodes;
66+
/*! \brief Buffer to receive the index of the Receive_LinkedNodes buffer where corresponding list of linked nodes begins. */
67+
su2vector<unsigned long> Buffer_Receive_StartLinkedNodes;
68+
/*! \brief Buffer to receive the list of surface-connected nodes, for each vertex.
69+
* \details The vertices are ordered as in Buffer_Receive_nLinkedNodes and Buffer_Receive_StartLinkedNodes, but for each*/
70+
su2vector<unsigned long> Buffer_Receive_LinkedNodes;
71+
/*! \brief Buffer to receive the rank that owns the vertex. */
72+
su2vector<unsigned long> Buffer_Receive_Proc;
6773

6874
unsigned long
6975
nGlobalVertex_Target, /*!< \brief Global number of vertex of the target boundary. */
@@ -141,7 +147,7 @@ class CInterpolator {
141147

142148
protected:
143149
/*!
144-
* \brief Recontstruct the boundary connectivity from parallel partitioning and broadcasts it to all threads
150+
* \brief Reconstruct the boundary connectivity from parallel partitioning and broadcasts it to all threads.
145151
* \param[in] val_zone - index of the zone
146152
* \param[in] val_marker - index of the marker
147153
*/

Common/include/interface_interpolation/CSlidingMesh.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ class CSlidingMesh final : public CInterpolator {
6363
* \param[out] element - double array where element node coordinates will be stored
6464
* \return Number of points included in the element.
6565
*/
66-
static int Build_3D_surface_element(const unsigned long *map, const unsigned long *startIndex,
67-
const unsigned long* nNeighbor, const su2double *coord,
66+
static int Build_3D_surface_element(const su2vector<unsigned long>& map, const su2vector<unsigned long>& startIndex,
67+
const su2vector<unsigned long>& nNeighbor, const su2activematrix& coord,
6868
unsigned long centralNode, su2double** element);
6969

7070
/*!

0 commit comments

Comments
 (0)