IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
ippl::SubFieldLayout< Dim > Class Template Reference

SubFieldLayout provides a layout for a sub-region of a larger field. More...

#include <SubFieldLayout.h>

Inheritance diagram for ippl::SubFieldLayout< Dim >:
Collaboration diagram for ippl::SubFieldLayout< Dim >:

Public Types

using NDIndex_t = NDIndex<Dim>
using view_type = typename detail::ViewType<NDIndex_t, 1>::view_type
using host_mirror_type = typename view_type::host_mirror_type
using rank_list = std::vector<int>
using bounds_list = std::vector<bound_type>
using neighbor_list = std::array<rank_list, detail::countHypercubes(Dim) - 1>
using neighbor_range_list = std::array<bounds_list, detail::countHypercubes(Dim) - 1>

Public Member Functions

 SubFieldLayout (const mpi::Communicator &=MPI_COMM_WORLD)
 Default constructor, which should only be used if you are going to call 'initialize' soon after (before using in any context).
 SubFieldLayout (mpi::Communicator, const NDIndex< Dim > &domain, const NDIndex< Dim > &subDomain, std::array< bool, Dim > decomp, bool isAllPeriodic=false)
 Constructor that creates a SubFieldLayout for a sub-region of a larger domain.
 SubFieldLayout (mpi::Communicator, const NDIndex< Dim > &domain, std::array< bool, Dim > decomp, bool isAllPeriodic=false)
 Constructor for full-domain layout.
virtual ~SubFieldLayout ()=default
 Destructor: Everything deletes itself automatically.
void initialize (const NDIndex< Dim > &domain, const NDIndex< Dim > &subDomain, std::array< bool, Dim > decomp, bool isAllPeriodic=false)
 Initializes a SubFieldLayout with the sub-domain partitioned in the same way as the original FieldLayout partitiones the full domain.
void initialize (const NDIndex< Dim > &domain, std::array< bool, Dim > decomp, bool isAllPeriodic=false)
 Initializes a SubFieldLayout using the domain as both the full domain and sub-domain.
const NDIndex< Dim > & getOriginDomain () const
 Return the original domain before sub-region extraction.
template<unsigned Dim2>
bool operator== (const SubFieldLayout< Dim2 > &x) const
 Compare SubFieldLayouts to see if they represent the same domain.
template<unsigned Dim2>
bool operator== (const FieldLayout< Dim2 > &x) const
 Compare SubFieldLayout to a FieldLayout to see if they represent the same domain.
const NDIndex< Dim > & getDomain () const
bool operator== (const FieldLayout< Dim > &x) const
bool getDistribution (unsigned int d) const
std::array< bool, DimisParallel () const
const NDIndex_tgetLocalNDIndex () const
const NDIndex_tgetLocalNDIndex (int rank) const
const host_mirror_type getHostLocalDomains () const
const view_type getDeviceLocalDomains () const
const neighbor_listgetNeighbors () const
const neighbor_range_listgetNeighborsSendRange () const
const neighbor_range_listgetNeighborsRecvRange () const
void findPeriodicNeighbors (const int nghost, const NDIndex< Dim > &localDomain, NDIndex< Dim > &grown, NDIndex< Dim > &neighborDomain, const int rank, std::map< unsigned int, int > &offsets, unsigned d0=0, unsigned codim=0)
void findNeighbors (int nghost=1)
void addNeighbors (const NDIndex_t &gnd, const NDIndex_t &nd, const NDIndex_t &ndNeighbor, const NDIndex_t &intersect, int nghost, int rank)
void write (std::ostream &=std::cout) const
void updateLayout (const std::vector< NDIndex_t > &domains)

Static Public Member Functions

static int getMatchingIndex (int index)

Public Attributes

bool isAllPeriodic_m
mpi::Communicator comm

Protected Member Functions

void calcWidths ()

Protected Attributes

NDIndex_t gDomain_m
 Global domain.
view_type dLocalDomains_m
 Local domains (device view).
host_mirror_type hLocalDomains_m
 Local domains (host mirror view).
std::array< bool, DimisParallelDim_m
unsigned int minWidth_m [Dim]

Private Member Functions

bound_type getBounds (const NDIndex_t &nd1, const NDIndex_t &nd2, const NDIndex_t &offset, int nghost)
int getPeriodicOffset (const NDIndex_t &nd, const unsigned int d, const int k)

Private Attributes

NDIndex_t originDomain_m
 Original global domain in which the sub-field is defined.
neighbor_list neighbors_m
neighbor_range_list neighborsSendRange_m
neighbor_range_list neighborsRecvRange_m

Detailed Description

template<unsigned Dim>
class ippl::SubFieldLayout< Dim >

SubFieldLayout provides a layout for a sub-region of a larger field.

SubFieldLayout extends FieldLayout to handle sub-regions of a larger computational domain. It ensures that the sub-region is partitioned in the same way as the original FieldLayout, maintaining consistent parallel decomposition and neighbor relationships within the sub-region.

Important Constraint:
SubFieldLayout only allows for sub-layouts that do NOT leave local domains empty. All MPI ranks must have at least some portion of the sub-domain assigned to them. If a sub-domain would result in empty local domains for some ranks, an exception will be thrown during initialization.
Template Parameters
DimNumber of spatial dimensions

Definition at line 39 of file SubFieldLayout.h.

Member Typedef Documentation

◆ bounds_list

template<unsigned Dim>
using ippl::FieldLayout< Dim >::bounds_list = std::vector<bound_type>
inherited

Definition at line 192 of file FieldLayout.h.

◆ host_mirror_type

template<unsigned Dim>
using ippl::SubFieldLayout< Dim >::host_mirror_type = typename view_type::host_mirror_type

Definition at line 43 of file SubFieldLayout.h.

◆ NDIndex_t

template<unsigned Dim>
using ippl::SubFieldLayout< Dim >::NDIndex_t = NDIndex<Dim>

Definition at line 41 of file SubFieldLayout.h.

◆ neighbor_list

template<unsigned Dim>
using ippl::FieldLayout< Dim >::neighbor_list = std::array<rank_list, detail::countHypercubes(Dim) - 1>
inherited

Definition at line 194 of file FieldLayout.h.

◆ neighbor_range_list

template<unsigned Dim>
using ippl::FieldLayout< Dim >::neighbor_range_list = std::array<bounds_list, detail::countHypercubes(Dim) - 1>
inherited

Definition at line 195 of file FieldLayout.h.

◆ rank_list

template<unsigned Dim>
using ippl::FieldLayout< Dim >::rank_list = std::vector<int>
inherited

Definition at line 191 of file FieldLayout.h.

◆ view_type

template<unsigned Dim>
using ippl::SubFieldLayout< Dim >::view_type = typename detail::ViewType<NDIndex_t, 1>::view_type

Definition at line 42 of file SubFieldLayout.h.

Constructor & Destructor Documentation

◆ SubFieldLayout() [1/3]

template<unsigned Dim>
ippl::SubFieldLayout< Dim >::SubFieldLayout ( const mpi::Communicator & communicator = MPI_COMM_WORLD)

Default constructor, which should only be used if you are going to call 'initialize' soon after (before using in any context).

Default constructor, which should only be used if you are going to call 'initialize' soon after (before using in any context).

Parameters
communicatorMPI communicator to use (defaults to MPI_COMM_WORLD)
Parameters
communicatorMPI communicator to use (defaults to MPI_COMM_WORLD)

Creates a SubFieldLayout without specifying domains. The layout must be initialized later using the initialize() methods. This constructor is useful when you need to defer the layout configuration until more information is available.

Creates a SubFieldLayout without specifying domains. The layout must be initialized later using the initialize() methods. This constructor is useful when you need to defer the layout configuration until more information is available.

Definition at line 28 of file SubFieldLayout.hpp.

References Dim, and ippl::FieldLayout< Dim >::FieldLayout().

Referenced by operator==().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SubFieldLayout() [2/3]

template<unsigned Dim>
ippl::SubFieldLayout< Dim >::SubFieldLayout ( mpi::Communicator communicator,
const NDIndex< Dim > & domain,
const NDIndex< Dim > & subDomain,
std::array< bool, Dim > isParallel,
bool isAllPeriodic = false )

