GithubHelp home page GithubHelp logo

xiangyu-hu / sphinxsys Goto Github PK

View Code? Open in Web Editor NEW
286.0 8.0 211.0 229.55 MB

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.

Home Page: https://www.sphinxsys.org/

License: Apache License 2.0

CMake 3.62% C++ 89.62% C 1.52% Dockerfile 0.13% Python 2.58% PostScript 2.50% Batchfile 0.02% HTML 0.01%
computer-aided-engineering cpp finite-volume-method fluid-dynamics fluid-structure-interaction gpu high-performance-computing multi-physics research-and-development smoothed-particle-hydrodynamics

sphinxsys's People

Contributors

alundilong avatar antonov548 avatar arturtoshev avatar bencevirtonomy avatar bo-zhang1995 avatar chenxizhaotum avatar chingenlin71 avatar chuvirtonomy avatar dongwutum avatar drchizhang avatar durganshu avatar fabienpean-virtonomy avatar franguuuu avatar johnvirtonomy avatar lisu-lisa avatar maiyetum95 avatar mrezavandvirtonomy avatar ncsalis avatar schrodingersalphago avatar shuaihao-zhang avatar shuoguozhangtum avatar spadaxsys-dev avatar sphyaru avatar weiyivirtonomy avatar xiangyu-hu avatar xiaojingtang1234 avatar yashmandaokar avatar yuanjiajy avatar yyc84 avatar zhentongwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sphinxsys's Issues

There is no tabulated kernel function.

This will need to the limitation of only using simple kernel functions. With tabulated kernel function one can use more complex kernel function especially those for high-order approximations.

Installation error C2244

I have been trying to install SPHinXsys following the instructions on the website and a video tutorial from bilibili.
When building the sphinxsys, the sphinsys_2d and 3d lib files are not created. This is caused by C2244 errors in sphinxsys_2d.
I am using vs2017, the errors are as follows:

2>F:\SPHinXsys-source\SPHINXsys\src\for_2D_build\meshes\mesh_with_data_packages.hpp(107): error C2244: “SPH::MeshWithDataPackages<MeshFieldType,DataPackageType>::DataValueFromGlobalIndex”: 无法将函数定义与现有的声明匹配 (编译源文件 F:\SPHinXsys-source\SPHINXsys\src\shared\geometries\level_set.cpp)
2>F:\SPHinXsys-source\SPHINXsys\src\for_2D_build\meshes\mesh_with_data_packages.hpp(106): note: 参见“SPH::MeshWithDataPackages<MeshFieldType,DataPackageType>::DataValueFromGlobalIndex”的声明 (编译源文件 F:\SPHinXsys-source\SPHINXsys\src\shared\geometries\level_set.cpp)
2>F:\SPHinXsys-source\SPHINXsys\src\for_2D_build\meshes\mesh_with_data_packages.hpp(107): note: 定义 (编译源文件 F:\SPHinXsys-source\SPHINXsys\src\shared\geometries\level_set.cpp)
2>F:\SPHinXsys-source\SPHINXsys\src\for_2D_build\meshes\mesh_with_data_packages.hpp(107): note: 'DataType SPH::MeshWithDataPackages<MeshFieldType,DataPackageType>::DataValueFromGlobalIndex(const SPH::Vecu &)' (编译源文件 F:\SPHinXsys-source\SPHINXsys\src\shared\geometries\level_set.cpp)
2>F:\SPHinXsys-source\SPHINXsys\src\for_2D_build\meshes\mesh_with_data_packages.hpp(107): note: 现有声明 (编译源文件 F:\SPHinXsys-source\SPHINXsys\src\shared\geometries\level_set.cpp)
2>F:\SPHinXsys-source\SPHINXsys\src\for_2D_build\meshes\mesh_with_data_packages.hpp(107): note: 'DataType SPH::MeshWithDataPackages<MeshFieldType,DataPackageType>::DataValueFromGlobalIndex(const SPH::Vecu &)' (编译源文件 F:\SPHinXsys-source\SPHINXsys\src\shared\geometries\level_set.cpp)
2>F:\SPHinXsys-source\SPHINXsys\src\for_2D_build\meshes\mesh_with_data_packages.hpp(172): error C2244: “SPH::MeshWithDataPackages<MeshFieldType,DataPackageType>::probeMesh”: 无法将函数定义与现有的声明匹配 (编译源文件 F:\SPHinXsys-source\SPHINXsys\src\shared\geometries\level_set.cpp)
2>F:\SPHinXsys-source\SPHINXsys\src\for_2D_build\meshes\mesh_with_data_packages.hpp(171): note: 参见“SPH::MeshWithDataPackages<MeshFieldType,DataPackageType>::probeMesh”的声明 (编译源文件 F:\SPHinXsys-source\SPHINXsys\src\shared\geometries\level_set.cpp)
2>F:\SPHinXsys-source\SPHINXsys\src\for_2D_build\meshes\mesh_with_data_packages.hpp(172): note: 定义 (编译源文件 F:\SPHinXsys-source\SPHINXsys\src\shared\geometries\level_set.cpp)
2>F:\SPHinXsys-source\SPHINXsys\src\for_2D_build\meshes\mesh_with_data_packages.hpp(172): note: 'DataType SPH::MeshWithDataPackages<MeshFieldType,DataPackageType>::probeMesh(const SPH::Vecd &)' (编译源文件 F:\SPHinXsys-source\SPHINXsys\src\shared\geometries\level_set.cpp)
2>F:\SPHinXsys-source\SPHINXsys\src\for_2D_build\meshes\mesh_with_data_packages.hpp(172): note: 现有声明 (编译源文件 F:\SPHinXsys-source\SPHINXsys\src\shared\geometries\level_set.cpp)
2>F:\SPHinXsys-source\SPHINXsys\src\for_2D_build\meshes\mesh_with_data_packages.hpp(172): note: 'DataType SPH::MeshWithDataPackages<MeshFieldType,DataPackageType>::probeMesh(const SPH::Vecd &)' (编译源文件 F:\SPHinXsys-source\SPHINXsys\src\shared\geometries\level_set.cpp)

