Celeritas 0.6.0-rc.2.10+develop.de0a3a05
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::NonuniformGridInserter< Index > Class Template Reference

Construct a generic grid using mutable host data and add it to the specified grid collection. More...

#include <NonuniformGridInserter.hh>

Public Types

Type aliases
using SpanConstFlt = Span< float const >
 
using SpanConstDbl = Span< double const >
 
using Values = Collection< real_type, Ownership::value, MemSpace::host >
 
using GridValues = Collection< NonuniformGridRecord, Ownership::value, MemSpace::host, Index >
 

Public Member Functions

 NonuniformGridInserter (Values *reals, GridValues *grids)
 Construct with a reference to mutable host data.
 
Index operator() (SpanConstFlt grid, SpanConstFlt values)
 Add a grid of generic data with linear interpolation to the collection.
 
Index operator() (SpanConstDbl grid, SpanConstDbl values)
 Add a grid of generic data with linear interpolation to the collection.
 
Index operator() (ImportPhysicsVector const &vec)
 Add an imported physics vector as a generic grid to the collection.
 
Index operator() ()
 Add an empty grid.
 

Detailed Description

template<class Index>
class celeritas::NonuniformGridInserter< Index >

Construct a generic grid using mutable host data and add it to the specified grid collection.

NonuniformGridInserter insert(&data->reals, &data->generic_grids);
std::vector<NonuniformGridIndex> grid_ids;
for (material : range(MaterialId{mats->size()}))
grid_ids.push_back(insert(physics_vector[material.get()]));
S & get(AuxStateVec &vec, AuxId auxid)
Get a mutable item from a state vector efficiently and safely.
Definition AuxStateVec.hh:77
CELER_CONSTEXPR_FUNCTION Range< T > range(T begin, T end)
Return a range over fixed beginning and end values.
Definition Range.hh:190
Construct a generic grid using mutable host data and add it to the specified grid collection.
Definition NonuniformGridInserter.hh:38

Member Function Documentation

◆ operator()() [1/2]

template<class Index >
auto celeritas::NonuniformGridInserter< Index >::operator() ( )

Add an empty grid.

Useful for when there's no imported grid present for a given material.

◆ operator()() [2/2]

Add an imported physics vector as a generic grid to the collection.

Returns the id of the inserted grid, or an empty id if the vector is empty.


The documentation for this class was generated from the following file: