70 CHARACTER(CHRLEN) :: ifilename,sectionstring,rcsidentstring
71 INTEGER :: errorflag,icont,ifile,ifl,imass,ipatch,ivar,
j,ncont,nvars
72 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv
73 TYPE(t_grid),
POINTER :: pgrid
75 TYPE(t_patch),
POINTER :: ppatch
76 TYPE(t_plag),
POINTER :: pplag
83 TYPE(t_region
),
POINTER :: pregion
90 '$RCSfile: PLAG_RFLU_WriteSolutionBinary.F90,v $ $Revision: 1.6 $'
92 global => pregion%global
95 'PLAG_RFLU_WriteSolutionBinary.F90')
97 IF ( global%myProcid == masterproc .AND. &
98 global%verbLevel > verbose_none )
THEN
99 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing binary particle file...'
103 pregion%iRegionGlobal,global%currentTime, &
107 OPEN(ifile,file=ifilename,
form=
"UNFORMATTED",
status=
"UNKNOWN",&
109 global%error = errorflag
110 IF ( global%error /= err_none )
THEN
111 CALL
errorstop(global,err_file_open,__line__,ifilename)
118 IF ( global%myProcid == masterproc .AND. &
119 global%verbLevel > verbose_low )
THEN
120 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
123 sectionstring =
'# ROCFLU particle file'
124 WRITE(ifile) sectionstring
126 sectionstring =
'# Precision and range'
127 WRITE(ifile) sectionstring
128 WRITE(ifile)
precision(1.0_rfreal),range(1.0_rfreal)
130 sectionstring =
'# Physical time'
131 WRITE(ifile) sectionstring
132 WRITE(ifile) global%currentTime
138 pgrid => pregion%grid
139 pplag => pregion%plag
141 ncont = pregion%plagInput%nCont
145 sectionstring =
'# Dimensions'
146 WRITE(ifile) sectionstring
147 WRITE(ifile) pplag%nPcls,nvars
153 IF ( global%myProcid == masterproc .AND. &
154 global%verbLevel > verbose_low )
THEN
155 WRITE(stdout,
'(A,3X,A)') solver_name,
'Conserved variables...'
158 sectionstring =
'# Particle x-momentum'
159 WRITE(ifile) sectionstring
160 WRITE(ifile) (pplag%cv(cv_plag_xmom,
j),
j=1,pplag%nPcls)
162 sectionstring =
'# Particle y-momentum'
163 WRITE(ifile) sectionstring
164 WRITE(ifile) (pplag%cv(cv_plag_ymom,
j),
j=1,pplag%nPcls)
166 sectionstring =
'# Particle z-momentum'
167 WRITE(ifile) sectionstring
168 WRITE(ifile) (pplag%cv(cv_plag_zmom,
j),
j=1,pplag%nPcls)
170 sectionstring =
'# Particle energy'
171 WRITE(ifile) sectionstring
172 WRITE(ifile) (pplag%cv(cv_plag_ener,
j),
j=1,pplag%nPcls)
174 sectionstring =
'# Particle x-location'
175 WRITE(ifile) sectionstring
176 WRITE(ifile) (pplag%cv(cv_plag_xpos,
j),
j=1,pplag%nPcls)
178 sectionstring =
'# Particle y-location'
179 WRITE(ifile) sectionstring
180 WRITE(ifile) (pplag%cv(cv_plag_ypos,
j),
j=1,pplag%nPcls)
182 sectionstring =
'# Particle z-location'
183 WRITE(ifile) sectionstring
184 WRITE(ifile) (pplag%cv(cv_plag_zpos,
j),
j=1,pplag%nPcls)
186 sectionstring =
'# Particle vapor energy'
187 WRITE(ifile) sectionstring
188 WRITE(ifile) (pplag%cv(cv_plag_enervapor,
j),
j=1,pplag%nPcls)
190 DO icont = 1,pregion%plagInput%nCont
191 imass = pplag%cvPlagMass(icont)
193 sectionstring =
'# Particle mass'
194 WRITE(ifile) sectionstring
195 WRITE(ifile) (pplag%cv(imass,
j),
j=1,pplag%nPcls)
202 IF ( global%myProcid == masterproc .AND. &
203 global%verbLevel > verbose_low )
THEN
204 WRITE(stdout,
'(A,3X,A)') solver_name,
'Additional variables...'
207 sectionstring =
'# Particle superloading'
208 WRITE(ifile) sectionstring
209 WRITE(ifile) (pplag%arv(arv_plag_spload,
j),
j=1,pplag%nPcls)
211 sectionstring =
'# Particle initial identifier'
212 WRITE(ifile) sectionstring
213 WRITE(ifile) (pplag%aiv(aiv_plag_pidini,
j),
j=1,pplag%nPcls)
215 sectionstring =
'# Particle initial region'
216 WRITE(ifile) sectionstring
217 WRITE(ifile) (pplag%aiv(aiv_plag_regini,
j),
j=1,pplag%nPcls)
219 sectionstring =
'# Particle cell'
220 WRITE(ifile) sectionstring
221 WRITE(ifile) (pplag%aiv(aiv_plag_icells,
j),
j=1,pplag%nPcls)
227 IF ( global%myProcid == masterproc .AND. &
228 global%verbLevel > verbose_low )
THEN
229 WRITE(stdout,
'(A,3X,A)') solver_name,
'Patch data...'
232 sectionstring =
'# Patch data'
233 WRITE(ifile) sectionstring
235 DO ipatch = 1,pgrid%nPatches
236 ppatch => pregion%patches(ipatch)
238 IF ( (ppatch%bcType >= bc_injection .AND. ppatch%bcType <= bc_injection + bc_range) .OR. &
239 (ppatch%bcType >= bc_inflow .AND. ppatch%bcType <= bc_inflow + bc_range) )
THEN
240 ptileplag => ppatch%tilePlag
242 DO ifl = 1,ppatch%nBFaces
243 WRITE(ifile) ptileplag%cv(cv_tile_momnrm,ifl), &
244 ptileplag%cv(cv_tile_ener ,ifl)
248 imass = ptileplag%cvTileMass(icont)
249 WRITE(ifile) (ptileplag%cv(imass,ifl), &
250 ifl=1,ppatch%nBFaces)
253 DO ifl = 1,ppatch%nBFaces
254 WRITE(ifile) ptileplag%dv(dv_tile_countdown,ifl), &
255 ptileplag%dv(dv_tile_diam ,ifl), &
256 ptileplag%dv(dv_tile_spload ,ifl)
265 IF ( global%myProcid == masterproc .AND. &
266 global%verbLevel > verbose_low )
THEN
267 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
270 sectionstring =
'# End'
271 WRITE(ifile) sectionstring
277 CLOSE(ifile,iostat=errorflag)
278 global%error = errorflag
279 IF ( global%error /= err_none )
THEN
280 CALL
errorstop(global,err_file_close,__line__,ifilename)
283 IF ( global%myProcid == masterproc .AND. &
284 global%verbLevel > verbose_none )
THEN
285 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing binary particle file done.'
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE form
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
subroutine plag_rflu_writesolutionbinary(pRegion)
subroutine buildfilenameunsteady(global, dest, ext, id, tm, fileName)