Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periodic BC: add dummy BCs. #2038

Closed
wants to merge 1 commit into from
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
7 changes: 7 additions & 0 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ class CConfig {
string Inlet_Filename; /*!< \brief Filename specifying an inlet profile. */
su2double Inlet_Matching_Tol; /*!< \brief Tolerance used when matching a point to a point from the inlet file. */
string ActDisk_FileName; /*!< \brief Filename specifying an actuator disk. */
bool Periodic_DummyBC; /*!< \brief True if achieve periodic BCs with dummy points. */

string *Marker_Euler, /*!< \brief Euler wall markers. */
*Marker_FarField, /*!< \brief Far field markers. */
Expand Down Expand Up @@ -4867,6 +4868,12 @@ class CConfig {
*/
bool GetSens_Remove_Sharp(void) const { return Sens_Remove_Sharp; }

/*!
* \brief Check if achieve periodic BCs with dummy points.
* \return True if achieve periodic BCs with dummy points.
*/
bool GetPeriodic_DummyBC(void) const { return Periodic_DummyBC; }

/*!
* \brief Get the kind of inlet boundary condition treatment (total conditions or mass flow).
* \return Kind of inlet boundary condition.
Expand Down
1 change: 1 addition & 0 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,7 @@ void CConfig::SetConfig_Options() {
rotation_angle_z-axis, translation_x, translation_y, translation_z, ... ) */
addPeriodicOption("MARKER_PERIODIC", nMarker_PerBound, Marker_PerBound, Marker_PerDonor,
Periodic_RotCenter, Periodic_RotAngles, Periodic_Translation);
addBoolOption("PERIODIC_DUMMY", Periodic_DummyBC, false);

/*!\brief MARKER_PYTHON_CUSTOM\n DESCRIPTION: Python customizable marker(s) \ingroup Config*/
addStringListOption("MARKER_PYTHON_CUSTOM", nMarker_PyCustom, Marker_PyCustom);
Expand Down
2 changes: 1 addition & 1 deletion SU2_CFD/include/gradients/computeGradientsLeastSquares.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ void computeGradientsLeastSquares(CSolver* solver,
GradientType& gradient,
RMatrixType& Rmatrix)
{
const bool periodic = (solver != nullptr) && (config.GetnMarker_Periodic() > 0);
const bool periodic = (solver != nullptr) && (config.GetnMarker_Periodic() > 0) && (!config.GetPeriodic_DummyBC());

const size_t nPointDomain = geometry.GetnPointDomain();

Expand Down
3 changes: 2 additions & 1 deletion SU2_CFD/include/limiters/computeLimiters_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ void computeLimiters_impl(CSolver* solver,

const bool periodic = (solver != nullptr) &&
(kindPeriodicComm1 != PERIODIC_NONE) &&
(config.GetnMarker_Periodic() > 0);
(config.GetnMarker_Periodic() > 0) &&
(!config.GetPeriodic_DummyBC());

#ifdef HAVE_OMP
constexpr size_t OMP_MAX_CHUNK = 512;
Expand Down
2 changes: 1 addition & 1 deletion SU2_CFD/include/solvers/CFVMFlowSolverBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ class CFVMFlowSolverBase : public CSolver {

/*--- We can access memory more efficiently if there are no periodic boundaries. ---*/

const bool isPeriodic = (config->GetnMarker_Periodic() > 0);
const bool isPeriodic = (config->GetnMarker_Periodic() > 0) && (!config->GetPeriodic_DummyBC());

/*--- Loop domain points. ---*/

Expand Down
24 changes: 24 additions & 0 deletions SU2_CFD/include/solvers/CSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,30 @@ class CSolver {
unsigned short val_periodic_index,
unsigned short commType);

/*!
* \brief Routine to load a solver quantity into the data structures for MPI periodic communication and to launch non-blocking sends and recvs.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
* \param[in] val_periodic_index - Index for the periodic marker to be treated (first in a pair).
* \param[in] commType - Enumerated type for the quantity to be communicated.
*/
void InitiatePeriodicDummyComms(CGeometry *geometry,
const CConfig *config,
unsigned short val_periodic_index,
unsigned short commType);

/*!
* \brief Routine to complete the set of non-blocking periodic communications launched by InitiatePeriodicComms() and unpacking of the data in the solver class.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
* \param[in] val_periodic_index - Index for the periodic marker to be treated (first in a pair).
* \param[in] commType - Enumerated type for the quantity to be unpacked.
*/
void CompletePeriodicDummyComms(CGeometry *geometry,
const CConfig *config,
unsigned short val_periodic_index,
unsigned short commType);

/*!
* \brief Set number of linear solver iterations.
* \param[in] val_iterlinsolver - Number of linear iterations.
Expand Down
Loading