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

Interpolate restart file when it does not match the mesh #1277

Merged
merged 12 commits into from
May 6, 2021
4 changes: 2 additions & 2 deletions Common/include/adt/CADTPointsOnlyClass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class CADTPointsOnlyClass : public CADTBaseClass {
*/
CADTPointsOnlyClass(unsigned short nDim,
unsigned long nPoints,
su2double *coor,
unsigned long *pointID,
const su2double *coor,
const unsigned long *pointID,
const bool globalTree);

/*!
Expand Down
2 changes: 1 addition & 1 deletion Common/include/toolboxes/CLinearPartitioner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ using namespace std;
* \class CLinearPartitioner
* \brief Helper class that provides the counts for each rank in a linear
* partitioning given the global count as input.
* \author: T. Economon
* \author T. Economon
*/
class CLinearPartitioner {

Expand Down
8 changes: 4 additions & 4 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4426,8 +4426,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
if (DirectDiff != NO_DERIVATIVE) {
#ifndef CODI_FORWARD_TYPE
if (Kind_SU2 == SU2_COMPONENT::SU2_CFD) {
SU2_MPI::Error(string("SU2_CFD: Config option DIRECT_DIFF= YES requires AD or complex support!\n") +
string("Please use SU2_CFD_DIRECTDIFF (configuration/compilation is done using the preconfigure.py script)."),
SU2_MPI::Error("SU2_CFD: Config option DIRECT_DIFF= YES requires AD support.\n"
"Please use SU2_CFD_DIRECTDIFF (meson.py ... -Denable-directdiff=true ...).",
pcarruscag marked this conversation as resolved.
Show resolved Hide resolved
CURRENT_FUNCTION);
}
#endif
Expand Down Expand Up @@ -4465,8 +4465,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i

#else
if (AD_Mode == YES) {
SU2_MPI::Error(string("AUTO_DIFF=YES requires Automatic Differentiation support.\n") +
string("Please use correct executables (configuration/compilation is done using the preconfigure.py script)."),
SU2_MPI::Error("Config option AUTO_DIFF= YES requires AD support.\n"
"Please use SU2_???_AD (meson.py ... -Denable-autodiff=true ...).",
CURRENT_FUNCTION);
}
#endif
Expand Down
4 changes: 2 additions & 2 deletions Common/src/adt/CADTPointsOnlyClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

CADTPointsOnlyClass::CADTPointsOnlyClass(unsigned short nDim,
unsigned long nPoints,
su2double *coor,
unsigned long *pointID,
const su2double *coor,
const unsigned long *pointID,
const bool globalTree) {

/* Allocate some thread-safe working variables if required. */
Expand Down
4 changes: 0 additions & 4 deletions Common/src/grid_movement/CSurfaceMovement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1576,11 +1576,7 @@ su2double CSurfaceMovement::SetCartesianCoord(CGeometry *geometry, CConfig *conf
}
}

#ifdef HAVE_MPI
SU2_MPI::Allreduce(&my_MaxDiff, &MaxDiff, 1, MPI_DOUBLE, MPI_MAX, SU2_MPI::GetComm());
#else
MaxDiff = my_MaxDiff;
#endif

if (rank == MASTER_NODE)
cout << "Update cartesian coord | FFD box: " << FFDBox->GetTag() << ". Max Diff: " << MaxDiff <<"."<< endl;
Expand Down
7 changes: 7 additions & 0 deletions SU2_CFD/include/solvers/CSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ class CSolver {

private:

/*!
* \brief Interpolate Restart_Data after reading it.
* \param[in] geometry - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
*/
void InterpolateRestartData(const CGeometry *geometry, const CConfig *config);

/*--- Private to prevent use by derived solvers, each solver MUST have its own "nodes" member of the
most derived type possible, e.g. CEulerSolver has nodes of CEulerVariable* and not CVariable*.
This variable is to avoid two virtual functions calls per call i.e. CSolver::GetNodes() returns
Expand Down
Loading