|
[Sponsors] |
OpenFOAM not recognize custom library (decomp method) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Erik Nijkamp
Join Date: Dec 2023
Posts: 5
Rep Power: 2 ![]() |
Hi all,
I am struggling with adding a custom decomp method to OpenFOAM. This library successfully complies to a .o object, and further to a .so object. However, it does not show up as an option when using DecomposePar. Perhaps its relevant that I am using foam-extend4.1. For simplicity, I was just trying to get a new decomp method called metisDecomp2, which is just the same as metisDecomp, but I just want to show that something new can be added. So I copied the metisDecomp/ folder, renamed it to metisDecomp2/, and renamed all the files, and moved it to the $FOAM_USER_LIBBIN I crtl+F metisDecomp and replaced it with metisDecomp2 in the C and H file, to make the new class. I updated the Make/files, Make/options, and CMakeLists.txt as shown below. Make/files: Code:
metisDecomp2.C LIB = $(FOAM_USER_LIBBIN)/libmetisDecomp2 Make/options: Code:
EXE_INC = \ -I$(METIS_INCLUDE_DIR) \ -I$(FOAM_SRC)/decompositionMethods/lnInclude \ -I$(FOAM_SRC)/scotchDecomp/lnInclude LIB_LIBS = \ -ldecompositionMethods \ -L$(FOAM_LIBBIN)/dummy \ -L$(METIS_LIB_DIR) -lmetis and the CMakeLists.txt Code:
list(APPEND SOURCES metisDecomp2.C ) add_foam_library(metisDecomp2 SHARED ${SOURCES}) target_link_libraries(metisDecomp2 PUBLIC decompositionMethods metis2) After I do all this, and put the option metis2, it says: Code:
Unknown decompositionMethod metis2 Valid decompositionMethods are : 8 ( engineScotch hierarchical manual metis parMetis patchConstrained scotch simple ) I assume that I am missing something small and simple. I have never added my own custom lib. Thanks for your time looking over my question. If you need any more clarification, please let me know. Best, Erik |
|
![]() |
![]() |
Tags |
decomposepar methods, libbin |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Reading rigidBody motion state from custom library | katiuskas | OpenFOAM Programming & Development | 2 | November 21, 2023 05:49 |
Duplicate library entries when running a solver with custom library | francescomarra | OpenFOAM Programming & Development | 3 | May 17, 2022 08:37 |
"Missing" files when implementing OpenFOAM dictionaries referenced in custom solver | markdeluca | OpenFOAM Programming & Development | 0 | December 2, 2018 16:58 |
HopeFOAM-0.1(Discontinuous Galerkin Method Extension of OpenFOAM) is released online! | ExerciseGroup | OpenFOAM Announcements from Other Sources | 3 | December 11, 2017 14:26 |
Building a custom solver on OpenFOAM 2.0 | wschosta | OpenFOAM Programming & Development | 1 | July 8, 2011 15:07 |