Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ jobs:
uses: docker://ghcr.io/su2code/su2/test-su2:260405-0054
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
args: -b ${{github.ref}} -t develop -c fix_periodic_axis -s ${{matrix.testscript}}
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:260405-0054
with:
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
uses: docker://ghcr.io/su2code/su2/test-su2:260405-0054
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tapetests"
args: -b ${{github.ref}} -t develop -c fix_periodic_axis -s ${{matrix.testscript}} -a "--tapetests"
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:260405-0054
with:
Expand Down Expand Up @@ -330,7 +330,7 @@ jobs:
PMIX_MCA_gds: hash
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan"
args: -b ${{github.ref}} -t develop -c fix_periodic_axis -s ${{matrix.testscript}} -a "--tsan"
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:260405-0054
with:
Expand Down Expand Up @@ -375,7 +375,7 @@ jobs:
uses: docker://ghcr.io/su2code/su2/test-su2-asan:260405-0054
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--asan"
args: -b ${{github.ref}} -t develop -c fix_periodic_axis -s ${{matrix.testscript}} -a "--asan"
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-asan:260405-0054
with:
Expand Down
16 changes: 14 additions & 2 deletions Common/include/geometry/CGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,14 @@ class CGeometry {
a particular vertex to be sent in periodic comms. */
*Local_Marker_PeriodicRecv{nullptr}; /*!< \brief Data structure holding the local index of the periodic marker for
a particular vertex to be received in periodic comms. */
su2double* bufD_PeriodicRecv{nullptr}; /*!< \brief Data structure for su2double periodic receive. */
su2double* bufD_PeriodicSend{nullptr}; /*!< \brief Data structure for su2double periodic send. */
vector<unsigned long> Local_Copy_PeriodicSend; /*!< \brief For points on a rotation axis, which are their own periodic
match, the number of times the rotation is applied to the data
sent (one send per other copy of the control volume). Zero for
all other points. */
vector<unsigned long> Local_Copy_PeriodicRecv; /*!< \brief Same as Local_Copy_PeriodicSend, for the data received. */
bool PeriodicAxisPoints{false}; /*!< \brief Whether this rank has periodic points on a rotation axis. */
su2double* bufD_PeriodicRecv{nullptr}; /*!< \brief Data structure for su2double periodic receive. */
su2double* bufD_PeriodicSend{nullptr}; /*!< \brief Data structure for su2double periodic send. */
unsigned short* bufS_PeriodicRecv{nullptr}; /*!< \brief Data structure for unsigned long periodic receive. */
unsigned short* bufS_PeriodicSend{nullptr}; /*!< \brief Data structure for unsigned long periodic send. */
SU2_MPI::Request* req_PeriodicSend{nullptr}; /*!< \brief Data structure for periodic send requests. */
Expand Down Expand Up @@ -517,6 +523,12 @@ class CGeometry {
*/
void AllocatePeriodicComms(unsigned short val_countPerPeriodicPoint);

/*! \brief Sum partial scalar or vector geometry data over periodic copies (called by the master). */
void SumPeriodicGeometry(const CConfig* config, su2activematrix& values, int vectorIndex);

/*! \brief Refresh donor volumes after a mesh update. */
void UpdatePeriodicVolumes(const CConfig* config);

/*!
* \brief Routine to launch non-blocking recvs only for all periodic communication with neighboring partitions.
* \note This routine is called by any class that has loaded data into the generic communication buffers.
Expand Down
11 changes: 11 additions & 0 deletions Common/include/linear_algebra/CSysMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,13 @@ class CSysMatrix {
private:
friend struct CSysMatrixComms;

int periodicVectorIndex{-2}; /*!< \brief -2 disables periodic projection; -1 denotes scalar variables. */
mutable CSysVector<ScalarType> projectedInput;
mutable su2activematrix periodicBuffer;

void ProjectPeriodic(const CSysVector<ScalarType>& input, CSysVector<ScalarType>& output, CGeometry* geometry,
const CConfig* config) const;

const int rank; /*!< \brief MPI Rank. */
const int size; /*!< \brief MPI Size. */

Expand Down Expand Up @@ -700,6 +707,10 @@ class CSysMatrix {
void ComputeLU_SGSPreconditionerBackward(CSysVector<ScalarType>& prod) const;

public:
/*! \brief Keep all partial periodic rows and couple their matching unknowns in the product. */
void SetPeriodicProjection(int vectorIndex) { periodicVectorIndex = vectorIndex; }
bool HasPeriodicProjection() const { return periodicVectorIndex >= -1; }

/*!
* \brief Constructor of the class.
*/
Expand Down
Loading
Loading