Constructor that creates a SubFieldLayout for a sub-region of a larger domain.

Constructor that creates a SubFieldLayout for a sub-region of a larger domain.

Parameters
communicatorMPI communicator to use
domainThe full domain that defines the partitioning
subDomainThe sub-region within the full domain, which is partitioned in the same way as the fullomain
decompArray specifying which dimensions should be parallel
isAllPeriodicWhether all dimensions have periodic boundary conditions
Parameters
communicatorMPI communicator to use
domainThe full domain that defines the partitioning
subDomainThe sub-region within the full domain, which is partitioned in the same way as the fullomain
decompArray specifying which dimensions should be parallel
isAllPeriodicWhether all dimensions have periodic boundary conditions

Implementation details: Initializes both the full domain decomposition and the sub-domain layout. The sub-domain must be contained within the full domain. All MPI ranks must have non-empty local domains after intersection with the sub-domain, otherwise an exception will be thrown.

This constructor sets up the parallel decomposition based on the full domain, then restricts the full domain to the specified sub-region while maintaining the same partitioning structure.

Implementation details: Initializes both the full domain decomposition and the sub-domain layout. The sub-domain must be contained within the full domain. All MPI ranks must have non-empty local domains after intersection with the sub-domain, otherwise an exception will be thrown.

This constructor sets up the parallel decomposition based on the full domain, then restricts the full domain to the specified sub-region while maintaining the same partitioning structure.

Definition at line 44 of file SubFieldLayout.hpp.

References Dim, ippl::FieldLayout< Dim >::FieldLayout(), initialize(), and ippl::FieldLayout< Dim >::isParallel().

Here is the call graph for this function:

◆ SubFieldLayout() [3/3]

template<unsigned Dim>
ippl::SubFieldLayout< Dim >::SubFieldLayout ( mpi::Communicator communicator,
const NDIndex< Dim > & domain,
std::array< bool, Dim > isParallel,
bool isAllPeriodic = false )

Constructor for full-domain layout.

Constructor for full-domain layout.

Parameters
communicatorMPI communicator to use
domainThe full domain that defines the partitioning and is used as the sub-domain simultaneously
decompArray specifying which dimensions should be parallel
isAllPeriodicWhether all dimensions have periodic boundary conditions
Parameters
communicatorMPI communicator to use
domainThe full domain that defines the partitioning and is used as the sub-domain simultaneously
decompArray specifying which dimensions should be parallel
isAllPeriodicWhether all dimensions have periodic boundary conditions

Implementation details: Creates a SubFieldLayout where the sub-domain is the same as the full domain, making it functionally equivalent to a regular FieldLayout.

Implementation details: Creates a SubFieldLayout where the sub-domain is the same as the full domain, making it functionally equivalent to a regular FieldLayout.

Definition at line 58 of file SubFieldLayout.hpp.

References Dim, ippl::FieldLayout< Dim >::FieldLayout(), initialize(), and ippl::FieldLayout< Dim >::isParallel().

Here is the call graph for this function:

◆ ~SubFieldLayout()

template<unsigned Dim>
virtual ippl::SubFieldLayout< Dim >::~SubFieldLayout ( )
virtualdefault

Destructor: Everything deletes itself automatically.

Member Function Documentation

◆ addNeighbors()

template<unsigned Dim>
void ippl::FieldLayout< Dim >::addNeighbors ( const NDIndex_t & gnd,
const NDIndex_t & nd,
const NDIndex_t & ndNeighbor,
const NDIndex_t & intersect,
int nghost,
int rank )
inherited

Adds a neighbor to the neighbor list

Parameters
gndthe local domain, including ghost cells
ndthe local domain
ndNeighborthe neighbor rank's domain
intersectthe intersection of the domains
nghostnumber of ghost cells
rankthe neighbor's rank

Definition at line 275 of file FieldLayout.hpp.

References getBounds().

Here is the call graph for this function:

◆ calcWidths()

template<unsigned Dim>
void ippl::FieldLayout< Dim >::calcWidths ( )
protectedinherited

Definition at line 172 of file FieldLayout.hpp.

