Skip to content

Commit 88a74c6

Browse files
committed
Merge branch 'master' into omarinoDev
2 parents 27e672b + 53ee674 commit 88a74c6

78 files changed

Lines changed: 68125 additions & 627 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/CI_parallel.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,23 @@ jobs:
930930
mpiexec -n 64 ./horses3d.ns Actuator.control
931931
if: '!cancelled()'
932932

933+
#
934+
# 33) Cylinder with Adaptive Time Step and Reinforcement Learning p-adaptation
935+
# --------------------------------------------
936+
- name: Build Cylinder_AdaptiveTimeStep_pAdaptationRL
937+
working-directory: ./Solver/test/NavierStokes/Cylinder_AdaptiveTimeStep_pAdaptationRL/SETUP
938+
run: |
939+
source /opt/intel/oneapi/setvars.sh || true
940+
make MODE=${{matrix.mode}} COMPILER=${{matrix.compiler}} COMM=${{matrix.comm}} ENABLE_THREADS=${{matrix.enable_threads}} WITH_METIS=YES
941+
if: '!cancelled()'
942+
943+
- name: Run Cylinder_AdaptiveTimeStep_pAdaptationRL
944+
working-directory: ./Solver/test/NavierStokes/Cylinder_AdaptiveTimeStep_pAdaptationRL
945+
run: |
946+
source /opt/intel/oneapi/setvars.sh || true
947+
mpiexec -n 64 ./horses3d.ns Cylinder_AdaptiveTimeStep_pAdaptationRL.control
948+
if: '!cancelled()'
949+
933950
########################################################################
934951
####### PARTICLES ########
935952
########################################################################

.github/workflows/CI_sequential 2.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,3 +786,21 @@ jobs:
786786
./horses3d.ns Actuator.control
787787
if: '!cancelled()'
788788

789+
#
790+
# 33) Cylinder with Adaptive Time Step and Reinforcement Learning p-adaptation
791+
# --------------------------------------------
792+
793+
- name: Build Cylinder_AdaptiveTimeStep_pAdaptationRL
794+
working-directory: ./Solver/test/NavierStokes/Cylinder_AdaptiveTimeStep_pAdaptationRL/SETUP
795+
run: |
796+
source /opt/intel/oneapi/setvars.sh || true
797+
make MODE=${{matrix.mode}} COMPILER=${{matrix.compiler}} COMM=${{matrix.comm}} ENABLE_THREADS=${{matrix.enable_threads}} WITH_MKL=${{matrix.mkl}} WITH_HDF5=${{matrix.hdf5}}
798+
if: '!cancelled()'
799+
800+
- name: Run Cylinder_AdaptiveTimeStep_pAdaptationRL
801+
working-directory: ./Solver/test/NavierStokes/Cylinder_AdaptiveTimeStep_pAdaptationRL
802+
run: |
803+
source /opt/intel/oneapi/setvars.sh || true
804+
./horses3d.ns Cylinder_AdaptiveTimeStep_pAdaptationRL.control
805+
if: '!cancelled()'
806+

.github/workflows/CI_sequential 3.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,26 @@ jobs:
192192
source /opt/intel/oneapi/setvars.sh || true
193193
./horses3d.mu Convergence.control
194194
if: ('!cancelled()' && matrix.compiler == 'ifort')
195+
#
196+
# 2) Convergence_cs
197+
# ----------------------------
198+
# This test case is skipped with gfortran as the result is slightly different
195199

200+
- name: Build MultiphaseConvergence_cs
201+
working-directory: ./Solver/test/Multiphase/Convergence_cs/SETUP
202+
run: |
203+
source /opt/intel/oneapi/setvars.sh || true
204+
make MODE=${{matrix.mode}} COMPILER=${{matrix.compiler}} COMM=${{matrix.comm}} ENABLE_THREADS=${{matrix.enable_threads}} WITH_MKL=${{matrix.mkl}}
205+
if: ('!cancelled()' && matrix.compiler == 'ifort')
206+
207+
- name: Run MultiphaseConvergence_cs
208+
working-directory: ./Solver/test/Multiphase/Convergence_cs
209+
run: |
210+
source /opt/intel/oneapi/setvars.sh || true
211+
./horses3d.mu Convergence_cs.control
212+
if: ('!cancelled()' && matrix.compiler == 'ifort')
196213
#
197-
# 2) RisingBubble
214+
# 3) RisingBubble
198215
# ----------------------------
199216
# This test case is skipped with gfortran as the result is slightly different
200217