Need some help please.

Using Moving least square for observing

The current observation is using Shepherd average for probing the observation quantities. I am thinking that we may can use moving least square to increase the accuracy.

latest master cannot compile through

Old master works fine (around 5-7 days back, cannot remember exactly).
For current master, visual studio 2017 (windows 10) reports a numerous errors related to xstring, stdexcept, xlocinfo...., etc. Please see the attached.

I would like to checkout a new branch to work on a new feature, but I cannot move on.

image

Build SPHinXsys in a different Linux distriburion

Hi there,

Maybe it can help others to build (compile) SPHinXsys in different unix distributions. (I also don't rule out the possibility that I did something wrong 😕)

I built SPHinXsys on CentOS 7. In my case, Cmake, gcc, LAPACK and BLAS were already installed in the root directory.

After downloading and installing the prerequisites below:
Google test framework
BOOST library
TBB library
Simbody library

I added to my .bashrc file the following commands:

export GTEST_ROOT=/path/to/gtest
export GTEST_HOME=/path/to/gtest
export LIBRARY_PATH=$GTEST_HOME/lib64:$LIBRARY_PATH
export LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH
export CPLUS_INCLUDE_PATH=$GTEST_HOME/include:$CPLUS_INCLUDE_PATH

export SIMBODY_HOME=/path/to/simbody
export LIBRARY_PATH=$SIMBODY_HOME/lib64:$LIBRARY_PATH
export LD_LIBRARY_PATH=$LIBRARY_PATH:$LD_LIBRARY_PATH
export CPLUS_INCLUDE_PATH=$SIMBODY_HOME/include:$CPLUS_INCLUDE_PATH
export SIMBODY_LIB_DIR=$SIMBODY_HOME/lib64
export SIMBODY_INCLUDE_DIR=$SIMBODY_HOME/include
export SIMBODY_LIBRARIES=$SIMBODY_HOME/lib64
export SIMBODY_DEBUG_LIBRARIES=$SIMBODY_HOME/lib64
export SIMBODY_RELEASE_LIBRARIES=$SIMBODY_HOME/lib64

export TBB_HOME=/path/to/tbb
export TBB_INCLUDE_DIR=$TBB_HOME/include
export LIBRARY_PATH=$TBB_HOME/lib:$LIBRARY_PATH
export TBB_LIB_DIR=$TBB_HOME/lib
export TBB_LIB_DIR_TEMP=$TBB_HOME/lib
export LD_LIBRARY_PATH=$TBB_LIB_DIR:$LD_LIBRARY_PATH
export CPLUS_INCLUDE_PATH=$TBB_HOME/include:$CPLUS_INCLUDE_PATH
export TBB_LIBRARY_RELEASE=$TBB_HOME/lib
export TBB_LIBRARY_DEBUG=$TBB_HOME/lib

export BOOST_HOME=/path/to/boost-1.71.0

export EIGEN3_INCLUDE_DIR=/path/to/eigen-3.4.0
export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/path/to/eigen-3.4.0
export CPLUS_INCLUDE_PATH=$EIGEN3_INCLUDE_DIR:$CPLUS_INCLUDE_PATH

Then, after typing the comand bash in the terminal, it was possible to build and install SPHinXsys.

⚠️ Some observations

  • Certainly above there are more exports than necessary.
  • I'm not sure, but maybe with minor changes on cmake files provided in SPHinXsys, cmake will find the libraries.
  • In the step-by-step installation (https://www.sphinxsys.org/html/installation.html), I think that after the text "After installing Simbody correctly, set environment variable"
    echo 'export TBB_HOME=/path/to/tbb' >> ~/.bash_profile
    should be
    echo 'export SIMBODY_HOME=/path/to/simbody' >> ~/.bash_profile
    and
    echo 'export TBB_HOME=/path/to/tbb' >> ~/.bashrc
    should be
    echo 'export SIMBODY_HOME=/path/to/simbody' >> ~/.bashrc

Need help in creating user-defined case

Dear all,
Is it possible to provide some tutorials on how to create user-defined cases? I found that we cannot simply add a new project to the solution file and some extra processes need to be done before we create a new test case. Currently I comment the unused test cases and write the code on these files and I wondered if there is a clever way to solve this issue.
Thanks

2d wave elastic wall not able restart

This is because the functions
void SolidParticles::WriteParticlesToXmlForRestart(std::string &filefullpath)
and
void SolidParticles::ReadParticleFromXmlForRestart(std::string &filefullpath)
not written correctly.

Units of parameters?

Hi, I think the units of the reference value of parameters are different for different cases.

How can I know the units of parameters in each case.

For example, in the case "test_2d_dambreak", what are the units of liquid column height 'LH' and end time "End_Time". In the case "test_2d_wetting_effects", what are the units of tank height "DH", reference density "rho0_f", water viscosity "mu_f", surface tension "tension_force" and end time "End_Time".

Regression with contact management / memory ownership model

The registration and memory management of particles field has been changed recently to move as many field out of base_particles.h

These changes have some consequent side effects due to the memory ownership design. See for example class ContactDensitySummation

ContactDensitySummation::
ContactDensitySummation(SolidBodyRelationContact &solid_body_contact_relation)
: PartInteractionDynamicsByParticle(*solid_body_contact_relation.sph_body_,
*solid_body_contact_relation.body_surface_layer_),
ContactDynamicsData(solid_body_contact_relation), mass_(particles_->mass_),
offset_W_ij_(StdVec<Real>(contact_configuration_.size(), 0.0))
{
particles_->registerVariable(contact_density_, "ContactDensity");

Before, the field ContactDensity was in base_particles.h so initialized once per body. Now, it is moved in the contact algorithm ContactDensitySummation class. It means that creating 2 such objects for different body relation involving the same body in contact is no more possible. Why is it desired ? Because the user might need different contact topology at different point of the simulation, e.g. {A->B} and then {A->C,D}

Without modifying current memory ownership model, I see barely any opportunity:

  • On user side, creating a catch all body relation {A-> B,C,D} which is not necessarily possible because of the sequence of contact (A might not only collide with B at the beginning but also C, that one wants to avoid)
  • On library side, allow registering several field with the same name by overwriting and keeping only the last source, which is a dangerous implicit feature with high risk a breaking user expectations

Relaxation dynamics: capture singularity points from the geometry

The code should be able to capture the singularity points in the geometry.
The idea is first check all key points in the geometry by checking its curvature which is computed from the level set function. Then, for each key point with large curvature, we create a new singular particle. We may need to check whether this new particles is too close to an already created singular particle according to a threshold to avoid too fine geometry beyond the resolvability of particles. These newly created particles will be tagged as constrained particles so that it does not move in the relaxation process.

Installation error

Dear all,
I'm installing this solver with Visual Studio Community 2017 and encountered two types of (MSB 3073 and LNK1181) errors when trying to build and install the project. It seems that I'm missing the ''structural_simulation_module.lib'' file or failing to link the lib file somehow.
I put the errors into a txt file below.
Error log.txt
Bests,
Jun Li

Error in installation

Dear Prof. @Xiangyu-Hu,
I start to install SPHinXsys on windows, i completed installation steps by video in youtube but in the step that "configure SPHinXsys with cmake", i encountered with following error:

CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
The package name passed to find_package_handle_standard_args (Simbody)
does not match the name of the calling package (SIMBODY). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindSIMBODY.cmake:189 (find_package_handle_standard_args)
cmake/Import3rdpartylibs.cmake:3 (FIND_PACKAGE)
CMakeLists.txt:122 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

C:/Simbody/include
C:/Simbody/lib
SimTKsimbody;SimTKmath;SimTKcommon;liblapack;libblas;pthreadVC2_x64
SimTKsimbody;SimTKmath;SimTKcommon;liblapack;libblas;pthreadVC2_x64
liblapack;libblas;pthreadVC2_x64
C:/tbb2019_20191006oss/include
C:/tbb2019_20191006oss/lib/intel64/vc14
tbb;tbbmalloc;tbbmalloc_proxy
C:/boost_1_74_0
C:/boost_1_74_0/lib64-msvc-14.1
optimized;C:/boost_1_74_0/lib64-msvc-14.1/boost_program_options-vc141-mt-x64-1_74.lib;debug;C:/boost_1_74_0/lib64-msvc-14.1/boost_program_options-vc141-mt-gd-x64-1_74.lib
CMake Error at cmake/Import3rdpartylibs.cmake:55 (find_package):
Could not find a package configuration file provided by "GTest" with any of
the following names:

GTestConfig.cmake
gtest-config.cmake

Add the installation prefix of "GTest" to CMAKE_PREFIX_PATH or set
"GTest_DIR" to a directory containing one of the above files. If "GTest"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:122 (include)

Examples should run entirely by default unless flags are given

Following up the live discussion: the way program options are handled should be modified. Examples without program options should run the whole sequence, while flags allows to specify specific behavior.

./example # should run particle generation/relaxation + timeloop
./example -r=true # should run just generation/relaxation
./example -i=true # should just reload

Program options should also be following more standard format with dash followed by single letter and double-dash followed by whole words. Since sphinxsys has 3 options that starts with R, it would be preferable to only allow whole word writing to avoid confusion and error.

./example --relax 
./example --reload 
./example --restart

Effects:

  • Easier for newcomer to test examples
  • Can simplify several CMakeLists by reducing duplication

请问新的release何时发行

尊敬的开发者:
您好,我比较关心现在的master里的几个新算例,请问新的release版本何时发行,或者我可不可以使用现在的master版本。

Unable to build in debug mode

Hi Prof:

By referring to my previous question:

I've tried to build the same project in "Debug" mode as well; unfortunately I am getting the error like this:
C1128 number of sections exceeded object file format limit: compile with /bigobj sphinxsys_static_2d C:\Research\SPHinXsys-master\SPHINXsys\src\for_2D_build\geometries\geometry.cpp

C1128 number of sections exceeded object file format limit: compile with /bigobj sphinxsys_2d
C:\Research\SPHinXsys-master\SPHINXsys\src\for_2D_build\geometries\geometry.cpp

LNK1104 cannot open file '......\SPHINXsys\lib\Debug\sphinxsys_2d.lib' test_2d_poiseuille_flow
Link

I've changed the cmake_build_type in cmake to "Debug" as well, same errors are obtained.

My solution:

I have regenerated the solution file using cmake and set CMAKE_Build_type = RelWithDebInfo.
Then, I opened the project using VS2017 and build using RelWithDebInfo.

It works with no error.

I guess we have to navigate back to "cmake" to change the build type & generate the solution file again whenever
we want to switch between release & debug mode in VS ?

use of Adaptive contact relations

I would like to use the Multi-level Mesh to a problem similar to the self_contact or the muscle_solid_contact test but I am missing information on how to do:

SelfSurfaceContactRelation (Adaptive)

and the InteractionDynamics for
SelfContactDensitySummation
SelfContactForce
ContactDensitySummation
ContactForceFromWall

with MultiLevel particles. Any help on how to work with this kind of system?

Making cache-friendly loops

void StressRelaxationFirstHalf::Initialization(size_t index_i, Real dt)
{
pos_n_[index_i] += vel_n_[index_i] * dt * 0.5;
F_[index_i] += dF_dt_[index_i] * dt * 0.5;
rho_n_[index_i] = rho0_ / det(F_[index_i]);
//obtain the first Piola-Kirchhoff stress from the second Piola-Kirchhoff stress
//it seems using reproducing correction here increases convergence rate near the free surface
stress_PK1_[index_i] = F_[index_i] * material_->ConstitutiveRelation(F_[index_i], index_i) * B_[index_i];
}

While considering vectorization and see how it could fit, I ended up thinking specifically about this part of the code above. This kind of loop is suboptimal as it is doing one action on several different arrays. A data-oriented and cache-friendly approach would be applying the operation for each array one after the other:

for(auto index_i = 0; index_i < total_real_particles; ++index_i)
   	pos_n_[index_i] += vel_n_[index_i] * dt * 0.5;
for(auto i = 0; i < total_real_particles; ++i)
	F_[index_i] += dF_dt_[index_i] * dt * 0.5;
for(auto i = 0; i < total_real_particles; ++i)
        rho_n_[index_i] = rho0_ / det(F_[index_i]);
for(auto i = 0; i < total_real_particles; ++i)
	stress_PK1_[index_i] = F_[index_i] * material_->ConstitutiveRelation(F_[index_i], index_i);

It does not seem so widespread overall in the codebase (as only one field is getting touched) but the architecture around ParticleDynamics1Level in the library favors this kind of pattern.

粒子无关性问题

老师,您好!我在用SPH模拟岩土力学问题时,遇到了粒子无关性检验不收敛的问题。
例如,二维溃坝问题表现为粒子越多,最终滑动距离越远。
岩土力学采用的是弹塑性本构,屈服准则用D-P准则下的非关联塑性流动法则。壁面条件采用的是通过核函数插值得到其密度、应力、速度(反向)。

Build Error: Ubuntu

Hello!

I get this error:

[ 5%] Building CXX object SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/boundary_condition/inflow_boundary.cpp.o make[2]: *** [SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/build.make:79: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/adaptations/adaptation.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:43, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.cpp:6: /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:47:36: error: ‘tbb::internal’ has not been declared 47 | using tbb::internal::no_assign; | ^~~~~~~~ /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:53:25: error: expected class-name before ‘{’ token 53 | { | ^ In file included from /usr/include/boost/geometry/geometry.hpp:26, from /usr/include/boost/geometry.hpp:17, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/multi_polygon_shape.h:19, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/all_geometries.h:9, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:44, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.cpp:6: /usr/include/boost/geometry/geometry.hpp:27:1: note: ‘#pragma message: CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.’ 27 | BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/geometry/geometry.hpp:28:1: note: ‘#pragma message: CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.’ 28 | BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.") | ^~~~~~~~~~~~~~~~~~~~ In file included from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:43, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.cpp:7: /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:47:36: error: ‘tbb::internal’ has not been declared 47 | using tbb::internal::no_assign; | ^~~~~~~~ /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:53:25: error: expected class-name before ‘{’ token 53 | { | ^ In file included from /usr/include/boost/geometry/geometry.hpp:26, from /usr/include/boost/geometry.hpp:17, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/multi_polygon_shape.h:19, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/all_geometries.h:9, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:44, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.cpp:7: /usr/include/boost/geometry/geometry.hpp:27:1: note: ‘#pragma message: CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.’ 27 | BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/geometry/geometry.hpp:28:1: note: ‘#pragma message: CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.’ 28 | BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’ 17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>") | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’ 17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>") | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:43, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/fluid_body.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/fluid_body.cpp:6: /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:47:36: error: ‘tbb::internal’ has not been declared 47 | using tbb::internal::no_assign; | ^~~~~~~~ /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:53:25: error: expected class-name before ‘{’ token 53 | { | ^ In file included from /usr/include/boost/geometry/geometry.hpp:26, from /usr/include/boost/geometry.hpp:17, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/multi_polygon_shape.h:19, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/all_geometries.h:9, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:44, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/fluid_body.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/fluid_body.cpp:6: /usr/include/boost/geometry/geometry.hpp:27:1: note: ‘#pragma message: CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.’ 27 | BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/geometry/geometry.hpp:28:1: note: ‘#pragma message: CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.’ 28 | BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’ 17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>") | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:43, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/solid_body.h:32, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/solid_body.cpp:7: /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:47:36: error: ‘tbb::internal’ has not been declared 47 | using tbb::internal::no_assign; | ^~~~~~~~ /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:53:25: error: expected class-name before ‘{’ token 53 | { | ^ In file included from /usr/include/boost/geometry/geometry.hpp:26, from /usr/include/boost/geometry.hpp:17, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/multi_polygon_shape.h:19, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/all_geometries.h:9, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:44, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/solid_body.h:32, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/solid_body.cpp:7: /usr/include/boost/geometry/geometry.hpp:27:1: note: ‘#pragma message: CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.’ 27 | BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/geometry/geometry.hpp:28:1: note: ‘#pragma message: CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.’ 28 | BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.") | ^~~~~~~~~~~~~~~~~~~~ make[2]: *** [SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/build.make:93: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/bodies/base_body.cpp.o] Error 1 In file included from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:43, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/base_particle_dynamics.h:37, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/particle_dynamics_algorithms.h:39, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/all_particle_dynamics.h:7, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/boundary_face.h:32, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/boundary_face.cpp:2: /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:47:36: error: ‘tbb::internal’ has not been declared 47 | using tbb::internal::no_assign; | ^~~~~~~~ /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:53:25: error: expected class-name before ‘{’ token 53 | { | ^ In file included from /usr/include/boost/geometry/geometry.hpp:26, from /usr/include/boost/geometry.hpp:17, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/multi_polygon_shape.h:19, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/all_geometries.h:9, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:44, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/base_particle_dynamics.h:37, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/particle_dynamics_algorithms.h:39, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/all_particle_dynamics.h:7, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/boundary_face.h:32, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/boundary_face.cpp:2: /usr/include/boost/geometry/geometry.hpp:27:1: note: ‘#pragma message: CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.’ 27 | BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/geometry/geometry.hpp:28:1: note: ‘#pragma message: CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.’ 28 | BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.") | ^~~~~~~~~~~~~~~~~~~~ In file included from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:43, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/base_particle_dynamics.h:37, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/particle_dynamics_algorithms.h:39, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/all_particle_dynamics.h:7, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/boundary_face.h:32, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/inflow_boundary.h:33, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/inflow_boundary.cpp:2: /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:47:36: error: ‘tbb::internal’ has not been declared 47 | using tbb::internal::no_assign; | ^~~~~~~~ /home/aas/SPHinXsys/SPHINXsys/src/shared/particles/particle_sorting.h:53:25: error: expected class-name before ‘{’ token 53 | { | ^ make[2]: *** [SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/build.make:107: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/bodies/body_relation.cpp.o] Error 1 In file included from /usr/include/boost/geometry/geometry.hpp:26, from /usr/include/boost/geometry.hpp:17, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/multi_polygon_shape.h:19, from /home/aas/SPHinXsys/SPHINXsys/src/for_2D_build/geometries/all_geometries.h:9, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/base_body.h:44, from /home/aas/SPHinXsys/SPHINXsys/src/shared/bodies/body_relation.h:34, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/base_particle_dynamics.h:37, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/particle_dynamics_algorithms.h:39, from /home/aas/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/all_particle_dynamics.h:7, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/boundary_face.h:32, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/inflow_boundary.h:33, from /home/aas/SPHinXsys/SPHINXsys/src/shared/boundary_condition/inflow_boundary.cpp:2: /usr/include/boost/geometry/geometry.hpp:27:1: note: ‘#pragma message: CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.’ 27 | BOOST_PRAGMA_MESSAGE("CAUTION: Boost.Geometry in Boost 1.73 deprecates support for C++03 and will require C++14 from Boost 1.75 onwards.") | ^~~~~~~~~~~~~~~~~~~~ /usr/include/boost/geometry/geometry.hpp:28:1: note: ‘#pragma message: CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.’ 28 | BOOST_PRAGMA_MESSAGE("CAUTION: Define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING to suppress this message.") | ^~~~~~~~~~~~~~~~~~~~ make[2]: *** [SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/build.make:121: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/bodies/fluid_body.cpp.o] Error 1 /usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’ 17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>") | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’ 17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>") | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/detail/no_exceptions_support.hpp:17:1: note: ‘#pragma message: This header is deprecated. Use <boost/core/no_exceptions_support.hpp> instead.’ 17 | BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>") | ^~~~~~~~~~~~~~~~~~~~~~~ make[2]: *** [SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/build.make:135: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/bodies/solid_body.cpp.o] Error 1 make[2]: *** [SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/build.make:149: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/boundary_condition/boundary_face.cpp.o] Error 1 make[2]: *** [SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/build.make:163: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/__/shared/boundary_condition/inflow_boundary.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:2205: SPHINXsys/src/for_2D_build/CMakeFiles/sphinxsys_2d.dir/all] Error 2 make: *** [Makefile:146: all] Error 2

I've been following the guide here: https://www.sphinxsys.org/html/installation.html

Can you help me fix it?

Kind regards

Wave paddle modeling in SPHinXsys

Hi Everyone,
I've recently become familiar with your articles and SPHinXsys Program. I must admit that your code has impressive FSI simulation capabilities.
For my new research, I must simulate the interaction of regular waves with a single flexible structure. Multi-resolution FSI coupling benchmark test of SPHinXsys works exceptionally well and is highly applicable to my research endeavors.

However, I would like to know how to embed a wave paddle into your code. Does a predetermined method? Or perhaps you could assist me in implementing wave-paddle in SPHinXsys.

Channel flow with clamped elastic walls

Hello there,

Is possible to simulate a channel flow with clamped elastic walls using the current master version ? Similar to that shown in the video below:

https://www.youtube.com/watch?v=Bfhe6MGZ3eI

Also, is it possible to attach two elastic solids or model an elastic solid with two young's modulus ? I'd like to run a case similar to the draft below:
valve_draft

Until now, I've simulated only elastic solids attached to one fixed wall. Maybe if I change a specific class related to elastic solids in SPHinXsys I can do that.

Any help is very welcome.

Particle generation breaks restart feature

template <class ParticleGeneratorType, typename... ConstructorArgs>
void generateParticles(ConstructorArgs &&...args)
{
ParticleGeneratorType particle_generator(*this, std::forward<ConstructorArgs>(args)...);
particle_generator.initializeGeometricVariables();
base_particles_->initializeOtherVariables();
base_material_->assignBaseParticles(base_particles_);
};

Restart is inherently broken with new particle generation approach. For any particle generator, initializeOtherVariables happens after the function implemented by the user, the initialization of extra variable based on a function such as

registerVariable(n0_, "InitialNormalDirection",
[&](size_t i) -> Vecd
{ return n_[i]; });

is (1) crashing if the variable was registered by the user inadvertently (avoidable and ok, requires removing some lines), and (2) overriding any user/file loaded values (more problematic from design POV). See the sources of problems in base_particles.hpp

if (all_variable_maps_[type_index].find(variable_name) == all_variable_maps_[type_index].end())
{
variable_addrs.resize(real_particles_bound_, initial_value);
std::get<type_index>(all_particle_data_).push_back(&variable_addrs);
all_variable_maps_[type_index].insert(make_pair(variable_name, std::get<type_index>(all_particle_data_).size() - 1));
}
else
{
std::cout << "\n Error: the variable '" << variable_name << "' has already been registered!" << std::endl;
std::cout << __FILE__ << ':' << __LINE__ << std::endl;
exit(1);
}

and

template <typename VariableType, class InitializationFunction>
void BaseParticles::
registerVariable(StdLargeVec<VariableType> &variable_addrs,
const std::string &variable_name, const InitializationFunction &initialization)
{
constexpr int type_index = DataTypeIndex<VariableType>::value;
registerVariable(variable_addrs, variable_name);
for (size_t i = 0; i != real_particles_bound_; ++i)
{
variable_addrs[i] = initialization(i);
}
}

[CI] todo improvements

  • Linux #174
  • Windows #174
  • MacOS X #181
  • Documentation #174
  • Make the CMake install tree and export targets
  • Matrix
    • Different library linkage shared/static
    • Different OS versions (Ubuntu 20.04/22.04, Windows 2019/2022, macOS)
  • Build CMake targets based on commit diff
  • Cleanup unnecessary CMake scripts
  • Split CI workflow/jobs to reduce waste in case of failure (split cache of dependencies from building files). Item can be discarded after friendlyanon/setup-vcpkg#6 is accepted
  • Improvement upon #176 to use -march=native everywhere except on CI where it seems to cause problems (causing illegal instructions randomly and hard to debug). See also #182
  • Use asset caching to ensure continued operation even if the original source changes or disappears. microsoft/vcpkg#25734 (comment) or wait for microsoft/vcpkg#29067 to be merged

Error in test case running

Dear @Xiangyu-Hu
I hope everything well with you.

I install the SPHinxsys on windows and when i want run the test 2dam break test case, i encountered with two error.
picture of errors attached.
please help me about this issue.

Capture

Installation error

Greetings,

I've trying to build the SPHinXsys project using Cmake following the last step in the installation guide and I encountered errors below. It seems like I missed some files here but I have already cloned the repository. Could you please help me ?

CMake Error at cmake/Import3rdpartylibs.cmake:55 (find_package):
Could not find a package configuration file provided by "GTest" with any of
the following names:

GTestConfig.cmake
gtest-config.cmake

Add the installation prefix of "GTest" to CMAKE_PREFIX_PATH or set
"GTest_DIR" to a directory containing one of the above files. If "GTest"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:122 (include)

Bests,
Jun

Questions about getRotationFromPseudoNormalForFiniteDeformation

Dear developer,
We feel confused about these equation, would you please share the reference paper of this part?

Vec2d getRotationFromPseudoNormalForFiniteDeformation(const Vec2d &dpseudo_n_d2t, const Vec2d &rotation, const Vec2d &angular_vel, Real dt)
{
Vec2d dangular_vel_dt(0.0);
dangular_vel_dt[0] = -(dpseudo_n_d2t[0] + sin(rotation[0]) * powerN(angular_vel[0], 2))
/ (2 * sin(rotation[0]) * angular_vel[0] * dt - cos(rotation[0]));
return dangular_vel_dt;
}
//=================================================================================================//
Vec3d getRotationFromPseudoNormalForFiniteDeformation(const Vec3d &dpseudo_n_d2t, const Vec3d &rotation, const Vec3d &angular_vel, Real dt)
{
Vec3d dangular_vel_dt(0.0);
dangular_vel_dt[0] = (dpseudo_n_d2t[1] - sin(rotation[0]) * powerN(angular_vel[0], 2))
/ (2 * sin(rotation[0]) * angular_vel[0] * dt - cos(rotation[0]));
dangular_vel_dt[1] = (dpseudo_n_d2t[0] + cos(rotation[0]) * sin(rotation[1])
* (powerN(angular_vel[0], 2) + powerN(angular_vel[1], 2))
+ 2 * sin(rotation[0]) * cos(rotation[1]) * angular_vel[0] * angular_vel[1]
+ (2 * cos(rotation[0]) * sin(rotation[1]) * angular_vel[0] * dt
+ 2 * sin(rotation[0]) * cos(rotation[1]) * angular_vel[1] * dt
+ sin(rotation[0]) * cos(rotation[1])) * dangular_vel_dt[0])
/ (-2 * sin(rotation[0]) * cos(rotation[1]) * angular_vel[0] * dt
- 2 * cos(rotation[0]) * sin(rotation[1]) * angular_vel[1] * dt
+ cos(rotation[0]) * cos(rotation[1]));
return dangular_vel_dt;
}

Invalid numeric argument '/Werror' while building

Hi SPHinXsys team,

I'm now trying out the feature of SPHinXsys (following the YouTube Installation procedure) & I encountered the following issue while building the Test_2D_dambreak case.

Error code D8021 : Invalid numeric argument '/Werror' while building

From the web, this error code D8021 states:
invalid numeric argument 'number'
A number greater than 65,534 was specified as a numeric argument.

I am not sure how to resolve this.

Can you advise? Thank you very much sphinxsys team.

Problems about fluid sound speed in fsi2

In the case fsi2, the value of fluid sound speed can largely influence the behavior of flow behind the cylinder. When using cf=20*U_f in line 33, the displacements of the beam tip decrease to a small value.
This problem exists for all the released versions.

API not robust against misuse

Summarizing earlier discussion:

The new approach to use algorithms, e.g. InteractionDynamics<fluid_dynamics::TransportVelocityCorrectionComplex> pushes implementation details knowledge requirement on users and does not prevent misuse. For example, someone using InteractionDynamics instead of InteractionWithUpdate compiles and would generate wrong output without error/warning.

Moreover, there are still several inconsistencies in the codebase, for example solid_dynamics::AverageVelocityAndAcceleration does not require such wrapping.

The problem is that it imposes a weak interface coupling on the inner class with no way to enforce validity. How to use the algorithm is known by the developer and should be enforced directly, allowing only relevant policies to the surface such as particle range (and perhaps parallel scheduling backend in the future).

As I see there are currently 2 options, one simple enough and directly applicable: with alias template (either in a new namespace SPH::, SPH::algorithms::, or move existing into another namespace like impl). The other option would involve larger refactoring with static polymorphism and class policies with no clear (short-term) benefits and harder to formulate so I will skip.

For example, this would yield

namespace fluid_dynamics
{
template<typename Range = SPHBody>
using TransportVelocityCorrectionComplex = InteractionDynamics<impl::TransportVelocityCorrectionComplex,Range>;
}

vs2017导入SPHINXsys后,运行其中一个case,出现下面的链接错误。

輸出列表
2>cl /c /IC:\simbody\include /IC:\tbb2019_20191006oss\include /IC:\local\boost_1_74_0 /I"C:\googletest-distribution\include" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\adaptations" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\bodies" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\common" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\generative_structures" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\geometries" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\include" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\io_system" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\kernels" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\materials" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\meshes" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\particle_dynamics\active_muscle_dynamics" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\particle_dynamics" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\particle_dynamics\diffusion_reaction_dynamics" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\particle_dynamics\dissipation_dynamics" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\particle_dynamics\electro_physiology" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\particle_dynamics\external_force" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\particle_dynamics\fluid_dynamics" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\particle_dynamics\fluid_dynamics\eulerian_fluid_dynamics" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\particle_dynamics\general_dynamics" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\particle_dynamics\observer_dynamics" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\particle_dynamics\relax_dynamics" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\particle_dynamics\solid_dynamics" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\particle_generator" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\particles" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\regression_test" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\simbody_sphinxsys" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\sphinxsys_system" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\for_2D_build\common" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\for_2D_build\geometries" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\for_2D_build\particle_generator" /I"D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\for_2D_build\meshes" /W1 /WX- /diagnostics:classic /MP /O2 /Ob2 /D _MBCS /D WIN32 /D _WINDOWS /D NDEBUG /D BOOST_AVAILABLE /D _USE_MATH_DEFINES /D TBB_SUPPRESS_DEPRECATED_MESSAGES=1 /D "CMAKE_INTDIR="Release"" /Gm- /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"sphinxsys_2d.dir\Release\" /Fd"sphinxsys_2d.dir\Release\sphinxsys_2d.pdb" /Gd /TP /errorReport:prompt /EHsc";" "D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\shared\adaptations\adaptation.cpp" "D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\for_2D_build\bodies\solid_body_supplementary.cpp" "D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\for_2D_build\common\scalar_functions_supplementary.cpp" "D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\for_2D_build\geometries\level_set_supplementary.cpp" "D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\for_2D_build\geometries\multi_polygon_shape.cpp" "D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\for_2D_build\meshes\base_mesh_supplementary.cpp" "D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\for_2D_build\meshes\cell_linked_list_supplementary.cpp" "D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\for_2D_build\particle_dynamics\solid_dynamics\solid_dynamics_supplementary.cpp" "D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\for_2D_build\particle_generator\particle_generator_lattice_supplementary.cpp" "D:\SPH\SPHinXsys-1.0-beta.0.3\SPHINXsys\src\for_2D_build\particles\solid_particles_supplementary.cpp"
2>
2>cl : 命令行 warning D9002: 忽略未知选项“/EH;”

错误列表:

E0070 不允许使用不完整的类型
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK2019 无法解析的外部符号 "public: __cdecl SPH::XmlEngine::XmlEngine(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (??0XmlEngine@SPH@@qeaa@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@0@Z),该符号在函数 "public: __cdecl SPH::RegressionTestBase<class SPH::BodyReducedQuantityRecording >::RegressionTestBase<class SPH::BodyReducedQuantityRecording ><class SPH::In_Output &,class WaterBlock &,class SPH::Gravity &>(class SPH::In_Output &,class WaterBlock &,class SPH::Gravity &)" (??$?0AEAVIn_Output@SPH@@AEAVWaterBlock@@AEAVGravity@1@@?$RegressionTestBase@V?$BodyReducedQuantityRecording@VTotalMechanicalEnergy@SPH@@@sph@@@sph@@qeaa@AEAVIn_Output@1@AEAVWaterBlock@@AEAVGravity@1@@z) 中被引用 test_2d_dambreak D:\SPH\SPHinXsys-Github-build\tests\2d_examples\test_2d_dambreak\Dambreak.obj 1

后面都是LINK2019这种错误。

Shell contact current limitations

StdLargeVec<Vecd> &contact_pos_k = *(contact_pos_[k]);
Neighborhood &contact_neighborhood = (*contact_configuration_[k])[index_i];
for (size_t n = 0; n != contact_neighborhood.current_size_; ++n)
{
const Vecd contact_pos_j = contact_pos_k[contact_neighborhood.j_[n]];
const Vecd dp_2_t_0 = pos_n_[index_i] - Vecd(dp_2 * x_0, dp_2 * x_0) - contact_pos_j;
const Vecd dp_2_t_1 = pos_n_[index_i] - Vecd(dp_2 * x_1, dp_2 * x_1) - contact_pos_j;
const Vecd dp_2_t_2 = pos_n_[index_i] - Vecd(dp_2 * x_2, dp_2 * x_2) - contact_pos_j;
const Real W_rij_t_0 = kernel_->W(dp_2_t_0.norm(), dp_2_t_0);
const Real W_rij_t_1 = kernel_->W(dp_2_t_1.norm(), dp_2_t_1);
const Real W_rij_t_2 = kernel_->W(dp_2_t_2.norm(), dp_2_t_2);
sigma += (w_0 * W_rij_t_0 + w_1 * W_rij_t_1 + w_2 * W_rij_t_2) * dp_2;
}

Before I forget again, the above snippet for shell contact calculation has several issues for the generalization in 3D:

  1. The algorithm sample along a line (correct in 2D), but it requires a tensor product (sampling a surface) of gauss points in 3D
  2. In 3D the part Vecd(dp_2 * x_0, dp_2 * x_0) yields Vec3d(dp_2 * x_0, dp_2 * x_0, 0) (absence of the z-coordinate)
  3. IIRC the numerical quadrature should be performed along the the boundary of the object (line, surface) so the quadrature point position should be given relatively to the tangent (and bitangent) of the body around the particle

For visual purpose, the correction of point 3 in current file would be:

    const Vecd dp_2_t_0 = pos_n_[index_i] - dp_2 * x_0 * tangent - contact_pos_j; 
    const Vecd dp_2_t_1 = pos_n_[index_i] - dp_2 * x_1 * tangent - contact_pos_j; 
    const Vecd dp_2_t_2 = pos_n_[index_i] - dp_2 * x_2 * tangent - contact_pos_j; 

Class `SoftConstrainSolidBodyRegion` cannot be used more than once for the same body

SoftConstrainSolidBodyRegion::
SoftConstrainSolidBodyRegion(BaseBodyRelationInner &inner_relation, BodyPartByParticle &body_part)
: PartInteractionDynamicsByParticleWithUpdate(*inner_relation.sph_body_, body_part),
SolidDataInner(inner_relation),
Vol_(particles_->Vol_),
vel_(particles_->vel_), acc_(particles_->acc_)
{
particles_->registerVariable(vel_temp_, "TemporaryVelocity");
particles_->registerVariable(acc_temp_, "TemporaryAcceleration");
}

Registering the variable prevents using several of this type of constraint in a single simulation because it leads to error if it is constructed more than once for the same body:

Error: the variable 'TemporaryVelocity' has already been registered!

Too many warning in the code

I saw many warning like this during compiling:
/home/SPHinXsys/SPHINXsys/src/shared/particle_dynamics/solid_dynamics/solid_dynamics.cpp:247:3: warning: when initialized here [-Wreorder]
This might have unexpected side effects. We should work together to resolve the issue.

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.