Dear Vuong,

As you said, the general procedure is

1.) Install / configure dumux (git clone all relevant dune repositories) and run dune-control. This is done by the install skript and will automatically create the build directory ("build-cmake") in your dumux folder

2.) Navigate to the folder in your build-cmake directory and type "make my_exetuable" to start compiling

Keep in mind the folder structure:

* There are SOURCE files (main.cc, problem.hh, params.input, CMakeLists.txt). You need to edit/create these files. * You compile and run your BINARY files in the build-cmake directory (which has the same folder structure as your source directories)

Have you tried finishing the first exercise of our tutorial? https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/-/tree/master/exercises/exercise-basic

It will guide you through the folder structure and how to add a new executable to your CMakeLists.txt

You should clone that repository first. Go to your dumux root folder (where dumux, dune-common, dune-grid etc can be found) and type

git clone https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course.git

./dune-common/bin/dune-control --opts=dumux/cmake.opts --only=dumux-course all

After that, you should be able to work with that new module, i.e. work on the exercises.

You can add new exectuables in existing folders, as described in the basic exercise, or you can also add completely new folders by simply copying one of the existing folders, rename it and adapt everything to your needs.

Then you need to make sure to also add that folder in the corresponding CMakeLists.txt file (located in the same directory as your new folder).

For instance, your CMakeLists.txt in exercises/CMakeLists.txt looks like

# add a target that builds all exercise solutions
add_custom_target(test_exercises)

add_subdirectory(exercise-basic)
add_subdirectory(exercise-coupling-ff-pm)
add_subdirectory(exercise-runtimeparams)
add_subdirectory(exercise-grids)
add_subdirectory(exercise-properties)
add_subdirectory(exercise-fluidsystem)
add_subdirectory(exercise-fractures)
add_subdirectory(exercise-biomineralization)
add_subdirectory(exercise-mainfile)

add_subdirectory(solution)


Just add a new line to that if you created a new folder in that directory:

add_subdirectory(my_new_folder)

Make sure to give your executables in that new  unique names (also with respect to the other folders), otherwise CMake will complain.

Afterwards, run  "make" in your build-cmake folder for an update. If everything was set correctly, the new folder will also appear there.

Best wishes
Kilian


On 19.11.21 00:01, Pham, Vuong Van wrote:

Dear all,

Thanks for pointing that out, and so that is the issue I want to address. My point is, I read the DuMuX course tutorial and came up with this procedure, as follows (in order to use DuMuX):

*Install DUNE and DuMuX -> build the source files (i.e., CMakeLists.txt; problem.hh, params.input, etc) -> cmake CMakeLists.txt -> execute DuMuX as ./…. params.input*

Therefore, please assist me on the mistakes in my understanding above (especially the meaning, use, and how-to-create such the _/build/_ directory, or build-cmake)

I really appreciate your support. I am a beginner in DuMuX so I hope that my questions are not that dumb.

/Best regards,/

*Vuong Van Pham**//*

Graduate Research Assistant (GRA)

Department of Chemical and Petroleum Engineering (CPE), University of Kansas

Email: [email protected] <mailto:[email protected]>

Phone: +1-(785)-979-2664

*From:* Timo Koch <[email protected]>
*Sent:* Thursday, November 18, 2021 4:30 AM
*To:* DuMux User Mailing List <[email protected]>
*Cc:* Pham, Vuong Van <[email protected]>
*Subject:* Re: [DuMux] (no subject)

Dear Vuong,

it looks like you ran cmake in the source directory. You have to run „make executable“ in the _build_ directory. Per default dumux/build-cmake/…

Timo



    18. nov. 2021 kl. 08:19 skrev Kilian Weishaupt
    <[email protected]
    <mailto:[email protected]>>:

    

    Dear Vuong Van,

    did you modify anything in your CMakeLists.txt file? You said the
    test ran successfully so the executable in
    |dumux/dumux/build-cmake/test/porousmediumflow/1p" was build
    successfully?|

    |Best wishes|
    |Kilian|

    On 18.11.21 07:53, Pham, Vuong Van wrote:

        Dear Kilian,

        Still following the Cmake command (i.e., make
        name_of_executable), I attempted to do so in the Ubuntu
        command window, however I received this error as attached:

        <image001.png>

        The picture indicated that for some reasons the command
        “dune_symlink_to_source_files” is unknown to Cmake. Besides,
        what I observed was that, the commands that are relevant to
        DUNE, somehow are unknown by Cmake and cause incomplete
        configuration. Please assist me on this error.

        /Best regards,/

        *Vuong Van Pham*

        Graduate Research Assistant (GRA)

        Department of Chemical and Petroleum Engineering (CPE),
        University of Kansas

        Email: [email protected] <mailto:[email protected]>

        Phone: +1-(785)-979-2664

        *From:* Kilian Weishaupt
        <[email protected]>
        <mailto:[email protected]>
        *Sent:* Thursday, November 18, 2021 12:42 AM
        *To:* Pham, Vuong Van <[email protected]>
        <mailto:[email protected]>
        *Cc:* DuMux User Mailing List
        <[email protected]>
        <mailto:[email protected]>
        *Subject:* Re: [DuMux] (no subject)

        Dear Vuong Van,

        I'm glad the installation worked now.

        1.)

        CMakeLists.txt is a configuration file read by CMake, a build
        system generator. If configured correctly,
        you compile your source code just by calling

        make name_of_the_executable

        If you make any changes to CMakeLists.txt, a simple

        make

        will update the build configuration.

        Have a look at the tests or at our course exercises here
        
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/-/tree/master/exercises/exercise-basic
        
