diff --git a/trunk/mesh.f90 b/trunk/mesh.f90 index ac59d5897..84ed3035e 100644 --- a/trunk/mesh.f90 +++ b/trunk/mesh.f90 @@ -198,9 +198,9 @@ FE_mapElemtype(134) = 2 FE_mapElemtype( 11) = 3 FE_mapElemtype( 27) = 4 - + ! call to various subroutines to parse the stuff from the input file... - if (IO_open_inputFile(fileUnit)) then + if (IO_open_inputFile(fileUnit)) then call mesh_get_meshDimensions(fileUnit) call mesh_build_nodeMapping(fileUnit) call mesh_build_elemMapping(fileUnit) @@ -213,7 +213,7 @@ call mesh_tell_statistics() close (fileUnit) else - call IO_error(100) + call IO_error(100) ! cannot open input file endif END SUBROUTINE @@ -795,14 +795,18 @@ matchFace: do j = 1,FE_NfaceNodes(-neighbor,t) ! count over nodes on matc SUBROUTINE mesh_tell_statistics() use prec, only: pInt + use IO, only: IO_error implicit none - integer(pInt) i integer(pInt), dimension (:,:), allocatable :: mesh_MatTex - character(len=64) fmt + character(len=64) fmt + integer(pInt) i + + if (mesh_maxValStateVar(1) == 0) call IO_error(110) ! no materials specified + if (mesh_maxValStateVar(2) == 0) call IO_error(120) ! no textures specified + allocate (mesh_MatTex(mesh_maxValStateVar(1),mesh_maxValStateVar(2))) mesh_MatTex = 0_pInt - do i=1,mesh_NcpElems mesh_MatTex(mesh_element(3,i),mesh_element(4,i)) = & mesh_MatTex(mesh_element(3,i),mesh_element(4,i)) + 1 ! count combinations of material and texture