Skip to content

Commit

Permalink
Merge and fixed conflict.
Browse files Browse the repository at this point in the history
  • Loading branch information
economon committed Aug 29, 2019
2 parents 5770a3d + d781ddc commit d2ac22b
Show file tree
Hide file tree
Showing 115 changed files with 7,162 additions and 1,458 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ TestData

Mercurial
.hg*

# Ignore build folder
build
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ env:
TEST_SCRIPT=serial_regression_AD.py

# Parallel build and test for AD:
- CONFIGURE_COMMAND="./meson.py build --prefix=$TRAVIS_BUILD_DIR -Denable-pywrapper=true -Denable-autodiff=true -Denable-directdiff=true"
- CONFIGURE_COMMAND="./meson.py build --prefix=$TRAVIS_BUILD_DIR -Denable-pywrapper=true -Denable-autodiff=true"
TEST_SCRIPT=parallel_regression_AD.py

before_install:
Expand Down
6 changes: 6 additions & 0 deletions Common/include/ad_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ namespace AD{
*/
void StopRecording();

/*!
* \brief Check if the tape is active
* \param[out] Boolean which determines whether the tape is active.
*/
bool TapeActive();

/*!
* \brief Registers the variable as an input. I.e. as a leaf of the computational graph.
* \param[in] data - The variable to be registered as input.
Expand Down
4 changes: 4 additions & 0 deletions Common/include/ad_structure.inl
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ namespace AD{

inline void StopRecording() {AD::globalTape.setPassive();}

inline bool TapeActive() {return AD::globalTape.isActive();}

inline void ClearAdjoints() {AD::globalTape.clearAdjoints(); }

inline void ComputeAdjoint() {AD::globalTape.evaluate();
Expand Down Expand Up @@ -243,6 +245,8 @@ namespace AD{

inline void StopRecording() {}

inline bool TapeActive() {return false;}

inline void ClearAdjoints() {}

inline void ComputeAdjoint() {}
Expand Down
111 changes: 102 additions & 9 deletions Common/include/config_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ class CConfig {
nMarker_Shroud,/*!< \brief Number of shroud markers to set grid velocity to 0.*/
nMarker_NearFieldBound, /*!< \brief Number of near field boundary markers. */
nMarker_ActDiskInlet, nMarker_ActDiskOutlet,
nMarker_Deform_Mesh, /*!< \brief Number of deformable markers at the boundary. */
nMarker_Fluid_Load, /*!< \brief Number of markers in which the flow load is computed/employed. */
nMarker_Fluid_InterfaceBound, /*!< \brief Number of fluid interface markers. */
nMarker_CHTInterface, /*!< \brief Number of conjugate heat transfer interface markers. */
nMarker_Dirichlet, /*!< \brief Number of interface boundary markers. */
Expand Down Expand Up @@ -246,6 +248,8 @@ class CConfig {
*Marker_TurboBoundIn, /*!< \brief Turbomachinery performance boundary markers. */
*Marker_TurboBoundOut, /*!< \brief Turbomachinery performance boundary donor markers. */
*Marker_NearFieldBound, /*!< \brief Near Field boundaries markers. */
*Marker_Deform_Mesh, /*!< \brief Deformable markers at the boundary. */
*Marker_Fluid_Load, /*!< \brief Markers in which the flow load is computed/employed. */
*Marker_Fluid_InterfaceBound, /*!< \brief Fluid interface markers. */
*Marker_CHTInterface, /*!< \brief Conjugate heat transfer interface markers. */
*Marker_ActDiskInlet,
Expand Down Expand Up @@ -454,7 +458,6 @@ class CConfig {
su2double *LocationStations; /*!< \brief Airfoil sections in wing slicing subroutine. */
su2double *NacelleLocation; /*!< \brief Definition of the nacelle location. */
unsigned short Kind_Solver, /*!< \brief Kind of solver Euler, NS, Continuous adjoint, etc. */
*Kind_Solver_PerZone, /*!< \brief Kind of solvers for each zone Euler, NS, Continuous adjoint, etc. */
Kind_MZSolver, /*!< \brief Kind of multizone solver. */
Kind_FluidModel, /*!< \brief Kind of the Fluid Model: Ideal or Van der Walls, ... . */
Kind_ViscosityModel, /*!< \brief Kind of the Viscosity Model*/
Expand Down Expand Up @@ -533,7 +536,6 @@ class CConfig {
Use_Accurate_Jacobians; /*!< \brief Use numerically computed Jacobians for AUSM+up(2) and SLAU(2). */
bool EulerPersson; /*!< \brief Boolean to determine whether this is an Euler simulation with Persson shock capturing. */
bool FSI_Problem, /*!< \brief Boolean to determine whether the simulation is FSI or not. */
ZoneSpecific_Problem, /*!< \brief Boolean to determine whether we wish to use zone-specific solvers. */
Multizone_Problem; /*!< \brief Boolean to determine whether we are solving a multizone problem. */
unsigned short nID_DV; /*!< \brief ID for the region of FEM when computed using direct differentiation. */
bool AD_Mode; /*!< \brief Algorithmic Differentiation support. */
Expand Down Expand Up @@ -594,6 +596,7 @@ class CConfig {
unsigned long GridDef_Nonlinear_Iter, /*!< \brief Number of nonlinear increments for grid deformation. */
GridDef_Linear_Iter; /*!< \brief Number of linear smoothing iterations for grid deformation. */
unsigned short Deform_Stiffness_Type; /*!< \brief Type of element stiffness imposed for FEA mesh deformation. */
bool Deform_Mesh; /*!< \brief Determines whether the mesh will be deformed. */
bool Deform_Output; /*!< \brief Print the residuals during mesh deformation to the console. */
su2double Deform_Tol_Factor; /*!< Factor to multiply smallest volume for deform tolerance (0.001 default) */
su2double Deform_Coeff; /*!< Deform coeffienct */
Expand Down Expand Up @@ -684,6 +687,8 @@ class CConfig {
*Marker_All_MixingPlaneInterface, /*!< \brief Global index for MixingPlane interface markers using the grid information. */
*Marker_All_DV, /*!< \brief Global index for design variable markers using the grid information. */
*Marker_All_Moving, /*!< \brief Global index for moving surfaces using the grid information. */
*Marker_All_Deform_Mesh, /*!< \brief Global index for deformable markers at the boundary. */
*Marker_All_Fluid_Load, /*!< \brief Global index for markers in which the flow load is computed/employed. */
*Marker_All_PyCustom, /*!< \brief Global index for Python customizable surfaces using the grid information. */
*Marker_All_Designing, /*!< \brief Global index for moving using the grid information. */
*Marker_CfgFile_Monitoring, /*!< \brief Global index for monitoring using the config information. */
Expand All @@ -696,6 +701,8 @@ class CConfig {
*Marker_CfgFile_TurbomachineryFlag, /*!< \brief Global index for Turbomachinery flag using the config information. */
*Marker_CfgFile_MixingPlaneInterface, /*!< \brief Global index for MixingPlane interface using the config information. */
*Marker_CfgFile_Moving, /*!< \brief Global index for moving surfaces using the config information. */
*Marker_CfgFile_Deform_Mesh, /*!< \brief Global index for deformable markers at the boundary. */
*Marker_CfgFile_Fluid_Load, /*!< \brief Global index for markers in which the flow load is computed/employed. */
*Marker_CfgFile_PyCustom, /*!< \brief Global index for Python customizable surfaces using the config information. */
*Marker_CfgFile_DV, /*!< \brief Global index for design variable markers using the config information. */
*Marker_CfgFile_PerBound; /*!< \brief Global index for periodic boundaries using the config information. */
Expand Down Expand Up @@ -2944,6 +2951,18 @@ class CConfig {
*/
unsigned short GetnMarker_NearFieldBound(void);

/*!
* \brief Get the total number of deformable markers at the boundary.
* \return Total number of deformable markers at the boundary.
*/
unsigned short GetnMarker_Deform_Mesh(void);

/*!
* \brief Get the total number of markers in which the flow load is computed/employed.
* \return Total number of markers in which the flow load is computed/employed.
*/
unsigned short GetnMarker_Fluid_Load(void);

/*!
* \brief Get the total number of boundary markers.
* \return Total number of boundary markers.
Expand Down Expand Up @@ -3478,6 +3497,20 @@ class CConfig {
*/
void SetMarker_All_Moving(unsigned short val_marker, unsigned short val_moving);

/*!
* \brief Set if a marker <i>val_marker</i> allows deformation at the boundary.
* \param[in] val_marker - Index of the marker in which we are interested.
* \param[in] val_interface - 0 or 1 depending if the the marker is or not a DEFORM_MESH marker.
*/
void SetMarker_All_Deform_Mesh(unsigned short val_marker, unsigned short val_interface);

/*!
* \brief Set if a in marker <i>val_marker</i> the flow load will be computed/employed.
* \param[in] val_marker - Index of the marker in which we are interested.
* \param[in] val_interface - 0 or 1 depending if the the marker is or not a Fluid_Load marker.
*/
void SetMarker_All_Fluid_Load(unsigned short val_marker, unsigned short val_interface);

/*!
* \brief Set if a marker <i>val_marker</i> is going to be customized in Python <i>val_PyCustom</i>
* (read from the config file).
Expand Down Expand Up @@ -3601,6 +3634,20 @@ class CConfig {
*/
unsigned short GetMarker_All_Moving(unsigned short val_marker);

/*!
* \brief Get whether marker <i>val_marker</i> is a DEFORM_MESH marker
* \param[in] val_marker - 0 or 1 depending if the the marker belongs to the DEFORM_MESH subset.
* \return 0 or 1 depending if the marker belongs to the DEFORM_MESH subset.
*/
unsigned short GetMarker_All_Deform_Mesh(unsigned short val_marker);

/*!
* \brief Get whether marker <i>val_marker</i> is a Fluid_Load marker
* \param[in] val_marker - 0 or 1 depending if the the marker belongs to the Fluid_Load subset.
* \return 0 or 1 depending if the marker belongs to the Fluid_Load subset.
*/
unsigned short GetMarker_All_Fluid_Load(unsigned short val_marker);

/*!
* \brief Get the Python customization for a marker <i>val_marker</i>.
* \param[in] val_marker - Index of the marker in which we are interested.
Expand Down Expand Up @@ -4140,6 +4187,12 @@ class CConfig {
* \return Number of nonlinear increments for mesh deformation.
*/
unsigned long GetGridDef_Nonlinear_Iter(void);

/*!
* \brief Get information about whether the mesh will be deformed using pseudo linear elasticity.
* \return <code>TRUE</code> means that grid deformation is active.
*/
bool GetDeform_Mesh(void);

/*!
* \brief Get information about writing grid deformation residuals to the console.
Expand Down Expand Up @@ -4904,12 +4957,6 @@ class CConfig {
* \return boolean.
*/
bool GetBoolTurbomachinery(void);

/*!
* \brief Verify if there are zone specific solvers entered in the config file.
* \return boolean.
*/
bool GetBoolZoneSpecific(void);

/*!
* \brief number Turbomachinery blades computed using the pitch information.
Expand Down Expand Up @@ -5690,7 +5737,13 @@ class CConfig {
* \return <code>TRUE</code> if there is a grid movement; otherwise <code>FALSE</code>.
*/
bool GetGrid_Movement(void);


/*!
* \brief Get information about dynamic grids.
* \return <code>TRUE</code> if there is a grid movement; otherwise <code>FALSE</code>.
*/
bool GetDynamic_Grid(void);

/*!
* \brief Get information about the volumetric movement.
* \return <code>TRUE</code> if there is a volumetric movement is required; otherwise <code>FALSE</code>.
Expand Down Expand Up @@ -6131,6 +6184,18 @@ class CConfig {
*/
unsigned short GetMarker_CfgFile_Moving(string val_marker);

/*!
* \brief Get the DEFORM_MESH information from the config definition for the marker <i>val_marker</i>.
* \return DEFORM_MESH information of the boundary in the config information for the marker <i>val_marker</i>.
*/
unsigned short GetMarker_CfgFile_Deform_Mesh(string val_marker);

/*!
* \brief Get the Fluid_Load information from the config definition for the marker <i>val_marker</i>.
* \return Fluid_Load information of the boundary in the config information for the marker <i>val_marker</i>.
*/
unsigned short GetMarker_CfgFile_Fluid_Load(string val_marker);

/*!
* \brief Get the Python customization information from the config definition for the marker <i>val_marker</i>.
* \return Python customization information of the boundary in the config information for the marker <i>val_marker</i>.
Expand Down Expand Up @@ -6502,6 +6567,18 @@ class CConfig {
* \return Internal index for a moving boundary <i>val_marker</i>.
*/
unsigned short GetMarker_Moving(string val_marker);

/*!
* \brief Get the internal index for a DEFORM_MESH boundary <i>val_marker</i>.
* \return Internal index for a DEFORM_MESH boundary <i>val_marker</i>.
*/
unsigned short GetMarker_Deform_Mesh(string val_marker);

/*!
* \brief Get the internal index for a Fluid_Load boundary <i>val_marker</i>.
* \return Internal index for a Fluid_Load boundary <i>val_marker</i>.
*/
unsigned short GetMarker_Fluid_Load(string val_marker);

/*!
* \brief Get the name of the surface defined in the geometry file.
Expand All @@ -6511,6 +6588,22 @@ class CConfig {
*/
string GetMarker_Moving_TagBound(unsigned short val_marker);

/*!
* \brief Get the name of the DEFORM_MESH boundary defined in the geometry file.
* \param[in] val_marker - Value of the marker in which we are interested.
* \return Name that is in the geometry file for the surface that
* has the marker <i>val_marker</i>.
*/
string GetMarker_Deform_Mesh_TagBound(unsigned short val_marker);

/*!
* \brief Get the name of the Fluid_Load boundary defined in the geometry file.
* \param[in] val_marker - Value of the marker in which we are interested.
* \return Name that is in the geometry file for the surface that
* has the marker <i>val_marker</i>.
*/
string GetMarker_Fluid_Load_TagBound(unsigned short val_marker);

/*!
* \brief Get the name of the surface defined in the geometry file.
* \param[in] val_marker - Value of the marker in which we are interested.
Expand Down
26 changes: 24 additions & 2 deletions Common/include/config_structure.inl
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,8 @@ inline unsigned long CConfig::GetGridDef_Linear_Iter(void) { return GridDef_Line

inline unsigned long CConfig::GetGridDef_Nonlinear_Iter(void) { return GridDef_Nonlinear_Iter; }

inline bool CConfig::GetDeform_Mesh(void) { return Deform_Mesh; }

inline bool CConfig::GetDeform_Output(void) { return Deform_Output; }

inline su2double CConfig::GetDeform_Coeff(void) { return Deform_Coeff; }
Expand Down Expand Up @@ -1243,8 +1245,6 @@ inline bool CConfig::GetBoolMixingPlaneInterface(void) { return (nMarker_MixingP

inline bool CConfig::GetBoolTurbomachinery(void) { return (nMarker_Turbomachinery !=0);}

inline bool CConfig::GetBoolZoneSpecific(void) { return ZoneSpecific_Problem;}

inline bool CConfig::GetBoolTurbMixingPlane(void) { return turbMixingPlane;}

inline bool CConfig::GetSpatialFourier(void){return SpatialFourier;}
Expand Down Expand Up @@ -1343,6 +1343,10 @@ inline string CConfig::GetMarker_HeatFlux_TagBound(unsigned short val_marker) {

inline string CConfig::GetMarker_Moving_TagBound(unsigned short val_marker) { return Marker_Moving[val_marker]; }

inline string CConfig::GetMarker_Deform_Mesh_TagBound(unsigned short val_marker) { return Marker_Deform_Mesh[val_marker]; }

inline string CConfig::GetMarker_Fluid_Load_TagBound(unsigned short val_marker) { return Marker_Fluid_Load[val_marker]; }

inline string CConfig::GetMarker_PyCustom_TagBound(unsigned short val_marker){ return Marker_PyCustom[val_marker]; }

inline string CConfig::GetMarker_Analyze_TagBound(unsigned short val_marker) { return Marker_Analyze[val_marker]; }
Expand Down Expand Up @@ -1382,6 +1386,10 @@ inline void CConfig::SetMarker_All_DV(unsigned short val_marker, unsigned short

inline void CConfig::SetMarker_All_Moving(unsigned short val_marker, unsigned short val_moving) { Marker_All_Moving[val_marker] = val_moving; }

inline void CConfig::SetMarker_All_Deform_Mesh(unsigned short val_marker, unsigned short val_interface) { Marker_All_Deform_Mesh[val_marker] = val_interface; }

inline void CConfig::SetMarker_All_Fluid_Load(unsigned short val_marker, unsigned short val_interface) { Marker_All_Fluid_Load[val_marker] = val_interface; }

inline void CConfig::SetMarker_All_PyCustom(unsigned short val_marker, unsigned short val_PyCustom) { Marker_All_PyCustom[val_marker] = val_PyCustom; }

inline void CConfig::SetMarker_All_PerBound(unsigned short val_marker, short val_perbound) { Marker_All_PerBound[val_marker] = val_perbound; }
Expand Down Expand Up @@ -1416,6 +1424,10 @@ inline unsigned short CConfig::GetMarker_All_DV(unsigned short val_marker) { ret

inline unsigned short CConfig::GetMarker_All_Moving(unsigned short val_marker) { return Marker_All_Moving[val_marker]; }

inline unsigned short CConfig::GetMarker_All_Deform_Mesh(unsigned short val_marker) { return Marker_All_Deform_Mesh[val_marker]; }

inline unsigned short CConfig::GetMarker_All_Fluid_Load(unsigned short val_marker) { return Marker_All_Fluid_Load[val_marker]; }

inline unsigned short CConfig::GetMarker_All_PyCustom(unsigned short val_marker) { return Marker_All_PyCustom[val_marker];}

inline unsigned short CConfig::GetnMarker_All(void) { return nMarker_All; }
Expand All @@ -1426,6 +1438,10 @@ inline unsigned short CConfig::GetnMarker_EngineInflow(void) { return nMarker_En

inline unsigned short CConfig::GetnMarker_EngineExhaust(void) { return nMarker_EngineExhaust; }

inline unsigned short CConfig::GetnMarker_Deform_Mesh(void) { return nMarker_Deform_Mesh; }

inline unsigned short CConfig::GetnMarker_Fluid_Load(void) { return nMarker_Fluid_Load; }

inline unsigned short CConfig::GetnMarker_Fluid_InterfaceBound(void) { return nMarker_Fluid_InterfaceBound; }

inline unsigned short CConfig::GetnMarker_Monitoring(void) { return nMarker_Monitoring; }
Expand Down Expand Up @@ -1602,6 +1618,12 @@ inline su2double CConfig::GetCFLRedCoeff_Turb(void) { return CFLRedCoeff_Turb; }

inline bool CConfig::GetGrid_Movement(void) { return (Kind_GridMovement != NO_MOVEMENT) || ((nKind_SurfaceMovement > 0) && !GetSurface_Movement(FLUID_STRUCTURE_STATIC)); }

inline bool CConfig::GetDynamic_Grid(void) {
return (Kind_GridMovement != NO_MOVEMENT)
|| ((nKind_SurfaceMovement > 0) && !GetSurface_Movement(FLUID_STRUCTURE_STATIC))
|| (Deform_Mesh && (Unsteady_Simulation != NO));
}

inline unsigned short CConfig::GetKind_SurfaceMovement(unsigned short iMarkerMoving){return Kind_SurfaceMovement[iMarkerMoving];}

inline bool CConfig::GetRotating_Frame(void) { return Rotating_Frame; }
Expand Down
2 changes: 1 addition & 1 deletion Common/include/element_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ class CElement {
* \brief Store the value of the identifier for the Dielectric Elastomers.
* \param[in] val_iDe - identifier of the DE property.
*/
void Set_ElProperties(CElementProperty *element_property);
void Set_ElProperties(CProperty *element_property);

/*!
* \brief Store the value of the identifier for the Dielectric Elastomers.
Expand Down
Loading

0 comments on commit d2ac22b

Please sign in to comment.