Skip to content

compile error

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6118
    LaurentDelaon
    Participant

    hi everybody,

     // setup disk
      Vector<T,2> centerDisk( centerDiskX, centerDiskY );
      Vector<T,2> originDisk;
      IndicatorCuboid2D<T> disk( dx, dy, centerDisk, angle );
      
      // setup disk boundary: circle1 and circle2
      Vector<T,2> centerCircle1( centerCircle1X, centerCircle1Y );
      IndicatorCircle2D<T> circle1( centerCircle1, radiusCircle );
      Vector<T,2> centerCircle2( centerCircle2X, centerCircle2Y );
      IndicatorCircle2D<T> circle2( centerCircle2, radiusCircle );
      
      Vector<T,2> centerCircle3( centerCircle2X-0.1, lengthY/2 );
      IndicatorCircle2D<T> circle3( centerCircle3, 0.005 );
      
      
      // setup moteur
      IndicatorIdentity2D<T> moteur( disk + circle1 + circle2);

    not compilewiththis error :

    `cylinder2d-maquette.cpp: In function ‘void prepareGeometry(const olb::UnitConverter<double, olb::descriptors::D2Q9<> >&, olb::SuperGeometry2D<double>&)’:
    cylinder2d-maquette.cpp:127:39: error: no match for ‘operator+’ (operand types are ‘olb::IndicatorCuboid2D<double>’ and ‘olb::IndicatorCircle2D<double>’)
    IndicatorIdentity2D<T> moteur( disk + circle1 + circle2);

    regards

    Laurent.

    #6125
    LaurentDelaon
    Participant

    I precise that is it compile with olb1.2 and not with olb1.4…
    each cases under ubuntu 18.04.

    Laurent.

    #6132
    Adrian
    Keymaster

    This is probably a compiler issue / functor operations that are only supported in the latest release. I would strongly recommend to update both OpenLB and your operating system.

    • This reply was modified 2 years, 5 months ago by Adrian.
    #6133
    LaurentDelaon
    Participant

    HI Adrian,

    I precise : not working with olb1.4 …

    What I can do ?

    regard’s.
    Laurent.

    #6136
    Adrian
    Keymaster

    Ah, sorry. This should work for shared pointer based functor / indicator arithmetic. i.e. you can rewrite it to wrap all indicators in std::shared_ptr.

    #6137
    LaurentDelaon
    Participant

    ok I understand.

    I try to do it.

    thank’s for your prompt reply.

    regards
    Laurent.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.