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
30 changes: 15 additions & 15 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,25 @@ jobs:
config_set: [BaseMPI, ReverseMPI, ForwardMPI, BaseNoMPI, ReverseNoMPI, ForwardNoMPI, ReverseTagNoMPI, BaseOMP, ReverseOMP, ForwardOMP]
include:
- config_set: BaseMPI
flags: '-Denable-pywrapper=true -Denable-coolprop=true -Denable-mpp=true -Dinstall-mpp=true -Denable-mlpcpp=true -Denable-tests=true --warnlevel=2'
flags: '-Dcpu-arch=skylake -Denable-pywrapper=true -Denable-coolprop=true -Denable-mpp=true -Dinstall-mpp=true -Denable-mlpcpp=true -Denable-tests=true --warnlevel=2'
- config_set: ReverseMPI
flags: '-Denable-autodiff=true -Denable-normal=false -Denable-pywrapper=true -Denable-tests=true -Denable-mlpcpp=true --warnlevel=3 --werror'
flags: '-Dcpu-arch=skylake -Denable-autodiff=true -Denable-normal=false -Denable-pywrapper=true -Denable-tests=true -Denable-mlpcpp=true --warnlevel=3 --werror'
- config_set: ForwardMPI
flags: '-Denable-directdiff=true -Denable-normal=false -Denable-tests=true -Denable-mlpcpp=true --warnlevel=3 --werror'
flags: '-Dcpu-arch=skylake -Denable-directdiff=true -Denable-normal=false -Denable-tests=true -Denable-mlpcpp=true --warnlevel=3 --werror'
- config_set: BaseNoMPI
flags: '-Denable-pywrapper=true -Denable-openblas=true -Dwith-mpi=disabled -Denable-mlpcpp=true -Denable-tests=true --warnlevel=3 --werror'
flags: '-Dcpu-arch=skylake -Denable-pywrapper=true -Denable-openblas=true -Dwith-mpi=disabled -Denable-mlpcpp=true -Denable-tests=true --warnlevel=3 --werror'
- config_set: ReverseNoMPI
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-pywrapper=true -Denable-tests=true --warnlevel=3 --werror'
flags: '-Dcpu-arch=skylake -Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-pywrapper=true -Denable-tests=true --warnlevel=3 --werror'
- config_set: ForwardNoMPI
flags: '-Denable-directdiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-tests=true --warnlevel=3 --werror'
flags: '-Dcpu-arch=skylake -Denable-directdiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-tests=true --warnlevel=3 --werror'
- config_set: ReverseTagNoMPI
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-pywrapper=true -Denable-tests=true --warnlevel=3 --werror -Dcodi-tape=Tag'
flags: '-Dcpu-arch=skylake -Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled -Denable-pywrapper=true -Denable-tests=true --warnlevel=3 --werror -Dcodi-tape=Tag'
- config_set: BaseOMP
flags: '-Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
flags: '-Dcpu-arch=skylake -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
- config_set: ReverseOMP
flags: '-Denable-autodiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
flags: '-Dcpu-arch=skylake -Denable-autodiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
- config_set: ForwardOMP
flags: '-Denable-directdiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
flags: '-Dcpu-arch=skylake -Denable-directdiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
steps:
- name: Cache Object Files
Expand Down Expand Up @@ -83,11 +83,11 @@ jobs:
config_set: [BaseOMP-tsan, ReverseOMP-tsan] #ForwardOMP-tsan
include:
- config_set: BaseOMP-tsan
flags: '--buildtype=debugoptimized -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3'
flags: '--buildtype=debugoptimized -Dcpu-arch=skylake -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3'
- config_set: ReverseOMP-tsan
flags: '--buildtype=debugoptimized -Denable-autodiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3'
flags: '--buildtype=debugoptimized -Dcpu-arch=skylake -Denable-autodiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-tecio=false --warnlevel=3'
#- config_set: ForwardOMP-tsan
# flags: '--buildtype=debug -Denable-directdiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
# flags: '--buildtype=debug -Dcpu-arch=skylake -Denable-directdiff=true -Denable-normal=false -Dwith-omp=true -Denable-mixedprec=true -Denable-pywrapper=true -Denable-tecio=false --warnlevel=3 --werror'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
steps:
- name: Cache Object Files
Expand Down Expand Up @@ -125,9 +125,9 @@ jobs:
config_set: [BaseNoMPI-asan, ReverseNoMPI-asan]
include:
- config_set: BaseNoMPI-asan
flags: '--buildtype=debugoptimized -Denable-openblas=true -Dwith-mpi=disabled -Denable-mlpcpp=true --warnlevel=3 --werror'
flags: '--buildtype=debugoptimized -Dcpu-arch=skylake -Denable-openblas=true -Dwith-mpi=disabled -Denable-mlpcpp=true --warnlevel=3 --werror'
- config_set: ReverseNoMPI-asan
flags: '--buildtype=debugoptimized --optimization=1 -Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled --warnlevel=3 --werror'
flags: '--buildtype=debugoptimized -Dcpu-arch=skylake --optimization=1 -Denable-autodiff=true -Denable-normal=false -Dwith-mpi=disabled --warnlevel=3 --werror'
runs-on: ${{ inputs.runner || 'ubuntu-latest' }}
steps:
- name: Cache Object Files
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ jobs:
strategy:
fail-fast: false
matrix:
os_bin: [macos64-omp, macos64-mpi, linux64-omp, linux64-mpi, win64-omp, win64-mpi]
os_bin: [macos64, macos64-mpi, linux64-omp, linux64-mpi, win64-omp, win64-mpi]
include:
- os_bin: win64-omp
flags: '-Dwith-omp=true -Dwith-mpi=disabled --cross-file=/hostfiles/hostfile_windows'
flags: '-Dcpu-arch=haswell -Dwith-omp=true -Dwith-mpi=disabled --cross-file=/hostfiles/hostfile_windows'
- os_bin: win64-mpi
flags: '-Dcustom-mpi=true --cross-file=/hostfiles/hostfile_windows_mpi'
- os_bin: macos64-omp
flags: '-Dwith-omp=true -Dwith-mpi=disabled --cross-file=/hostfiles/hostfile_darwin'
flags: '-Dcpu-arch=haswell -Dcustom-mpi=true --cross-file=/hostfiles/hostfile_windows_mpi'
- os_bin: macos64
flags: '-Dcpu-arch= -Dwith-mpi=disabled --cross-file=/hostfiles/hostfile_darwin'
- os_bin: macos64-mpi
flags: '-Dcustom-mpi=true --cross-file=/hostfiles/hostfile_darwin_mpi'
flags: '-Dcpu-arch= -Dcustom-mpi=true --cross-file=/hostfiles/hostfile_darwin_mpi'
- os_bin: linux64-omp
flags: '-Dwith-omp=true -Dwith-mpi=disabled -Dstatic-cgns-deps=true --cross-file=/hostfiles/hostfile_linux'
flags: '-Dcpu-arch=haswell -Dwith-omp=true -Dwith-mpi=disabled -Dstatic-cgns-deps=true --cross-file=/hostfiles/hostfile_linux'
- os_bin: linux64-mpi
flags: '-Dcustom-mpi=true --cross-file=/hostfiles/hostfile_linux_mpi'
flags: '-Dcpu-arch=haswell -Dcustom-mpi=true --cross-file=/hostfiles/hostfile_linux_mpi'
runs-on: ubuntu-latest
steps:
- name: Cache Object Files
Expand Down
4 changes: 2 additions & 2 deletions SU2_CFD/include/solvers/CHeatSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ class CHeatSolver final : public CScalarSolver<CHeatVariable> {
LinSysRes(iPoint, 0) -= thermal_diffusivity * dTdn * Area;

if (implicit) {
su2double Jacobian_i[] = {-thermal_diffusivity / dist_ij * Area};
Jacobian.SubtractBlock2Diag(iPoint, &Jacobian_i);
su2double Jacobian_i[1][1] = {{-thermal_diffusivity / dist_ij * Area}};
Jacobian.SubtractBlock2Diag(iPoint, Jacobian_i);
}
}

Expand Down
24 changes: 9 additions & 15 deletions SU2_CFD/src/solvers/CGradientSmoothingSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,6 @@ void CGradientSmoothingSolver::Compute_Surface_Residual(CGeometry* geometry, con
int EL_KIND = 0;
std::array<unsigned long, MAXNNODE_2D> indexNode;
std::array<unsigned long, MAXNNODE_2D> indexVertex;
su2double Weight, Jac_X, norm, val_Coord, normalSens = 0.0, Residual=0.0;
su2double normal[MAXNDIM];

for (iElem = 0; iElem < geometry->GetnElem_Bound(val_marker); iElem++) {
/*--- Identify the kind of boundary element ---*/
Expand All @@ -562,7 +560,7 @@ void CGradientSmoothingSolver::Compute_Surface_Residual(CGeometry* geometry, con
indexNode[iNode] = geometry->bound[val_marker][iElem]->GetNode(iNode);

for (iDim = 0; iDim < nDim; iDim++) {
val_Coord = Get_ValCoord(geometry, indexNode[iNode], iDim);
const su2double val_Coord = Get_ValCoord(geometry, indexNode[iNode], iDim);
element_container[GRAD_TERM][EL_KIND]->SetRef_Coord(iNode, iDim, val_Coord);
}
}
Expand All @@ -575,31 +573,27 @@ void CGradientSmoothingSolver::Compute_Surface_Residual(CGeometry* geometry, con
}
}

element_container[GRAD_TERM][EL_KIND]
->ClearElement(); /*--- Restarts the element: avoids adding over previous results in other elements --*/
/*--- Restarts the element: avoids adding over previous results in other elements --*/
element_container[GRAD_TERM][EL_KIND]->ClearElement();
element_container[GRAD_TERM][EL_KIND]->ComputeGrad_SurfaceEmbedded();
unsigned int nGauss = element_container[GRAD_TERM][EL_KIND]->GetnGaussPoints();

for (unsigned int iGauss = 0; iGauss < nGauss; iGauss++) {
Weight = element_container[GRAD_TERM][EL_KIND]->GetWeight(iGauss);
Jac_X = element_container[GRAD_TERM][EL_KIND]->GetJ_X(iGauss);
const su2double Weight = element_container[GRAD_TERM][EL_KIND]->GetWeight(iGauss);
const su2double Jac_X = element_container[GRAD_TERM][EL_KIND]->GetJ_X(iGauss);

for (unsigned int iNode = 0; iNode < nNodes; iNode++) {
su2double normal[MAXNDIM] = {};
geometry->vertex[val_marker][indexVertex[iNode]]->GetNormal(normal);
norm = GeometryToolbox::Norm(nDim, normal);
const su2double norm = GeometryToolbox::Norm(nDim, normal);
for (iDim = 0; iDim < nDim; iDim++) {
normal[iDim] = normal[iDim] / norm;
}

su2double normalSens = 0;
for (iDim = 0; iDim < nDim; iDim++) {
normalSens += normal[iDim] * nodes->GetSensitivity(indexNode[iNode], iDim);
}

Residual += Weight * Jac_X * element_container[GRAD_TERM][EL_KIND]->GetNi(iNode, iGauss) * normalSens;
LinSysRes.AddBlock(indexNode[iNode], &Residual);

Residual = 0;
normalSens = 0;
LinSysRes(indexNode[iNode], 0) += Weight * Jac_X * element_container[GRAD_TERM][EL_KIND]->GetNi(iNode, iGauss) * normalSens;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions SU2_CFD/src/solvers/CHeatSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,8 @@ void CHeatSolver::BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **solv
HeatFlux = HeatFluxDensity * Area;

if (implicit) {
su2double Jacobian_i[] = {-thermal_diffusivity*Area};
Jacobian.SubtractBlock2Diag(iPoint, &Jacobian_i);
su2double Jacobian_i[1][1] = {{-thermal_diffusivity*Area}};
Jacobian.SubtractBlock2Diag(iPoint, Jacobian_i);
}
}
else {
Expand Down
5 changes: 2 additions & 3 deletions SU2_CFD/src/solvers/CTurbSASolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,8 @@ void CTurbSASolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_conta
su2double coeff = (nu_total/sigma);
su2double RoughWallBC = nodes->GetSolution(iPoint,0)/(0.03*Roughness_Height);

su2double Res_Wall;// = new su2double [nVar];
Res_Wall = coeff*RoughWallBC*Area;
LinSysRes.SubtractBlock(iPoint, &Res_Wall);
su2double Res_Wall = coeff*RoughWallBC*Area;
LinSysRes(iPoint, 0) -= Res_Wall;

su2double Jacobian_i = (laminar_viscosity /density *Area)/(0.03*Roughness_Height*sigma);
Jacobian_i += 2.0*RoughWallBC*Area/sigma;
Expand Down
13 changes: 10 additions & 3 deletions SU2_PY/pySU2/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,17 @@ else
mpi4py_include = ''
endif

su2_swig_args = []
foreach arg : su2_cpp_args
if not arg.startswith('-f') and not arg.startswith('-m')
su2_swig_args += arg
endif
endforeach

swig_gen = generator(
swig,
output: ['@BASENAME@.cxx'],
arguments: su2_cpp_args +
arguments: su2_swig_args +
[ '-c++', '-python', '-I'+mpi4py_include, '-outdir', meson.current_build_dir(), '-o', './@OUTPUT@', '@INPUT@'],
depfile: '@BASENAME@.d',
)
Expand All @@ -43,7 +50,7 @@ if get_option('enable-normal')
],
install: true,
include_directories : mpi4py_include,
cpp_args : [default_warning_flags,su2_cpp_args],
cpp_args : [default_warning_flags, su2_swig_args],
name_prefix : '',
install_dir: 'bin'
)
Expand All @@ -62,7 +69,7 @@ if get_option('enable-autodiff')
],
install: true,
include_directories : mpi4py_include,
cpp_args : [default_warning_flags, su2_cpp_args, codi_rev_args],
cpp_args : [default_warning_flags, su2_swig_args, codi_rev_args],
name_prefix : '',
install_dir: 'bin'
)
Expand Down
16 changes: 8 additions & 8 deletions TestCases/disc_adj_fsi/dyn_fsi/grad_dv.opt.ref
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
INDEX GRAD
0 -4.570880056076276e-04
1 -2.401474032110094e-04
2 -9.134741314806565e-05
3 -1.628103414800329e-05
4 -1.741046937496715e-05
5 -9.462481743926707e-05
6 -2.452469742444662e-04
7 -4.635498236376295e-04
0 -4.570880237875418e-04
1 -2.401474145411196e-04
2 -9.134741927897237e-05
3 -1.628103641919142e-05
4 -1.741046901352254e-05
5 -9.462481564764888e-05
6 -2.452469723327466e-04
7 -4.635498231799566e-04
2 changes: 1 addition & 1 deletion TestCases/fea_topology/grad_ref_node.dat.ref
Original file line number Diff line number Diff line change
Expand Up @@ -6157,7 +6157,7 @@
-9.57383e-11
-2.60763e-10
-2.54078e-10
-1.57599e-10
-1.57598e-10
-8.68931e-12
-4.26927e-13
0
Expand Down
Loading
Loading