Skip to content

Undefined reference to

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6114
    wf_guoyl
    Participant

    Hello, everyone!

    I am simulating phase-change flow, and I tried using “Zou-He” velocity boundary conditions at the inlet. I copied four files from “olb-1.4r0” and put them in “olb-1.3r1”. These four files are “setZouHeVelocityBoundary2D.h”, “setZouHeVelocityBoundary2D.hh”, “setLocalVelocityBoundary2D.h” and “setLocalVelocityBoundary2D.hh”. But when I compile with “make”, an error message appears:

    /usr/bin/ld: flowTest.o: in function `void olb::setZouHeVelocityBoundary<double, olb::descriptors::D2Q9<olb::descriptors::VELOCITY, olb::descriptors::FORCE, olb::descriptors::EXTERNAL_FORCE, olb::descriptors::PSI_PSEUDO_RHO>, olb::BGKdynamics<double, olb::descriptors::D2Q9<olb::descriptors::VELOCITY, olb::descriptors::FORCE, olb::descriptors::EXTERNAL_FORCE, olb::descriptors::PSI_PSEUDO_RHO> > >(olb::SuperLattice2D<double, olb::descriptors::D2Q9<olb::descriptors::VELOCITY, olb::descriptors::FORCE, olb::descriptors::EXTERNAL_FORCE, olb::descriptors::PSI_PSEUDO_RHO> >&, double, olb::FunctorPtr<olb::SuperIndicatorF2D<double> >&&)’:
    flowTest.cpp:(.text._ZN3olb24setZouHeVelocityBoundaryIdNS_11descriptors4D2Q9IJNS1_8VELOCITYENS1_5FORCEENS1_14EXTERNAL_FORCEENS1_14PSI_PSEUDO_RHOEEEENS_11BGKdynamicsIdS7_EEEEvRNS_14SuperLattice2DIT_T0_EESB_ONS_10FunctorPtrINS_17SuperIndicatorF2DISB_EEEE[_ZN3olb24setZouHeVelocityBoundaryIdNS_11descriptors4D2Q9IJNS1_8VELOCITYENS1_5FORCEENS1_14EXTERNAL_FORCEENS1_14PSI_PSEUDO_RHOEEEENS_11BGKdynamicsIdS7_EEEEvRNS_14SuperLattice2DIT_T0_EESB_ONS_10FunctorPtrINS_17SuperIndicatorF2DISB_EEEE]+0x132): undefined reference to `void olb::addPoints2CommBC<double, olb::descriptors::D2Q9<olb::descriptors::VELOCITY, olb::descriptors::FORCE, olb::descriptors::EXTERNAL_FORCE, olb::descriptors::PSI_PSEUDO_RHO> >(olb::SuperLattice2D<double, olb::descriptors::D2Q9<olb::descriptors::VELOCITY, olb::descriptors::FORCE, olb::descriptors::EXTERNAL_FORCE, olb::descriptors::PSI_PSEUDO_RHO> >&, olb::FunctorPtr<olb::SuperIndicatorF2D<double> >&&, int)’

    collect2: error: ld returned 1 exit status
    make: *** [Makefile:95: flowTest] Error 1

    “flowTest” is the name of the c++ file. I’m not sure what the problem is. Can anyone help me? If possible, I would like to send my program to your mailbox. Many thanks!

    • This topic was modified 2 years, 5 months ago by wf_guoyl.
    #6116
    wf_guoyl
    Participant

    Hello, I realize that olb-1.3r1 is quite different from olb-1.4r0, especially in terms of boundary handling. So I’m going to use the boundary conditions that we have in the version olb-r1.3r1 instead of copying some files from olb-1.4r0 to olb-1.3r1, because my previous program was in olb-1.3r1. Please allow me to summarize and change my questions:

    Q1: How to implement Zou-He velocity boundary condition in version 1.3r1 ?
    I saw the function “creatZouHeBoundaryCondition2D”. but I don’t know how to call it, because I am not familiar with “BlockLatticeStructure2D”.

    Q2: How to implement convection boundary condition in version 1.3r1 ?
    I call it like this: NSboundaryCondition.addConvectionBoundary(superGeometry, materialOutflow, omega). The program can run, but the droplet still deforms at the boundary and does not flow through the boundary.

    So those are my two questions. Who can help me? I would be grateful if anyone would help me.

    #6142
    Adrian
    Keymaster

    I strongly recommend that you port your application to release 1.4 instead of trying to backport changes from 1.4 to 1.3. The high level interface changes beween 1.3 and 1.4 are not that large.

    You can see the boundary setup in 1.3r1 in the documentation and examples included in the release as well as the corresponding user guide.

    #6143
    wf_guoyl
    Participant

    Hello, Adrian!

    Thank you very much for your reply in your busy schedule!

    In the last few days, I have finished porting my application to release 1.4. The application can compile successfully, but the application diverges when it starts to run. I check the geometry part with Paraview, I find that the top and rightmost layers of the grid in the computation area are not defined. This problem did not occur in the last version. I tried the following solutions:

    1.Change geometric parameters and change the method.
    2.Delete “superGeometry.clean()”, “superGeometry.innerClean()”.

    No matter how much I change it, the top and rightmost layers of the grid are still undefined, I wonder what is the reason for this. Thank you again!

    #6149
    Adrian
    Keymaster

    What exactly do you mean by undefined? Which material number is set there and how does this correspond to your material definition?

    Are the boundary material numbers shifted by one cell layer or not present at all (~undefined)?

    Edit: I just saw that you sent my your code – I’ll look into it if I get the chance.

    • This reply was modified 2 years, 5 months ago by Adrian.
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.