Git Product home page Git Product logo

bitpit's Issues

spatial gradient with PabloUniform and level set module

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

CMake error: PETSC could not be found

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?

Linking problem with DEBUG

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?

Cannot build on Ubuntu 18.04

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

PABLO Cuboid (Non Uniform)

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.

Read vtu file printed by bitbip

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)

error while building on Ubuntu 16.04 LTS

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

PS: I install the BLAS CBLAS and LAPACK using the following commands:

BLAS:
gfortran -c -O3 -fPIC *.f
gcc -shared *.o -fPIC -o libblas.so
cp libblas.so /usr/local/lib/ ar rv libblas.a *.o
sudo cp libblas.a /usr/local/lib

CBLAS:
cp ../BLAS/libblas.a testing
make
sudo cp lib/cblas_LINUX.a /usr/local/lib/libcblas.a

LAPACK:
I use gfortran as the complier.
change this in Makefile
#lib: lapacklib tmglib
lib: blaslib variants lapacklig tmglib
make
cd lapacke
make
cp include/*.h /usr/local/include
cd ..
cp *.a /usr/local/lib

cmake : build bitpit as a subproject

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:

  1. turn CMAKE_PROJECT_NAME into PROJECT_NAME
    Indeed, CMAKE_PROJECT_NAME expands to the outer project name (which is not desirable), while PROJECT_NAME expands to the nearest project command (which is what we want)
  2. the way CMAKE_MODULE_PATH is set should CMAKE_CURRENT_SOURCE_DIR instead of CMAKE_SOURCE_DIR for the same reason that CMAKE_SOURCE_DIR expands to the top-level cmake project command

Let me know if you agree on this. I can provide a PR for it if needed.

Get Interface Extrema

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

PABLO: Getting corner nodes along periodic boundaries

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 !

*MPI* LoadBalance Issue - Terminate called after throwing an instance of 'std::runtime_error' what(): Stream is not expandable.

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)

Set of boundary cells for coupling two meshes

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?

On running basic examples via cmake.

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.

PABLO: findNeighbours missing elements with periodic boundary conditions and MPI

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.

PABLO_example_00011.cpp.txt
log.rank1.txt

build error by CMake

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!

Using PABLO with CFD

Hi,
Is it possible to use PABLO with lattice Boltzmann method, how?

Regards
Ali

Local Numbering

Hi all,

I have three (maybe trivial questions) traversing my Voloctree in parallel, first of all:

  1. calling mytree.getCellCount(); I get the ghost octant in my count. It means that for 2 processes and 16 octants it counts 12 cells. How can I ask only for local ones?

Supposing now that I am traversing the structure Voloctree named mytree in this way:

for( auto & cell : mytree.getCells() ){
const long id = cell.getId() ;
[...]

  1. How can I get the local index of the cell in the processor?
  2. Asking information about neighborhood how can I get the face neighboring? There is an equivalent to _findCellEdgeNeighs, _findCellVertexNeighs ?

Thank you for your help.

bitpit::Map refactor

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:

  • add a method to class ParaTree to get a const ref to a Map
  • make public some of the API of class Map
  • let PabloUniform exposes a const ref to the logical coordinate of the node (currently available in ParaTree, but not in PabloUniform).

I'll submit a PR for that so you can have an idea of the modifications

Levelset use multi solid objects

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.

Substitute std::pow functions used in RBF with a faster implementation

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.

Simplify DiscretizationStencil class

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?

PabloUniform class design

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 ?

Interfaces getId from cell

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

Compiler warning -- nested loops with same index variable name

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.

ParaTree::getCenter for a ghost octant

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 .

Voloctree, VolCartesian or alternative class

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:

  1. Is there a way to generate a NXxNYxNZ mesh in which each cell can be refined using an octal strategy (AMR like) and allowing to use the 2:1 balance functionality.
  2. Is it possible to reject cells/octants if not used. For instance in the case of the flow around a sphere or a cylinder where the cells/octants inside the solid do not contribute to the computation.

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)

Possible ways to slightly improve CMake build system

I'd like to suggest here two minor ideas to slightly improve cmake in bitpit, related to modern cmake best practice use

  1. Use imported targets:

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).

  1. Defining an ALIAS library BITPIT::BITPIT in BITPITConfig.cmake would help application code use bitpit, for example in my top-level CMakeLists.txt I do :
#####################################################################
# 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.

compile error

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

Build error

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.