References Dim, gDomain_m, hLocalDomains_m, ippl::NDIndex< Dim >::length(), and minWidth_m.

Referenced by initialize(), ippl::SubFieldLayout< Dim >::initialize(), and updateLayout().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findNeighbors()

template<unsigned Dim>
void ippl::FieldLayout< Dim >::findNeighbors ( int nghost = 1)
inherited

Finds all neighboring ranks based on the field layout

Parameters
nghostnumber of ghost cells (default 1)

Definition at line 228 of file FieldLayout.hpp.

References comm, ippl::detail::countHypercubes(), Dim, IpplTimings::getTimer(), hLocalDomains_m, neighbors_m, neighborsRecvRange_m, neighborsSendRange_m, and IpplTimings::startTimer().

Referenced by initialize(), ippl::SubFieldLayout< Dim >::initialize(), and updateLayout().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findPeriodicNeighbors()

template<unsigned Dim>
void ippl::FieldLayout< Dim >::findPeriodicNeighbors ( const int nghost,
const NDIndex< Dim > & localDomain,
NDIndex< Dim > & grown,
NDIndex< Dim > & neighborDomain,
const int rank,
std::map< unsigned int, int > & offsets,
unsigned d0 = 0,
unsigned codim = 0 )
inherited

Recursively finds neighbor ranks for layouts with all periodic boundary conditions

Parameters
nghostnumber of ghost cells
localDomainthe rank's local domain
grownthe local domain, grown by the number of ghost cells
neighborDomaina candidate neighbor rank's domain
rankthe candidate neighbor's rank
offsetsa dictionary containing offsets along different dimensions
d0the dimension from which to start checking (default 0)
codimthe codimension of overlapping regions to check (default 0)

Definition at line 190 of file FieldLayout.hpp.

References Dim, and getPeriodicOffset().

Here is the call graph for this function:

◆ getBounds()

template<unsigned Dim>
FieldLayout< Dim >::bound_type ippl::FieldLayout< Dim >::getBounds ( const NDIndex_t & nd1,
const NDIndex_t & nd2,
const NDIndex_t & offset,
int nghost )
privateinherited

Obtain the bounds to send / receive. The second domain, i.e., nd2, is grown by nghost cells in each dimension in order to figure out the intersecting cells.

Parameters
nd1either remote or owned domain
nd2either remote or owned domain
offsetto map global to local grid point
nghostnumber of ghost cells per dimension

Definition at line 305 of file FieldLayout.hpp.

References ippl::NDIndex< Dim >::grow().

Referenced by addNeighbors().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDeviceLocalDomains()

template<unsigned Dim>
const FieldLayout< Dim >::view_type ippl::FieldLayout< Dim >::getDeviceLocalDomains ( ) const
inherited

Definition at line 135 of file FieldLayout.hpp.

References dLocalDomains_m.

◆ getDistribution()

template<unsigned Dim>
bool ippl::FieldLayout< Dim >::getDistribution ( unsigned int d) const
inlineinherited

Definition at line 252 of file FieldLayout.h.

References gDomain_m, and minWidth_m.

◆ getDomain()

◆ getHostLocalDomains()

template<unsigned Dim>
const FieldLayout< Dim >::host_mirror_type ippl::FieldLayout< Dim >::getHostLocalDomains ( ) const
inherited

◆ getLocalNDIndex() [1/2]

◆ getLocalNDIndex() [2/2]

template<unsigned Dim>
const FieldLayout< Dim >::NDIndex_t & ippl::FieldLayout< Dim >::getLocalNDIndex ( int rank) const
inherited

Definition at line 121 of file FieldLayout.hpp.

References comm, hLocalDomains_m, and PAssert.

◆ getMatchingIndex()

template<unsigned Dim>
int ippl::FieldLayout< Dim >::getMatchingIndex ( int index)
staticinherited

Given the index of a hypercube, find the index of the opposite hypercube, i.e. the component with the same codimension belonging to a neighboring domain that touches the hypercube with the given index, as determined by the ternary encoding for hypercubes.

For neighbor communication, the opposite component is the one that receives sent data or sends us data to receive for a given component.

