Add 3D-1D coupling interface APIs#131
Conversation
|
@taeoukkim This PR does not build on MacOS. This is a CMake issue I think; I'll have a look. |
|
@taeoukkim The compiler used to build svOneDSolver/Code/Source/interface/interface.cpp was set to I added after the |
ktbolt
left a comment
There was a problem hiding this comment.
@taeoukkim You've done a great job here adding an interface to an old and confusing code !
A couple of important things to clean up
-
Only use print statements for debugging; they should not be active for release
-
Use a consistent error handing; really everything should use
cvExceptionI'm guessing; writing to cerr is not very useful should throw I think
svOneDSolver writes out lots of .dat files and prints a simulation history to stdout I think. How is this managed for the 3D interface ?
Thank you for identifying the issue and suggesting the fix!! I added the C++20 settings to the top-level CMakeLists.txt and confirmed that the interface library builds successfully on my Mac. |
|
@ktbolt Thank you very much for the thorough review and helpful suggestions. I have addressed all of the comments. I also clarified that accepted coupled solutions are written to VTK and text files at the requested output interval. Both the standalone OneDSolver and svoned_interface build successfully on macOS, and I confirmed that the standalone solver still runs correctly. |
Current situation
resolves #129
Release Notes
Update 1D solver for 3D-1D coupling.
Functions are stored in "interface.cpp" file.
Main functions are: initialize_1d, set_external_step_size_1d, return_1d_solution, update_1d_solution, run_1d_simulation_step_1d, and extract_coupled_dof.
Now, when you compile the code, it will create a shared library for coupling at ".../svOneDSolver/build/lib/libsvoned_interface.dylib"
The API functions can be accessed through this shared library.
Documentation
I will update document.
Testing
3D-1D testing done
Code of Conduct & Contributing Guidelines