Skip to content

D3Q27 lattice

This topic contains 4 replies, has 2 voices, and was last updated by  sharkskinz3 1 week, 6 days ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #4494

    sharkskinz3
    Participant

    Hello OpenLB,

    I have been trying to compile one of the examples provided with the download by swapping out the provided D3Q19 lattice with D3Q27. I thought this would be a simple matter of replacing the definition at the top of the application source, i.e.

    #define DESCRIPTOR D3Q27<>

    and making a clean build, but this generates a lot of errors at the link stage (specifically undefined references).

    Can anyone help?

    #4496

    mathias
    Keymaster

    Dear sharkskinz3,

    which example was it? Can you also post the error message? Did you compile in “generic” mode (cf. user guide)?

    Best
    Mathias

    #4497

    sharkskinz3
    Participant

    Hi Mathias,

    thank you for your reply.

    I am compiling the laminar cylinder3d example.
    The errors I get (and there are a lot of them) are at the link stage, for example:

    cylinder3d.cpp:(.text.startup+0x74e): undefined reference to `olb::sOnLatticeBoundaryCondition3D<double, olb::descriptors::D3Q27<> >::~sOnLatticeBoundaryCondition3D()’

    I am not sure that I am compiling in generic mode. During compilation, the flag -DOLB_PRECOMPILED is passed, so I assume I am using pre-compiled libraries.

    I could not find a reference in the user guide for compiling in generic mode; is this a command line switch, or do I need to modify one of the make files (global.mk?)?

    Thank you for your help.

    sk3

    #4498

    mathias
    Keymaster

    Yes you need to change the config.mk

    BUILDTYPE := precompiled
    #BUILDTYPE := generic

    to

    #BUILDTYPE := precompiled
    BUILDTYPE := generic

    Then, you need to recompile the entiere code by

    make cleanbuild
    make

    There are section in the user guide. Seaech for “precompiled”.

    Best
    Mathias

    #4502

    sharkskinz3
    Participant

    Perfect. Thank you Mathias!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.