<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.iws.uni-stuttgart.de%2Fdumux-repositories%2Fdumux-course%2F-%2Ftree%2Fmaster%2Fexercises%2Fexercise-basic&data=04%7C01%7Cvuongvanpham%40ku.edu%7Cde613490bee44b1296d908d9aa7e63c5%7C3c176536afe643f5b96636feabbe3c1a%7C0%7C0%7C637728282092917187%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=zdHLOvKbHWQHW7G17zW1GN1%2Bq5Vj%2FajNuTGk0LVx8F4%3D&reserved=0>
        to get more information
        on how to properly use CMakeLists.txt

        2.) You may either just use a simple text editor such as Atom
        or notepad++ or you can try setting up VS Code (an IDE) which
        however, is a little bit more involved to configure. Note that
        you can either edit your files under Windows (as shown in the
        windows explorer) or using the Ubuntu subsytem. Whatever works
        better for you.

        See Point 3 in our wiki on how to get VS Code
        
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/wikis/Windows-Subsystem-for-DuMux
        
<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.iws.uni-stuttgart.de%2Fdumux-repositories%2Fdumux%2F-%2Fwikis%2FWindows-Subsystem-for-DuMux&data=04%7C01%7Cvuongvanpham%40ku.edu%7Cde613490bee44b1296d908d9aa7e63c5%7C3c176536afe643f5b96636feabbe3c1a%7C0%7C0%7C637728282092927180%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=gLWMDVj2UyWQPUESnsfD2QvorfIAifDLjJefjt%2BTzX0%3D&reserved=0>

        PS: Please always respond to the mailing list
        ([email protected]
        <mailto:[email protected]>, I also forgot to do
        that in my first mail) such that others can profit from our
        discussion, too.

        Best wishes
        Kilian

        On 17.11.21 20:56, Pham, Vuong Van wrote:

            Dear Kilian,

            I am glad to receive your swift response. Following the
            use of DuMuX (at this point I installed all folders and
            ran the test successfully), I have the concerns listed as
            below:

            1.The core structure of a “DuMux” job contains files as
            the attached figure. I believe that I have to compile the
            “CMakeLists.txt” using CMake prior to any further
            execution. May you assist me how to compile such that
            “CMakeLists.txt” properly?

            <image002.png>

            2.By far, I only know how to modify contents in a file
            (within Ubuntu subsystem) using Vim editor. However, I may
            need either Python/C++ later to modify such files. May you
            suggest me an IDE to use with C++ in Ubuntu subsystem?

            I hope that my concerns are appropriate.

            /Best regards,/

            *Vuong Van Pham*

            Graduate Research Assistant (GRA)

            Department of Chemical and Petroleum Engineering (CPE),
            University of Kansas

            Email: [email protected] <mailto:[email protected]>

            Phone: +1-(785)-979-2664

            *From:* Kilian Weishaupt
            <[email protected]>
            <mailto:[email protected]>
            *Sent:* Wednesday, November 17, 2021 10:28 AM
            *To:* Pham, Vuong Van <[email protected]>
            <mailto:[email protected]>
            *Subject:* Re: [DuMux] (no subject)

            Dear Vuong Van,

            we recently updated our wiki for installing Dumux under
            Windows 10.

            There seems to be an issue with git clone which can be
            fixed as described in the wiki.

            
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/wikis/Windows-Subsystem-for-DuMux
            
