diff --git a/previews/PR5/.documenter-siteinfo.json b/previews/PR5/.documenter-siteinfo.json index 7c639b2..f186793 100644 --- a/previews/PR5/.documenter-siteinfo.json +++ b/previews/PR5/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-06T14:51:44","documenter_version":"1.4.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-06T15:16:10","documenter_version":"1.4.1"}} \ No newline at end of file diff --git a/previews/PR5/authors/index.html b/previews/PR5/authors/index.html index 7da8b3a..493cc50 100644 --- a/previews/PR5/authors/index.html +++ b/previews/PR5/authors/index.html @@ -1,2 +1,2 @@ -Authors · TrixiNeighborhoodSearch.jl

Authors

This package is maintained by the authors of TrixiParticles.jl. For a full list of authors, see AUTHORS.md in the TrixiParticles.jl repository. These authors form "The TrixiParticles.jl Authors", as mentioned under License.

+Authors · TrixiNeighborhoodSearch.jl

Authors

This package is maintained by the authors of TrixiParticles.jl. For a full list of authors, see AUTHORS.md in the TrixiParticles.jl repository. These authors form "The TrixiParticles.jl Authors", as mentioned under License.

diff --git a/previews/PR5/index.html b/previews/PR5/index.html index c52af1f..4f48394 100644 --- a/previews/PR5/index.html +++ b/previews/PR5/index.html @@ -1,2 +1,2 @@ -Home · TrixiNeighborhoodSearch.jl
+Home · TrixiNeighborhoodSearch.jl
diff --git a/previews/PR5/license/index.html b/previews/PR5/license/index.html index 6a2bfa1..95a9bb3 100644 --- a/previews/PR5/license/index.html +++ b/previews/PR5/license/index.html @@ -1,2 +1,2 @@ -License · TrixiNeighborhoodSearch.jl

License

MIT License

Copyright (c) 2023-present The TrixiParticles.jl Authors (see Authors)
Copyright (c) 2023-present Helmholtz-Zentrum hereon GmbH, Institute of Surface Science

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+License · TrixiNeighborhoodSearch.jl

License

MIT License

Copyright (c) 2023-present The TrixiParticles.jl Authors (see Authors)
Copyright (c) 2023-present Helmholtz-Zentrum hereon GmbH, Institute of Surface Science

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

diff --git a/previews/PR5/reference/index.html b/previews/PR5/reference/index.html index 95fb74f..9cd1f1b 100644 --- a/previews/PR5/reference/index.html +++ b/previews/PR5/reference/index.html @@ -5,8 +5,8 @@ neighborhood_search=GridNeighborhoodSearch)

The keyword arguments periodic_box_min_corner and periodic_box_max_corner explained above can also be passed to the Semidiscretization and will internally be forwarded to the neighborhood search:

semi = Semidiscretization(system1, system2,
                           neighborhood_search=GridNeighborhoodSearch,
                           periodic_box_min_corner=[0.0, -0.25],
-                          periodic_box_max_corner=[1.0, 0.75])

References

source
TrixiNeighborhoodSearch.TrivialNeighborhoodSearchType
TrivialNeighborhoodSearch{NDIMS}(search_radius, eachparticle)

Trivial neighborhood search that simply loops over all particles. The search radius still needs to be passed in order to sort out particles outside the search radius in the internal function for_particle_neighbor, but it's not used in the internal function eachneighbor.

Arguments

  • NDIMS: Number of dimensions.
  • search_radius: The uniform search radius.
  • eachparticle: UnitRange of all particle indices. Usually just 1:n_particles.

Keywords

  • periodic_box_min_corner: In order to use a (rectangular) periodic domain, pass the coordinates of the domain corner in negative coordinate directions.
  • periodic_box_max_corner: In order to use a (rectangular) periodic domain, pass the coordinates of the domain corner in positive coordinate directions.
Internal use only

Please note that this constructor is intended for internal use only. It is not part of the public API of TrixiParticles.jl, and it thus can altered (or be removed) at any time without it being considered a breaking change.

