Go to the source code of this file.
|
template<int N, typename DstPC , typename DstTile , typename FAB , typename Index , typename CreateFunc1 , typename CreateFunc2 , typename TransFunc , amrex::EnableIf_t< std::is_integral< Index >::value, int > foo = 0> |
Index | filterCreateTransformFromFAB (DstPC &pc1, DstPC &pc2, DstTile &dst1, DstTile &dst2, const amrex::Box box, const FAB *src_FAB, const Index *mask, const Index dst1_index, const Index dst2_index, CreateFunc1 &&create1, CreateFunc2 &&create2, TransFunc &&transform, const amrex::Geometry &geom_lev_zero) noexcept |
| Apply a filter on a list of FABs, then create and apply a transform operation to the particles depending on the output of the filter. More...
|
|
template<int N, typename DstPC , typename DstTile , typename FABs , typename Index , typename FilterFunc , typename CreateFunc1 , typename CreateFunc2 , typename TransFunc > |
Index | filterCreateTransformFromFAB (DstPC &pc1, DstPC &pc2, DstTile &dst1, DstTile &dst2, const amrex::Box box, const FABs &src_FABs, const Index dst1_index, const Index dst2_index, FilterFunc &&filter, CreateFunc1 &&create1, CreateFunc2 &&create2, TransFunc &&transform, const amrex::Geometry &geom_lev_zero) noexcept |
| Apply a filter on a list of FABs, then create and apply a transform operation to the particles depending on the output of the filter. More...
|
|
◆ filterCreateTransformFromFAB() [1/2]
template<int N, typename DstPC , typename DstTile , typename FAB , typename Index , typename CreateFunc1 , typename CreateFunc2 , typename TransFunc , amrex::EnableIf_t< std::is_integral< Index >::value, int > foo = 0>
Index filterCreateTransformFromFAB |
( |
DstPC & |
pc1, |
|
|
DstPC & |
pc2, |
|
|
DstTile & |
dst1, |
|
|
DstTile & |
dst2, |
|
|
const amrex::Box |
box, |
|
|
const FAB * |
src_FAB, |
|
|
const Index * |
mask, |
|
|
const Index |
dst1_index, |
|
|
const Index |
dst2_index, |
|
|
CreateFunc1 && |
create1, |
|
|
CreateFunc2 && |
create2, |
|
|
TransFunc && |
transform, |
|
|
const amrex::Geometry & |
geom_lev_zero |
|
) |
| |
|
noexcept |
Apply a filter on a list of FABs, then create and apply a transform operation to the particles depending on the output of the filter.
This version of the function takes as inputs a mask and a FAB that can be used in the transform function, both of which can be obtained using another version of filterCreateTransformFromFAB that takes a filter function as input.
- Template Parameters
-
N | number of particles created in the dst(s) in each cell |
DstTile | the dst particle tile type |
FAB | the src FAB type |
Index | the index type, e.g. unsigned int |
CreateFunc1 | the create function type for dst1 |
CreateFunc2 | the create function type for dst2 |
TransFunc | the transform function type |
- Parameters
-
[in,out] | dst1 | the first destination tile |
[in,out] | dst2 | the second destination tile |
[in] | box | the box where the particles are created |
[in] | src_FAB | A FAB defined on box that is used in the transform function |
[in] | mask | pointer to the mask: 1 means create, 0 means don't create |
[in] | dst1_index | the location at which to starting writing the result to dst1 |
[in] | dst2_index | the location at which to starting writing the result to dst2 |
[in] | create1 | callable that defines what will be done for the create step for dst1. |
[in] | create2 | callable that defines what will be done for the create step for dst2. |
[in] | transform | callable that defines the transformation to apply on dst1 and dst2. |
[in] | geom_lev_zero | the geometry object associated to level zero |
- Returns
- num_added the number of particles that were written to dst1 and dst2.
◆ filterCreateTransformFromFAB() [2/2]
template<int N, typename DstPC , typename DstTile , typename FABs , typename Index , typename FilterFunc , typename CreateFunc1 , typename CreateFunc2 , typename TransFunc >
Index filterCreateTransformFromFAB |
( |
DstPC & |
pc1, |
|
|
DstPC & |
pc2, |
|
|
DstTile & |
dst1, |
|
|
DstTile & |
dst2, |
|
|
const amrex::Box |
box, |
|
|
const FABs & |
src_FABs, |
|
|
const Index |
dst1_index, |
|
|
const Index |
dst2_index, |
|
|
FilterFunc && |
filter, |
|
|
CreateFunc1 && |
create1, |
|
|
CreateFunc2 && |
create2, |
|
|
TransFunc && |
transform, |
|
|
const amrex::Geometry & |
geom_lev_zero |
|
) |
| |
|
noexcept |
Apply a filter on a list of FABs, then create and apply a transform operation to the particles depending on the output of the filter.
This version of the function takes as input a filter functor (and an array of FABs that can be used in the filter functor), uses it to obtain a mask and a FAB and then calls another version of filterCreateTransformFromFAB that takes the mask and the FAB as inputs.
- Template Parameters
-
N | number of particles created in the dst(s) in each cell |
DstTile | the dst particle tile type |
FABs | the src array of Array4 type |
Index | the index type, e.g. unsigned int |
FilterFunc | the filter function type |
CreateFunc1 | the create function type for dst1 |
CreateFunc2 | the create function type for dst2 |
TransFunc | the transform function type |
- Parameters
-
[in,out] | dst1 | the first destination tile |
[in,out] | dst2 | the second destination tile |
[in] | box | the box where the particles are created |
[in] | src_FABs | A collection of source data, e.g. a class with Array4 to the EM fields, defined on box on which the filter operation is applied |
[in] | dst1_index | the location at which to starting writing the result to dst1 |
[in] | dst2_index | the location at which to starting writing the result to dst2 |
[in] | filter | a callable returning a value > 0 if particles are to be created in the considered cell. |
[in] | create1 | callable that defines what will be done for the create step for dst1. |
[in] | create2 | callable that defines what will be done for the create step for dst2. |
[in] | transform | callable that defines the transformation to apply on dst1 and dst2. |
[in] | geom_lev_zero | the geometry object associated to level zero |
- Returns
- num_added the number of particles that were written to dst1 and dst2.