⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basefield.f90

📁 国外大名顶顶的“台风”并行计算流体力学CFD软件的早期版本的源代码
💻 F90
字号:
!------------------------------------------------------------------------------!! MODULE : BASEFIELD                       Auteur : J. Gressier!                                         Date   : Octobre 2002! Fonction                                Modif  : (cf historique)!   Bibliotheque de procedures et fonctions pour la gestion des champs!   des differents solveurs!! Defauts/Limitations/Divers :! Historique :!!------------------------------------------------------------------------------!module BASEFIELDuse TYPHMAKE     ! Definition de la precision!use OUTPUTuse GEO3D        ! use TENSOR3      ! implicit none! -- Variables globales du module -------------------------------------------integer, parameter :: nghostcell = 1! -- DECLARATIONS -----------------------------------------------------------!------------------------------------------------------------------------------!! Definition de la structure ST_SCAFIELD : Champ physique de scalaire!------------------------------------------------------------------------------!type st_scafield  integer :: dim                            ! nombre de cellules  real(krp), dimension(:), pointer :: scal  ! champ du scalaireendtype!------------------------------------------------------------------------------!! Definition de la structure ST_VECFIELD : Champ physique de vecteurs!------------------------------------------------------------------------------!type st_vecfield  integer :: dim                            ! nombre de cellules  type(v3d), dimension(:), pointer :: vect  ! champ du vecteurendtype!------------------------------------------------------------------------------!! Definition de la structure ST_TENFIELD : Champ physique de tenseurs!------------------------------------------------------------------------------!type st_tenfield  integer :: dim                            ! nombre de cellules  type(t3d), dimension(:), pointer :: tens  ! champ du vecteurendtype! -- INTERFACES -------------------------------------------------------------interface new  module procedure new_scafield, new_vecfield, new_tenfieldendinterfaceinterface delete  module procedure delete_scafield, delete_vecfield, delete_tenfieldendinterface! -- Fonctions et Operateurs ------------------------------------------------! -- IMPLEMENTATION ---------------------------------------------------------contains!------------------------------------------------------------------------------!! Procedure : allocation d'une structure SCAFIELD!------------------------------------------------------------------------------!subroutine new_scafield(scafield, dim)implicit nonetype(st_scafield) :: scafield          ! champ a creerinteger           :: dim               ! dimension  scafield%dim = dim  if (scafield%dim > 0) then  allocate(scafield%scal(scafield%dim))  endifendsubroutine new_scafield!------------------------------------------------------------------------------!! Procedure : deallocation d'une structure SCAFIELD!------------------------------------------------------------------------------!subroutine delete_scafield(scafield)implicit nonetype(st_scafield) :: scafield       deallocate(scafield%scal)endsubroutine delete_scafield!------------------------------------------------------------------------------!! Procedure : allocation d'une structure VECFIELD!------------------------------------------------------------------------------!subroutine new_vecfield(vecfield, dim)implicit nonetype(st_vecfield) :: vecfield          ! champ a creerinteger           :: dim               ! dimension  vecfield%dim = dim  if (vecfield%dim > 0) then    allocate(vecfield%vect(dim))  endifendsubroutine new_vecfield!------------------------------------------------------------------------------!! Procedure : deallocation d'une structure VECFIELD!------------------------------------------------------------------------------!subroutine delete_vecfield(vecfield)implicit nonetype(st_vecfield) :: vecfield          deallocate(vecfield%vect)endsubroutine delete_vecfield!------------------------------------------------------------------------------!! Procedure : allocation d'une structure TENFIELD!------------------------------------------------------------------------------!subroutine new_tenfield(tenfield, dim)implicit nonetype(st_tenfield) :: tenfield          ! champ a creerinteger           :: dim               ! dimension  tenfield%dim = dim  if (tenfield%dim > 0) then    allocate(tenfield%tens(dim))  endifendsubroutine new_tenfield!------------------------------------------------------------------------------!! Procedure : deallocation d'une structure TENFIELD!------------------------------------------------------------------------------!subroutine delete_tenfield(tenfield)implicit nonetype(st_tenfield) :: tenfield          deallocate(tenfield%tens)endsubroutine delete_tenfieldendmodule BASEFIELD!------------------------------------------------------------------------------!! Historique des modifications!! oct  2002 : creation du module! juin 2003 : structuration des champs par type (scalaire, vecteur...)! DEV: interface champ/tableau! DEV: decoupage en MGFIELD et MZFIELD pour fonctions haut et bas niveau! juin 2004 : procedures insert_newgfield et delete_chainedgfield! nov  2004 : split GENFIELD -> GENFIELD / BASEFIELD!------------------------------------------------------------------------------!

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -