Author Topic: Number projection = 13  (Read 16628 times)

halleluja

  • Full Member
  • ***
  • Posts: 80
Number projection = 13
« on: October 04, 2022, 03:13:09 PM »
Hi everyone,

how can i do if number projection is 13?

For that I have setted istv = 13 if isw=1 and iste=13 if isw=8, but solution is wrong, whereas if the number of projection is 9 and set  istv = 9 if isw=1 and iste=9 if isw=8, the solution is right. I want to ask, if it is possible that the mistake is from gforran compiler, and it is  GNU Fortran (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0" and i use feap85, should i try another version of gfortran?

Best

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Number project
« Reply #1 on: October 04, 2022, 05:43:18 PM »

When you set an istv you should use

istv = max(istv, 13)

In case some other element is setting a value


Be sure all your user elements use a max, and also check the feap elements do also.

If all other values of istv work it is probably not a compiler problem.

halleluja

  • Full Member
  • ***
  • Posts: 80
Re: Number project
« Reply #2 on: October 05, 2022, 08:00:09 AM »

When you set an istv you should use

istv = max(istv, 13)

In case some other element is setting a value


Be sure all your user elements use a max, and also check the feap elements do also.

If all other values of istv work it is probably not a compiler problem.

Thanks a lot for your reply.  Does it mean, that for example if in elmt48.f i have setted istv=7 when isw=1, it should also be changed to istv = max(istv,7), even though i only use elmt49.f in my input file?

halleluja

  • Full Member
  • ***
  • Posts: 80
Re: Number project
« Reply #3 on: October 05, 2022, 09:33:59 AM »

When you set an istv you should use

istv = max(istv, 13)

In case some other element is setting a value


Be sure all your user elements use a max, and also check the feap elements do also.

If all other values of istv work it is probably not a compiler problem.

Dear  Prof. R.L. Taylor

I have made all my user elements use a max and checked also the feap elements, but it still dosen't work.

May i ask, if it is possible try my elements on your computer?
In elmt49.f the number of projection is 9, which gives the right solution (see plot9.png), whereas in elmt49.f(copy) the number of projection is 10, which gives the wrong solution (see plot10.png). The small difference of elmt49.f and elmt49.f(copy) is shown in diff1.png and diff2.png. The input file is Imesh49.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Number projection = 13
« Reply #4 on: October 05, 2022, 03:11:21 PM »
I had to make a couple of corrections but both work.

There is a bug in dimensions  ss(3) should be ss(4).  This could cause your problem -- but I am not sure it is the issue.  My compiler also required me to declare all the integer parameters  (ndf,ndm,isw, nst) as integers.

l also recommend that you never use the implicit double precision.  Instead use

implicit none

and explicitly type each variable.  It is a bit more work but will make sure that things match with our variable use.  I did not try compiling with gfortran but do not see anything obvious that should give a problem.   Also I no longer have older versions compiled so used the current release ver8.6

I hope this helps you find your problem.


halleluja

  • Full Member
  • ***
  • Posts: 80
Re: Number projection = 13
« Reply #5 on: October 07, 2022, 09:45:47 AM »
I had to make a couple of corrections but both work.

There is a bug in dimensions  ss(3) should be ss(4).  This could cause your problem -- but I am not sure it is the issue.  My compiler also required me to declare all the integer parameters  (ndf,ndm,isw, nst) as integers.

l also recommend that you never use the implicit double precision.  Instead use

implicit none

and explicitly type each variable.  It is a bit more work but will make sure that things match with our variable use.  I did not try compiling with gfortran but do not see anything obvious that should give a problem.   Also I no longer have older versions compiled so used the current release ver8.6

I hope this helps you find your problem.

Dear Prof. R.L. Taylor,

thans a lot for your reply.

I have modifed  ss(3) to ss(4), used implicit none and declared (ndf,ndm,isw, nst) as integers. But i still got the solution as plot10.png.      :'(
« Last Edit: October 07, 2022, 10:17:50 AM by halleluja »

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Number projection = 13
« Reply #6 on: October 07, 2022, 04:30:09 PM »
Check the printed nodal displacements.  Are they different?

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Number projection = 13
« Reply #7 on: October 08, 2022, 06:37:10 AM »
Your problem is a mystery!  You are plotting displacements so it has nothing to do with anything in isw=8.

Whatever the change is it seems to be affecting the projections weights.  Maybe your program has become corrupted in some way and it would be good to do a fresh install and compile.

A couple of other things.  For your solution scheme feap calls each element routine with several isw: 1, 3, 6, 12, 14, 26 - and if you are using ver8.6 isw = -1.

Your element processes things for isw=12 and this is wrong (isw=12 is for cases where the history variables at t_n get remapped for t_n+1 and that is never used for anything in feap or what you are doing.  I would suggest adding SAVE to each module and also the IMPLICIT NONE in every one (if you have not already done so).

If things still do not work then report all the conditions you are using: type of computer, main operating system & version(e.g. are you using a partition like linux under windows? a mac? a unix system? or what); then the compiler and anyother information.  Also tell us if you have made modifications to the program and what.

 

halleluja

  • Full Member
  • ***
  • Posts: 80
Re: Number projection = 13
« Reply #8 on: October 17, 2022, 02:34:14 PM »
Your problem is a mystery!  You are plotting displacements so it has nothing to do with anything in isw=8.

Whatever the change is it seems to be affecting the projections weights.  Maybe your program has become corrupted in some way and it would be good to do a fresh install and compile.

A couple of other things.  For your solution scheme feap calls each element routine with several isw: 1, 3, 6, 12, 14, 26 - and if you are using ver8.6 isw = -1.

Your element processes things for isw=12 and this is wrong (isw=12 is for cases where the history variables at t_n get remapped for t_n+1 and that is never used for anything in feap or what you are doing.  I would suggest adding SAVE to each module and also the IMPLICIT NONE in every one (if you have not already done so).

If things still do not work then report all the conditions you are using: type of computer, main operating system & version(e.g. are you using a partition like linux under windows? a mac? a unix system? or what); then the compiler and anyother information.  Also tell us if you have made modifications to the program and what.

 
Dear Prof. R.L. Taylor,
thanks a lot for your detailed explanation. I still have a question about isw=12. As you said
"Your element processes things for isw=12 and this is wrong (isw=12 is for cases where the history variables at t_n get remapped for t_n+1 and that is never used for anything in feap or what you are doing.", but in my code if isw=12, then the program go to
Code: [Select]
2      continue
       return
, which means the subroutine elmt49 modifies nothing if isw=12, or this is also wrong because isw=12 cannot appear in subroutine elmt49?
« Last Edit: October 17, 2022, 02:36:29 PM by halleluja »

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1164
Re: Number projection = 13
« Reply #9 on: October 17, 2022, 04:28:52 PM »
Your element can see isw.eq.12 in FEAP.  Elements are called with isw.eq.12 when you issue the TIME command.  In general you
should not be doing anything under isw.eq.12, so jumping to a continue and exiting your element is the correct thing to do in general.
This switch value is for 'special treatments'.

halleluja

  • Full Member
  • ***
  • Posts: 80
Re: Number projection = 13
« Reply #10 on: October 18, 2022, 04:35:37 AM »
Your element can see isw.eq.12 in FEAP.  Elements are called with isw.eq.12 when you issue the TIME command.  In general you
should not be doing anything under isw.eq.12, so jumping to a continue and exiting your element is the correct thing to do in general.
This switch value is for 'special treatments'.
Dear Prof. S. Govindjee,

thanks a lot for your reply. Because i will implement a user element with plastic deformation, and i write a framework for history data with 7 gauss points each element and 5 internal variables each gauss point:
Code: [Select]
      subroutine elmt49(d,ul,xl,ix,tl,s,p,ndf,ndm,nst,isw)
c.... go to correct array processor
c                 4       8      12     
      go to(1,2,3,3,2,3,2,3,2,2,2,2,2,3,3), isw
      return

1     continue

      nhv = 5                ! 5 internal variables every gauss point
      nh1 = nh1 + 7*nhv      ! 7 gauss points every element
      istv = max(istv,13)   

      return

2     continue
      return

3     continue

      nn = 0
      nhv = 5
     
      call tint2d(7,lint,el)

      do 400 l = 1,lint

        if (isw.eq.14) then
          hr(nh1+nn+0)=1.d0 ! (1,1)
          hr(nh1+nn+1)=1.d0 ! (2,2)
          hr(nh1+nn+2)=0.d0 ! (1,2)
          hr(nh1+nn+3)=0.d0 ! (2,1)
          hr(nh1+nn+4)=0.d0
        else

          Fgradpl(1,1)=hr(nh1+nn+0)
          Fgradpl(2,2)=hr(nh1+nn+1)
          Fgradpl(1,2)=hr(nh1+nn+2)
          Fgradpl(2,1)=hr(nh1+nn+3)
          alpha=hr(nh1+nn+4)

          call plastic_deform(alpha,Fgradpl,sig,c)

          hr(nh2+nn+0)=Fgradpl(1,1)
          hr(nh2+nn+1)=Fgradpl(2,2)
          hr(nh2+nn+2)=Fgradpl(1,2)
          hr(nh2+nn+3)=Fgradpl(2,1)
          hr(nh2+nn+4)=alpha
         
c         compute residual
          p=p+...
c         compute tangent
          s=s+...

          if (isw.eq.8) then
            call elmt49plot(ix,valp,shp,xsj,hr(nph),hr(nph+numnp),hr(ner),nel,numnp) 
          endif

        endif ! End of if isw = 14

        nn = nn + nhv

400     continue

      return
      end
Did i use hr, nh1 and nh2 correctly?



P.S. I am now using FEAP84.
« Last Edit: October 18, 2022, 04:37:36 AM by halleluja »

halleluja

  • Full Member
  • ***
  • Posts: 80
Re: Number projection = 13
« Reply #11 on: October 18, 2022, 05:07:03 AM »
Your problem is a mystery!  You are plotting displacements so it has nothing to do with anything in isw=8.

Whatever the change is it seems to be affecting the projections weights.  Maybe your program has become corrupted in some way and it would be good to do a fresh install and compile.

A couple of other things.  For your solution scheme feap calls each element routine with several isw: 1, 3, 6, 12, 14, 26 - and if you are using ver8.6 isw = -1.

Your element processes things for isw=12 and this is wrong (isw=12 is for cases where the history variables at t_n get remapped for t_n+1 and that is never used for anything in feap or what you are doing.  I would suggest adding SAVE to each module and also the IMPLICIT NONE in every one (if you have not already done so).

If things still do not work then report all the conditions you are using: type of computer, main operating system & version(e.g. are you using a partition like linux under windows? a mac? a unix system? or what); then the compiler and anyother information.  Also tell us if you have made modifications to the program and what.

 

Dear Prof. R.L. Taylor,

my doctor father have also tested the example on FEAP85 and he uses a Macbook. If he uses Intel-Compiler (fort) it also works fine, but if he uses GNU-Compiler (gfortran), he also cannot get an output as plot9.png.

Later i have tested the example on FEAP84, it works fine. So my doctor father suggested me to use FEAP84 first and he will update FEAP to FEAP86 later.

For the information of my laptop i use hp elitebook with Ubuntu 18.4 under windows. The version of gfortran and gcc is 7.5.0.

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1164
Re: Number projection = 13
« Reply #12 on: October 18, 2022, 08:06:40 PM »
I think you can use
Code: [Select]
nh1 =  7*nhv
so set the value do not increment it since you do not know what the prior value is.  It may not be zeroed.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Number projection = 13
« Reply #13 on: October 19, 2022, 06:09:14 AM »
It is very odd that you have this problem.  You are plotting a solution dof, not a projected quantity in what I reviewed.  Thus if you change this parameter and you get an error there must be a dimension error, a type mismatch or something else in the program.  We are aware that when you compile ver8.5 using gfortran this should be displayed.

Maybe 'valgrind' can help you -- it is worth installing and using.