Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Kirill's Mesher work in Linux #1

Closed
raquelalegre opened this issue Jul 28, 2015 · 1 comment
Closed

Make Kirill's Mesher work in Linux #1

raquelalegre opened this issue Jul 28, 2015 · 1 comment
Assignees

Comments

@raquelalegre
Copy link
Contributor

At the moment it only works in Windows. It also needs some refactoring.

@raquelalegre raquelalegre self-assigned this Jul 28, 2015
@raquelalegre
Copy link
Contributor Author

I made the latest Mesher_plus_Rat.cpp work in your Unix workstation with CGAL 4.2 and CMake, except for the Matlab stuff that @sinanshi will configure.

In order to make this work, I had to:

  1. Install CGAL latest available version:

    sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe"
    sudo apt-get update
    sudo apt-get install -y libcgal-dev libcgal-demo
    
  2. Clone the Mesher repo to my workspace directory in your Linux workstation:

    ssh raquel@128.40.160.112
    cd ~raquel/work
    git clone git@github.com:EIT-team/Mesher.git
    
  3. Change the contents of Mesher_plus_Rat.cpp like this:

    • Point or was named using a reserved word which made g++ complain, so I renamed it to origin.
    • Includes that refer to headers in current folder need to change from include <input_parameters.h> to include "input_parameters.h" for the build to look for them in the right place.
    • Comment out the call to save_matlab since the CMake config files need to be modified in order to find the necessary matlab libs.
  4. Configure the CMake stuff linking properly CGAL's ImageIO and build executable:

    cd Mesher
    cgal_create_CMakeLists -c ImageIO
    cmake .
    make
    
  5. Run:

    ./Mesher_plus_Rat
    

This is the output I got:

 Reading the input file:
-facet angle = 30
-faced distance= 0.2
-cell radius edge ratio = 3
-cell fine size = 1
-cell coarse size = 3
-preserve elements with fine size (perc. from the border)= 1%

-electrode radius = 0.3
-mesh size near the electrode = 0.1
-make lloyd = 0
-make odt = 0
-make exude = 0
-make perturb = 0
-time limit = 180
Error opening electrode file: No such file or directory
 Reading the Image file...
 Meshing with initial mesh...
 Optimising:
 Saving the mesh into matlab file...
 ALL DONE, press any key! :)

There's a smiley face, so I think it went well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant