Skip to content

Commit

Permalink
Merge pull request #353 from ywkawai/feature/dns
Browse files Browse the repository at this point in the history
Feature/dns
  • Loading branch information
ywkawai authored Jun 10, 2024
2 parents 3046eb3 + f9a3f15 commit 2a340e0
Show file tree
Hide file tree
Showing 29 changed files with 1,351 additions and 772 deletions.
1 change: 1 addition & 0 deletions FElib/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ OBJS_NAME_FLUID_DYN_SOLVER = \

OBJS_NAME_TURBULENCE = \
scale_atm_phy_tb_dgm_driver.o \
scale_atm_phy_tb_dgm_dns.o \
scale_atm_phy_tb_dgm_smg.o \
scale_atm_phy_tb_dgm_globalsmg.o \
scale_atm_phy_tb_dgm_common.o
Expand Down
6 changes: 4 additions & 2 deletions FElib/src/depend
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ $(BUILD_DIR)/scale_atm_dyn_dgm_nonhydro3d_rhot_hevi_splitform.o: fluid_dyn_solve
$(BUILD_DIR)/scale_atm_dyn_dgm_spongelayer.o: fluid_dyn_solver/scale_atm_dyn_dgm_spongelayer.F90 $(DEPENDLIB) $(BUILD_DIR)/scale_element_base.o $(BUILD_DIR)/scale_localmesh_3d.o $(BUILD_DIR)/scale_localmesh_base.o $(BUILD_DIR)/scale_mesh_base3d.o $(BUILD_DIR)/scale_mesh_cubedom3d.o $(BUILD_DIR)/scale_mesh_cubedspheredom3d.o
$(BUILD_DIR)/scale_atm_dyn_dgm_trcadvect3d_heve.o: fluid_dyn_solver/scale_atm_dyn_dgm_trcadvect3d_heve.F90 $(DEPENDLIB) $(BUILD_DIR)/scale_element_base.o $(BUILD_DIR)/scale_element_hexahedral.o $(BUILD_DIR)/scale_localmesh_2d.o $(BUILD_DIR)/scale_localmesh_3d.o $(BUILD_DIR)/scale_localmeshfield_base.o $(BUILD_DIR)/scale_mesh_base2d.o $(BUILD_DIR)/scale_mesh_base3d.o $(BUILD_DIR)/scale_meshfield_base.o $(BUILD_DIR)/scale_polynominal.o $(BUILD_DIR)/scale_sparsemat.o
$(BUILD_DIR)/scale_atm_phy_mp_dgm_common.o: microphysics/scale_atm_phy_mp_dgm_common.F90 $(DEPENDLIB) $(BUILD_DIR)/scale_element_base.o $(BUILD_DIR)/scale_localmesh_3d.o $(BUILD_DIR)/scale_localmeshfield_base.o $(BUILD_DIR)/scale_mesh_base3d.o $(BUILD_DIR)/scale_polynominal.o $(BUILD_DIR)/scale_sparsemat.o
$(BUILD_DIR)/scale_atm_phy_tb_dgm_common.o: turbulence/scale_atm_phy_tb_dgm_common.F90 $(DEPENDLIB) $(BUILD_DIR)/scale_element_base.o $(BUILD_DIR)/scale_localmesh_2d.o $(BUILD_DIR)/scale_localmesh_3d.o $(BUILD_DIR)/scale_model_var_manager.o
$(BUILD_DIR)/scale_atm_phy_tb_dgm_driver.o: turbulence/scale_atm_phy_tb_dgm_driver.F90 $(DEPENDLIB) $(BUILD_DIR)/scale_atm_dyn_dgm_bnd.o $(BUILD_DIR)/scale_atm_dyn_dgm_nonhydro3d_common.o $(BUILD_DIR)/scale_atm_phy_tb_dgm_common.o $(BUILD_DIR)/scale_atm_phy_tb_dgm_globalsmg.o $(BUILD_DIR)/scale_atm_phy_tb_dgm_smg.o $(BUILD_DIR)/scale_element_base.o $(BUILD_DIR)/scale_element_hexahedral.o $(BUILD_DIR)/scale_localmesh_2d.o $(BUILD_DIR)/scale_localmesh_3d.o $(BUILD_DIR)/scale_localmesh_base.o $(BUILD_DIR)/scale_mesh_base3d.o $(BUILD_DIR)/scale_mesh_cubedspheredom3d.o $(BUILD_DIR)/scale_meshfield_base.o $(BUILD_DIR)/scale_model_mesh_manager.o $(BUILD_DIR)/scale_model_var_manager.o $(BUILD_DIR)/scale_sparsemat.o
$(BUILD_DIR)/scale_atm_phy_tb_dgm_common.o: turbulence/scale_atm_phy_tb_dgm_common.F90 $(DEPENDLIB) $(BUILD_DIR)/scale_element_base.o $(BUILD_DIR)/scale_localmesh_2d.o $(BUILD_DIR)/scale_localmesh_3d.o $(BUILD_DIR)/scale_model_var_manager.o $(BUILD_DIR)/scale_sparsemat.o
$(BUILD_DIR)/scale_atm_phy_tb_dgm_dns.o: turbulence/scale_atm_phy_tb_dgm_dns.F90 $(DEPENDLIB) $(BUILD_DIR)/scale_element_base.o $(BUILD_DIR)/scale_element_hexahedral.o $(BUILD_DIR)/scale_localmesh_2d.o $(BUILD_DIR)/scale_localmesh_3d.o $(BUILD_DIR)/scale_localmeshfield_base.o $(BUILD_DIR)/scale_mesh_base3d.o $(BUILD_DIR)/scale_meshfield_base.o $(BUILD_DIR)/scale_sparsemat.o
$(BUILD_DIR)/scale_atm_phy_tb_dgm_driver.o: turbulence/scale_atm_phy_tb_dgm_driver.F90 $(DEPENDLIB) $(BUILD_DIR)/scale_atm_dyn_dgm_bnd.o $(BUILD_DIR)/scale_atm_dyn_dgm_nonhydro3d_common.o $(BUILD_DIR)/scale_atm_phy_tb_dgm_common.o $(BUILD_DIR)/scale_atm_phy_tb_dgm_dns.o $(BUILD_DIR)/scale_atm_phy_tb_dgm_globalsmg.o $(BUILD_DIR)/scale_atm_phy_tb_dgm_smg.o $(BUILD_DIR)/scale_element_base.o $(BUILD_DIR)/scale_element_hexahedral.o $(BUILD_DIR)/scale_localmesh_2d.o $(BUILD_DIR)/scale_localmesh_3d.o $(BUILD_DIR)/scale_localmesh_base.o $(BUILD_DIR)/scale_mesh_base3d.o $(BUILD_DIR)/scale_mesh_cubedspheredom3d.o $(BUILD_DIR)/scale_meshfield_base.o $(BUILD_DIR)/scale_model_mesh_manager.o $(BUILD_DIR)/scale_model_var_manager.o $(BUILD_DIR)/scale_sparsemat.o
$(BUILD_DIR)/scale_atm_phy_tb_dgm_globalsmg.o: turbulence/scale_atm_phy_tb_dgm_globalsmg.F90 $(DEPENDLIB) $(BUILD_DIR)/scale_atm_phy_tb_dgm_common.o $(BUILD_DIR)/scale_cubedsphere_coord_cnv.o $(BUILD_DIR)/scale_element_base.o $(BUILD_DIR)/scale_element_hexahedral.o $(BUILD_DIR)/scale_localmesh_2d.o $(BUILD_DIR)/scale_localmesh_3d.o $(BUILD_DIR)/scale_localmeshfield_base.o $(BUILD_DIR)/scale_mesh_base3d.o $(BUILD_DIR)/scale_meshfield_base.o $(BUILD_DIR)/scale_sparsemat.o
$(BUILD_DIR)/scale_atm_phy_tb_dgm_smg.o: turbulence/scale_atm_phy_tb_dgm_smg.F90 $(DEPENDLIB) $(BUILD_DIR)/scale_atm_phy_tb_dgm_common.o $(BUILD_DIR)/scale_element_base.o $(BUILD_DIR)/scale_element_hexahedral.o $(BUILD_DIR)/scale_localmesh_2d.o $(BUILD_DIR)/scale_localmesh_3d.o $(BUILD_DIR)/scale_localmeshfield_base.o $(BUILD_DIR)/scale_mesh_base3d.o $(BUILD_DIR)/scale_meshfield_base.o $(BUILD_DIR)/scale_sparsemat.o
$(BUILD_DIR)/scale_coriolis_param.o: common/scale_coriolis_param.F90 $(DEPENDLIB)
Expand Down Expand Up @@ -126,6 +127,7 @@ MODS = \
$(BUILD_DIR)/scale_atm_dyn_dgm_trcadvect3d_heve.mod \
$(BUILD_DIR)/scale_atm_phy_mp_dgm_common.mod \
$(BUILD_DIR)/scale_atm_phy_tb_dgm_common.mod \
$(BUILD_DIR)/scale_atm_phy_tb_dgm_dns.mod \
$(BUILD_DIR)/scale_atm_phy_tb_dgm_driver.mod \
$(BUILD_DIR)/scale_atm_phy_tb_dgm_globalsmg.mod \
$(BUILD_DIR)/scale_atm_phy_tb_dgm_smg.mod \
Expand Down
10 changes: 5 additions & 5 deletions FElib/src/file/scale_file_common_meshfield.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module scale_file_common_meshfield
MeshBase3D_DIMTYPEID_ZT, &
MeshBase3D_DIMTYPEID_XY, MeshBase3D_DIMTYPEID_XYT, &
MeshBase3D_DIMTYPEID_XYZ, MeshBase3D_DIMTYPEID_XYZT, &
MeshBase3D_DIMTYPE_NUM
MESHBASE3D_DIMTYPE_NUM

