optimad / bitpit Goto Github PK
View Code? Open in Web Editor NEWOpen source library for scientific HPC
Home Page: http://optimad.github.io/bitpit/
License: GNU Lesser General Public License v3.0
Open source library for scientific HPC
Home Page: http://optimad.github.io/bitpit/
License: GNU Lesser General Public License v3.0
Hello - I have been able to use PabloUniform to create an octree with refined grids around my region of interest, interface of a geometric object such as sphere. Here are my questions:
1 - Is there a way for me to compute first order and second order spatial gradient of a scaler field that I have previously simulated/computed using my octree grid created with PabloUniform?
2 - Can you use this grid created with PabloUniform to perform singed distance computations using the level set module? From the few examples provided, level set module seems to be only compatible with VolOctree class.
Thanks
Discretization module needs unit testing.
Dear,
When using ccmake to install bitpit, I get the following error:
CMake Error at
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137
(message):
PETSc could not be found. Be sure to set PETSC_DIR and PETSC_ARCH.
(missing: PETSC_INCLUDES PETSC_LIBRARIES PETSC_EXECUTABLE_RUNS)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378
(_FPHSA_FAILURE_MESSAGE)
external/PETSc/cmake/FindPETSc.cmake:348
(find_package_handle_standard_args)
CMakeLists.txt:524 (find_package)
However, I have set all environmental variables (PETSC_DIR, PETSC_ARCH, PETSC_INCLUDES, PETSC_LIBRARIES and PETSC_EXECUTABLE_RUNS). Does anybody know how to solve this?
Containers module needs unit testing.
Volunstructured module needs unit testing.
Hi,
when I compile my library in debug mode I use the macro "-D DEBUG" to activate some feature.
When I link my program to bitpit, I have a conflict.
Compiling (g++ -std=c++17 -pthread -g2 -O0 **-D DEBUG** -D MKLENABLED ) Octree_generator.cpp <command-line>:0:7: error: expected identifier before numeric constant /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:55:9: note: in expansion of macro ‘DEBUG’ DEBUG ^~~~~ <command-line>:0:7: error: expected ‘}’ before numeric constant /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:55:9: note: in expansion of macro ‘DEBUG’ DEBUG ^~~~~ <command-line>:0:7: error: expected unqualified-id before numeric constant /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:55:9: note: in expansion of macro ‘DEBUG’ DEBUG ^~~~~ In file included from /home/lverzeroli01/src/bitpit/include/bitpit/bitpit_IO.hpp:48:0, from /home/lverzeroli01/src/bitpit/include/bitpit/surfunstructured.hpp:31, from /home/lverzeroli01/src/bitpit/include/bitpit/bitpit_surfunstructured.hpp:30, from GenerateSimpleShapes.hpp:4, from Octree_generator.cpp:23: /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:63:13: error: ‘Verbosity’ does not name a type; did you mean ‘Visibility’? typedef Verbosity Priority; ^~~~~~~~~ Visibility /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:136:22: error: ‘log’ is not a class, namespace, or enumeration void setPriority(log::Priority priority); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:137:5: error: ‘log’ does not name a type log::Priority getPriority(); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:139:24: error: ‘log’ is not a class, namespace, or enumeration void setVisibility(log::Visibility visibility); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:140:5: error: ‘log’ does not name a type log::Visibility getVisibility(); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:142:25: error: ‘log’ is not a class, namespace, or enumeration void setVerbosities(log::Verbosity verbosity); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:150:30: error: ‘log’ is not a class, namespace, or enumeration void setConsoleVerbosity(log::Verbosity verbosity); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:151:5: error: ‘log’ does not name a type log::Verbosity getConsoleVerbosity(); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:158:27: error: ‘log’ is not a class, namespace, or enumeration void setFileVerbosity(log::Verbosity verbosity); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:159:5: error: ‘log’ does not name a type log::Verbosity getFileVerbosity(); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:164:43: error: ‘log’ is not a class, namespace, or enumeration void println(const std::string &line, log::Priority priority); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:165:43: error: ‘log’ is not a class, namespace, or enumeration void println(const std::string &line, log::Visibility visibility); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:165:10: error: ‘void Logger::println(const string&, int)’ cannot be overloaded void println(const std::string &line, log::Visibility visibility); ^~~~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:164:10: error: with ‘void Logger::println(const string&, int)’ void println(const std::string &line, log::Priority priority); ^~~~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:166:49: error: ‘log’ does not name a type void println(const std::string &line, const log::Priority priority, log::Visibility visibility); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:166:63: error: expected unqualified-id before ‘priority’ void println(const std::string &line, const log::Priority priority, log::Visibility visibility); ^~~~~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:166:63: error: expected ‘)’ before ‘priority’ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:166:54: error: expected ‘;’ at end of member declaration void println(const std::string &line, const log::Priority priority, log::Visibility visibility); ^~~~~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:166:63: error: ‘priority’ does not name a type; did you mean ‘error_t’? void println(const std::string &line, const log::Priority priority, log::Visibility visibility); ^~~~~~~~ error_t /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:169:41: error: ‘log’ is not a class, namespace, or enumeration void print(const std::string &line, log::Priority priority); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:170:41: error: ‘log’ is not a class, namespace, or enumeration void print(const std::string &line, log::Visibility visibility); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:170:10: error: ‘void Logger::print(const string&, int)’ cannot be overloaded void print(const std::string &line, log::Visibility visibility); ^~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:169:10: error: with ‘void Logger::print(const string&, int)’ void print(const std::string &line, log::Priority priority); ^~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:171:41: error: ‘log’ is not a class, namespace, or enumeration void print(const std::string &line, log::Priority priority, log::Visibility visibility); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:171:65: error: ‘log’ is not a class, namespace, or enumeration void print(const std::string &line, log::Priority priority, log::Visibility visibility); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:181:5: error: ‘log’ does not name a type log::Priority m_priority; ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:182:5: error: ‘log’ does not name a type log::Visibility m_visibility; ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:184:5: error: ‘log’ does not name a type log::Verbosity m_consoleVerbosity; ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:185:5: error: ‘log’ does not name a type log::Verbosity m_fileVerbosity; ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:207:21: error: ‘log’ is not a class, namespace, or enumeration void initialize(log::Mode mode, bool reset, ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:210:21: error: ‘log’ is not a class, namespace, or enumeration void initialize(log::Mode mode, bool reset = false, ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:214:21: error: ‘log’ is not a class, namespace, or enumeration void initialize(log::Mode mode, const std::string &name, ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:230:18: error: ‘log’ is not a class, namespace, or enumeration bool setMode(log::Mode mode); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:231:5: error: ‘log’ does not name a type log::Mode getMode() const; ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:233:25: error: ‘log’ is not a class, namespace, or enumeration void setVerbosities(log::Verbosity verbosity); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:234:30: error: ‘log’ is not a class, namespace, or enumeration void setConsoleVerbosity(log::Verbosity verbosity); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:235:27: error: ‘log’ is not a class, namespace, or enumeration void setFileVerbosity(log::Verbosity verbosity); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:245:5: error: ‘log’ does not name a type log::Mode m_mode; ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:268:11: error: ‘namespace log { }’ redeclared as different kind of symbol namespace log { ^~~ In file included from /usr/include/features.h:424:0, from /usr/include/x86_64-linux-gnu/c++/7/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h:533, from /usr/include/c++/7/iostream:38, from Octree_generator.cpp:18: /usr/include/x86_64-linux-gnu/bits/mathcalls.h:104:1: note: previous declaration ‘double log(double)’ __MATHCALL_VEC (log,, (_Mdouble_ __x)); ^ In file included from /home/lverzeroli01/src/bitpit/include/bitpit/bitpit_IO.hpp:48:0, from /home/lverzeroli01/src/bitpit/include/bitpit/surfunstructured.hpp:31, from /home/lverzeroli01/src/bitpit/include/bitpit/bitpit_surfunstructured.hpp:30, from GenerateSimpleShapes.hpp:4, from Octree_generator.cpp:23: /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:306:47: error: ‘log’ does not name a type Logger& setPriority(Logger& logger, const log::Priority &priority); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:306:61: error: expected unqualified-id before ‘&’ token Logger& setPriority(Logger& logger, const log::Priority &priority); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:306:61: error: expected ‘)’ before ‘&’ token /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:306:62: error: expected initializer before ‘priority’ Logger& setPriority(Logger& logger, const log::Priority &priority); ^~~~~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:307:36: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> struct LoggerManipulator’ LoggerManipulator<log::Priority> priority(const log::Priority &priority); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:307:36: note: expected a type, got ‘log’ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:307:53: error: ‘log’ does not name a type LoggerManipulator<log::Priority> priority(const log::Priority &priority); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:307:67: error: expected unqualified-id before ‘&’ token LoggerManipulator<log::Priority> priority(const log::Priority &priority); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:307:67: error: expected ‘)’ before ‘&’ token /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:307:68: error: expected initializer before ‘priority’ LoggerManipulator<log::Priority> priority(const log::Priority &priority); ^~~~~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:309:49: error: ‘log’ does not name a type Logger& setVisibility(Logger& logger, const log::Visibility &visibility); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:309:65: error: expected unqualified-id before ‘&’ token Logger& setVisibility(Logger& logger, const log::Visibility &visibility); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:309:65: error: expected ‘)’ before ‘&’ token /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:309:66: error: expected initializer before ‘visibility’ Logger& setVisibility(Logger& logger, const log::Visibility &visibility); ^~~~~~~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:310:38: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> struct LoggerManipulator’ LoggerManipulator<log::Visibility> visibility(const log::Visibility &visibility); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:310:38: note: expected a type, got ‘log’ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:310:57: error: ‘log’ does not name a type LoggerManipulator<log::Visibility> visibility(const log::Visibility &visibility); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:310:73: error: expected unqualified-id before ‘&’ token LoggerManipulator<log::Visibility> visibility(const log::Visibility &visibility); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:310:73: error: expected ‘)’ before ‘&’ token /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:310:74: error: expected initializer before ‘visibility’ LoggerManipulator<log::Visibility> visibility(const log::Visibility &visibility); ^~~~~~~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:312:50: error: ‘log’ does not name a type Logger& setVerbosities(Logger& logger, const log::Verbosity &verbosity); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:312:65: error: expected unqualified-id before ‘&’ token Logger& setVerbosities(Logger& logger, const log::Verbosity &verbosity); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:312:65: error: expected ‘)’ before ‘&’ token /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:312:66: error: expected initializer before ‘verbosity’ Logger& setVerbosities(Logger& logger, const log::Verbosity &verbosity); ^~~~~~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:313:36: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> struct LoggerManipulator’ LoggerManipulator<log::Priority> verbosities(const log::Verbosity &verbosity); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:313:36: note: expected a type, got ‘log’ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:313:56: error: ‘log’ does not name a type LoggerManipulator<log::Priority> verbosities(const log::Verbosity &verbosity); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:313:71: error: expected unqualified-id before ‘&’ token LoggerManipulator<log::Priority> verbosities(const log::Verbosity &verbosity); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:313:71: error: expected ‘)’ before ‘&’ token /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:313:72: error: expected initializer before ‘verbosity’ LoggerManipulator<log::Priority> verbosities(const log::Verbosity &verbosity); ^~~~~~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:315:55: error: ‘log’ does not name a type Logger& setConsoleVerbosity(Logger& logger, const log::Verbosity &verbosity); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:315:70: error: expected unqualified-id before ‘&’ token Logger& setConsoleVerbosity(Logger& logger, const log::Verbosity &verbosity); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:315:70: error: expected ‘)’ before ‘&’ token /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:315:71: error: expected initializer before ‘verbosity’ Logger& setConsoleVerbosity(Logger& logger, const log::Verbosity &verbosity); ^~~~~~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:316:36: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> struct LoggerManipulator’ LoggerManipulator<log::Priority> consoleVerbosity(const log::Verbosity &verbosity); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:316:36: note: expected a type, got ‘log’ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:316:61: error: ‘log’ does not name a type LoggerManipulator<log::Priority> consoleVerbosity(const log::Verbosity &verbosity); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:316:76: error: expected unqualified-id before ‘&’ token LoggerManipulator<log::Priority> consoleVerbosity(const log::Verbosity &verbosity); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:316:76: error: expected ‘)’ before ‘&’ token /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:316:77: error: expected initializer before ‘verbosity’ LoggerManipulator<log::Priority> consoleVerbosity(const log::Verbosity &verbosity); ^~~~~~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:318:52: error: ‘log’ does not name a type Logger& setFileVerbosity(Logger& logger, const log::Verbosity &verbosity); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:318:67: error: expected unqualified-id before ‘&’ token Logger& setFileVerbosity(Logger& logger, const log::Verbosity &verbosity); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:318:67: error: expected ‘)’ before ‘&’ token /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:318:68: error: expected initializer before ‘verbosity’ Logger& setFileVerbosity(Logger& logger, const log::Verbosity &verbosity); ^~~~~~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:319:36: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> struct LoggerManipulator’ LoggerManipulator<log::Priority> fileVerbosity(const log::Verbosity &verbosity); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:319:36: note: expected a type, got ‘log’ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:319:58: error: ‘log’ does not name a type LoggerManipulator<log::Priority> fileVerbosity(const log::Verbosity &verbosity); ^~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:319:73: error: expected unqualified-id before ‘&’ token LoggerManipulator<log::Priority> fileVerbosity(const log::Verbosity &verbosity); ^ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:319:73: error: expected ‘)’ before ‘&’ token /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:319:74: error: expected initializer before ‘verbosity’ LoggerManipulator<log::Priority> fileVerbosity(const log::Verbosity &verbosity); ^~~~~~~~~ /home/lverzeroli01/src/bitpit/include/bitpit/logger.hpp:326:1: error: expected declaration before ‘}’ token } ^ ../../Make.common:59: recipe for target 'Octree_generator.o' failed make: *** [Octree_generator.o] Error 1
If I change the macro -D DEBUG with something else (i.e. debug), it works.
Can you suggest me something to keep on using -D DEBUG?
PABLO module needs unit testing.
Hello,
I am trying to build bitpit on ubuntu 18.04.
I have installed the required libraries (lapack
, blas
, libxml2
, ...etc). I have also build PETSC
successfully following these instructions.
After that, I added the following to ~/.bashrc
export PETSC_DIR='/mnt/d/Programs/mimmo_bitpit/petsc'
export PETSC_ARCH='arch-linux2-c-debug'
But when I try to build bitpit I get the following error:
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
PETSc could not be found. Be sure to set PETSC_DIR and PETSC_ARCH.
(missing: PETSC_INCLUDES PETSC_LIBRARIES PETSC_EXECUTABLE_RUNS)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
external/PETSc/cmake/FindPETSc.cmake:348 (find_package_handle_standard_args)
CMakeLists.txt:524 (find_package)
Thank you
Hi,
I've implemented a variant of the class PabloUniform which is able to manage octrees with different edge length. Namely, i can use Not only square and cube but also rectangle and rectangular cuboid octree.
Are you interested in this feature? Maybe I can open a pull request.
HI,
i'm looking the results produced by bitpit in the test folder after running 'make test'.
I'm using paraview 5.8.0, 5.8.1 and 5.9.0 but I can't read the vtu files.
I get this error message:
ERROR: In /home/buildslave/dashboards/buildbot/paraview-pvbinsdash-linux-shared-release_superbuild/build/superbuild/paraview/src/VTK/IO/XML/vtkXMLUnstructuredDataReader.cxx, line 745
vtkXMLUnstructuredGridReader (0x644f3f0): Cannot read cell data from Cells. Offsets and connectivity arrays must be the same type.
Can you help me? I'm using the bitpit version 1.5. (the same for the 1.6)
Hi everyone:
After installing the BLAS CBLAS and lapack. I have encountered the following error while building. Could anyone help me? Thanks. My OS is Ubuntu 16.04 LTS, gcc version 5.4.0, cmake version 3.5.1.
[ 2%] Built target COMMON_TARGET_OBJECT
[ 5%] Built target POD_TARGET_OBJECT
[ 9%] Built target CONTAINERS_TARGET_OBJECT
[ 20%] Built target IO_TARGET_OBJECT
[ 20%] Built target LA_TARGET_OBJECT
[ 21%] Built target CG_TARGET_OBJECT
[ 25%] Built target PABLO_TARGET_OBJECT
[ 26%] Built target SURFUNSTRUCTURED_TARGET_OBJECT
[ 36%] Built target PATCHKERNEL_TARGET_OBJECT
[ 36%] Built target VOLCARTESIAN_TARGET_OBJECT
[ 38%] Built target VOLOCTREE_TARGET_OBJECT
[ 38%] Built target VOLUNSTRUCTURED_TARGET_OBJECT
[ 38%] Built target RBF_TARGET_OBJECT
[ 45%] Built target LEVELSET_TARGET_OBJECT
[ 46%] Built target bitpit
[ 49%] Built target test_common_00001
[ 49%] Built target test_operators_00001
[ 52%] Built target test_IO_00003
[ 52%] Built target test_containers_00001
[ 54%] Built target test_IO_00004
[ 54%] Built target test_IO_00002
[ 57%] Built target test_IO_00005
[ 57%] Built target test_IO_00006
[ 60%] Built target test_LA_00001
[ 60%] Built target test_IO_00001
[ 61%] Linking CXX executable test_CG_00002
[ 61%] Built target test_SA_00001
[ 62%] Linking CXX executable test_CG_00001
/usr/local/lib/liblapack.a(xerbla.o): In function xerbla_': xerbla.f:(.text+0x49): undefined reference to
_gfortran_st_write'
xerbla.f:(.text+0x54): undefined reference to _gfortran_string_len_trim' xerbla.f:(.text+0x69): undefined reference to
_gfortran_transfer_character_write'
xerbla.f:(.text+0x79): undefined reference to _gfortran_transfer_integer_write' xerbla.f:(.text+0x81): undefined reference to
gfortran_st_write_done'
xerbla.f:(.text+0x8a): undefined reference to _gfortran_stop_string' collect2: error: ld returned 1 exit status test/CG/CMakeFiles/test_CG_00002.dir/build.make:99: recipe for target 'test/CG/test_CG_00002' failed make[2]: *** [test/CG/test_CG_00002] Error 1 CMakeFiles/Makefile2:2305: recipe for target 'test/CG/CMakeFiles/test_CG_00002.dir/all' failed make[1]: *** [test/CG/CMakeFiles/test_CG_00002.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... /usr/local/lib/liblapack.a(xerbla.o): In function
xerbla':
xerbla.f:(.text+0x49): undefined reference to _gfortran_st_write' xerbla.f:(.text+0x54): undefined reference to
_gfortran_string_len_trim'
xerbla.f:(.text+0x69): undefined reference to _gfortran_transfer_character_write' xerbla.f:(.text+0x79): undefined reference to
_gfortran_transfer_integer_write'
xerbla.f:(.text+0x81): undefined reference to _gfortran_st_write_done' xerbla.f:(.text+0x8a): undefined reference to
_gfortran_stop_string'
collect2: error: ld returned 1 exit status
test/CG/CMakeFiles/test_CG_00001.dir/build.make:99: recipe for target 'test/CG/test_CG_00001' failed
make[2]: *** [test/CG/test_CG_00001] Error 1
CMakeFiles/Makefile2:2374: recipe for target 'test/CG/CMakeFiles/test_CG_00001.dir/all' failed
make[1]: *** [test/CG/CMakeFiles/test_CG_00001.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
SA module needs unit testing.
Hello,
I would like to suggest the following minor change in the top-level CMakeLists.txt in order to enable bitpit to be built as a subproject of another cmake project, e.g. like this:
project(OUTER_PROJ)
...
add_subdirectory(bitpit)
This currently doesn't work, but very tiny cmake modifications are required to re-enable this:
Let me know if you agree on this. I can provide a PR for it if needed.
Hello,
I'm trying to optimize my code on non-conforming regions of Cartesian hierarchical meshes, using the Volctree data structure.
In this context I would ask the extremal points of an interface, can you help me to make it easier than expected? I can't find if there is a direct access function to this infomation.
Given the index of an interface I can get the centroid and the size, it is necessary to compute myself the extremals using these informations?
I was familiar with the getNodes of PABLO, but currently I'm interested also to intersection points, and I would prefer using the Interface or the Cell (it is coherent with the remaining part of the code).
Thank you in advance,
Alice
Levelset module needs unit testing.
Hi there !
We've been using PABLO for a couple of months to build a new CFD simulation code but I've run into a slight problem as of late.
When I'm trying to extract corner neighbours of a cell using (for example) findNeighbours
with codim=2
in 2D, the function will yield no result along periodic borders. Everything is ok inside the domain, the problem only arises at periodic boundaries.
Here is a MWE to see the problem:
int run_2d()
{
ParaTree mesh(2);
/** Periodic boundary conditions */
mesh.setPeriodic(0);
mesh.setPeriodic(1);
mesh.setPeriodic(2);
mesh.setPeriodic(3);
/** Global refinement, once**/
mesh.adaptGlobalRefine();
mesh.adapt();
mesh.updateConnectivity();
uint32_t nOct = mesh.getNumOctants();
std::cout << "Number of Octants : " << nOct << std::endl;
std::cout << "Extracting the four corner neighbours of each Oct : " << std::endl;
for (uint32_t iOct=0; iOct < nOct; ++iOct) {
std::vector<uint32_t> neigh;
std::vector<bool> isGhost;
std::cout << ". iOct = " << iOct << std::endl;
for (uint8_t iCorner=0; iCorner<4; ++iCorner) {
mesh.findNeighbours(iOct, iCorner, 2, neigh, isGhost);
std::cout << " - For corner " << (int)iCorner << "; " << neigh.size() << " neighbours: [ ";
for (auto iNeigh: neigh)
std::cout << iNeigh << " ";
std::cout << "]" << std::endl;
}
}
std::cout << "Extracting the four face neighbours of each Oct : " << std::endl;
for (uint32_t iOct=0; iOct < nOct; ++iOct) {
std::vector<uint32_t> neigh;
std::vector<bool> isGhost;
std::cout << ". iOct = " << iOct << std::endl;
for (uint8_t iFace=0; iFace<4; ++iFace) {
mesh.findNeighbours(iOct, iFace, 1, neigh, isGhost);
std::cout << " - For face " << (int)iFace << "; " << neigh.size() << " neighbours: [ ";
for (auto iNeigh: neigh)
std::cout << iNeigh << " ";
std::cout << "]" << std::endl;
}
}
return 0;
}
In this example, we have 4 cells. Trying to extract the corner nodes of the cells will give us only one result for each node (the one that is inside the domain), while we should have 4 neighbours for each cell.
I don't know if it's easy to fix for you. For the moment, I'm switching to using multiple calls to findNeighbours along faces, but this is not ideal. So if you have a better recommendation I'd be glad to hear it :)
Thanks in advance !
Start load balance #0 :: PABLO :: --------------------------------------------- #0 :: PABLO :: LOAD BALANCE #0 :: PABLO :: #0 :: PABLO :: Initial Serial distribution : #0 :: PABLO :: Octants for proc 0 : 64 #0 :: PABLO :: Octants for proc 1 : 0 terminate called after throwing an instance of 'std::runtime_error' what(): Stream is not expandable. Level: 0 Start load balance terminate called after throwing an instance of 'std::runtime_error' what(): Stream is not expandable.
the issue is caused by template<typename T> bitpit::OBinaryStream& operator<<(bitpit::OBinaryStream &stream, const T &value)
using sizeof on a stream buffer that was sized using getBinarySize
In void ParaTree::buildGhostOctants(const std::map<int, u32vector>& bordersPerProc, const std::vector<AccretionData>& accretions)
Hi,
I've just discovered your library and find it very interesting. Actually, after a short glance at the documentation, It fits my purposes perfectly. One thing I could not see directly, however, is the following.
Suppose you want to exchange data from two solvers spatial boundaries, i.e. Solver 1 requires the data in a set of cells of Solver 2 and vice versa. Is it possible already or is it easy to implement into bitpit (probably into PABLO) in the MPI setting?
Dear bitpit developers,
My experience are limited to making projects on windows by Visual Studio, so the question might sound silly to you.
I think I've successfully installed bitpit, and trying to run some examples.
What I've done is that I've copied the first Pablo example and trying to make my own CmakeLists.txt and run it, but it seems it does not work well.
`CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(helloworld)
SET(BITPIT_DIR "/usr/local/lib/cmake/bitpit-1.7")
FIND_PACKAGE(BITPIT REQUIRED)
include(${BITPIT_USE_FILE})
INCLUDE_DIRECTORIES(${BITPIT_INCLUDE_DIRS})
ADD_DEFINITIONS(${BITPIT_DEFINITIONS})
ADD_EXECUTABLE(a.out main.cpp)
TARGET_LINK_LIBRARIES(a.out ${BITPIT_LIBRARIES})`
So here is my CMakeLists.txt file and cmake command works well, but when I run make , it keeps showing the error
icpc: error #10236: File not found: 'BITPIT_ENABLE_MPI=0'
Is there something that I've made mistake?
I would like to thank you in advance.
Hi,
I opened an issue a while ago on periodic conditions and border nodes in findNeighbours (here). We have just started working on a 3D version of our code, and the problem has started appearing again with multiple MPI processes.
If we take the example no11 in the examples
folder, and add one more refinement level (see attachment, added a .txt extension so github would link it). Then, when we run with 4 mpi processes, some octants will be missing corner neighbours, but also edge neighbours. See attachment (log.rank1.txt), lines 117-118 for an example of missing nodes for a corner neighbour, and 395 for an edge neighbour.
The problem does not appear without MPI, so our take is that the periodic edges and corners are not included in the ghosts when loadbalancing.
hi, I tried to build bitpit by CMake, but I have a problem. .
Below is the content.
#----------------------------------------------------------------------------------------------------------------#
CMake Error at C:/Users/Dio/Downloads/cmake-3.10.2-win64-x64/share/cmake-3.10/Modules/FindBLAS.cmake:699 (message):
A required library with BLAS API not found. Please specify library
location.
Call Stack (most recent call first):
C:/Users/Dio/Downloads/cmake-3.10.2-win64-x64/share/cmake-3.10/Modules/FindLAPACK.cmake:162 (find_package)
CMakeLists.txt:425 (find_package)
#----------------------------------------------------------------------------------------------------------------#
so, I'm compiled LAPACK by CLAPCK.
but Where should I add it?
I'm tried add environment variables in "CMakeList.txt"
Below is the content.
#---------------------------------------------------------------------------*/
set(LAPACKE_DIR, "C:/trybuild/lapack")
set(LAPACKE_INCDIR, "C:/trybuild/lapack/include")
set(LAPACKE_LIBDIR, "C:/trybuild/lapack/lib")
#------------------------------------------------------------------------------------#
CMake settings
#------------------------------------------------------------------------------------#
cmake_minimum_required(VERSION 2.8)
project("bitpit" CXX)
But. it would have the same error as this. How can I solve it? Thanks!
Hello,
I want to know if it's possible to do particle-mesh simulation in bitpit framework? Such as particle-in-cell (PIC) . And is it possible to manage the particles in MPI as AMR mesh?
POD module needs unit testing.
Hi,
Is it possible to use PABLO with lattice Boltzmann method, how?
Regards
Ali
Dear,
When I am running ccmake to configure bitpit, as suggested in:
https://github.com/optimad/bitpit/blob/master/INSTALL.md
I get the following error:
Does anybody know how to fix it?
Voloctree module needs unit testing.
Hi all,
I have three (maybe trivial questions) traversing my Voloctree in parallel, first of all:
Supposing now that I am traversing the structure Voloctree named mytree in this way:
for( auto & cell : mytree.getCells() ){
const long id = cell.getId() ;
[...]
Thank you for your help.
Volcartesian module needs unit testing.
bitpit needs an infrastructure for running unit tests.
I order to ease writing IO routine outside of class ParaTree/PabloUniform, a routine that needs to access mesh connectivity and geometry, I would like to suggest the following modifications:
I'll submit a PR for that so you can have an idea of the modifications
Hello everyone,
Is there a simple way to add individual parts of a SurfUnstructured as a new object to the Levelset? My use case is that I would like to access and perform operations only with certain parts of the object. Is there a simple way to achieve this?
Or do I have to decompose the multi solid STL into individuals, so that I can add them as individual objects to the Levelset?
Any advice would be highly appreciated.
RBFs make use of std::pow(a,b), in which b is always an integer. By carrying out tests for the std::pow function, it seems that this is suboptimal in contrast to the case in which an in-house version of a "pow" function is used, which is specialized for exponents of type of integer. The speed-up is at least an order of magnitude.
Current implementation of DiscretizationStencil class allows to store different set of stencils. Each stencil is stored in a different "bucket". This feature was used to store in one single data structure the stencils of the different interfaces of a cell.
Since some months, we no longer need DiscretizationStencil class being able to store different set of stencils. Can we remove this feature? @edoardolombardi @roccoarpa Are you relying on stencil buckets in your applications?
CG module needs unit testing.
Surfunstructured module needs unit testing.
I noticed that PabloUniform is overloading some member functions of the base class ParaTree but not all of them, and so some of the base class members are (accidentally ?) hidden in the derived class; I don't think this the intended behavior, maybe someone can clarify this.
Just as an example:
PabloTree defines 6 different versions of method "getNodes" with different signatures, while
PabloUniform redefines 5 of them.
The problem is that the following public member of ParaTree
const u32arr3vector & getNodes() const;
is not available in the derived class PabloUniform because it is hidden by other "getNodes" avaialble in the derived class.
I think, the above member getNodes() should also be available in the derived class. So a possible
solution is just to add in class PabloUniform declaration:
using ParaTree::getNodes;
What do you think ?
On master branch, tip commit 8cee428:
Enabled serial compiling (ENABLE_MPI = OFF) -> Communications module depending on MPI is not disabled by default.
IO module needs unit testing.
Hi all,
sorry to bother you, I can't find how to get the interfaces information from a Cell or an Octant. I can get the interfaces globally using getInterfaces(), moreover when I would examine the interfaces belonging on a cell I guess that I'm missing something.
Supposing four faces as example I use
` for (int i=0;i<4;i++){
long inter=cell.getInterface(i,ID);
std::array<double,3> normal = mytree.evalInterfaceNormal(inter);
cout << endl<< "index of face "<< inter<< endl << normal<<endl;
}`
where ID is initialized to 0. When I print the normal vectors and the indices it is evident that I'm doing an error; can you example me the correct way to extract the index of the interfaces when two or more of them lie on the same face? Is the choice to initialize ID wrong?
I also tried to get the interfaces of the face using
long *inter=cell.getInterfaces(i);
but I'm not sure about the correct use of the obtained pointer in interface-class functions.
Thank you for your help,
Alice
LTO currently doesn't work in MSYS2/MInGW compiling of bitpit. Review for MinGW misconfiguration/problems.
issues raised in pull #145
Hi,
This assert triggers when I load balance my PABLO octree with user data.
Here is a short reproducer to compile in debug and run with at least 2 MPI :
PABLO_test3.cpp.txt
When building current master 1630f0f I get the follow compiler warning:
bitpit/src/voloctree/voloctree.cpp(1774): warning #823: reference is to variable "k" (declared at line 1721) -- under old for-init scoping rules it would have been variable "k" (declared at line 1729)
createdCells[k] = cellId;
It seems that there are are a pair of nested loops, both using the variable name "k" as their loop index.
I suggest that the inner loop variable name should be changed (to "j"?), both to silence the warning and to make the code more explicit in intent.
Operators module needs unit testing.
Communications module needs unit testing.
Hello,
If i'm not mistaken currently, there is no API to get center coordinates for a ghost octant.
I can send a patch for that.
Would you prefer a separate function call, or just keep current API and add a last default argument, a boolean stating if the octant should be considered regular or ghost .
Hi,
First I congratulate all of you guys for this project. I also wish you a happy new year !
I am interested in using your library in the CFD/LBM context but I find some difficulties to understand the voloctree class:
I saw that the volcartesian class provides with the NXxNYxNZ mesh generation capability but the octal/AMR like refinement is not accessible anymore: am I mistaken?
Maybe it is necessary to derive a new class but, if so, I will need a confirmation and, if possible, some help.
Best,
Hatem
Originally posted by @ActarusG69 in #1 (comment)
I'd like to suggest here two minor ideas to slightly improve cmake in bitpit, related to modern cmake best practice use
e.g. when calling find_package(MPI), cmake defines several imported targets like MPI::MPI_CXX. By linking to MPI::MPI_CXX, cmake will automatically transfer both compile and link flags; and thus you don't need to manipulate CMAKE_CXX_FLAGS, MPI_CXX_LINK_FLAGS or include_directories anymore, all you need is just to link your target to MPI::MPI_CXX
find_package(MPI)
# define an executable or library target, e.g.
add_executable(my_executable my_source.cpp)
target_link_libraries(my_executable PRIVATE MPI::MPI_CXX)
It is possible to use this feature with executables, as well as STATIC / SHARED libraries, and since cmake 3.12 with OBJECT libraries too (as OBJECT lib are used in bitpit for the different modules).
#####################################################################
# Find BitPit
#####################################################################
find_package(BITPIT REQUIRED)
# create imported target for bitpit library
if (BITPIT_FOUND)
if(NOT TARGET BITPIT::BITPIT)
get_filename_component(LIB_EXT "${BITPIT_LIBRARY}" EXT)
if(LIB_EXT STREQUAL ".a" OR LIB_EXT STREQUAL ".lib")
set(LIB_TYPE STATIC)
else()
set(LIB_TYPE SHARED)
endif()
add_library(BITPIT::BITPIT ${LIB_TYPE} IMPORTED GLOBAL)
set(_tmp_dep_libs "${BITPIT_LIBRARIES}")
list(REMOVE_DUPLICATES _tmp_dep_libs)
set_target_properties(BITPIT::BITPIT
PROPERTIES
IMPORTED_LOCATION "${BITPIT_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${BITPIT_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${_tmp_dep_libs}")
endif()
endif(BITPIT_FOUND)
Then I can use bitpit simply by :
target_link_libraries(my_exe PRIVATE BITPIT::BITPIT)
My suggestion is to add the cmake code above defining BITPIT::BITPIT alias library directly in BITPITConfig.cmake.
LA module needs unit testing.
Hi,
I get the error at the translation stage:
[ 10%] Built target LEVELSET_TARGET_OBJECT [ 13%] Built target COMMON_TARGET_OBJECT [ 14%] Building CXX object src/CG/CMakeFiles/CG_TARGET_OBJECT.dir/CG_elem.cpp.o In file included from /usr/include/c++/4.8.2/complex:45:0, from /usr/include/c++/4.8.2/ccomplex:38, from /usr/include/c++/4.8.2/complex.h:32, from /usr/include/lapacke/lapacke.h:77, from /home/Pekka/mimmo/bitpit/src/CG/CG_elem.cpp:30: /usr/include/c++/4.8.2/sstream:63:3: error: template with C linkage template<typename _CharT, typename _Traits, typename _Alloc> ^ /usr/include/c++/4.8.2/sstream:271:3: error: template with C linkage template<typename _CharT, typename _Traits, typename _Alloc>
If I understand correctly this is symptom of " extern "C" " call. How avoid this problem?
My Linux is Centos7 and gcc version is gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16).
BR/Pekka
Hello,
I am using Ubuntu 18.04.
I am trying to install bitpit from source. I have cloned the repository and checked out the 1.6.0 branch. I followed #22 to successfully generate the build files.
I am quite sure that I have all the dependencies installed. But, am still getting a build error:
(base) gwen@ubuntu:~/github/bitpit-build$ make
[ 1%] Building CXX object src/POD/CMakeFiles/POD_TARGET_OBJECT.dir/pod.cpp.o
In file included from /home/gwen/github/bitpit/src/POD/pod.cpp:37:0:
/home/gwen/github/bitpit/external/LAPACKE/include/bitpit_private_lapacke.hpp:49:18: fatal error: lapacke.h: No such file or directory
# include <lapacke.h>
^~~~~~~~~~~
compilation terminated.
make[2]: *** [src/POD/CMakeFiles/POD_TARGET_OBJECT.dir/build.make:76: src/POD/CMakeFiles/POD_TARGET_OBJECT.dir/pod.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1005: src/POD/CMakeFiles/POD_TARGET_OBJECT.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
I installed the lapack dependencies using these commands:
sudo apt update
sudo apt install liblapack3
sudo apt install liblapack-dev
sudo apt install libopenblas-base
sudo apt install libopenblas-dev
sudo apt install liblapacke-dev
sudo apt install liblapack-dev
If anyone has any idea of what it is I'm missing, please let me know!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.