
neper安装
安装:(1) sudo ./configure (2)sudo make (3)sudo make install。a. 安装OpanMP: sudo apt-get install mpich。GSL:下载地址:http://mirrors.ustc.edu.cn/gnu/gsl/4. 安装Gmsh: sudo apt-get install libgmsh-dev。5. 安装Pov-ray :
1.neper官网:Neper: Polycrystal Generation and Meshing — Neper 4.7.0 documentation
2.安装GSL和NLOPT两个软件
GSL:下载地址:http://mirrors.ustc.edu.cn/gnu/gsl/
安装:(1) sudo ./configure (2)sudo make (3)sudo make install
NLOPT: sudo apt-get install libnlopt.dev
3.进入neper文件的src文件中:
a. 安装OpanMP: sudo apt-get install mpich
b. mkdir Bulid
c. cd Build
d. cmake ..
e. make
f .sudo make install
4. 安装Gmsh: sudo apt-get install libgmsh-dev
5. 安装Pov-ray : sudo apt-get install povray
6.添加依赖:sudo apt-get install libnlopt0
现在就可以执行命令生成多晶结构了,但是在划分网格时会报错,所以还需要进一步安装Gmsh。
Installing Gmsh
We download the source code from the website 需要搭梯子(https://gmsh.info ), latest version. It is then a good idea to move it to ~/Progs
, where Neper already is:
mv gmsh-4.11.1-source.tgz ~/Progs/
tar -zxf gmsh-4.11.1-source.tgz
cd ~/Progs/gmsh-4.11.1-source
We can then compile it. As Gmsh is also managed with CMake, installation is no much different from that of Neper itself:
mkdir build cd build cmake .. -- The CXX compiler identification is GNU 11.3.0 -- The C compiler identification is GNU 11.3.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Could NOT find Git (missing: GIT_EXECUTABLE) -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of size_t -- Check size of size_t - done -- Found 64Bit -- Found OpenMP_C: -fopenmp (found version "4.5") -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5") -- Found OpenMP -- Found Eigen[contrib] -- Found Mesh -- Found Solver -- Found Post -- Found Plugins -- Found Parser -- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR) -- Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB) -- Could NOT find FLTK (missing: FLTK_LIBRARIES FLTK_INCLUDE_DIR) -- Found ONELAB -- Found ONELABMetamodel -- Found ANN[contrib] -- Found ALGLIB[contrib] -- Found DIntegration -- Found Kbipack -- GMP not found: Kbipack uses long int -- Found MathEx[contrib] -- Found Metis[contrib] -- Found TetGen/BR -- Found Voro++[contrib] -- Found OptHom -- Found DomHex -- Found QuadTri -- Found Blossom -- Found Netgen -- Found Bamg -- Found Hxt -- Found QuadMeshingTools -- Found WinslowUntangler -- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) (found version "") -- HDF5 not found -- Found Gmm[contrib] -- Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) -- Looking for vsnprintf -- Looking for vsnprintf - found -- Looking for sys/socket.h -- Looking for sys/socket.h - found -- Check size of socklen_t -- Check size of socklen_t - done -- Check size of intptr_t -- Check size of intptr_t - done -- Looking for dlfcn.h -- Looking for dlfcn.h - found -- Found Dlopen -- Looking for linux/joystick.h -- Looking for linux/joystick.h - found -- Found LinuxJoystick -- Performing Test WALL -- Performing Test WALL - Success -- Performing Test WCAST -- Performing Test WCAST - Failed -- Performing Test WDEPREC -- Performing Test WDEPREC - Success -- Performing Test WIND -- Performing Test WIND - Success -- Performing Test WATTR -- Performing Test WATTR - Success -- Performing Test NOWARN -- Performing Test NOWARN - Success -- Performing Test NOOPT -- Performing Test NOOPT - Success Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/api/square.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/baffles.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/boolean.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/chamfer.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/coherence.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/compsolid.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/compsolid2.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/extend_field.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/extrude.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/extrude2.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/fillet.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/fillet2.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/fillet3.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/fillet4.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/fillet_chamfer.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/fleur.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/fragment_numbering.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/hybrid_occ_builtin.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/hyperboloid.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/import.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/import2.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/intersect_line_volume.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/neuron.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/number_of_tets.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/periodic.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/periodic_embedded.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/pipe.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/primitives.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/revolve.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/revolve2.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/shell_sewing.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/simple.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/simple2.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/simple3.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/simple4.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/simple5.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/simple6.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/simple7.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/slicer.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/slicer_surfaces.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/spherical_surf.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/spline.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/step_assembly.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/surface_filling.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/thicksolid.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/thrusections.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/transfinite.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/transform.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/boolean/twist.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/examples/post_processing/compute_area_volume.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/tutorials/t16.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/tutorials/t17.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/tutorials/t18.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/tutorials/t19.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/tutorials/t20.geo Skipping test /home/rquey/Progs/gmsh-4.11.1-source/tutorials/t21.geo -- -- Gmsh 4.11.1 has been configured for Linux64 -- -- * Build options: 64Bit ALGLIB[contrib] ANN[contrib] Bamg Blossom DIntegration Dlopen DomHex Eigen[contrib] Gmm[contrib] Hxt Kbipack LinuxJoystick MathEx[contrib] Mesh Metis[contrib] Netgen ONELAB ONELABMetamodel OpenMP OptHom Parser Plugins Post QuadMeshingTools QuadTri Solver TetGen/BR Voro++[contrib] WinslowUntangler -- * Build type: RelWithDebInfo -- * C compiler: /usr/bin/cc -- * C++ compiler: /usr/bin/c++ -- * Install prefix: /usr/local -- -- Configuring done -- Generating done -- Build files have been written to: /home/rquey/Progs/gmsh-4.11.1-source/build
Configuration completed and is sufficient for Neper. So, we can make and install:
make sudo make install
The second command copies the gmsh
binary file to a system location, which makes the command available to Neper.
Back to Neper’s build directory, we re-run the tests:
cd ~/Progs/neper-4.6.1/src/build ctest 99% tests passed, 2 tests failed out of 461 Total Test time (real) = 47.92 sec The following tests FAILED: 211 - V/asymptote (Failed) 325 - V/povray (Failed) Errors while running CTest
All “M” tests now pass.
现在执行以下命令测试一下效果吧:
neper -T -n 100
neper -V n100-id1.tess -print img1
neper -M n100-id1.tess
neper -V n100-id1.tess,n100-id1.msh -print img2
更多推荐
所有评论(0)