@@ -213,7 +230,7 @@ jobs:
213230
if: ('!cancelled()' && matrix.compiler == 'ifort')
214231

215232
#
216-
# 3) Pipe
233+
# 4) Pipe
217234
# ----------------------------
218235

219236
- name: Build MultiphasePipe
@@ -231,7 +248,7 @@ jobs:
231248
if: '!cancelled()'
232249

233250
#
234-
# 4) Entropy conserving test
251+
# 5) Entropy conserving test
235252
# ----------------------------
236253

237254
- name: Build MultiphaseEntropyConservingTest
@@ -249,7 +266,7 @@ jobs:
249266
if: '!cancelled()'
250267

251268
#
252-
# 5) RisingBubbleVreman
269+
# 6) RisingBubbleVreman
253270
# ----------------------------
254271
# This test case is skipped with gfortran as the result is slightly different
255272

@@ -268,7 +285,7 @@ jobs:
268285
if: ('!cancelled()')
269286

270287
#
271-
# 6) Mu AL
288+
# 7) Mu AL
272289
# -------------------------------
273290

274291
- name: Build Mu-AL
@@ -286,7 +303,7 @@ jobs:
286303
if: '!cancelled()'
287304

288305
#
289-
# 7) Multiphase monopole with acoustics, sponge, and Reinforcement Learning p-adaptation
306+
# 8) Multiphase monopole with acoustics, sponge, and Reinforcement Learning p-adaptation
290307
# --------------------------------------------
291308
- name: Build Multiphase_Monopole_pAdaptationRL
292309
working-directory: ./Solver/test/Multiphase/Monopole_pAdaptationRL/SETUP
@@ -303,7 +320,7 @@ jobs:
303320
if: '!cancelled()'
304321

305322
#
306-
# 8) Snell
323+
# 9) Snell
307324
# ----------------------------
308325
- name: Build MultiphaseSnell
309326
working-directory: ./Solver/test/Multiphase/Snell/SETUP
@@ -320,7 +337,7 @@ jobs:
320337
if: ('!cancelled()')
321338

322339
#
323-
# 9) Mixed RK
340+
# 10) Mixed RK
324341
# ----------------------------
325342
- name: Build MultiphaseMixedRK
326343
working-directory: ./Solver/test/Multiphase/MixedRK/SETUP

Solver/configure

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ TEST_CASES="./Euler/BoxAroundCircle \
7878
./NavierStokes/VirtualSurfaces_acoustics_pAdaptationRL \
7979
./NavierStokes/ActuatorLineInterpolation \
8080
./NavierStokes/ActuatorLineProjection \
81+
./NavierStokes/Cylinder_AdaptiveTimeStep_pAdaptationRL \
8182
./IncompressibleNS/Convergence \
8283
./IncompressibleNS/Kovasznay \
8384
./IncompressibleNS/TaylorGreen \
@@ -88,6 +89,7 @@ TEST_CASES="./Euler/BoxAroundCircle \
8889
./IncompressibleNS/ActuatorLineInterpolation \
8990
./CahnHilliard/TJokisaari \
9091
./Multiphase/Convergence \
92+
./Multiphase/Convergence_cs \
9193
./Multiphase/EntropyConservingTest \
9294
./Multiphase/RisingBubble \
9395
./Multiphase/RisingBubbleVreman \

Solver/src/AcousticSolver/SpatialDiscretization.f90

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ end subroutine Finalize_SpaceAndTimeMethods
111111
!
112112
!////////////////////////////////////////////////////////////////////////
113113
!
114-
SUBROUTINE ComputeTimeDerivative( mesh, particles, time, mode, HO_Elements, element_mask)
114+
SUBROUTINE ComputeTimeDerivative( mesh, particles, time, mode, HO_Elements, element_mask, Level)
115115
IMPLICIT NONE
116116
!
117117
! ---------
@@ -124,6 +124,7 @@ SUBROUTINE ComputeTimeDerivative( mesh, particles, time, mode, HO_Elements, elem
124124
integer, intent(in) :: mode
125125
logical, intent(in), optional :: HO_Elements
126126
logical, intent(in), optional :: element_mask(:)
127+
integer, intent(in), optional :: Level
127128
!
128129
! ---------------
129130
! Local variables
@@ -167,7 +168,7 @@ END SUBROUTINE ComputeTimeDerivative
167168
! This routine computes the time derivative element by element, without considering the Riemann Solvers
168169
! This is useful for estimating the isolated truncation error
169170
!
170-
SUBROUTINE ComputeTimeDerivativeIsolated( mesh, particles, time, mode, HO_Elements, element_mask)
171+
SUBROUTINE ComputeTimeDerivativeIsolated( mesh, particles, time, mode, HO_Elements, element_mask, Level)
171172
IMPLICIT NONE
172173
!
173174
! ---------
@@ -179,7 +180,8 @@ SUBROUTINE ComputeTimeDerivativeIsolated( mesh, particles, time, mode, HO_Elemen
179180
REAL(KIND=RP) :: time
180181
integer, intent(in) :: mode
181182
logical, intent(in), optional :: HO_Elements
182-
logical, intent(in), optional :: element_mask(:)
183+
logical, intent(in), optional :: element_mask(:)
184+
integer, intent(in), optional :: Level
183185
!
184186
! ---------------
185187
! Local variables
@@ -206,7 +208,7 @@ END SUBROUTINE ComputeTimeDerivativeIsolated
206208

207209
subroutine TimeDerivative_ComputeQDot( mesh , particles, t)
208210
! use ActuatorLine, only: farm
209-
! use SpongeClass, only: sponge
211+
use SpongeClass, only: sponge, addSourceSponge
210212
implicit none
211213
type(HexMesh) :: mesh
212214
type(Particles_t) :: particles
@@ -330,7 +332,7 @@ subroutine TimeDerivative_ComputeQDot( mesh , particles, t)
330332
end do
331333
!$omp end do
332334
! for the sponge, loops are in the internal subroutine as values are precalculated
333-
! call sponge % addSource(mesh)
335+
call addSourceSponge(sponge,mesh)
334336
!
335337
! ***********************
336338
! Now add the source term

Solver/src/AcousticSolver/main.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ PROGRAM HORSES3DMainCAA
114114
! Integrate in time
115115
! -----------------
116116
!
117-
CALL timeIntegrator % integrate(sem, controlVariables, sem % monitors, ComputeTimeDerivative, ComputeTimeDerivativeIsolated)
117+
CALL timeIntegrator % integrate(sem, controlVariables, sem % monitors, sem % samplings, ComputeTimeDerivative, ComputeTimeDerivativeIsolated)
118118
!
119119
! ------------------------------------------
120120
! Finish measuring the total simulation time

Solver/src/CahnHilliardSolver/SpatialDiscretization.f90

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ end subroutine Initialize_SpaceAndTimeMethods
118118
!
119119
!////////////////////////////////////////////////////////////////////////
120120
!
121-
subroutine ComputeTimeDerivative( mesh, particles, time, mode, HO_Elements, element_mask)
121+
subroutine ComputeTimeDerivative( mesh, particles, time, mode, HO_Elements, element_mask, Level)
122122
IMPLICIT NONE
123123
!
124124
! ---------
@@ -131,6 +131,7 @@ subroutine ComputeTimeDerivative( mesh, particles, time, mode, HO_Elements, elem
131131
integer, intent(in) :: mode
132132
logical, intent(in), optional :: HO_Elements
133133
logical, intent(in), optional :: element_mask(:)
134+
integer, intent(in), optional :: Level
134135
!
135136
! ---------------
136137
! Local variables
@@ -372,7 +373,7 @@ subroutine ComputeTimeDerivative( mesh, particles, time, mode, HO_Elements, elem
372373

373374
end subroutine ComputeTimeDerivative
374375

375-
subroutine ComputeTimeDerivativeIsolated( mesh, particles, time, mode, HO_Elements, element_mask)
376+
subroutine ComputeTimeDerivativeIsolated( mesh, particles, time, mode, HO_Elements, element_mask, Level)
376377
IMPLICIT NONE
377378
!
378379
! ---------
@@ -384,7 +385,8 @@ subroutine ComputeTimeDerivativeIsolated( mesh, particles, time, mode, HO_Elemen
384385
REAL(KIND=RP) :: time
385386
integer, intent(in) :: mode
386387
logical, intent(in), optional :: HO_Elements
387-
logical, intent(in), optional :: element_mask(:)
388+
logical, intent(in), optional :: element_mask(:)
389+
integer, intent(in), optional :: Level
388390

389391
error stop 'ComputeTimeDerivativeIsolated not implemented for Cahn-Hilliard'
390392
end subroutine ComputeTimeDerivativeIsolated

Solver/src/CahnHilliardSolver/main.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ PROGRAM HORSES3DMainCH
122122
! Integrate in time
123123
! -----------------
124124
!
125-
CALL timeIntegrator % integrate(sem, controlVariables, sem % monitors, ComputeTimeDerivative, ComputeTimeDerivativeIsolated)
125+
CALL timeIntegrator % integrate(sem, controlVariables, sem % monitors, sem % samplings, ComputeTimeDerivative, ComputeTimeDerivativeIsolated)
126126
!
127127
! ------------------------------------------
128128
! Finish measuring the total simulation time

Solver/src/IncompressibleNSSolver/SpatialDiscretization.f90

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ end subroutine Finalize_SpaceAndTimeMethods
173173
!
174174
!////////////////////////////////////////////////////////////////////////
175175
!
176-
SUBROUTINE ComputeTimeDerivative( mesh, particles, time, mode, HO_Elements, element_mask)
176+
SUBROUTINE ComputeTimeDerivative( mesh, particles, time, mode, HO_Elements, element_mask, Level)
177177
IMPLICIT NONE
178178
!
179179
! ---------
@@ -186,6 +186,7 @@ SUBROUTINE ComputeTimeDerivative( mesh, particles, time, mode, HO_Elements, elem
186186
integer, intent(in) :: mode
187187
logical, intent(in), optional :: HO_Elements
188188
logical, intent(in), optional :: element_mask(:)
189+
integer, intent(in), optional :: Level
189190
!
190191
! ---------------
191192
! Local variables
@@ -263,7 +264,7 @@ END SUBROUTINE ComputeTimeDerivative
263264
! This routine computes the time derivative element by element, without considering the Riemann Solvers
264265
! This is useful for estimating the isolated truncation error
265266
!
266-
SUBROUTINE ComputeTimeDerivativeIsolated( mesh, particles, time, mode, HO_Elements, element_mask)
267+
SUBROUTINE ComputeTimeDerivativeIsolated( mesh, particles, time, mode, HO_Elements, element_mask, Level)
267268
use EllipticDiscretizationClass
268269
IMPLICIT NONE
269270
!
@@ -277,6 +278,7 @@ SUBROUTINE ComputeTimeDerivativeIsolated( mesh, particles, time, mode, HO_Elemen
277278
integer, intent(in) :: mode
278279
logical, intent(in), optional :: HO_Elements
279280
logical, intent(in), optional :: element_mask(:)
281+
integer, intent(in), optional :: Level
280282
!
281283
! ---------------
282284
! Local variables

Solver/src/IncompressibleNSSolver/main.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ PROGRAM HORSES3DMainiNS
115115
! Integrate in time
116116
! -----------------
117117
!
118-
CALL timeIntegrator % integrate(sem, controlVariables, sem % monitors, ComputeTimeDerivative, ComputeTimeDerivativeIsolated)
118+
CALL timeIntegrator % integrate(sem, controlVariables, sem % monitors, sem % samplings, ComputeTimeDerivative, ComputeTimeDerivativeIsolated)
119119
!
120120
! ----------------------------------
121121
! Export particles to VTK (temporal)

0 commit comments

Comments
 (0)