|
IPPL (Independent Parallel Particle Layer)
IPPL
|
#include <BareField.h>
Public Types | |
| using | Layout_t = FieldLayout<Dim> |
| using | Domain_t = NDIndex<Dim> |
| Domain type specifying the index region. | |
| using | view_type = typename detail::ViewType<T, Dim, ViewArgs...>::view_type |
| View type storing the data. | |
| typedef view_type::memory_space | memory_space |
| typedef view_type::execution_space | execution_space |
| using | HostMirror = typename view_type::host_mirror_type |
| template<class... PolicyArgs> | |
| using | policy_type = typename RangePolicy<Dim, PolicyArgs...>::policy_type |
| using | halo_type = detail::HaloCells<T, Dim, ViewArgs...> |
| using | value_type = T |
Public Member Functions | |
| BareField () | |
| BareField (const BareField &)=default | |
| BareField (Layout_t &l, int nghost=1) | |
| BareField | deepCopy () const |
| ~BareField ()=default | |
| template<typename... Args> | |
| void | resize (Args... args) |
| void | initialize (Layout_t &l, int nghost=1) |
| void | updateLayout (Layout_t &, int nghost=1) |
| detail::size_type | size (unsigned d) const |
| const Domain_t & | getOwned () const |
| const Domain_t | getAllocated () const |
| int | getNghost () const |
| void | fillHalo () |
| void | accumulateHalo () |
| void | accumulateHalo_noghost (int nghost=1) |
| auto & | getCommunicator () const |
| Layout_t & | getLayout () const |
| const Index & | getIndex (unsigned d) const |
| const NDIndex< Dim > & | getDomain () const |
| halo_type & | getHalo () |
| BareField & | operator= (T x) |
| template<typename E, size_t N> | |
| BareField & | operator= (const detail::Expression< E, N > &expr) |
| template<typename... Args> | |
| KOKKOS_INLINE_FUNCTION T | operator() (Args... args) const |
| view_type & | getView () |
| const view_type & | getView () const |
| HostMirror | getHostMirror () const |
| template<class... PolicyArgs> | |
| policy_type< execution_space, PolicyArgs... > | getFieldRangePolicy (const int nghost=0) const |
| void | write (std::ostream &out=std::cout) const |
| void | write (Inform &inf) const |
| T | sum (int nghost=0) const |
| T | max (int nghost=0) const |
| T | min (int nghost=0) const |
| T | prod (int nghost=0) const |
| template<typename E, size_t N> | |
| BareField< T, Dim, ViewArgs... > & | operator= (const detail::Expression< E, N > &expr) |
| KOKKOS_INLINE_FUNCTION auto | operator[] (size_t i) const |
Static Public Attributes | |
| static constexpr unsigned | dim = Dim |
Private Member Functions | |
| void | setup () |
Private Attributes | |
| int | nghost_m |
| Number of ghost layers on each field boundary. | |
| view_type | dview_m |
| Actual field data. | |
| Domain_t | owned_m |
| Domain of the data. | |
| halo_type | halo_m |
| Layout_t * | layout_m = nullptr |
| How the arrays are laid out. | |
| T | data type |
| Dim | field dimension |
Definition at line 40 of file BareField.h.
| using ippl::BareField< T, Dim, ViewArgs >::Domain_t = NDIndex<Dim> |
Domain type specifying the index region.
Definition at line 47 of file BareField.h.
| typedef view_type::execution_space ippl::BareField< T, Dim, ViewArgs >::execution_space |
Definition at line 52 of file BareField.h.
| using ippl::BareField< T, Dim, ViewArgs >::halo_type = detail::HaloCells<T, Dim, ViewArgs...> |
Definition at line 57 of file BareField.h.
| using ippl::BareField< T, Dim, ViewArgs >::HostMirror = typename view_type::host_mirror_type |
Definition at line 53 of file BareField.h.
| using ippl::BareField< T, Dim, ViewArgs >::Layout_t = FieldLayout<Dim> |
Definition at line 44 of file BareField.h.
| typedef view_type::memory_space ippl::BareField< T, Dim, ViewArgs >::memory_space |
Definition at line 51 of file BareField.h.
| using ippl::BareField< T, Dim, ViewArgs >::policy_type = typename RangePolicy<Dim, PolicyArgs...>::policy_type |
Definition at line 55 of file BareField.h.
| using ippl::BareField< T, Dim, ViewArgs >::value_type = T |
Definition at line 59 of file BareField.h.
| using ippl::BareField< T, Dim, ViewArgs >::view_type = typename detail::ViewType<T, Dim, ViewArgs...>::view_type |
View type storing the data.
Definition at line 50 of file BareField.h.
| ippl::BareField< T, Dim, ViewArgs >::BareField | ( | ) |
A default constructor, which should be used only if the user calls the 'initialize' function before doing anything else. There are no special checks in the rest of the BareField methods to check that the field has been properly initialized.
Definition at line 89 of file BareField.hpp.
References layout_m, and nghost_m.
Referenced by deepCopy(), and operator=().
|
default |
| ippl::BareField< T, Dim, ViewArgs >::BareField | ( | Layout_t & | l, |
| int | nghost = 1 ) |
|
default |
| void ippl::BareField< T, Dim, ViewArgs >::accumulateHalo | ( | ) |
Definition at line 154 of file BareField.hpp.
References Dim, dview_m, halo_m, layout_m, and nghost_m.
Referenced by ippl::assemble_rhs_from_particles().
| void ippl::BareField< T, Dim, ViewArgs >::accumulateHalo_noghost | ( | int | nghost = 1 | ) |
Definition at line 165 of file BareField.hpp.
| BareField< T, Dim, ViewArgs... > ippl::BareField< T, Dim, ViewArgs >::deepCopy | ( | ) | const |
Creates a new BareField with the same properties and contents
Definition at line 94 of file BareField.hpp.
References BareField(), Dim, dview_m, layout_m, and nghost_m.
| void ippl::BareField< T, Dim, ViewArgs >::fillHalo | ( | ) |
Definition at line 143 of file BareField.hpp.
References Dim, dview_m, halo_m, layout_m, and nghost_m.
Referenced by ippl::curl(), ippl::div(), ippl::grad(), ippl::hess(), ippl::laplace(), ippl::lower_laplace(), ippl::poisson(), ippl::upper_and_lower_laplace(), and ippl::upper_laplace().
|
inline |
Index domain of the allocated field.
Definition at line 123 of file BareField.h.
|
inline |
Definition at line 131 of file BareField.h.
Referenced by ippl::ExtrapolateFace< Field >::apply(), ippl::PeriodicFace< Field >::apply(), ippl::BConds< Field, Dim >::assignGhostToPhysical(), ippl::BConds< Field, Dim >::findBCNeighbors(), and ippl::PeriodicFace< Field >::findBCNeighbors().
|
inline |
Definition at line 140 of file BareField.h.
|
inline |
Generate the range policy for iterating over the field, excluding ghost layers
| PolicyArgs... | additional template parameters for the range policy |
| nghost | Number of ghost layers to include in the range policy (default 0) |
Definition at line 183 of file BareField.h.
Referenced by ippl::innerProduct(), ippl::mult(), and ippl::norm().
|
inline |
Definition at line 142 of file BareField.h.
Referenced by ippl::PeriodicFace< Field >::apply().
|
inline |
Definition at line 173 of file BareField.h.
|
inline |
Definition at line 139 of file BareField.h.
|
inline |
Definition at line 134 of file BareField.h.
Referenced by ippl::adapted_powermethod(), ippl::ExtrapolateFace< Field >::apply(), ippl::PeriodicFace< Field >::apply(), ippl::assemble_rhs_from_particles(), ippl::ExtrapolateFace< Field >::assignGhostToPhysical(), ippl::PeriodicFace< Field >::assignGhostToPhysical(), ippl::PeriodicFace< Field >::findBCNeighbors(), ippl::BareField< T, Dim, ViewArgs... >::getCommunicator(), ippl::BareField< T, Dim, ViewArgs... >::getDomain(), ippl::BareField< T, Dim, ViewArgs... >::getIndex(), ippl::gs_preconditioner< Field, LowerF, UpperF, InvDiagF >::init_fields(), ippl::richardson_preconditioner< Field, UpperAndLowerF, InvDiagF >::init_fields(), ippl::richardson_preconditioner_alt< Field, OperatorF, InvDiagF >::init_fields(), ippl::ssor_preconditioner< Field, LowerF, UpperF, InvDiagF, DiagF >::init_fields(), ippl::innerProduct(), ippl::interpolate_to_diracs(), ippl::lower_laplace_no_comm(), ippl::norm(), ippl::gs_preconditioner< Field, LowerF, UpperF, InvDiagF >::operator()(), ippl::jacobi_preconditioner< Field, InvDiagF >::operator()(), ippl::polynomial_chebyshev_preconditioner< Field, OperatorF >::operator()(), ippl::richardson_preconditioner< Field, UpperAndLowerF, InvDiagF >::operator()(), ippl::richardson_preconditioner_alt< Field, OperatorF, InvDiagF >::operator()(), ippl::ssor_preconditioner< Field, LowerF, UpperF, InvDiagF, DiagF >::operator()(), ippl::powermethod(), ippl::polynomial_newton_preconditioner< Field, OperatorF >::recursive_preconditioner(), ippl::PoissonCG< Field< T, Dim >, Field_t< Dim > >::setSolver(), and ippl::upper_laplace_no_comm().
|
inline |
Definition at line 125 of file BareField.h.
Referenced by ippl::ExtrapolateFace< Field >::apply(), ippl::PeriodicFace< Field >::apply(), ippl::assemble_rhs_from_particles(), ippl::ExtrapolateFace< Field >::assignGhostToPhysical(), ippl::PeriodicFace< Field >::assignGhostToPhysical(), ippl::PeriodicFace< Field >::findBCNeighbors(), ippl::interpolate_to_diracs(), ippl::lower_laplace_no_comm(), ippl::FFT< Cos1Transform, Field >::transform(), ippl::FFT< CosTransform, Field >::transform(), ippl::FFT< SineTransform, Field >::transform(), and ippl::upper_laplace_no_comm().
|
inline |
Index domain of the local field.
Definition at line 117 of file BareField.h.
Referenced by ippl::FFT< Cos1Transform, Field >::transform(), ippl::FFT< CosTransform, Field >::transform(), and ippl::FFT< SineTransform, Field >::transform().
|
inline |
Definition at line 169 of file BareField.h.
Referenced by ippl::ExtrapolateFace< Field >::apply(), ippl::PeriodicFace< Field >::apply(), ippl::assemble_rhs_from_particles(), ippl::ExtrapolateFace< Field >::assignGhostToPhysical(), ippl::PeriodicFace< Field >::assignGhostToPhysical(), ippl::innerProduct(), ippl::interpolate_to_diracs(), ippl::mult(), ippl::norm(), ippl::FFT< Cos1Transform, Field >::transform(), ippl::FFT< CosTransform, Field >::transform(), and ippl::FFT< SineTransform, Field >::transform().
|
inline |
Definition at line 171 of file BareField.h.
| void ippl::BareField< T, Dim, ViewArgs >::initialize | ( | Layout_t & | l, |
| int | nghost = 1 ) |
Initialize the field, if it was constructed from the default constructor. This should NOT be called if the field was constructed by providing a FieldLayout.
| l | of field |
| nghost | number of ghost layers |
Definition at line 109 of file BareField.hpp.
References layout_m, nghost_m, and setup().
| T ippl::BareField< T, Dim, ViewArgs >::max | ( | int | nghost = 0 | ) | const |
| T ippl::BareField< T, Dim, ViewArgs >::min | ( | int | nghost = 0 | ) | const |
|
inline |
Assign another field.
| Args... | variadic template to specify an access index for a view element. |
| args | view indices |
Definition at line 165 of file BareField.h.
| BareField & ippl::BareField< T, Dim, ViewArgs >::operator= | ( | const detail::Expression< E, N > & | expr | ) |
Assign an arbitrary BareField expression
| E | expression type |
| N | size of the expression, this is necessary for running on the device since otherwise it does not allocate enough memory |
| expr | is the expression |
| BareField< T, Dim, ViewArgs... > & ippl::BareField< T, Dim, ViewArgs >::operator= | ( | const detail::Expression< E, N > & | expr | ) |
Definition at line 182 of file BareField.hpp.
| BareField< T, Dim, ViewArgs... > & ippl::BareField< T, Dim, ViewArgs >::operator= | ( | T | x | ) |
Definition at line 172 of file BareField.hpp.
References ippl::apply(), BareField(), Dim, dview_m, ippl::getRangePolicy(), and ippl::parallel_for().
|
inlineinherited |
Access single element of the expression
Definition at line 32 of file IpplExpressions.h.
| T ippl::BareField< T, Dim, ViewArgs >::prod | ( | int | nghost = 0 | ) | const |
| void ippl::BareField< T, Dim, ViewArgs >::resize | ( | Args... | args | ) |
Dimension independent view resize function which calls Kokkos.
| Args... | variadic template specifying the individiual dimension arguments |
Definition at line 138 of file BareField.hpp.
References dview_m.
Referenced by setup().
|
private |
Allocate field.
Definition at line 127 of file BareField.hpp.
References layout_m, nghost_m, owned_m, and resize().
Referenced by BareField(), initialize(), and updateLayout().
|
inline |
Local field size.
| d | the dimension |
Definition at line 111 of file BareField.h.
| T ippl::BareField< T, Dim, ViewArgs >::sum | ( | int | nghost = 0 | ) | const |
| void ippl::BareField< T, Dim, ViewArgs >::updateLayout | ( | Layout_t & | l, |
| int | nghost = 1 ) |
Definition at line 119 of file BareField.hpp.
References layout_m, nghost_m, and setup().
| void ippl::BareField< T, Dim, ViewArgs >::write | ( | Inform & | inf | ) | const |
Print the BareField
| inf | Inform object |
Definition at line 202 of file BareField.hpp.
References Inform::getDestination(), and write().
| void ippl::BareField< T, Dim, ViewArgs >::write | ( | std::ostream & | out = std::cout | ) | const |
Print the BareField.
| out | stream |
Definition at line 196 of file BareField.hpp.
References dview_m, and ippl::detail::write().
Referenced by write().
|
staticconstexpr |
Definition at line 60 of file BareField.h.
Referenced by ippl::innerProduct(), and ippl::norm().
|
private |
Actual field data.
Definition at line 212 of file BareField.h.
Referenced by accumulateHalo(), accumulateHalo_noghost(), deepCopy(), fillHalo(), ippl::BareField< T, Dim, ViewArgs... >::operator()(), operator=(), resize(), and write().
|
private |
Definition at line 217 of file BareField.h.
Referenced by accumulateHalo(), accumulateHalo_noghost(), and fillHalo().
|
private |
How the arrays are laid out.
Definition at line 225 of file BareField.h.
Referenced by accumulateHalo(), accumulateHalo_noghost(), BareField(), BareField(), deepCopy(), fillHalo(), initialize(), setup(), and updateLayout().
|
private |
Number of ghost layers on each field boundary.
Definition at line 209 of file BareField.h.
Referenced by accumulateHalo(), BareField(), BareField(), deepCopy(), fillHalo(), initialize(), setup(), and updateLayout().
|
private |