Skip to content
Merged
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
6 changes: 3 additions & 3 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6339,17 +6339,17 @@ class CConfig {
/*!
* \brief Center of rotation for a rotational periodic boundary.
*/
su2double *GetPeriodicRotCenter(string val_marker);
const su2double *GetPeriodicRotCenter(string val_marker) const;

/*!
* \brief Angles of rotation for a rotational periodic boundary.
*/
su2double *GetPeriodicRotAngles(string val_marker);
const su2double *GetPeriodicRotAngles(string val_marker) const;

/*!
* \brief Translation vector for a rotational periodic boundary.
*/
su2double *GetPeriodicTranslation(string val_marker);
const su2double *GetPeriodicTranslation(string val_marker) const;

/*!
* \brief Get the rotationally periodic donor marker for boundary <i>val_marker</i>.
Expand Down
40 changes: 22 additions & 18 deletions Common/include/basic_types/ad_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,18 @@ namespace AD{
*/
inline void Push_TapePosition() {}

/*!
* \brief Start a passive region, i.e. stop recording.
* \return True is tape was active.
*/
inline bool BeginPassive() { return false; }

/*!
* \brief End a passive region, i.e. start recording if we were recording before.
* \param[in] wasActive - Whether we were recording before entering the passive region.
*/
inline void EndPassive(bool wasActive) {}

#else
using CheckpointHandler = codi::DataStore;

Expand Down Expand Up @@ -488,27 +500,19 @@ namespace AD{

FORCEINLINE void EndExtFunc() { delete FuncHelper; }

#endif // CODI_REVERSE_TYPE
FORCEINLINE bool BeginPassive() {
if(AD::globalTape.isActive()) {
StopRecording();
return true;
}
return false;
}

} // namespace AD
FORCEINLINE void EndPassive(bool wasActive) { if(wasActive) StartRecording(); }

/*--- Macro to begin and end sections with a passive tape ---*/
#endif // CODI_REVERSE_TYPE

#ifdef CODI_REVERSE_TYPE
#define AD_BEGIN_PASSIVE \
if(AD::globalTape.isActive()) {\
AD::globalTape.setPassive();\
AD::Status = true; \
}
#define AD_END_PASSIVE \
if(AD::Status) { \
AD::globalTape.setActive(); \
AD::Status = false; \
}
#else
#define AD_BEGIN_PASSIVE
#define AD_END_PASSIVE
#endif
} // namespace AD