To run a simulation with this neighborhood search, just pass the type to the constructor of Semidiscretization:

semi = Semidiscretization(system1, system2,
+                          periodic_box_max_corner=[1.0, 0.75])

References

  • M. Chalela, E. Sillero, L. Pereyra, M.A. Garcia, J.B. Cabral, M. Lares, M. Merchán. "GriSPy: A Python package for fixed-radius nearest neighbors search". In: Astronomy and Computing 34 (2021). doi: 10.1016/j.ascom.2020.100443
  • Markus Ihmsen, Nadir Akinci, Markus Becker, Matthias Teschner. "A Parallel SPH Implementation on Multi-Core CPUs". In: Computer Graphics Forum 30.1 (2011), pages 99–112. doi: 10.1111/J.1467-8659.2010.01832.X
source
TrixiNeighborhoodSearch.TrivialNeighborhoodSearchType
TrivialNeighborhoodSearch{NDIMS}(search_radius, eachparticle)

Trivial neighborhood search that simply loops over all particles. The search radius still needs to be passed in order to sort out particles outside the search radius in the internal function for_particle_neighbor, but it's not used in the internal function eachneighbor.

Arguments

  • NDIMS: Number of dimensions.
  • search_radius: The uniform search radius.
  • eachparticle: UnitRange of all particle indices. Usually just 1:n_particles.

Keywords

  • periodic_box_min_corner: In order to use a (rectangular) periodic domain, pass the coordinates of the domain corner in negative coordinate directions.
  • periodic_box_max_corner: In order to use a (rectangular) periodic domain, pass the coordinates of the domain corner in positive coordinate directions.
Internal use only

Please note that this constructor is intended for internal use only. It is not part of the public API of TrixiParticles.jl, and it thus can altered (or be removed) at any time without it being considered a breaking change.

To run a simulation with this neighborhood search, just pass the type to the constructor of Semidiscretization:

semi = Semidiscretization(system1, system2,
                           neighborhood_search=TrivialNeighborhoodSearch)

The keyword arguments periodic_box_min_corner and periodic_box_max_corner explained above can also be passed to the Semidiscretization and will internally be forwarded to the neighborhood search:

semi = Semidiscretization(system1, system2,
                           neighborhood_search=TrivialNeighborhoodSearch,
                           periodic_box_min_corner=[0.0, -0.25],
-                          periodic_box_max_corner=[1.0, 0.75])
source
TrixiNeighborhoodSearch.@threadedMacro
@threaded for ... end

Semantically the same as Threads.@threads when iterating over a AbstractUnitRange but without guarantee that the underlying implementation uses Threads.@threads or works for more general for loops. In particular, there may be an additional check whether only one thread is used to reduce the overhead of serial execution or the underlying threading capabilities might be provided by other packages such as Polyester.jl.

Warn

This macro does not necessarily work for general for loops. For example, it does not necessarily support general iterables such as eachline(filename).

Some discussion can be found at https://discourse.julialang.org/t/overhead-of-threads-threads/53964 and https://discourse.julialang.org/t/threads-threads-with-one-thread-how-to-remove-the-overhead/58435.

Copied from Trixi.jl.

source
+ periodic_box_max_corner=[1.0, 0.75])source
TrixiNeighborhoodSearch.@threadedMacro
@threaded for ... end

Semantically the same as Threads.@threads when iterating over a AbstractUnitRange but without guarantee that the underlying implementation uses Threads.@threads or works for more general for loops. In particular, there may be an additional check whether only one thread is used to reduce the overhead of serial execution or the underlying threading capabilities might be provided by other packages such as Polyester.jl.

Warn

This macro does not necessarily work for general for loops. For example, it does not necessarily support general iterables such as eachline(filename).

Some discussion can be found at https://discourse.julialang.org/t/overhead-of-threads-threads/53964 and https://discourse.julialang.org/t/threads-threads-with-one-thread-how-to-remove-the-overhead/58435.

Copied from Trixi.jl.

source