64 CHARACTER(CHRLEN) :: &
65 RCSIdentString =
'$RCSfile: RFLU_ModSTL.F90,v $ $Revision: 1.4 $'
110 TYPE(t_region
),
POINTER :: pregion
116 LOGICAL :: writepatchflag
117 CHARACTER(1) :: writepatchchar
118 CHARACTER(CHRLEN) :: ifilename
119 INTEGER :: errorflag,ifl,ifile,ipatch,ivg,ivl,ivl2
120 TYPE(t_grid),
POINTER :: pgrid
122 TYPE(t_patch),
POINTER :: ppatch
128 global => pregion%global
133 IF ( global%verbLevel > verbose_none )
THEN
134 WRITE(stdout,
'(A,1X,A)') solver_name, &
135 'Writing surface grid in ASCII STL format...'
142 pgrid => pregion%grid
156 OPEN(ifile,file=ifilename,
form=
"FORMATTED",
status=
"UNKNOWN", &
158 global%error = errorflag
159 IF ( global%error /= err_none )
THEN
160 CALL
errorstop(global,err_file_open,__line__,ifilename)
167 WRITE(ifile,
'(A)')
'solid'
169 DO ipatch = 1,pgrid%nPatches
170 ppatch => pregion%patches(ipatch)
176 WRITE(stdout,
'(A,3X,A,1X,I2,1X,A)') solver_name,
'Write patch', &
177 ipatch,
'to STL file? (y/n)'
178 READ(stdin,
'(A)',iostat=errorflag) writepatchchar
180 IF ( errorflag == err_none )
THEN
181 IF ( writepatchchar ==
'y' )
THEN
182 writepatchflag = .true.
184 writepatchflag = .false.
187 writepatchflag = .false.
194 IF ( writepatchflag .EQV. .true. )
THEN
195 IF ( global%verbLevel > verbose_none )
THEN
196 WRITE(stdout,
'(A,5X,A,1X,I2,1X,A)') solver_name,
'Writing patch', &
197 ipatch,
'to STL file...'
202 DO ifl = 1,ppatch%nBTris
203 WRITE(ifile,
'(A,3(1X,E13.6))')
'facet normal', &
204 ppatch%fn(xcoord:zcoord,ifl)
205 WRITE(ifile,
'(A)')
'outer loop'
208 ivg = ppatch%bTri2v(ivl,ifl)
210 WRITE(ifile,
'(A,3(1X,E13.6))')
'vertex',pgrid%xyz(xcoord:zcoord,ivg)
213 WRITE(ifile,
'(A)')
'endloop'
214 WRITE(ifile,
'(A)')
'endfacet'
219 DO ifl = 1,ppatch%nBQuads
223 WRITE(ifile,
'(A,3(1X,E13.6))')
'facet normal', &
224 ppatch%fn(xcoord:zcoord,ifl)
225 WRITE(ifile,
'(A)')
'outer loop'
228 ivg = ppatch%bQuad2v(ivl,ifl)
230 WRITE(ifile,
'(A,3(1X,E13.6))')
'vertex',pgrid%xyz(xcoord:zcoord,ivg)
233 WRITE(ifile,
'(A)')
'endloop'
234 WRITE(ifile,
'(A)')
'endfacet'
238 WRITE(ifile,
'(A,3(1X,E13.6))')
'facet normal', &
239 ppatch%fn(xcoord:zcoord,ifl)
240 WRITE(ifile,
'(A)')
'outer loop'
249 ivg = ppatch%bQuad2v(ivl2,ifl)
251 WRITE(ifile,
'(A,3(1X,E13.6))')
'vertex',pgrid%xyz(xcoord:zcoord,ivg)
254 WRITE(ifile,
'(A)')
'endloop'
255 WRITE(ifile,
'(A)')
'endfacet'
258 IF ( global%verbLevel > verbose_none )
THEN
259 WRITE(stdout,
'(A,5X,A,1X,I2,1X,A)') solver_name,
'Writing patch', &
260 ipatch,
'to STL file done.'
265 WRITE(ifile,
'(A)')
'endsolid'
271 CLOSE(ifile,iostat=errorflag)
272 global%error = errorflag
273 IF ( global%myProcid == masterproc .AND. &
274 global%error /= err_none )
THEN
275 CALL
errorstop(global,err_file_close,__line__,ifilename)
282 IF ( global%verbLevel > verbose_none )
THEN
283 WRITE(stdout,
'(A,1X,A)') solver_name, &
284 'Writing surface grid in ASCII STL format done.'
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine buildfilenameplain(global, dest, ext, fileName)
**********************************************************************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, public rflu_stl_writesurfgridascii(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)