The matching index is given by swapping alls 1s for 0s and vice versa in the ternary encoding, while keeping the 2s unchanged. This can be understood from the fact that if the local component is on the upper boundary of the local domain, the neighbor component must be on the lower boundary of its local domain, and vice versa. The 2s are unchanged because both the local component and the neighbor component must be parallel to the same axes, otherwise their intersection would have lower or higher dimension than the components themselves.

Parameters
indexindex of the known component
Returns
Index of the matching component

Definition at line 22 of file FieldLayout.hpp.

References ippl::detail::countHypercubes(), and Dim.

Referenced by ippl::detail::HaloCells< T, Dim, ViewArgs >::exchangeBoundaries().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNeighbors()

template<unsigned Dim>
const FieldLayout< Dim >::neighbor_list & ippl::FieldLayout< Dim >::getNeighbors ( ) const
inherited

Get a list of all the neighbors, arranged by ternary encoding of the hypercubes

Returns
List of list of neighbor ranks touching each boundary component

Definition at line 140 of file FieldLayout.hpp.

References neighbors_m.

Referenced by ippl::detail::HaloCells< T, Dim, ViewArgs >::exchangeBoundaries().

Here is the caller graph for this function:

◆ getNeighborsRecvRange()

template<unsigned Dim>
const FieldLayout< Dim >::neighbor_range_list & ippl::FieldLayout< Dim >::getNeighborsRecvRange ( ) const
inherited

Get the domain ranges corresponding to regions that should be received from neighbor ranks

Returns
Ranges to receive

Definition at line 151 of file FieldLayout.hpp.

References neighborsRecvRange_m.

Referenced by ippl::detail::HaloCells< T, Dim, ViewArgs >::exchangeBoundaries().

Here is the caller graph for this function:

◆ getNeighborsSendRange()

template<unsigned Dim>
const FieldLayout< Dim >::neighbor_range_list & ippl::FieldLayout< Dim >::getNeighborsSendRange ( ) const
inherited

Get the domain ranges corresponding to regions that should be sent to neighbor ranks

Returns
Ranges to send

Definition at line 145 of file FieldLayout.hpp.

References neighborsSendRange_m.

Referenced by ippl::detail::HaloCells< T, Dim, ViewArgs >::exchangeBoundaries().

Here is the caller graph for this function:

◆ getOriginDomain()

template<unsigned Dim>
const NDIndex< Dim > & ippl::SubFieldLayout< Dim >::getOriginDomain ( ) const
inline

Return the original domain before sub-region extraction.

Returns
Reference to the original full domain

Definition at line 108 of file SubFieldLayout.h.

References originDomain_m.

Referenced by operator==().

Here is the caller graph for this function:

◆ getPeriodicOffset()

template<unsigned Dim>
int ippl::FieldLayout< Dim >::getPeriodicOffset ( const NDIndex_t & nd,
const unsigned int d,
const int k )
privateinherited

Definition at line 327 of file FieldLayout.hpp.

References gDomain_m, and ippl::max.

Referenced by findPeriodicNeighbors().

Here is the caller graph for this function:

◆ initialize() [1/2]

template<unsigned Dim>
void ippl::SubFieldLayout< Dim >::initialize ( const NDIndex< Dim > & domain,
const NDIndex< Dim > & subDomain,
std::array< bool, Dim > isParallel,
bool isAllPeriodic = false )

Initializes a SubFieldLayout with the sub-domain partitioned in the same way as the original FieldLayout partitiones the full domain.

Initializes a SubFieldLayout with the sub-domain partitioned in the same way as the original FieldLayout partitiones the full domain.

Parameters
domainThe full domain to be partitioned
subDomainThe sub-region within the full domain
decompArray specifying which dimensions should be parallel
isAllPeriodicWhether all dimensions have periodic boundary conditions
Parameters
domainThe full domain to be partitioned
subDomainThe sub-region within the full domain
decompArray specifying which dimensions should be parallel
isAllPeriodicWhether all dimensions have periodic boundary conditions

Implementation details: This method first partitions the full domain for parallel processing, then restricts each rank's local domain to the specified sub-domain.

The sub-domain must be contained within the full domain, and all MPI ranks must have non-empty local domains after intersection with the sub-domain, otherwise an exception will be thrown.

Implementation details: This method first partitions the full domain for parallel processing, then restricts each rank's local domain to the specified sub-domain.

The sub-domain must be contained within the full domain, and all MPI ranks must have non-empty local domains after intersection with the sub-domain, otherwise an exception will be thrown.

Definition at line 76 of file SubFieldLayout.hpp.

References ippl::FieldLayout< Dim >::calcWidths(), ippl::FieldLayout< Dim >::comm, ippl::NDIndex< Dim >::contains(), ippl::FieldLayout< Dim >::dLocalDomains_m, ippl::FieldLayout< Dim >::findNeighbors(), ippl::FieldLayout< Dim >::gDomain_m, ippl::FieldLayout< Dim >::hLocalDomains_m, ippl::FieldLayout< Dim >::initialize(), ippl::FieldLayout< Dim >::isParallel(), originDomain_m, and PAssert.

Referenced by SubFieldLayout(), and SubFieldLayout().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize() [2/2]

template<unsigned Dim>
void ippl::SubFieldLayout< Dim >::initialize ( const NDIndex< Dim > & domain,
std::array< bool, Dim > isParallel,
bool isAllPeriodic = false )

Initializes a SubFieldLayout using the domain as both the full domain and sub-domain.

Initializes a SubFieldLayout using the domain as both the full domain and sub-domain.

Parameters
domainThe domain to be partitioned
decompArray specifying which dimensions should be parallel
isAllPeriodicWhether all dimensions have periodic boundary conditions
Parameters
domainThe domain to be partitioned
decompArray specifying which dimensions should be parallel
isAllPeriodicWhether all dimensions have periodic boundary conditions

Implementation details: This method initializes the layout to use the entire domain as both the full domain and the sub-domain, making it equivalent to a regular FieldLayout.

Implementation details: This method initializes the layout to use the entire domain as both the full domain and the sub-domain, making it equivalent to a regular FieldLayout.

Definition at line 120 of file SubFieldLayout.hpp.

References ippl::FieldLayout< Dim >::initialize(), ippl::FieldLayout< Dim >::isParallel(), and originDomain_m.

Here is the call graph for this function:

◆ isParallel()

template<unsigned Dim>
std::array< bool, Dim > ippl::FieldLayout< Dim >::isParallel ( ) const
inlineinherited

Definition at line 258 of file FieldLayout.h.

References isParallelDim_m.

Referenced by FieldLayout(), ippl::FFTPeriodicPoissonSolver< FieldLHS, FieldRHS >::initialize(), initialize(), ippl::SubFieldLayout< Dim >::initialize(), ippl::SubFieldLayout< Dim >::initialize(), ippl::SubFieldLayout< Dim >::SubFieldLayout(), and ippl::SubFieldLayout< Dim >::SubFieldLayout().

Here is the caller graph for this function:

◆ operator==() [1/3]

template<unsigned Dim>
bool ippl::FieldLayout< Dim >::operator== ( const FieldLayout< Dim > & x) const
inlineinherited

Definition at line 235 of file FieldLayout.h.

References comm, Dim, FieldLayout(), gDomain_m, getDomain(), getLocalNDIndex(), and hLocalDomains_m.

Here is the call graph for this function:

◆ operator==() [2/3]

template<unsigned Dim>
template<unsigned Dim2>
bool ippl::SubFieldLayout< Dim >::operator== ( const FieldLayout< Dim2 > & x) const
inline

Compare SubFieldLayout to a FieldLayout to see if they represent the same domain.

Template Parameters
Dim2Dimension of the FieldLayout
Parameters
xThe FieldLayout to compare with
Returns
true if the SubFieldLayout's domain equals its original domain and matches the FieldLayout's domain and local domains

Definition at line 148 of file SubFieldLayout.h.

References ippl::FieldLayout< Dim >::comm, Dim, ippl::FieldLayout< Dim >::FieldLayout(), ippl::FieldLayout< Dim >::gDomain_m, ippl::FieldLayout< Dim >::getDomain(), ippl::FieldLayout< Dim >::getLocalNDIndex(), ippl::FieldLayout< Dim >::hLocalDomains_m, and originDomain_m.

Here is the call graph for this function:

◆ operator==() [3/3]

template<unsigned Dim>
template<unsigned Dim2>
bool ippl::SubFieldLayout< Dim >::operator== ( const SubFieldLayout< Dim2 > & x) const
inline

Compare SubFieldLayouts to see if they represent the same domain.

Template Parameters
Dim2Dimension of the other SubFieldLayout
Parameters
xThe other SubFieldLayout to compare with
Returns
true if both the current domain, origin domain and local domains match

Definition at line 118 of file SubFieldLayout.h.

References ippl::FieldLayout< Dim >::comm, Dim, ippl::FieldLayout< Dim >::getDomain(), ippl::FieldLayout< Dim >::getLocalNDIndex(), getOriginDomain(), ippl::FieldLayout< Dim >::hLocalDomains_m, originDomain_m, and SubFieldLayout().

Here is the call graph for this function:

◆ updateLayout()

template<unsigned Dim>
void ippl::FieldLayout< Dim >::updateLayout ( const std::vector< NDIndex_t > & domains)
inherited

Definition at line 54 of file FieldLayout.hpp.

References calcWidths(), dLocalDomains_m, findNeighbors(), and hLocalDomains_m.

Referenced by ippl::OrthogonalRecursiveBisection< Field, Tp >::binaryRepartition().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

template<unsigned Dim>
void ippl::FieldLayout< Dim >::write ( std::ostream & out = std::cout) const
inherited

Definition at line 157 of file FieldLayout.hpp.

References comm, gDomain_m, and hLocalDomains_m.

Referenced by ippl::operator<<().

Here is the caller graph for this function:

Member Data Documentation

◆ comm

◆ dLocalDomains_m

template<unsigned Dim>
view_type ippl::FieldLayout< Dim >::dLocalDomains_m
protectedinherited

Local domains (device view).

Definition at line 382 of file FieldLayout.h.

Referenced by FieldLayout(), getDeviceLocalDomains(), initialize(), ippl::SubFieldLayout< Dim >::initialize(), and updateLayout().

◆ gDomain_m

◆ hLocalDomains_m

◆ isAllPeriodic_m

template<unsigned Dim>
bool ippl::FieldLayout< Dim >::isAllPeriodic_m
inherited

Definition at line 351 of file FieldLayout.h.

Referenced by initialize().

◆ isParallelDim_m

template<unsigned Dim>
std::array<bool, Dim> ippl::FieldLayout< Dim >::isParallelDim_m
protectedinherited

Definition at line 387 of file FieldLayout.h.

Referenced by initialize(), and isParallel().

◆ minWidth_m

template<unsigned Dim>
unsigned int ippl::FieldLayout< Dim >::minWidth_m[Dim]
protectedinherited

Definition at line 390 of file FieldLayout.h.

Referenced by calcWidths(), FieldLayout(), and getDistribution().

◆ neighbors_m

template<unsigned Dim>
neighbor_list ippl::FieldLayout< Dim >::neighbors_m
privateinherited

Definition at line 371 of file FieldLayout.h.

Referenced by findNeighbors(), and getNeighbors().

◆ neighborsRecvRange_m

template<unsigned Dim>
neighbor_range_list ippl::FieldLayout< Dim >::neighborsRecvRange_m
privateinherited

Definition at line 375 of file FieldLayout.h.

Referenced by findNeighbors(), and getNeighborsRecvRange().

◆ neighborsSendRange_m

template<unsigned Dim>
neighbor_range_list ippl::FieldLayout< Dim >::neighborsSendRange_m
privateinherited

Definition at line 375 of file FieldLayout.h.

Referenced by findNeighbors(), and getNeighborsSendRange().

◆ originDomain_m

template<unsigned Dim>
NDIndex_t ippl::SubFieldLayout< Dim >::originDomain_m
private

Original global domain in which the sub-field is defined.

This stores the full domain before any sub-region extraction, allowing comparison with regular FieldLayouts.

Definition at line 177 of file SubFieldLayout.h.

Referenced by getOriginDomain(), initialize(), initialize(), operator==(), and operator==().


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