/[escript]/trunk/paso/src/Coupler.h
ViewVC logotype

Contents of /trunk/paso/src/Coupler.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1562 - (show annotations)
Wed May 21 13:04:40 2008 UTC (11 years, 5 months ago) by gross
File MIME type: text/plain
File size: 2382 byte(s)
The algebraic upwinding with MPI. The case of boundary constraint needs still some attention. 


1
2 /* $Id: Coupler.h 1306 2007-09-18 05:51:09Z ksteube $ */
3
4 /*******************************************************
5 *
6 * Copyright 2003-2007 by ACceSS MNRF
7 * Copyright 2007 by University of Queensland
8 *
9 * http://esscc.uq.edu.au
10 * Primary Business: Queensland, Australia
11 * Licensed under the Open Software License version 3.0
12 * http://www.opensource.org/licenses/osl-3.0.php
13 *
14 *******************************************************/
15
16 /**************************************************************/
17
18 /* Paso: coupler */
19
20 /**************************************************************/
21
22 /* Author: gross@access.edu.au */
23
24 /**************************************************************/
25
26 #ifndef INC_PASO_COUPLER
27 #define INC_PASO_COUPLER
28
29 #include "SharedComponents.h"
30 /**************************************************************/
31
32 typedef struct Paso_Connector {
33
34 Paso_SharedComponents* send;
35 Paso_SharedComponents* recv;
36 dim_t reference_counter;
37 Paso_MPIInfo *mpi_info;
38
39 } Paso_Connector;
40 typedef struct Paso_Coupler {
41
42 dim_t block_size;
43
44 Paso_Connector* connector;
45
46 double *data; /* unmanaged pointer to data be send */
47 double *send_buffer;
48 double *recv_buffer;
49 #ifdef PASO_MPI
50 MPI_Request* mpi_requests;
51 MPI_Status* mpi_stati;
52 #else
53 void* mpi_requests;
54 void* mpi_stati;
55 #endif
56
57 dim_t reference_counter;
58 Paso_MPIInfo *mpi_info;
59
60 } Paso_Coupler;
61
62
63 Paso_Connector* Paso_Connector_alloc(Paso_SharedComponents * send, Paso_SharedComponents* recv);
64 Paso_Connector* Paso_Connector_getReference(Paso_Connector*);
65 Paso_Connector* Paso_Connector_unroll(Paso_Connector* in, index_t block_size);
66 Paso_Connector* Paso_Connector_copy(Paso_Connector* in);
67 void Paso_Connector_free(Paso_Connector*);
68
69 Paso_Coupler* Paso_Coupler_alloc(Paso_Connector*, dim_t blockSize);
70 Paso_Coupler* Paso_Coupler_getReference(Paso_Coupler*);
71 void Paso_Coupler_startCollect(Paso_Coupler* self,double* in);
72 double* Paso_Coupler_finishCollect(Paso_Coupler* self);
73 void Paso_Coupler_free(Paso_Coupler* in);
74 #define Paso_Coupler_borrowLocalData(_in_) (_in_)->data
75 #define Paso_Coupler_borrowRemoteData(_in_) (_in_)->recv_buffer
76 void Paso_Coupler_copyAll(const Paso_Coupler* src, Paso_Coupler* target);
77 dim_t Paso_Coupler_getLocalLength(const Paso_Coupler* in);
78 #endif

  ViewVC Help
Powered by ViewVC 1.1.26