Skip to content

Commit ac06f6f

Browse files
author
Max Aehle
committed
PeriodIndexNeighbors is static array now
1 parent 42ac1a3 commit ac06f6f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Common/include/geometry/primal_grid/CPrimalGrid.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ class CPrimalGrid {
5252
unsigned long GlobalIndex_DomainElement;
5353
bool gi;
5454
vector<long> Neighbor_Elements; /*!< \brief Vector to store the elements surronding an element. */
55-
vector<short> PeriodIndexNeighbors; /*!< \brief Vector to store the periodic index of a neighbor.
56-
A -1 indicates no periodic transformation to the neighbor. */
5755
su2double Coord_CG[3] = {0.0}; /*!< \brief Coordinates of the center-of-gravity of the element. */
5856

5957
su2double Volume; /*!< \brief Volume of the element. */
6058
su2double LenScale; /*!< \brief Length scale of the element. */
59+
short PeriodIndexNeighbors[N_FACES_MAXIMUM]; /*!< \brief Vector to store the periodic index of a neighbor.
60+
A -1 indicates no periodic transformation to the neighbor. */
6161
unsigned short TimeLevel; /*!< \brief Time level of the element for time accurate local time stepping. */
6262
/*! \brief Whether or not the Jacobian of the faces can be considered
6363
* constant in the transformation to the standard element. */

Common/src/geometry/primal_grid/CPrimalGrid.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ void CPrimalGrid::GetAllNeighbor_Elements() const {
4747

4848
void CPrimalGrid::InitializeNeighbors(unsigned short val_nFaces) {
4949

50-
/*--- Allocate the memory for Neighbor_Elements and PeriodIndexNeighbors and
50+
/*--- Allocate the memory for Neighbor_Elements and
5151
initialize the arrays to -1 to indicate that no neighbor is present and
5252
that no periodic transformation is needed to the neighbor. ---*/
5353
Neighbor_Elements.resize(val_nFaces,-1);
54-
PeriodIndexNeighbors.resize(val_nFaces,-1);
54+
for(size_t i=0; i<val_nFaces; i++) PeriodIndexNeighbors[i] = -1;
5555
ElementOwnsFace.reset();
5656
}

0 commit comments

Comments
 (0)