Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F88104170
many2many.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Oct 16, 19:43
Size
1 KB
Mime Type
text/x-c
Expires
Fri, Oct 18, 19:43 (2 d)
Engine
blob
Format
Raw Data
Handle
21717401
Attached To
rLAMMPS lammps
many2many.h
View Options
#ifndef MANY2MANY_H
#define MANY2MANY_H
#include <mpi.h>
class
Many2Many
{
public:
Many2Many
(
MPI_Comm
);
~
Many2Many
();
void
setup
(
int
,
int
*
,
int
,
int
*
);
void
exchange
(
int
*
,
int
*
);
void
exchange
(
double
*
,
double
*
);
protected:
int
me
,
nprocs
;
MPI_Comm
comm
;
class
Memory
*
memory
;
class
Error
*
error
;
int
nown
;
// # of IDs common to src and dest
int
nsrc_off
,
ndest_off
;
// # of off-processor IDs
int
*
src_own
,
*
dest_own
;
// indices of the owned IDs
int
*
src_off
,
*
dest_off
;
// indices of the off-proc IDs
int
*
src_iwork
,
*
dest_iwork
;
// work arrays for comm of ints
double
*
src_dwork
,
*
dest_dwork
;
// work arrays for comm of doubles
class
Irregular
*
irregular
;
// irregular comm from src->dest
struct
Datum1
{
int
id
;
// src or dest global ID
int
proc
;
// owning proc
int
index
;
// local index on owning proc
};
struct
Datum2
{
int
slocal
;
// local index of src ID on sending proc
int
dlocal
;
// local index of dest ID on receiving proc
int
dproc
;
// receiving proc
};
void
deallocate
();
};
#endif
Event Timeline
Log In to Comment