Skip to content
Snippets Groups Projects
Commit 57c4ac34 authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 08/10/2020: IO: add clessource in tbudgetdata type

parent c4f74a62
No related branches found
No related tags found
No related merge requests found
...@@ -48,6 +48,8 @@ subroutine Budget_store_init( tpbudget, hsource, pvars ) ...@@ -48,6 +48,8 @@ subroutine Budget_store_init( tpbudget, hsource, pvars )
allocate( tpbudget%xtmplesstore( Size( pvars, 1 ), Size( pvars, 2 ), Size ( pvars, 3 ) ) ) allocate( tpbudget%xtmplesstore( Size( pvars, 1 ), Size( pvars, 2 ), Size ( pvars, 3 ) ) )
end if end if
tpbudget%xtmplesstore(:, :, :) = pvars(:, :, :) tpbudget%xtmplesstore(:, :, :) = pvars(:, :, :)
tpbudget%clessource = hsource
end if end if
! Nothing else to do if budgets are not enabled ! Nothing else to do if budgets are not enabled
...@@ -106,6 +108,12 @@ subroutine Budget_store_end( tpbudget, hsource, pvars ) ...@@ -106,6 +108,12 @@ subroutine Budget_store_end( tpbudget, hsource, pvars )
call Print_msg( NVERB_DEBUG, 'BUD', 'Budget_store_end', trim( tpbudget%cname )//':'//trim( hsource ) ) call Print_msg( NVERB_DEBUG, 'BUD', 'Budget_store_end', trim( tpbudget%cname )//':'//trim( hsource ) )
if ( lles_call ) then if ( lles_call ) then
if ( hsource /= tpbudget%clessource ) &
call Print_msg( NVERB_FATAL, 'BUD', 'Budget_store_end', 'hsource not the same as in Budget_store_init (' &
// Trim( hsource ) // ' / ' // Trim( tpbudget%clessource ) // ')' )
tpbudget%clessource = 'reset'
if ( allocated( tpbudget%xtmplesstore ) ) then if ( allocated( tpbudget%xtmplesstore ) ) then
! Do the call to Les_budget with oadd=.true. ! Do the call to Les_budget with oadd=.true.
! This is necessary when the call to Budget_store_init was done with pvars not strictly ! This is necessary when the call to Budget_store_init was done with pvars not strictly
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
! P. Wautelet 23/04/2020: add nid in tbudgetdata datatype ! P. Wautelet 23/04/2020: add nid in tbudgetdata datatype
! P. Wautelet 30/06/2020: add NNETURSV, NNEADVSV and NNECONSV variables ! P. Wautelet 30/06/2020: add NNETURSV, NNEADVSV and NNECONSV variables
! P. Wautelet 17/08/2020: add xtmplesstore in tbudgetdata datatype ! P. Wautelet 17/08/2020: add xtmplesstore in tbudgetdata datatype
! P. Wautelet 08/10/2020: add clessource in tbudgetdata datatype
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! !
!* 0. DECLARATIONS !* 0. DECLARATIONS
...@@ -88,6 +89,7 @@ integer :: nbudgets ! Number of budget categories ...@@ -88,6 +89,7 @@ integer :: nbudgets ! Number of budget categories
type tbudgetdata type tbudgetdata
character(len=NBUNAMELGTMAX) :: cname = '' character(len=NBUNAMELGTMAX) :: cname = ''
character(len=NCOMMENTLGTMAX) :: ccomment = '' character(len=NCOMMENTLGTMAX) :: ccomment = ''
character(len=100) :: clessource = '' ! Last source stored
integer :: nid = -1 !Identifier number (based on parameters NBUDGET_*) integer :: nid = -1 !Identifier number (based on parameters NBUDGET_*)
integer :: ngroups = 0 !Number of groups of source terms to store integer :: ngroups = 0 !Number of groups of source terms to store
integer :: nsources = 0 !Number of source terms integer :: nsources = 0 !Number of source terms
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment