Xiangyu-Hu / SPHinXsys

SPHinXsys provides C++ APIs for engineering simulation and optimization. It aims at complex systems driven by fluid, structure, multi-body dynamics and beyond. The multi-physics library is based on a unique and unified computational framework by which strong coupling has been achieved for all involved physics.
https://www.sphinxsys.org/
Apache License 2.0
259 stars 199 forks source link

New aortic valve #364

Closed yuanjiajy closed 9 months ago

yuanjiajy commented 10 months ago

New Aortic-valve.cpp

DrChiZhang commented 10 months ago

Looks like all fails related to the installation of opencascade. One small question, can we replace Simbody's geometry with related staff in opencascade?

yuanjiajy commented 10 months ago

Looks like all fails related to the installation of opencascade. One small question, can we replace Simbody's geometry with related staff in opencascade?

Yes perhaps cause the capitalisation of OCCT and I have changed it. From my point of view, it could be changed since the latter one has more geometry functions

DrChiZhang commented 10 months ago

Looks like all fails related to the installation of opencascade. One small question, can we replace Simbody's geometry with related staff in opencascade?

Yes perhaps cause the capitalisation of OCCT and I have changed it. From my point of view, it could be changed since the latter one has more geometry functions

One small suggestion, use opencascade as a optional dependency, if possible.

DrChiZhang commented 10 months ago

opencascade is only supported on '!(uwp | osx | arm)', which does not match x64-osx. This usually means that there are known build failures, or runtime problems, when building other platforms. To ignore this and attempt to build opencascade anyway, rerun vcpkg with --allow-unsupported. you may add --allow-unsupported to vcpkg for MAC CI to have a check.

yuanjiajy commented 10 months ago

opencascade is only supported on '!(uwp | osx | arm)', which does not match x64-osx. This usually means that there are known build failures, or runtime problems, when building other platforms. To ignore this and attempt to build opencascade anyway, rerun vcpkg with --allow-unsupported. you may add --allow-unsupported to vcpkg for MAC CI to have a check.

OK I will do it later

yuanjiajy commented 10 months ago

In addition to the inability to install OCCT in Mac, there are still problems when installing OCCT under windows.

DrChiZhang commented 10 months ago

In addition to the inability to install OCCT in Mac, there are still problems when installing OCCT under windows.

Seems they already fixed this error. https://github.com/microsoft/vcpkg/issues/27896

DrChiZhang commented 10 months ago

I have tried with Mac OS 13.4.1, and its seems that oencascade installation works fine with "vcpkg install --clean-after-build --allow-unsupported ", while the installation took a very very long time.

Therefore, for MAC CI, you can try the following modification

first try:

${{github.workspace}}/vcpkg/vcpkg install --clean-after-build --allow-unsupported

if not work, try runs-on: macos-13

(Ref. https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources).

yuanjiajy commented 10 months ago

I have tried with Mac OS 13.4.1, and its seems that oencascade installation works fine with "vcpkg install --clean-after-build --allow-unsupported ", while the installation took a very very long time.

Therefore, for MAC CI, you can try the following modification

first try:

${{github.workspace}}/vcpkg/vcpkg install --clean-after-build --allow-unsupported

if not work, try runs-on: macos-13

(Ref. https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources).

OK I will have try it

DrChiZhang commented 10 months ago

Interesting, Windows now take more time than Linux and Mac, in the previous version, it takes more time than the others.

yuanjiajy commented 10 months ago

Interesting, Windows now take more time than Linux and Mac, in the previous version, it takes more time than the others.

Yes, I have blocked the OCCT installation and stoopped my case running in Windows because github doesn't have supplement memory to support windows OCCT installations.

Xiangyu-Hu commented 10 months ago

@yuanjiajy You can change the draft pull request to formal one already.

yuanjiajy commented 10 months ago

@yuanjiajy You can change the draft pull request to formal one already

@yuanjiajy You can change the draft pull request to formal one already.

ok I have changed it

FabienPean-Virtonomy commented 10 months ago

Is this PR a duplicate of #290 ?

yuanjiajy commented 10 months ago

Is this PR a duplicate of #290 ? no it's actually different from #290

Xiangyu-Hu commented 10 months ago

@yuanjiajy you need resolve the conversations first, then I can merge it.

yuanjiajy commented 10 months ago

@yuanjiajy you need resolve the conversations first, then I can merge it.

I've tried the methods in the conversation

FabienPean-Virtonomy commented 9 months ago

@Xiangyu-Hu OpenCASCADE can be added (or used without lengthy full build) with 3 main possibilities:

  1. Modify https://github.com/microsoft/vcpkg/tree/master/ports/opencascade to make the vcpkg installation modular
  2. Install via system package manager and use vcpkg overlay ports to find it without writing a dedicated CMake module file
  3. Use CMake FetchContent (see example below)
# Options for libigl modules
option(LIBIGL_COPYLEFT_CGAL "Use CGAL" ON) # Enable desired dependency/component
option(LIBIGL_COPYLEFT_TETGEN "Use TetGen" OFF) # Disable undesired dependency/component
option(LIBIGL_USE_STATIC_LIBRARY "Use libigl as static library" OFF) # Disable undesired features/components
include(FetchContent)
FetchContent_Declare(
    libigl
    URL https://github.com/libigl/libigl/archive/refs/tags/v2.4.0.zip
    URL_HASH MD5=0b4fea5dba2117b8db85c99a39a71f83
)
FetchContent_MakeAvailable(libigl)
target_link_libraries(main PRIVATE igl::core)
Xiangyu-Hu commented 9 months ago

@yuanjiajy @FabienPean-Virtonomy Have all issues settled? So that I can merge the pull request.

yuanjiajy commented 9 months ago

@yuanjiajy @FabienPean-Virtonomy Have all issues settled? So that I can merge the pull request.

For me, it's ok now

FabienPean-Virtonomy commented 9 months ago

See #381 which is based on this work, and is an alternative way to organize the code and handle the integration of OpenCASCADE.