80 INTEGER :: iflag, ireg
81 TYPE(t_region
),
POINTER :: regions(:)
84 INTEGER :: ipatch,
i,
j,
k, ipatchsrc
91 INTEGER :: ilev, lbound, bctype, inoff, ijnoff, ijkn, ibn, ien, found(6)
94 INTEGER :: iaddb, jaddb, kaddb, iadde, jadde, kadde, madd
97 INTEGER :: ibegsrc, iendsrc, jbegsrc, jendsrc, kbegsrc, kendsrc
98 INTEGER :: is, js, ks, l1srcdir, l2srcdir, mapmat(3,4)
99 INTEGER :: h, iregsrc, ilevsrc, lbs, l1bs, l1es, l2bs, l2es
104 global => regions(1)%global
106 'TFLU_ConvertFlo2FluMesh.F90' )
113 ilev = regions(ireg)%currLevel
132 DO ipatch=1,regions(ireg)%nPatches
134 patch => regions(ireg)%levels(ilev)%patches(ipatch)
135 lbound =
patch%lbound
136 bctype =
patch%bcType
137 iregsrc =
patch%srcRegion
145 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .AND. &
147 IF (lbound==1) iaddb = 1
148 IF (lbound==2) iadde = -1
149 IF (lbound==3) jaddb = 1
150 IF (lbound==4) jadde = -1
151 IF (lbound==5) kaddb = 1
152 IF (lbound==6) kadde = -1
155 IF (found(1)<0) goto 666
157 ELSEIF (lbound==2)
THEN
158 IF (found(2)<0) goto 666
160 ELSEIF (lbound==3)
THEN
161 IF (found(3)<0) goto 666
163 ELSEIF (lbound==4)
THEN
164 IF (found(4)<0) goto 666
166 ELSEIF (lbound==5)
THEN
167 IF (found(5)<0) goto 666
169 ELSEIF (lbound==6)
THEN
170 IF (found(6)<0) goto 666
177 IF (found(1)>0) goto 666
179 ELSEIF (lbound==2)
THEN
180 IF (found(2)>0) goto 666
182 ELSEIF (lbound==3)
THEN
183 IF (found(3)>0) goto 666
185 ELSEIF (lbound==4)
THEN
186 IF (found(4)>0) goto 666
188 ELSEIF (lbound==5)
THEN
189 IF (found(5)>0) goto 666
191 ELSEIF (lbound==6)
THEN
192 IF (found(6)>0) goto 666
202 WRITE(stdout,*)
'ERROR: Region', ireg, &
203 ' has mixed conn./phys. bc on same block side'
216 global%tofluNVerts = global%tofluNVerts + 1
224 global%tofluNHexs = global%tofluNHexs + 1
232 DO ipatch=1,regions(ireg)%nPatches
233 patch => regions(ireg)%levels(ilev)%patches(ipatch)
234 bctype =
patch%bcType
236 IF (bctype<bc_regionconf .OR. bctype>bc_regionconf+bc_range)
THEN
238 global%tofluNPatches = global%tofluNPatches + 1
242 global%tofluNbfMax =
max( global%tofluNbfMax,dims(1)*dims(2) )
243 global%tofluNFaces = global%tofluNFaces + dims(1)*dims(2)
247 global%tofluNbnMax =
max( global%tofluNbnMax,dims(1)*dims(2) )
257 global%tofluNFaces = global%tofluNFaces + 1
266 global%tofluNFaces = global%tofluNFaces + 1
275 global%tofluNFaces = global%tofluNFaces + 1
284 global%tofluNEdges = global%tofluNEdges + 3
290 DO ipatch=1,regions(ireg)%nPatches
291 patch => regions(ireg)%levels(ilev)%patches(ipatch)
292 bctype =
patch%bcType
293 iregsrc =
patch%srcRegion
295 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) &
296 .AND. iregsrc < ireg)
THEN
300 global%tofluNFaces = global%tofluNFaces + dims(1)*dims(2)
304 global%tofluNEdges = global%tofluNEdges - dims(1)*dims(2)*3
313 grid => regions(ireg)%levels(ilev)%grid
315 ALLOCATE(
grid%xyz(3,ibn:ien),stat=errorflag )
316 global%error = errorflag
317 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
321 global%error = errorflag
322 IF (global%error /= 0) CALL
errorstop( global,err_deallocate,__line__ )
333 ijkn = indijk(
i,
j,
k,inoff,ijnoff)
335 global%tofluNVerts = global%tofluNVerts + 1
336 global%tofluXyz(1,global%tofluNVerts) =
grid%xyz(xcoord,ijkn)
337 global%tofluXyz(2,global%tofluNVerts) =
grid%xyz(ycoord,ijkn)
338 global%tofluXyz(3,global%tofluNVerts) =
grid%xyz(zcoord,ijkn)
339 grid%tofluLoc2g(
i,
j,
k) = global%tofluNVerts
345 IF (iflag == 0) goto 888
349 DO ipatch=1,regions(ireg)%nPatches
351 patch => regions(ireg)%levels(ilev)%patches(ipatch)
352 lbound =
patch%lbound
353 bctype =
patch%bcType
354 iregsrc =
patch%srcRegion
358 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf + bc_range) .AND. &
362 ilevsrc = regions(iregsrc)%currLevel
363 lbs =
patch%srcLbound
371 DO ipatchsrc=1,regions(iregsrc)%nPatches
372 patchsrc => regions(iregsrc)%levels(ilevsrc)%patches(ipatchsrc)
374 IF (patchsrc%bcType==bctype .AND. &
375 patchsrc%lbound==lbs .AND. &
376 patchsrc%l1beg ==l1bs .AND. &
377 patchsrc%l1end ==l1es .AND. &
378 patchsrc%l2beg ==l2bs .AND. &
379 patchsrc%l2end ==l2es)
THEN
380 patch%srcPatch = ipatchsrc
384 ipatchsrc =
patch%srcPatch
385 patchsrc => regions(iregsrc)%levels(ilevsrc)%patches(ipatchsrc)
386 gridsrc => regions(iregsrc)%levels(ilevsrc)%grid
393 ibegsrc,iendsrc,jbegsrc,jendsrc,kbegsrc,kendsrc )
398 IF (
patch%srcL1beg >
patch%srcL1end) l1srcdir = -1
400 IF (
patch%srcL2beg >
patch%srcL2end) l2srcdir = -1
405 ibegsrc,iendsrc,jbegsrc,jendsrc, &
406 kbegsrc,kendsrc,mapmat )
408 IF (lbs==1) mapmat(1,4) = mapmat(1,4)+1
409 IF (lbs==2) mapmat(1,4) = mapmat(1,4)-1
410 IF (lbs==3) mapmat(2,4) = mapmat(2,4)+1
411 IF (lbs==4) mapmat(2,4) = mapmat(2,4)-1
412 IF (lbs==5) mapmat(3,4) = mapmat(3,4)+1
413 IF (lbs==6) mapmat(3,4) = mapmat(3,4)-1
417 is =
i*mapmat(1,1)+
j*mapmat(1,2)+
k*mapmat(1,3)+mapmat(1,4)
418 js =
i*mapmat(2,1)+
j*mapmat(2,2)+
k*mapmat(2,3)+mapmat(2,4)
419 ks =
i*mapmat(3,1)+
j*mapmat(3,2)+
k*mapmat(3,3)+mapmat(3,4)
420 grid%tofluLoc2g(
i,
j,
k) = gridsrc%tofluLoc2g(is,js,ks)
433 global%tofluNHexs = global%tofluNHexs + 1
434 h = global%tofluNHexs
435 global%tofluHex2v(1,h) =
grid%tofluLoc2g(
i ,
j ,
k )
436 global%tofluHex2v(2,h) =
grid%tofluLoc2g(
i ,
j ,
k+1)
437 global%tofluHex2v(3,h) =
grid%tofluLoc2g(
i+1,
j ,
k+1)
438 global%tofluHex2v(4,h) =
grid%tofluLoc2g(
i+1,
j ,
k )
439 global%tofluHex2v(5,h) =
grid%tofluLoc2g(
i ,
j+1,
k )
440 global%tofluHex2v(6,h) =
grid%tofluLoc2g(
i ,
j+1,
k+1)
441 global%tofluHex2v(7,h) =
grid%tofluLoc2g(
i+1,
j+1,
k+1)
442 global%tofluHex2v(8,h) =
grid%tofluLoc2g(
i+1,
j+1,
k )
**********************************************************************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 ibeg
**********************************************************************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 jpnbeg
subroutine rflo_getpatchdirection(patch, idir, jdir, kdir)
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
**********************************************************************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 kpnbeg
subroutine registerfunction(global, funName, fileName)
subroutine rflo_getpatchindices(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
**********************************************************************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 jdnbeg
**********************************************************************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 jpnend
**********************************************************************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 idnend
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
**********************************************************************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 jdnend
subroutine rflo_readgridregion(iReg, regions)
**********************************************************************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 jdir
**********************************************************************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 idnbeg
**********************************************************************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 knode iend
subroutine rflo_getpatchindicesnodes(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
**********************************************************************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 ipnbeg
**********************************************************************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 idir
subroutine convertflo2flumesh(iFlag, iReg, regions)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
subroutine rflo_getdimensphysnodes(region, iLev, ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend)
**********************************************************************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 knode jend
**********************************************************************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 kdir
subroutine rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
subroutine errorstop(global, errorCode, errorLine, addMessage)
**********************************************************************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 knode jbeg
subroutine rflo_getpatchmapping(lb, lbs, l1SrcDir, l2SrcDir, align, idir, jdir, kdir, idirSrc, jdirSrc, kdirSrc, ibeg, iend, jbeg, jend, kbeg, kend, ibegSrc, iendSrc, jbegSrc, jendSrc, kbegSrc, kendSrc, mapMat)
**********************************************************************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 knode kbeg
subroutine deregisterfunction(global)
**********************************************************************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 ipnend
**********************************************************************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 kdnbeg