Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

mpi_exch.c File Reference

Functions to exchange boundary data via MPI. More...

#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <mpi.h>
#include "../../util/source/compiler.h"
#include "../../util/source/logfile.h"
#include "../source/mb_cns.h"
#include "mpi_cns.h"

Functions

int allocate_send_and_receive_buffers (struct block_data *bd)
 Allocate memory for the MPI send and receive buffers.
int make_tag (int block_id, int bndry)
 Returns a tag that should be unique for each block and boundary combination.
int mpi_exchange_boundary_data (struct global_data *G, struct block_data bd[], int jb, int type_of_copy)
 Ensure that all boundary data is exchanged between connected boundaries on adjacent blocks.
int copy_into_send_buffer (struct block_data *bd, int bndry, int type_of_copy)
 Copy data into the send buffer from the appropriate boundary of the current block.
int copy_from_receive_buffer (struct block_data *bd, int bndry, int type_of_copy)
 Copy data from the receive buffer into the appropriate boundary of the current block.

Variables

double * send_buffer [4]
double * receive_buffer [4]


Detailed Description

Functions to exchange boundary data via MPI.

Author:
PA Jacobs and RJ Goozee

Function Documentation

int allocate_send_and_receive_buffers struct block_data bd  ) 
 

Allocate memory for the MPI send and receive buffers.

Parameters:
bd : a pointer to the block_data structure
Returns:
0 if successful, 1 otherwise.

int copy_from_receive_buffer struct block_data bd,
int  bndry,
int  type_of_copy
 

Copy data from the receive buffer into the appropriate boundary of the current block.

See workbook page 33, 18-Jun-02 for details of order.

Parameters:
bd : pointer to the target block
bndry : value specifying the block boundary
type_of_copy :

int copy_into_send_buffer struct block_data bd,
int  bndry,
int  type_of_copy
 

Copy data into the send buffer from the appropriate boundary of the current block.

See workbook page 33, 18-Jun-02 for details of order.

Parameters:
bd : pointer to the target block
bndry : value specifying the source block boundary
type_of_copy : sometimes we want to copy cell geometry, other times the flow data


Generated on Tue Oct 25 10:24:13 2005 for CFCFD by  doxygen 1.4.4