<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.iws.uni-stuttgart.de%2Fdumux-repositories%2Fdumux%2F-%2Fwikis%2FWindows-Subsystem-for-DuMux&data=04%7C01%7Cvuongvanpham%40ku.edu%7Cde613490bee44b1296d908d9aa7e63c5%7C3c176536afe643f5b96636feabbe3c1a%7C0%7C0%7C637728282092927180%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=gLWMDVj2UyWQPUESnsfD2QvorfIAifDLjJefjt%2BTzX0%3D&reserved=0>

            Best wishes
            Kilian

            On 12.11.21 01:39, Pham, Vuong Van wrote:

                /To the DuMux development team,/

                My name is VUONG VAN PHAM and I am an interested DuMux
                user for my research purpose. When I was tempted to
                install the simulator using installdumux.py, the
                installation was paused and the .log file is attached.

                Please assist me on how to install DuMux correctly.
                Also please note that I was tempted to install in
                ubuntu subsystem within Windows 10 (I do not know
                whether that impacts the installation process,
                however, I inform that fact just in case).

                /Best regards,/

                *Vuong Van Pham*

                Graduate Research Assistant (GRA)

                Department of Chemical and Petroleum Engineering
                (CPE), University of Kansas

                Email: [email protected] <mailto:[email protected]>

                Phone: +1-(785)-979-2664





                _______________________________________________

                DuMux mailing list

                [email protected]  
<mailto:[email protected]>

                https://listserv.uni-stuttgart.de/mailman/listinfo/dumux  
<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.uni-stuttgart.de%2Fmailman%2Flistinfo%2Fdumux&data=04%7C01%7Cvuongvanpham%40ku.edu%7Cde613490bee44b1296d908d9aa7e63c5%7C3c176536afe643f5b96636feabbe3c1a%7C0%7C0%7C637728282092937174%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=whr9VH%2FhoPCO4bBa8mK5NALr3QDCh7P%2B92nFwyUki2U%3D&reserved=0>

--
            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

            Kilian Weishaupt

            Institut für Wasser- und Umweltsystemmodellierung (IWS)

            Lehrstuhl für Hydromechanik und Hydrosystemmodellierung

            Universität Stuttgart, Pfaffenwaldring 61, 70569 Stuttgart

            Email:[email protected]  
<mailto:[email protected]>

            Telefon: 0049 711 685-60461 ** fax: 0049-711-685-60430

            http://www.hydrosys.uni-stuttgart.de  
<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.hydrosys.uni-stuttgart.de%2F&data=04%7C01%7Cvuongvanpham%40ku.edu%7Cde613490bee44b1296d908d9aa7e63c5%7C3c176536afe643f5b96636feabbe3c1a%7C0%7C0%7C637728282092947175%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=dbZlT866YezZ%2BYsOA6y3kJOJhPOItupRjINH5LHHPvI%3D&reserved=0>

            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

--
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

        Kilian Weishaupt

        Institut für Wasser- und Umweltsystemmodellierung (IWS)

        Lehrstuhl für Hydromechanik und Hydrosystemmodellierung

        Universität Stuttgart, Pfaffenwaldring 61, 70569 Stuttgart

        Email:[email protected]  
<mailto:[email protected]>

        Telefon: 0049 711 685-60461 ** fax: 0049-711-685-60430

        http://www.hydrosys.uni-stuttgart.de  
<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.hydrosys.uni-stuttgart.de%2F&data=04%7C01%7Cvuongvanpham%40ku.edu%7Cde613490bee44b1296d908d9aa7e63c5%7C3c176536afe643f5b96636feabbe3c1a%7C0%7C0%7C637728282092947175%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=dbZlT866YezZ%2BYsOA6y3kJOJhPOItupRjINH5LHHPvI%3D&reserved=0>

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

--
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    Kilian Weishaupt

    Institut für Wasser- und Umweltsystemmodellierung (IWS)

    Lehrstuhl für Hydromechanik und Hydrosystemmodellierung

    Universität Stuttgart, Pfaffenwaldring 61, 70569 Stuttgart

    Email:[email protected]  
<mailto:[email protected]>

    Telefon: 0049 711 685-60461 ** fax: 0049-711-685-60430

    http://www.hydrosys.uni-stuttgart.de  
<https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.hydrosys.uni-stuttgart.de%2F&data=04%7C01%7Cvuongvanpham%40ku.edu%7Cde613490bee44b1296d908d9aa7e63c5%7C3c176536afe643f5b96636feabbe3c1a%7C0%7C0%7C637728282092957170%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=QBDlHB8UdqRmhnwyAA%2FRwkrR%2FQy4zEYz8vX8WW6ycoU%3D&reserved=0>

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    _______________________________________________
    DuMux mailing list
    [email protected]
    <mailto:[email protected]>
    https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
    <https://listserv.uni-stuttgart.de/mailman/listinfo/dumux>


_______________________________________________
DuMux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Kilian Weishaupt
Institut für Wasser- und Umweltsystemmodellierung (IWS)
Lehrstuhl für Hydromechanik und Hydrosystemmodellierung
Universität Stuttgart, Pfaffenwaldring 61, 70569 Stuttgart
Email: [email protected]
Telefon: 0049 711 685-60461 ** fax: 0049-711-685-60430
http://www.hydrosys.uni-stuttgart.de
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

_______________________________________________
DuMux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to