安装 neper 多晶体网格生成软件 | 您所在的位置:网站首页 › L铅笔下载安装 › 安装 neper 多晶体网格生成软件 |
概述:安装 neper 前需要安装的组件包括 gcc, g++; cmake; gsl; nlopt; povray; gmsh; imagemagick 这里记录了两种环境安装 neper 的过程(基本相同): 1.桌面发行版 Deepin 2.Win10(1809以上) 的 Linux ubuntu 子系统 (WSL) Deepin 下安装 neper在安装neper之前, 需要安装 GSL(GNU Scientific Library) 和 NLOPT (不需下载)。下载 Neper 。 安装编译器 123sudo apt-get updatesudo apt install gccsudo apt install g++安装 GSL,cd 到 GSL 目录下 123sudo ./configuresudo makesudo make install安装 NLOPT 1sudo apt-get install libnlopt.dev安装 CMAKE 1sudo apt install cmake安装 neper cd 到 neper 下的 src 文件中 1234cd Buildcmake ..makesudo make install安装 Gmsh 1sudo apt-get install libgmsh-dev安装 PoV-Ray 1sudo apt-get install povray测试安装,在 neper 的 build 目录下 1make test WSL ubuntu 安装 neper 安装环境 1234567sudo apt install cmakesudo apt install g++sudo apt install gccsudo apt-get install libnlopt.devsudo apt-get install povraysudo apt-get install libgmsh-devsudo apt-get install imagemagick安装 GSL ,在 GSL 目录下 123sudo ./configuresudo makesudo make install 编译安装 neper下载 neper ,解压,进入 neper/src/ 目录,执行编译 123mkdir build && cd buid && cmake ..make -jsudo make install在 build 目录下执行 make test 进行测试,可以在 build 目录下找到相应的生成文件 运行例子来源 neper 官网 保存以下例子为 gene_gene.sh,执行 sudo sh ./gene_gene.sh 12345678910111213141516#!/bin/bashNEPER="neper --rcfile none"$NEPER -T -n 1000 -domain "cube(1,1,1)" -o gene_gene_1$NEPER -T -n 1000 -domain "cylinder(1,1,200)" -o gene_gene_2$NEPER -T -n 1000 -domain "sphere(1,1000)" -o gene_gene_3C="-datacellcol id -datacelltrs 0.5 -cameraangle 12 -imagesize 600:600"$NEPER -V gene_gene_1.tess $C -print gene_gene_1$NEPER -V gene_gene_2.tess $C -showedge "cyl==0" -cameraangle 11 -print gene_gene_2$NEPER -V gene_gene_3.tess $C -showedge "polynb>1" -cameraangle 9 -print gene_gene_3convert +append gene_gene_?.png gene_gene.pngexit 0 可能出现的错误以及解决方案No CMAKE_CXX_COMPILER could be found. Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH. 需要安装 cmake FindGSL.cmake: gsl-config/pkg-config gsl not found. Please set it manually. GSL_CONFIG=GSL_CONFIG-NOTFOUND CMake Error at cmake/FindGSL.cmake:178 (MESSAGE): GSL required, please specify it's location. Call Stack (most recent call first): contrib/ut/CMakeLists.txt:94 (find_package) 需要安装 GSL CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find NLOPT (missing: NLOPT_LIBRARY NLOPT_INCLUDE_DIRS) Call Stack (most recent call first): /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) cmake/FindNLOPT.cmake:35 (find_package_handle_standard_args) contrib/orilib/CMakeLists.txt:115 (find_package) 需要安装 NLOPT Error : Povray not found! Make sure it is available at the command line then run Neper again. 需要安装 povray 和 gmsh convert: not found 需要安装 imagemagick 参考链接:Neper 在 Linux(ubuntu)下的安装方法 |
CopyRight 2018-2019 实验室设备网 版权所有 |