Skip to content

Local force capping example#81

Open
J-Hizzle wants to merge 15 commits intoXzzX:mainfrom
J-Hizzle:local-force-capping-example
Open

Local force capping example#81
J-Hizzle wants to merge 15 commits intoXzzX:mainfrom
J-Hizzle:local-force-capping-example

Conversation

@J-Hizzle
Copy link
Contributor

Solves #72.

Relates to #76.

I also updated Subdomain with new member functions and the example file to the new simulationSetup.hpp standards.

Unfortunately, the example is very inefficient at the moment due to serially looping over all particles twice in 02_LennardJones_IdealGas_LocalCap.cpp:198-222. We might opt for rethinking force calculation as well in the future.

@XzzX
Copy link
Owner

XzzX commented Feb 26, 2026

Took the freedom to extract the Subdomain changes to #83.

@J-Hizzle
Copy link
Contributor Author

I don't understand the error for the nvcc debug build. I define the subdomain exactly the way it is done in Subdomain.test.cpp:66, which hasn't made any problems yet.

@J-Hizzle
Copy link
Contributor Author

Alright, apparently the error was that I initialized the Point3D argument of the Subdomain constructor with the object member config.neighborCutoff rather than the static constexpr class member Config::neigborCutoff.
I suppose that this is some strange interaction in between the {} constructor for the Point3D object and the static constexpr nature of the member.

  1. Is that correct or what would be the correct explanation?
  2. Where is this {} constructor for Point3D defined?
  3. Why did this issue only appear for nvcc and only when I initialized the Point3D manually? After all, the Subdomain constructor does exactly the same internally, doesn't it?

Depending on what the answers are to these questions, maybe it would be better to only use the static constexpr members of the Config class rather than the config object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants