Znn3bq.jpeg
²é¿´: 2600  |  »Ø¸´: 9
±¾Ìû²úÉú 1 ¸ö ³ÌÐòÇ¿Ìû £¬µã»÷ÕâÀï½øÐв鿴
µ±Ç°Ö»ÏÔʾÂú×ãÖ¸¶¨Ìõ¼þµÄ»ØÌû£¬µã»÷ÕâÀï²é¿´±¾»°ÌâµÄËùÓлØÌû

li_clifff

Òø³æ (ÕýʽдÊÖ)

[ÇóÖú] Çë½ÌÒ»¸öfortranС³ÌÐò±àÒë³ö´íµÄÎÊÌ⣬лл

ÈçϳÌÐò±àÒë²»³É¹¦£¬²»ÖªµÀÎÊÌâ³öÔÚÄÄÀmesh.datÎļþ¸ñʽÊǵÚÒ»ÐÐÊÇnumnp, numelµÄÊýÖµ£¬µÚ¶þÐе½×îºóÊÇmeshµÄ¸÷¸öËıßÐεľßÌå×ø±ê¡£´íÎóÐÅÏ¢ÊÇ£ºError: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association   [NUMNP]  integer*4 numnp, numel   
»¹ÓÐG:\Program Files\Microsoft Visual Studio\MyProjects\mesh\pmesh.for(22) : Error: An automatic object is invalid in a main program.   [X] dimension x(2,numnp),ia(numnp)£¬Çë¶à¶àÖ¸½Ì£¬Ð»Ð»                        


  PROGRAM pmesh
c
c-----------------------------------------------------------------
c     purpose : to eliminate the string from existed mesh data
c               warning : the mesh has to be made out of quadrangles only
c     in :c
c     out :
c             x     : array containing node coordinates
c             ia    : nodes reference number
c             ien   : list of element nodes
c             mat   : material ref. numbers for all elements
c             in    : element sides ref. number
cc-----------------------------------------------------------------------
c
      implicit real*8 (a-h,o-z)
      real xreal,yreal
      integer*4 numnp, numel                           
      dimension x(2,numnp),ia(numnp)
      dimension ien(4,numel),mat(numel),in(4,numel)
   
      open(57,file='pmesh1.dat')
      open(58,file='pmesh2.dat')
      
         call sizemesh(numnp, numel)
         open(21,file='mesh.dat')
          read(21,*)
          do 300 i=1,numnp                   
          read(21,2100)idum,xreal,yreal,ia(i)
              x(1,i) = xreal
              x(2,i) = yreal
          write(57,*)idum,xreal,yreal,ia(i)
300    continue
          do 500 n=1,numel
          read(21,2300)ndum,(ien(i,n),i=1,4),(in(i,n),i=1,4)
          write(58,*)ndum,(ien(i,n),i=1,4),(in(i,n),i=1,4)
500    continue
          close(21)

2100  format(i5,2x,e15.5,2x,e12.5,2x,i2)
2300  format(5(i5,2x),4(i2,2x))
          end
c**************************************************************


     subroutine sizemesh(numnp,numel)

        integer numnp, numel

      open(21,file='mesh.dat')
      read(21,*) numnp,numel
     close(21)
     return
     end
»Ø¸´´ËÂ¥
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

li_clifff

Òø³æ (ÕýʽдÊÖ)

ÎÒ·¢ÏÖÔçÆÚf77³ÌÐò£¬¶ÔÊý×éûÓж¯Ì¬¸³Öµ£¬¶¼ÊÇÏȶ¨ÒåÒ»¸ö´óµÄÊý×é±ÈÈç
x£¨nnpmax£©,nnpmaxÔÚparameter.incÎļþÀ¶øÊµ¼ÊÉÏ×Ó³ÌÐòÀïµÄ´óСnnpÊDZ仯µÄ£¬µ«Ö»Òª²»³¬¹ýnnpmax¾ÍÐУ¬ÕâÑùµÄ·½Ê½Ò²²»´í¡£
9Â¥2011-09-28 11:46:33
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
²é¿´È«²¿ 10 ¸ö»Ø´ð

snoopyzhao

ÖÁ×ðľ³æ (Ö°Òµ×÷¼Ò)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¡ï ¡ï
ÓàÔó³É(½ð±Ò+2): лл²ÎÓëÓ¦Öú£¡ 2011-08-24 16:26:52
ben_ladeng: ר¼Ò¿¼ºË´æµµ 2011-09-28 11:39:50
ÄãÖ÷³ÌÖÐµÄ numnp ºÍ numel ±ØÐ븳ֵ£¬·ñÔò±ØÐëʹÓö¯Ì¬Êý×飬ÄÇôÄãµÄ x, ia, ien, mat, in µÈÊý×é¾ÍÐèÒªÓà allocatable Ö®ÀàµÄ¹Ø¼ü´ÊÖØÐÂÉùÃ÷£¬È»ºóÔÚµ÷ÓÃ×Ó³ÌÐò sizemesh Ö®ºó£¬Óà allocated À´·ÖÅäÄÚ´æ¡£
2Â¥2011-08-24 11:13:08
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

snoopyzhao

ÖÁ×ðľ³æ (Ö°Òµ×÷¼Ò)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï
li_clifff(½ð±Ò+20): ȷʵÊÇÕâÑù£¬¶¯Ì¬Êý×飬ѧϰÁË£¬Ð»Ð» 2011-08-24 11:36:10
ÓàÔó³É(½ð±Ò+3): ÐÁ¿àÁË£¡ 2011-08-24 16:27:14
dubo(½ð±Ò+5, ³ÌÐòÇ¿Ìû+1): ¶àлӦÖí 2011-08-27 16:42:39
ben_ladeng: ר¼Ò¿¼ºË´æµµ 2011-09-28 11:40:00
ÉÏÃæ´íÁËÒ»µã¶ù£¬²»ÊÇÓà allocated£¬¶øÊÇÓà allocate À´·ÖÅäÄÚ´æ¡£ÏÂÃæÊÇÐ޸ĺóµÄ³ÌÐò£º
CODE:
      PROGRAM pmesh
c
c-----------------------------------------------------------------
c     purpose : to eliminate the string from existed mesh data
c               warning : the mesh has to be made out of quadrangles only
c     in :c
c     out :
c             x     : array containing node coordinates
c             ia    : nodes reference number
c             ien   : list of element nodes
c             mat   : material ref. numbers for all elements
c             in    : element sides ref. number
cc-----------------------------------------------------------------------
c
      implicit real*8 (a-h,o-z)
      real xreal,yreal
      integer*4 numnp, numel                           
      real, allocatable :: x(:,:)
      integer*4, allocatable :: ien(:,:), ia(:), mat(:), in(:,:)
!     dimension x(2,numnp),ia(numnp)
!     dimension ien(4,numel),mat(numel),in(4,numel)
   
      open(57,file='pmesh1.dat')
      open(58,file='pmesh2.dat')
      
         call sizemesh(numnp, numel)
         allocate(x(2,numnp),ia(numnp),ien(4,numel),mat(numel),
     +             in(4,numel))
         open(21,file='mesh.dat')
          read(21,*)
          do 300 i=1,numnp                  
          read(21,2100)idum,xreal,yreal,ia(i)
              x(1,i) = xreal
              x(2,i) = yreal
          write(57,*)idum,xreal,yreal,ia(i)
300    continue
          do 500 n=1,numel
          read(21,2300)ndum,(ien(i,n),i=1,4),(in(i,n),i=1,4)
          write(58,*)ndum,(ien(i,n),i=1,4),(in(i,n),i=1,4)
500    continue
          close(21)

2100  format(i5,2x,e15.5,2x,e12.5,2x,i2)
2300  format(5(i5,2x),4(i2,2x))
          end
c**************************************************************


      subroutine sizemesh(numnp,numel)

        integer numnp, numel

      open(21,file='mesh.dat')
      read(21,*) numnp,numel
      close(21)
      return
      end

3Â¥2011-08-24 11:26:59
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

li_clifff

Òø³æ (ÕýʽдÊÖ)

¡ï
dubo(½ð±Ò+1): »¶Ó­ÌÖÂÛ 2011-08-27 16:41:30
µ«ÊÇÎÒÕæ¿´µ½ÓеÄf77³ÌÐòÖ÷³ÌÐò²»ÓÃallocatable£¬Ö±½Óµ÷ÓÃ×Ó³ÌÐòÉú³ÉµÄnumnp, numel¾Í¿ÉÒÔ£¬¾ÍÊǰ´ÎÒÄÇÑù¿ªÊ¼Ð´µÄ£¬²»ÖªµÀ×Ô¼º°´ÄÇÑùµÄ·½Ê½ÔõôÐв»Í¨ÁË
4Â¥2011-08-24 12:53:08
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] 271Çóµ÷¼Á +22 2261744733 2026-04-11 25/1250 2026-04-13 09:37 by qq1591999288
[¿¼ÑÐ] 314Çóµ÷¼Á +24 wakeluofu 2026-04-09 25/1250 2026-04-13 08:58 by lhj2009
[¿¼ÑÐ] 272·Ö²ÄÁÏ×ÓÇóµ÷¼Á +40 Loy0361 2026-04-10 52/2600 2026-04-12 19:23 by laoshidan
[¿¼ÑÐ] µ÷¼Á +25 ²»·ê´º 2026-04-07 26/1300 2026-04-12 11:53 by ´óÁ¦Ë®ÊÖÁ¦´óÎÞÇ
[¿¼ÑÐ] µ÷¼Á +10 ÔÂ@163.com 2026-04-11 10/500 2026-04-12 09:14 by zhouyuwinner
[¿¼ÑÐ] ¿¼ÑÐÇóµ÷¼Á +3 ban°àСÆß 2026-04-11 3/150 2026-04-11 20:48 by may_ÐÂÓî
[¿¼ÑÐ] 293Çóµ÷¼Á +8 ÓÂÔ¶¿â°®314 2026-04-06 8/400 2026-04-11 20:25 by À¶ÔÆË¼Óê
[¿¼ÑÐ] µç×ÓÐÅÏ¢279Çóµ÷¼Á£¬ÓÐÊé¶Á¾ÍÐÐ +8 wwwooden 2026-04-08 11/550 2026-04-11 20:22 by cq2548
[¿¼ÑÐ] 359Çóµ÷¼Á +5 θ¾·ÂÎÀÛÁË 2026-04-11 5/250 2026-04-11 19:55 by lbsjt
[¿¼ÑÐ] ±¾ÈËÅ®º¢ +7 ºðºð£¬ 2026-04-10 9/450 2026-04-11 14:45 by ACS Nano¡ª¡ª
[¿¼ÑÐ] 085501»úеר˶ 302·Ö ²»ÌôרҵÇóµ÷¼Á +7 Íôij. 2026-04-09 7/350 2026-04-11 14:37 by luhong1990
[¿¼ÑÐ] 0858Çóµ÷¼Á 5+5 Gky09300550£¬ 2026-04-10 8/400 2026-04-10 19:13 by chemisry
[¿¼ÑÐ] µ÷¼Á +19 2261744733 2026-04-08 19/950 2026-04-09 19:11 by vgtyfty
[¿¼ÑÐ] 0703»¯Ñ§Çóµ÷¼Á +21 ²»ÖªÃûµÄСئ 2026-04-08 21/1050 2026-04-09 18:55 by l_paradox
[¿¼ÑÐ] ²ÄÁÏ307·ÖÇó´óÀÐ×éÊÕÁô +17 Hllºú 2026-04-07 17/850 2026-04-09 10:53 by liuhuiying09
[¿¼ÑÐ] ÉúÎïѧѧ˶£¬³õÊÔ351·Ö£¬Çóµ÷¼Á +4 ¡­¡«¡¢Íõ¡­¡« 2026-04-08 5/250 2026-04-08 21:49 by limeifeng
[¿¼ÑÐ] ÉúÎïѧ328·ÖÇóµ÷¼Á +9 ÉÁµçkkl 2026-04-08 10/500 2026-04-08 21:42 by liuhuiying09
[¿¼ÑÐ] 264Çóµ÷¼Á +11 ÂóС¶£µ± 2026-04-07 11/550 2026-04-08 16:05 by Ò»Ö»ºÃ¹û×Ó?
[¿¼ÑÐ] Çóµ÷¼Á£¬ÏÖÔÚ»¹ÄÜÌîµÄ +3 Éϰ¶Ð¡Ó¨¼ÓÓÍ 2026-04-08 3/150 2026-04-08 14:30 by zhq0425
[¿¼ÑÐ] ÉúÎïѧ363µ÷¼ÁÇóÖú +7 fanzhang6666 2026-04-06 9/450 2026-04-07 17:37 by lijunpoly
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û