diff --git a/opencarp/CMakeLists.txt b/opencarp/CMakeLists.txt index 426ef6af402b79019617241008870e1865fbc293..19252340b93661e6f443098ee3af1d57c68ddc3f 100644 --- a/opencarp/CMakeLists.txt +++ b/opencarp/CMakeLists.txt @@ -10,20 +10,4 @@ include_directories(zlib) add_subdirectory(zlib) include_directories(openCARP) -add_subdirectory(openCARP) - -if(BUILD_EXAMPLES) - # install carputils - install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/external/carputils" - DESTINATION share COMPONENT carputils - USE_SOURCE_PERMISSIONS - PATTERN ".*" EXCLUDE - ) - - # install openCARP examples - install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/external/tutorials" - DESTINATION share COMPONENT examples - USE_SOURCE_PERMISSIONS - PATTERN ".*" EXCLUDE - ) -endif() \ No newline at end of file +add_subdirectory(openCARP) \ No newline at end of file diff --git a/opencarp/README.md b/opencarp/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bf420ef5445d029b5a5f41318b10b8886329bce8 --- /dev/null +++ b/opencarp/README.md @@ -0,0 +1,39 @@ +To install the openCARP codewithin M++, run the following commands: + +### Installation + +Make sure to install crucial packages on your machine: + +```sudo apt-get install gengetopt``` + +### Downloading submodules: + +The submodules used in openCARP have to be updated manually, as the repositories have a respectable file size. +They are updated with the following commands: + +``` +git -c submodule."opencarp/petsc".update=checkout submodule update --init --recursive +git -c submodule."opencarp/openCARP".update=checkout submodule update --init --recursive +``` + +### Installing PetSc + +To install petsc, the following command should work: + +``` +cd petsc +./configure --prefix=../include/petsc --download-mpich --download-fblaslapack --download-metis --download-parmetis --download-hypre +make all +make install +``` + +### Installing openCARP +Make sure you are in the top-level `opencarp` again. Then run + +``` +cmake -S. -B_build -DDLOPEN=ON -DBUILD_EXTERNAL=ON -DCMAKE_BUILD_TYPE=Release +cd _build +make all +``` +Now all code files are generated in the `openCARP` folder. +The compiled code can now be found in `_build/openCARP/bin` \ No newline at end of file