Dear Radu,
Thanks a lot. I've managed to solve the problem. The issue was caused
by wmake, the build tool in OpenFOAM, which struggled with compiling Chrono
code directly within the OpenFOAM environment. To work around this, I now
compile the Chrono component into a .so file using CMake and wrapp all the
functionalities required by OpenFOAM in functions and used forward
declarations to avoid dependency conflicts. This setup prevents OpenFOAM
from trying to directly include headers from the Chrono libraries. This
method seems to resolve the issues.
Regards,
Jay
在2024年4月13日星期六 UTC+1 08:19:49<Radu Serban> 写道:
> Jay – do I understand it correctly that you are using GCC 4.7?
>
> If that is the case, you will need to upgrade to something more recent
> (GCC is now at version 13!).
>
>
>
> You should also consider switching to the latest Chrono version (currently
> in the development ‘main’ branch of the git repository) which will be the
> base of the upcoming Chrono 9.0 release. There was a recent large
> refactoring of the code, but the information in the CHANGELOG file should
> help you with the update.
>
>
>
> Please follow up on this if the problem still persists.
>
>
>
> --Radu
>
>
>
> *From:* [email protected] <[email protected]> *On
> Behalf Of *Jay Jay
> *Sent:* Thursday, April 4, 2024 2:44 AM
> *To:* ProjectChrono <[email protected]>
> *Subject:* [chrono] error when coupling OpenFOAM and Chrono
>
>
>
> Hi everyone,
>
>
>
> I am coupling Chrono with OpenFOAM. But I got a problem. I have
> simplified the code and deleted irrelevant part. The code is:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *void chronoFSI::initializeShell() { std::cout << "Copyright (c) 2017
> projectchrono.org <http://projectchrono.org>\nChrono version: " <<
> CHRONO_VERSION << std::endl; std::cout <<
> "-----------------------------------------------------------\n";
> std::cout <<
> "-----------------------------------------------------------\n";
> std::cout << " ANCF Shell Elements demo with implicit integration
> \n"; std::cout <<
> "-----------------------------------------------------------\n";
> ChSystemSMC sys_; auto shellMesh_ =
> chrono_types::make_shared<ChMesh>();
> shellMesh_->SetAutomaticGravity(false); std::cout << "666\n"; auto
> element0 = chrono_types::make_shared<ChElementShellReissner4>();
> std::cout << "777\n"; auto element1 =
> chrono_types::make_shared<ChElementShellReissner4>(); std::cout <<
> "888\n"; int TotalNumElements = 10; for (int i = 0; i <
> TotalNumElements; i++) { std::cout << "888888888-1\n"; //
> Create the element and set its nodes. auto element =
> chrono_types::make_shared<ChElementShellReissner4>(); std::cout <<
> "888888888-2\n"; std::cout << "888888888-3\n"; } std::cout
> << "9999999999\n"; sys_.Add(shellMesh_); }*
>
> It is under OpenFOAM environment and I can compile it. But when running
> the code, I got the error:
>
>
>
>
>
>
>
>
>
> *Copyright (c) 2017 projectchrono.org <http://projectchrono.org> Chrono
> version: 8.0.0 -----------------------------------------------------------
> ----------------------------------------------------------- ANCF Shell
> Elements demo with implicit integration
> ----------------------------------------------------------- 666
> pimpleShellFoam: /usr/include/eigen3/Eigen/src/Core/DenseStorage.h:128:
> Eigen::internal::plain_array<T, Size, MatrixOrArrayOptions,
> 32>::plain_array() [with T = double; int Size = 576; int
> MatrixOrArrayOptions = 1]: Assertion
> `(internal::UIntPtr(eigen_unaligned_array_assert_workaround_gcc47(array)) &
> (31)) == 0 && "this assertion is explained here: "
> "http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html
> <https://urldefense.com/v3/__http:/eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html__;!!Mak6IKo!Kw2CEwM0cXA2U4JrQXwNdbrOdcBhjraNXQ2U1GDf1sAmsHTkUGvvDPG_8PBBcL9k_RNYKxaHrI6cZFItvR4Tdg$>"
>
> " **** READ THIS WEB PAGE !!! ****"' failed. Aborted (core dumped)*
>
>
>
> We can see by the output that the error occurs at ----- auto element0 =
> chrono_types::make_shared<ChElementShellReissner4>();.
>
>
>
> Can anyone know how to solve this? Thanks a lot.
>
>
>
> Regards,
>
> Jay
>
> --
> You received this message because you are subscribed to the Google Groups
> "ProjectChrono" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/projectchrono/7fed21a5-0efa-4c7d-9c27-bf32ad9d136en%40googlegroups.com
>
> <https://urldefense.com/v3/__https:/groups.google.com/d/msgid/projectchrono/7fed21a5-0efa-4c7d-9c27-bf32ad9d136en*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!Mak6IKo!Kw2CEwM0cXA2U4JrQXwNdbrOdcBhjraNXQ2U1GDf1sAmsHTkUGvvDPG_8PBBcL9k_RNYKxaHrI6cZFKLOgAy0g$>
> .
>
--
You received this message because you are subscribed to the Google Groups
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/projectchrono/ef3d6169-e7d0-430d-a040-3a699dea12d8n%40googlegroups.com.