Comments (1)
From today's discussion of Propagator
interface:
- Both linear and magnetic field propagators will have two
operator()
, one with a maximum step distance, one without - Result of both
operator()
will be a struct returning the actual distance traveled, and (if it crossed into a new volume) the new updated volume ID - (Maybe?) If it moves outside, return an unassigned volume ID
VolumeId{}
struct result_type
{
real_type distance; //!< Distance traveled to min(input limit, boundary)
VolumeId volume; //!< Post-propagation volume
};
// Input for propagation kernel: maximum distance to next physics interaction
// (or in the raytrace/rasterizing case, distance to next pixel)
result = propagate(limit) -> (distance actually traveled, VolumeId)
propagate(nolimit) -> (same)
// hit a new geometry volume *before* we hit limit:
result = {distance_traveled, geo.volume_id()};
// hit limit before hitting geometry boundary
result = {limit, VolumeId{}};
// no-limit case:
result = {distance_traveled, geo.inside() ? geo.volume_id() : VolumeId{}};
Hypothetical usage with an amazing goto
:
__global__ void move_to_new_material(...)
{
GeoTrackState geo(...);
Propagator propagate(geo);
MaterialTrackState mat(...);
real_type physics_distance_limit = physics[thread_id];
real_type accum_distance = 0;
MaterialId matid = mat.id();
prop:
auto result = propagate(physics_distance_limit);
accum_distance += result.distance;
if (result.volume)
{
// Moved to a new cell; check the new material
if (volume_to_mat[result.volume.get()] == matid)
{
// Material didn't change; keep propagating
physics_distance_limit -= result.distance;
goto prop;
}
}
return result.distance_traveled;
}
from celeritas.
Related Issues (20)
- Ensure reproducibility when using MT Geant4 with Celeritas offloading HOT 1
- Implement offload to Celeritas via G4VTrackingManager
- Improve device initialization for eventual CMSSW use
- Signal handling not thread-safe
- Automate tricky input parameters
- Support Intel GPUs
- Add G4VG support for ALICE Geant4 geometry components HOT 5
- Build errors with GEANT4 11.2.0 HOT 2
- Add ORANGE construction of single units HOT 2
- Nonuniform Rayleigh scattering cross section grid in Geant4 11.2 HOT 4
- Update celer-g4 ROOT I/O
- Geant4 object model HOT 3
- Integrate Celeritas into CMSSW
- Integrate Celeritas into ATLAS
- Demonstrate ADIOS output on Frontier HOT 2
- Undefined references with CudaRDCUtils and vecgeom
- Collaborate with HEPiX for CPU/GPU performance and efficiency benchmarking
- Convert Geant4 geometry to ORANGE
- Implement single-track CPU for performance and improve integration HOT 6
- Implement CPU-only G4MagneticField wrapper
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from celeritas.