use scale_mesh_rectdom2d, only: MeshRectDom2D
use scale_mesh_cubedom3d, only: MeshCubeDom3D
Expand Down Expand Up @@ -851,7 +851,7 @@ subroutine File_common_meshfield_get_dims3D( mesh3D, dimsinfo )
implicit none

class(MeshCubeDom3D), target, intent(in) :: mesh3D
type(FILE_common_meshfield_diminfo), intent(out) :: dimsinfo(MeshBase3D_DIMTYPE_NUM)
type(FILE_common_meshfield_diminfo), intent(out) :: dimsinfo(MESHBASE3D_DIMTYPE_NUM)

type(LocalMesh3D), pointer :: lcmesh
integer :: i, j, k, n
Expand Down Expand Up @@ -929,7 +929,7 @@ subroutine File_common_meshfield_get_dims3D_cubedsphere( mesh3D, dimsinfo )
implicit none

class(MeshCubedSphereDom3D), target, intent(in) :: mesh3D
type(FILE_common_meshfield_diminfo), intent(out) :: dimsinfo(MeshBase3D_DIMTYPE_NUM)
type(FILE_common_meshfield_diminfo), intent(out) :: dimsinfo(MESHBASE3D_DIMTYPE_NUM)

type(LocalMesh3D), pointer :: lcmesh
integer :: i, j, k, n
Expand Down Expand Up @@ -1011,7 +1011,7 @@ subroutine File_common_meshfield_get_axis3D( mesh3D, dimsinfo, x, y, z, &
implicit none

class(MeshCubeDom3D), target, intent(in) :: mesh3D
type(FILE_common_meshfield_diminfo), intent(in) :: dimsinfo(MeshBase3D_DIMTYPE_NUM)
type(FILE_common_meshfield_diminfo), intent(in) :: dimsinfo(MESHBASE3D_DIMTYPE_NUM)
real(DP), intent(out) :: x(dimsinfo(MeshBase3D_DIMTYPEID_X)%size)
real(DP), intent(out) :: y(dimsinfo(MeshBase3D_DIMTYPEID_Y)%size)
real(DP), intent(out) :: z(dimsinfo(MeshBase3D_DIMTYPEID_Z)%size)
Expand Down Expand Up @@ -1089,7 +1089,7 @@ subroutine File_common_meshfield_get_axis3D_cubedsphere( mesh3D, dimsinfo, x, y,
implicit none

class(MeshCubedSphereDom3D), target, intent(in) :: mesh3D
type(FILE_common_meshfield_diminfo), intent(in) :: dimsinfo(MeshBase3D_DIMTYPE_NUM)
type(FILE_common_meshfield_diminfo), intent(in) :: dimsinfo(MESHBASE3D_DIMTYPE_NUM)
real(DP), intent(out) :: x(dimsinfo(MeshBase3D_DIMTYPEID_X)%size)
real(DP), intent(out) :: y(dimsinfo(MeshBase3D_DIMTYPEID_Y)%size)
real(DP), intent(out) :: z(dimsinfo(MeshBase3D_DIMTYPEID_Z)%size)
Expand Down
16 changes: 13 additions & 3 deletions FElib/src/mesh/scale_localmesh_1d.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
!-------------------------------------------------------------------------------
!> module FElib / Mesh / Local 1D
!!
!! @par Description
!! Module to mangage 1D local mesh for element-based methods
!!
!! @author Yuta Kawai, Team SCALE
!<
#include "scaleFElib.h"
module scale_localmesh_1d

Expand All @@ -8,7 +16,7 @@ module scale_localmesh_1d
use scale_precision
use scale_localmesh_base, only: &
LocalMeshBase, LocalMeshBase_Init, LocalMeshBase_Final
use scale_element_base, only: elementbase, elementbase1D
use scale_element_base, only: ElementBase, ElementBase1D

!-----------------------------------------------------------------------------
implicit none
Expand All @@ -20,7 +28,7 @@ module scale_localmesh_1d
!
type, extends(LocalMeshBase), public :: LocalMesh1D

type(elementbase1D), pointer :: refElem1D
type(ElementBase1D), pointer :: refElem1D
real(RP) :: xmin, xmax
end type LocalMesh1D

Expand All @@ -42,14 +50,15 @@ module scale_localmesh_1d
!

contains
!OCL SERIAL
subroutine LocalMesh1D_Init( this, &
lcdomID, refElem, myrank )

implicit none

type(LocalMesh1D), intent(inout) :: this
integer, intent(in) :: lcdomID
class(elementbase1D), intent(in), target :: refElem
class(ElementBase1D), intent(in), target :: refElem
integer, intent(in), optional :: myrank
!-------------------------------------------------

Expand All @@ -59,6 +68,7 @@ subroutine LocalMesh1D_Init( this, &
return
end subroutine LocalMesh1D_Init

!OCL SERIAL
subroutine LocalMesh1D_Final( this, is_generated )
implicit none

Expand Down
12 changes: 11 additions & 1 deletion FElib/src/mesh/scale_localmesh_2d.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
!-------------------------------------------------------------------------------
!> module FElib / Mesh / Local 2D
!!
!! @par Description
!! Module to mangage 2D local mesh for element-based methods
!!
!! @author Yuta Kawai, Team SCALE
!<
#include "scaleFElib.h"
module scale_localmesh_2d

Expand All @@ -8,7 +16,7 @@ module scale_localmesh_2d
use scale_precision
use scale_localmesh_base, only: &
LocalMeshBase, LocalMeshBase_Init, LocalMeshBase_Final
use scale_element_base, only: elementbase, elementbase2D
use scale_element_base, only: ElementBase, ElementBase2D

!-----------------------------------------------------------------------------
implicit none
Expand Down Expand Up @@ -47,6 +55,7 @@ module scale_localmesh_2d
!

contains
!OCL SERIAL
subroutine LocalMesh2D_Init( this, &
lcdomID, refElem, myrank )

Expand All @@ -64,6 +73,7 @@ subroutine LocalMesh2D_Init( this, &
return
end subroutine LocalMesh2D_Init

!OCL SERIAL
subroutine LocalMesh2D_Final( this, is_generated )
implicit none
type(LocalMesh2D), intent(inout) :: this
Expand Down
14 changes: 12 additions & 2 deletions FElib/src/mesh/scale_localmesh_3d.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
!-------------------------------------------------------------------------------
!> module FElib / Mesh / Local 3D
!!
!! @par Description
!! Module to mangage 3D local mesh for element-based methods
!!
!! @author Yuta Kawai, Team SCALE
!<
#include "scaleFElib.h"
module scale_localmesh_3d

Expand All @@ -9,7 +17,7 @@ module scale_localmesh_3d
use scale_localmesh_base, only: &
LocalMeshBase, LocalMeshBase_Init, LocalMeshBase_Final
use scale_localmesh_2d, only: LocalMesh2D
use scale_element_base, only: elementbase, elementbase3D
use scale_element_base, only: ElementBase, ElementBase3D

!-----------------------------------------------------------------------------
implicit none
Expand Down Expand Up @@ -65,7 +73,7 @@ module scale_localmesh_3d
!

contains

!OCL SERIAL
subroutine LocalMesh3D_Init( this, &
lcdomID, refElem, myrank )
implicit none
Expand All @@ -84,6 +92,7 @@ subroutine LocalMesh3D_Init( this, &
return
end subroutine LocalMesh3D_Init

!OCL SERIAL
subroutine LocalMesh3D_Final( this, is_generated )
implicit none
type(LocalMesh3D), intent(inout) :: this
Expand All @@ -103,6 +112,7 @@ subroutine LocalMesh3D_Final( this, is_generated )
return
end subroutine LocalMesh3D_Final

!OCL SERIAL
subroutine LocalMesh3D_setLocalMesh2D( this, lcmesh2D )
implicit none
class(LocalMesh3D), intent(inout) :: this
Expand Down
10 changes: 9 additions & 1 deletion FElib/src/mesh/scale_localmesh_base.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
!-------------------------------------------------------------------------------
!> module FElib / Mesh / Local, Base
!!
!! @par Description
!! Base module to mangage meshes for element-based methods
!!
!! @author Yuta Kawai, Team SCALE
!<
#include "scaleFElib.h"
module scale_localmesh_base

Expand All @@ -8,7 +16,7 @@ module scale_localmesh_base
use scale_precision
use scale_io

use scale_element_base, only: elementbase
use scale_element_base, only: ElementBase

!-----------------------------------------------------------------------------
implicit none
Expand Down
15 changes: 13 additions & 2 deletions FElib/src/mesh/scale_mesh_base.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
!-------------------------------------------------------------------------------
!> module FElib / Mesh / Base
!!
!! @par Description
!! Base module to mangage meshes for element-based methods
!!
!! @author Yuta Kawai, Team SCALE
!<
#include "scaleFElib.h"
module scale_mesh_base

Expand Down Expand Up @@ -78,6 +86,7 @@ end subroutine MeshBase_get_localmesh
!

contains
!OCL SERIAL
subroutine MeshBase_Init( this, &
ndimtype, refElem, NLocalMeshPerPrc, NsideTile, &
nprocs )
Expand Down Expand Up @@ -119,6 +128,7 @@ subroutine MeshBase_Init( this, &
return
end subroutine MeshBase_Init

!OCL SERIAL
subroutine MeshBase_Final( this )
implicit none
class(MeshBase), intent(inout) :: this
Expand All @@ -136,13 +146,14 @@ subroutine MeshBase_Final( this )
return
end subroutine MeshBase_Final

!OCL SERIAL
subroutine MeshBase_setGeometricInfo( mesh, ndim )
implicit none

class(LocalMeshBase), intent(inout) :: mesh
integer, intent(in) :: ndim

class(elementbase), pointer :: refElem
class(ElementBase), pointer :: refElem
!-----------------------------------------------------------------------------

refElem => mesh%refElem
Expand All @@ -162,7 +173,7 @@ subroutine MeshBase_setGeometricInfo( mesh, ndim )
return
end subroutine MeshBase_setGeometricInfo


!OCL SERIAL
subroutine MeshBase_SetDimInfo( this, &
dimID, name, unit, desc, positive_down )
implicit none
Expand Down
Loading

0 comments on commit 2a340e0

Please sign in to comment.