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
89 rcsidentstring =
'$RCSfile: PLAG_RFLU_WriteSolutionASCII.F90,v $ $Revision: 1.8 $'
91 global => pregion%global
94 'PLAG_RFLU_WriteSolutionASCII.F90')
96 IF ( global%myProcid == masterproc .AND. &
97 global%verbLevel > verbose_none )
THEN
98 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing ASCII particle file...'
102 pregion%iRegionGlobal,global%currentTime, &
106 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"UNKNOWN",iostat=errorflag)
107 global%error = errorflag
108 IF ( global%error /= err_none )
THEN
109 CALL
errorstop(global,err_file_open,__line__,ifilename)
116 IF ( global%myProcid == masterproc .AND. &
117 global%verbLevel > verbose_low )
THEN
118 WRITE(stdout,
'(A,3X,A)') solver_name,
'Header information...'
121 sectionstring =
'# ROCFLU particle file'
122 WRITE(ifile,
'(A)') sectionstring
124 sectionstring =
'# Precision and range'
125 WRITE(ifile,
'(A)') sectionstring
126 WRITE(ifile,
'(2(I8))')
precision(1.0_rfreal),range(1.0_rfreal)
128 sectionstring =
'# Physical time'
129 WRITE(ifile,
'(A)') sectionstring
130 WRITE(ifile,
'(E23.16)') global%currentTime
136 pgrid => pregion%grid
137 pplag => pregion%plag
139 ncont = pregion%plagInput%nCont
143 sectionstring =
'# Dimensions'
144 WRITE(ifile,
'(A)') sectionstring
145 WRITE(ifile,
'(2(I8))') pplag%nPcls,nvars
151 IF ( global%myProcid == masterproc .AND. &
152 global%verbLevel > verbose_low )
THEN
153 WRITE(stdout,
'(A,3X,A)') solver_name,
'Conserved variables...'
156 sectionstring =
'# Particle x-momentum'
157 WRITE(ifile,
'(A)') sectionstring
158 WRITE(ifile,
'(5(E23.16))') (pplag%cv(cv_plag_xmom,
j),
j=1,pplag%nPcls)
160 sectionstring =
'# Particle y-momentum'
161 WRITE(ifile,
'(A)') sectionstring
162 WRITE(ifile,
'(5(E23.16))') (pplag%cv(cv_plag_ymom,
j),
j=1,pplag%nPcls)
164 sectionstring =
'# Particle z-momentum'
165 WRITE(ifile,
'(A)') sectionstring
166 WRITE(ifile,
'(5(E23.16))') (pplag%cv(cv_plag_zmom,
j),
j=1,pplag%nPcls)
168 sectionstring =
'# Particle energy'
169 WRITE(ifile,
'(A)') sectionstring
170 WRITE(ifile,
'(5(E23.16))') (pplag%cv(cv_plag_ener,
j),
j=1,pplag%nPcls)
172 sectionstring =
'# Particle x-location'
173 WRITE(ifile,
'(A)') sectionstring
174 WRITE(ifile,
'(5(E23.16))') (pplag%cv(cv_plag_xpos,
j),
j=1,pplag%nPcls)
176 sectionstring =
'# Particle y-location'
177 WRITE(ifile,
'(A)') sectionstring
178 WRITE(ifile,
'(5(E23.16))') (pplag%cv(cv_plag_ypos,
j),
j=1,pplag%nPcls)
180 sectionstring =
'# Particle z-location'
181 WRITE(ifile,
'(A)') sectionstring
182 WRITE(ifile,
'(5(E23.16))') (pplag%cv(cv_plag_zpos,
j),
j=1,pplag%nPcls)
184 sectionstring =
'# Particle vapor energy'
185 WRITE(ifile,
'(A)') sectionstring
186 WRITE(ifile,
'(5(E23.16))') (pplag%cv(cv_plag_enervapor,
j),
j=1,pplag%nPcls)
188 DO icont = 1,pregion%plagInput%nCont
189 imass = pplag%cvPlagMass(icont)
191 sectionstring =
'# Particle mass'
192 WRITE(ifile,
'(A)') sectionstring
193 WRITE(ifile,
'(5(E23.16))') (pplag%cv(imass,
j),
j=1,pplag%nPcls)
200 IF ( global%myProcid == masterproc .AND. &
201 global%verbLevel > verbose_low )
THEN
202 WRITE(stdout,
'(A,3X,A)') solver_name,
'Additional variables...'
205 sectionstring =
'# Particle superloading'
206 WRITE(ifile,
'(A)') sectionstring
207 WRITE(ifile,
'(5(E23.16))') (pplag%arv(arv_plag_spload,
j),
j=1,pplag%nPcls)
209 sectionstring =
'# Particle initial identifier'
210 WRITE(ifile,
'(A)') sectionstring
211 WRITE(ifile,
'(5(I8))') (pplag%aiv(aiv_plag_pidini,
j),
j=1,pplag%nPcls)
213 sectionstring =
'# Particle initial region'
214 WRITE(ifile,
'(A)') sectionstring
215 WRITE(ifile,
'(5(I8))') (pplag%aiv(aiv_plag_regini,
j),
j=1,pplag%nPcls)
217 sectionstring =
'# Particle cell'
218 WRITE(ifile,
'(A)') sectionstring
219 WRITE(ifile,
'(5(I8))') (pplag%aiv(aiv_plag_icells,
j),
j=1,pplag%nPcls)
225 IF ( global%myProcid == masterproc .AND. &
226 global%verbLevel > verbose_low )
THEN
227 WRITE(stdout,
'(A,3X,A)') solver_name,
'Patch data...'
230 sectionstring =
'# Patch data'
231 WRITE(ifile,
'(A)') sectionstring
233 DO ipatch = 1,pgrid%nPatches
234 ppatch => pregion%patches(ipatch)
236 IF ( (ppatch%bcType >= bc_injection .AND. ppatch%bcType <= bc_injection + bc_range) .OR. &
237 (ppatch%bcType >= bc_inflow .AND. ppatch%bcType <= bc_inflow + bc_range) )
THEN
238 ptileplag => ppatch%tilePlag
240 DO ifl = 1,ppatch%nBFaces
241 WRITE(ifile,
'(2(E23.16))') ptileplag%cv(cv_tile_momnrm,ifl), &
242 ptileplag%cv(cv_tile_ener ,ifl)
246 imass = ptileplag%cvTileMass(icont)
247 WRITE(ifile,
'(5(E23.16))') (ptileplag%cv(imass,ifl), &
248 ifl=1,ppatch%nBFaces)
251 DO ifl = 1,ppatch%nBFaces
252 WRITE(ifile,
'(3(E23.16))') ptileplag%dv(dv_tile_countdown,ifl), &
253 ptileplag%dv(dv_tile_diam ,ifl), &
254 ptileplag%dv(dv_tile_spload ,ifl)
263 IF ( global%myProcid == masterproc .AND. &
264 global%verbLevel > verbose_low )
THEN
265 WRITE(stdout,
'(A,3X,A)') solver_name,
'End marker...'
268 sectionstring =
'# End'
269 WRITE(ifile,
'(A)') sectionstring
275 CLOSE(ifile,iostat=errorflag)
276 global%error = errorflag
277 IF ( global%error /= err_none )
THEN
278 CALL
errorstop(global,err_file_close,__line__,ifilename)
281 IF ( global%myProcid == masterproc .AND. &
282 global%verbLevel > verbose_none )
THEN
283 WRITE(stdout,
'(A,1X,A)') solver_name,
'Writing ASCII particle file done.'
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine plag_rflu_writesolutionascii(pRegion)
**********************************************************************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 buildfilenameunsteady(global, dest, ext, id, tm, fileName)