Menu

#38 use of subCycle.H not functional in foam-extend 4.0

1.0
open
nobody
None
2020-01-14
2020-01-13
No

Hi

This bug occurs in fe40 but not in OF1806

The relevant part of my code is just two consecutive lines:

......

    subCycle<volScalarField> neSubCycle(ne, 3);
    subCycle<volScalarField> npSubCycle(np, 3);

.....

I execute using the debugger gdb with one breakpoint.

gdb $FOAM_USER_APPBIN/plasmacoupleddbnsTurbFoam

Breakpoint 1, main (argc=1, argv=0x7fffffff87a8) at plasmacoupleddbnsTurbFoam.C:326
326 subCycle<volscalarfield> neSubCycle(ne, 3);
(gdb) n
327 subCycle<volscalarfield> npSubCycle(np, 3);
(gdb) n</volscalarfield></volscalarfield>

--> FOAM FATAL ERROR:

object already allocated
From function void autoPtr<t>::set(T*)
in file lnInclude/autoPtrI.H at line 83.</t>

FOAM aborting

Program received signal SIGABRT, Aborted.

0x00002aaaafbc0214 in raise () from /cvmfs/soft.computecanada.ca/nix/store/63pk88rnmkzjblpxydvrmskkc8ci7cx6-glibc-2.24/lib/libc.so.6
(gdb)

Maybe I will be forced to forget about fe40 and instead use OF1806 compressible but non dbns solver

Related

Tickets: #38

Discussion

  • Hrvoje Jasak

    Hrvoje Jasak - 2020-01-14

    Can you provide a bug fix?

     
    • marc belleau

      marc belleau - 2020-01-14

      No, but on second thought it is perhaps not healthy to call npSubCycle(np,3) before executing neSubCycle.endSubCycle() in either OF1806 or fe40. It seems that if you do, you wind up with runTime.DeltaT divided by 6 instead of 3 for the field np. I could be wrong as I did not write the OF code and I could not find a tutorial that explains how to use subCycle.H. Anyhow, I thought this SourceForge web page was about reporting OF bugs and not fixing them. Regards, Marc


      From: Hrvoje Jasak hjasak@users.sourceforge.net
      Sent: January 14, 2020 5:37 AM
      To: [foam-extend:tickets] 38@tickets.foam-extend.p.re.sourceforge.net
      Subject: [foam-extend:tickets] #38 use of subCycle.H not functional in foam-extend 4.0

      Can you provide a bug fix?


      [tickets:#38]https://sourceforge.net/p/foam-extend/tickets/38/ use of subCycle.H not functional in foam-extend 4.0

      Status: open
      Milestone: 1.0
      Created: Mon Jan 13, 2020 07:48 PM UTC by marc belleau
      Last Updated: Mon Jan 13, 2020 07:48 PM UTC
      Owner: nobody

      Hi

      This bug occurs in fe40 but not in OF1806

      The relevant part of my code is just two consecutive lines:

      ......

      subCycle<volScalarField> neSubCycle(ne, 3);
      subCycle<volScalarField> npSubCycle(np, 3);
      

      .....

      I execute using the debugger gdb with one breakpoint.

      gdb $FOAM_USER_APPBIN/plasmacoupleddbnsTurbFoam

      Breakpoint 1, main (argc=1, argv=0x7fffffff87a8) at plasmacoupleddbnsTurbFoam.C:326
      326 subCycle<volscalarfield> neSubCycle(ne, 3);
      (gdb) n
      327 subCycle<volscalarfield> npSubCycle(np, 3);
      (gdb) n</volscalarfield></volscalarfield>

      --> FOAM FATAL ERROR:

      object already allocated
      From function void autoPtr<t>::set(T*)
      in file lnInclude/autoPtrI.H at line 83.</t>

      FOAM aborting

      Program received signal SIGABRT, Aborted.

      0x00002aaaafbc0214 in raise () from /cvmfs/soft.computecanada.ca/nix/store/63pk88rnmkzjblpxydvrmskkc8ci7cx6-glibc-2.24/lib/libc.so.6
      (gdb)

      Maybe I will be forced to forget about fe40 and instead use OF1806 compressible but non dbns solver


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/foam-extend/tickets/38/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Tickets: #38


Log in to post a comment.