/*--- If we compile under OSX we have to overload some of the operators for
Expand Down
13 changes: 4 additions & 9 deletions Common/include/fem/fem_geometry_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,8 @@ struct CBoundaryFEM {
*/
class CMeshFEM: public CGeometry {
protected:
unsigned long nVolElemTot; /*!< \brief Total number of local volume elements, including halos. */
unsigned long nVolElemOwned; /*!< \brief Number of owned local volume elements. */
unsigned long nVolElemTot{0}; /*!< \brief Total number of local volume elements, including halos. */
unsigned long nVolElemOwned{0}; /*!< \brief Number of owned local volume elements. */

vector<unsigned long> nVolElemOwnedPerTimeLevel; /*!< \brief Number of owned local volume elements
per time level. Cumulative storage. */
Expand Down Expand Up @@ -489,13 +489,13 @@ class CMeshFEM: public CGeometry {
vector<CFEMStandardBoundaryFace> standardBoundaryFacesGrid; /*!< \brief Vector that contains the standard boundary
faces used for the geometry of the DG solver. */

CBlasStructure *blasFunctions; /*!< \brief Pointer to the object to carry out the BLAS functionalities. */
CBlasStructure *blasFunctions{nullptr}; /*!< \brief Pointer to the object to carry out the BLAS functionalities. */

public:
/*!
* \brief Constructor of the class.
*/
CMeshFEM(void) : CGeometry() { blasFunctions = nullptr; }
CMeshFEM(void) : CGeometry() { }

/*!
* \overload
Expand Down Expand Up @@ -1250,9 +1250,4 @@ class CDummyMeshFEM_DG : public CMeshFEM_DG {
*/
CDummyMeshFEM_DG(CConfig *config);

/*!
* \brief Destructor of the class.
*/
~CDummyMeshFEM_DG() override;

};
5 changes: 0 additions & 5 deletions Common/include/geometry/CDummyGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,5 @@ class CDummyGeometry final : public CGeometry{
*/
CDummyGeometry(CConfig *config);

/*!
* \brief Destructor of the class.
*/
~CDummyGeometry() override;

};

288 changes: 154 additions & 134 deletions Common/include/geometry/CGeometry.hpp

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions Common/include/geometry/CMultiGridGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ class CMultiGridGeometry final : public CGeometry {
*/
CMultiGridGeometry(CGeometry **geometry, CConfig *config_container, unsigned short iMesh);

/*!
* \brief Destructor of the class.
*/
~CMultiGridGeometry(void) override;

/*!
* \brief Determine if a CVPoint van be agglomerated, if it have the same marker point as the seed.
* \param[in] CVPoint - Control volume to be agglomerated.
Expand Down
122 changes: 61 additions & 61 deletions Common/include/geometry/CPhysicalGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,71 +39,71 @@
class CPhysicalGeometry final : public CGeometry {

unordered_map<unsigned long, unsigned long>
Global_to_Local_Point; /*!< \brief Global-local indexation for the points. */
long *Local_to_Global_Point; /*!< \brief Local-global indexation for the points. */
unsigned short *Local_to_Global_Marker; /*!< \brief Local to Global marker. */
unsigned short *Global_to_Local_Marker; /*!< \brief Global to Local marker. */
unsigned long *adj_counter; /*!< \brief Adjacency counter. */
unsigned long **adjacent_elem; /*!< \brief Adjacency element list. */
su2activematrix Sensitivity; /*!< \brief Matrix holding the sensitivities at each point. */
Global_to_Local_Point; /*!< \brief Global-local indexation for the points. */
long *Local_to_Global_Point{nullptr}; /*!< \brief Local-global indexation for the points. */
unsigned short *Local_to_Global_Marker{nullptr}; /*!< \brief Local to Global marker. */
unsigned short *Global_to_Local_Marker{nullptr}; /*!< \brief Global to Local marker. */
unsigned long *adj_counter{nullptr}; /*!< \brief Adjacency counter. */
unsigned long **adjacent_elem{nullptr}; /*!< \brief Adjacency element list. */
su2activematrix Sensitivity; /*!< \brief Matrix holding the sensitivities at each point. */

vector<vector<unsigned long> > Neighbors;
unordered_map<unsigned long, unsigned long> Color_List;
vector<string> Marker_Tags;
unsigned long nLocal_Point,
nLocal_PointDomain,
nLocal_PointGhost,
nLocal_PointPeriodic,
nLocal_Elem,
nLocal_Bound_Elem,
nGlobal_Elem,
nGlobal_Bound_Elem,
nLocal_Line,
nLocal_BoundTria,
nLocal_BoundQuad,
nLinear_Line,
nLinear_BoundTria,
nLinear_BoundQuad,
nLocal_Tria,
nLocal_Quad,
nLocal_Tetr,
nLocal_Hexa,
nLocal_Pris,
nLocal_Pyra;
unsigned long nMarker_Global;
su2double *Local_Coords;
unsigned long *Local_Points;
unsigned long *Local_Colors;
unsigned long *Conn_Line;
unsigned long *Conn_BoundTria;
unsigned long *Conn_BoundQuad;
unsigned long *Conn_Line_Linear;
unsigned long *Conn_BoundTria_Linear;
unsigned long *Conn_BoundQuad_Linear;
unsigned long *Conn_Tria;
unsigned long *Conn_Quad;
unsigned long *Conn_Tetr;
unsigned long *Conn_Hexa;
unsigned long *Conn_Pris;
unsigned long *Conn_Pyra;
unsigned long *ID_Line;
unsigned long *ID_BoundTria;
unsigned long *ID_BoundQuad;
unsigned long *ID_Line_Linear;
unsigned long *ID_BoundTria_Linear;
unsigned long *ID_BoundQuad_Linear;
unsigned long *ID_Tria;
unsigned long *ID_Quad;
unsigned long *ID_Tetr;
unsigned long *ID_Hexa;
unsigned long *ID_Pris;
unsigned long *ID_Pyra;
unsigned long *Elem_ID_Line;
unsigned long *Elem_ID_BoundTria;
unsigned long *Elem_ID_BoundQuad;
unsigned long *Elem_ID_Line_Linear;
unsigned long *Elem_ID_BoundTria_Linear;
unsigned long *Elem_ID_BoundQuad_Linear;
unsigned long nLocal_Point{0},
nLocal_PointDomain{0},
nLocal_PointGhost{0},
nLocal_PointPeriodic{0},
nLocal_Elem{0},
nLocal_Bound_Elem{0},
nGlobal_Elem{0},
nGlobal_Bound_Elem{0},
nLocal_Line{0},
nLocal_BoundTria{0},
nLocal_BoundQuad{0},
nLinear_Line{0},
nLinear_BoundTria{0},
nLinear_BoundQuad{0},
nLocal_Tria{0},
nLocal_Quad{0},
nLocal_Tetr{0},
nLocal_Hexa{0},
nLocal_Pris{0},
nLocal_Pyra{0};
unsigned long nMarker_Global{0};
su2double *Local_Coords{nullptr};
unsigned long *Local_Points{nullptr};
unsigned long *Local_Colors{nullptr};
unsigned long *Conn_Line{nullptr};
unsigned long *Conn_BoundTria{nullptr};
unsigned long *Conn_BoundQuad{nullptr};
unsigned long *Conn_Line_Linear{nullptr};
unsigned long *Conn_BoundTria_Linear{nullptr};
unsigned long *Conn_BoundQuad_Linear{nullptr};
unsigned long *Conn_Tria{nullptr};
unsigned long *Conn_Quad{nullptr};
unsigned long *Conn_Tetr{nullptr};
unsigned long *Conn_Hexa{nullptr};
unsigned long *Conn_Pris{nullptr};
unsigned long *Conn_Pyra{nullptr};
unsigned long *ID_Line{nullptr};
unsigned long *ID_BoundTria{nullptr};
unsigned long *ID_BoundQuad{nullptr};
unsigned long *ID_Line_Linear{nullptr};
unsigned long *ID_BoundTria_Linear{nullptr};
unsigned long *ID_BoundQuad_Linear{nullptr};
unsigned long *ID_Tria{nullptr};
unsigned long *ID_Quad{nullptr};
unsigned long *ID_Tetr{nullptr};
unsigned long *ID_Hexa{nullptr};
unsigned long *ID_Pris{nullptr};
unsigned long *ID_Pyra{nullptr};
unsigned long *Elem_ID_Line{nullptr};
unsigned long *Elem_ID_BoundTria{nullptr};
unsigned long *Elem_ID_BoundQuad{nullptr};
unsigned long *Elem_ID_Line_Linear{nullptr};
unsigned long *Elem_ID_BoundTria_Linear{nullptr};
unsigned long *Elem_ID_BoundQuad_Linear{nullptr};

public:
/*--- This is to suppress Woverloaded-virtual, omitting it has no negative impact. ---*/
Expand Down
8 changes: 4 additions & 4 deletions Common/include/linear_algebra/CMatrixVectorProduct.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class CSysMatrixVectorProduct final : public CMatrixVectorProduct<ScalarType> {
private:
const CSysMatrix<ScalarType>& matrix; /*!< \brief pointer to matrix that defines the product. */
CGeometry* geometry; /*!< \brief geometry associated with the matrix. */
CConfig* config; /*!< \brief config of the problem. */
const CConfig *config; /*!< \brief config of the problem. */

public:
/*!
Expand All @@ -80,7 +80,7 @@ class CSysMatrixVectorProduct final : public CMatrixVectorProduct<ScalarType> {
* \param[in] config_ref - config of the problem
*/
inline CSysMatrixVectorProduct(const CSysMatrix<ScalarType> & matrix_ref,
CGeometry *geometry_ref, CConfig *config_ref) :
CGeometry *geometry_ref, const CConfig *config_ref) :
matrix(matrix_ref),
geometry(geometry_ref),
config(config_ref) {}
Expand Down Expand Up @@ -110,7 +110,7 @@ class CSysMatrixVectorProductTransposed final : public CMatrixVectorProduct<Scal
private:
const CSysMatrix<ScalarType>& matrix; /*!< \brief pointer to matrix that defines the product. */
CGeometry* geometry; /*!< \brief geometry associated with the matrix. */
CConfig* config; /*!< \brief config of the problem. */
const CConfig *config; /*!< \brief config of the problem. */

public:
/*!
Expand All @@ -120,7 +120,7 @@ class CSysMatrixVectorProductTransposed final : public CMatrixVectorProduct<Scal
* \param[in] config_ref - config of the problem
*/
inline CSysMatrixVectorProductTransposed(const CSysMatrix<ScalarType> & matrix_ref,
CGeometry *geometry_ref, CConfig *config_ref) :
CGeometry *geometry_ref, const CConfig *config_ref) :
matrix(matrix_ref),
geometry(geometry_ref),
config(config_ref) {}
Expand Down
4 changes: 2 additions & 2 deletions Common/include/linear_algebra/CPastixWrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class CPastixWrapper
/*!
* \brief Initialize the matrix format that PaStiX requires.
*/
void Initialize(CGeometry *geometry, CConfig *config);
void Initialize(CGeometry *geometry, const CConfig *config);

public:
/*!
Expand Down Expand Up @@ -169,7 +169,7 @@ class CPastixWrapper
* \param[in] kind_fact - Type of factorization.
* \param[in] transposed - Flag to use the transposed matrix during application of the preconditioner.
*/
void Factorize(CGeometry *geometry, CConfig *config, unsigned short kind_fact, bool transposed);
void Factorize(CGeometry *geometry, const CConfig *config, unsigned short kind_fact, bool transposed);

/*!
* \brief Runs the "solve" task for any rhs/sol with operator []
Expand Down
Loading