Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SIGSEGV when test mod] is there any exmaple code? #1

Open
Novice-me opened this issue Sep 5, 2023 · 0 comments
Open

[SIGSEGV when test mod] is there any exmaple code? #1

Novice-me opened this issue Sep 5, 2023 · 0 comments

Comments

@Novice-me
Copy link

when i test the mod with following code

      program main
      use tecplotwrite
      parameter(ni=10,nj=10)
      Real*8 x(ni,nj),y(ni,nj)
      Real*8 u(ni,nj),v(ni,nj)
      type(tecplotDataTemplate) :: data2Write
      
      do i = 1,ni
      do j = 1,nj
         x(i,j) = dble(i-1)/dble(ni-1)
         y(i,j) = dble(j-1)/dble(nj-1)

         u(i,j) = dble(i-1)
         v(i,j) = dble(j-1)
      enddo
      enddo
      data2Write%inunit = 10
      data2Write%datatitle = 'testmod.plt'
      data2Write%IMax = ni
      data2Write%JMax = nj
      data2Write%KMax = 1
      data2Write%Nvars = 4
      do i = 1,ni
      do j = 1,nj
            !------------ bug area ----------!
            data2Write%data(i,j,1,1) = x(i,j)
            data2Write%data(i,j,1,2) = y(i,j)
            data2Write%data(i,j,1,3) = u(i,j)
            data2Write%data(i,j,1,4) = v(i,j)
            !------------ bug area ----------!
      end do
      end do
      write(*,*) 'before Writing tecplot binary file .. '
      call tecplot_write_binary(data2Write) 
      stop
      end

how can i define the data for writing with data2Write%data, is there any exmaple code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant