1 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
5 C The following is a notice of limited availability of the code and
6 C Government license and disclaimer which must be included in the
7 C prologue of the code and in all source listings of the code.
10 C (c) 1977 University of Chicago
12 C Permission is hereby granted to use, reproduce, prepare
13 C derivative works, and to redistribute to others at no charge. If
14 C you distribute a copy or copies of the Software, or you modify a
15 C copy or copies of the Software or any portion of it, thus forming
16 C a work based on the Software and make and/or distribute copies of
17 C such work, you must meet the following conditions:
19 C a) If you make a copy of the Software (modified or verbatim)
20 C it must include the copyright notice and Government
21 C license and disclaimer.
23 C b) You must cause the modified Software to carry prominent
24 C notices stating that you changed specified portions of
27 C This software was authored by:
29 C Argonne National Laboratory
30 C J. Michalakes: (630) 252-6646; email: michalak@mcs.anl.gov
31 C Mathematics and Computer Science Division
32 C Argonne National Laboratory, Argonne, IL 60439
34 C ARGONNE NATIONAL LABORATORY (ANL), WITH FACILITIES IN THE STATES
35 C OF ILLINOIS AND IDAHO, IS OWNED BY THE UNITED STATES GOVERNMENT,
36 C AND OPERATED BY THE UNIVERSITY OF CHICAGO UNDER PROVISION OF A
37 C CONTRACT WITH THE DEPARTMENT OF ENERGY.
39 C GOVERNMENT LICENSE AND DISCLAIMER
41 C This computer code material was prepared, in part, as an account
42 C of work sponsored by an agency of the United States Government.
43 C The Government is granted for itself and others acting on its
44 C behalf a paid-up, nonexclusive, irrevocable worldwide license in
45 C this data to reproduce, prepare derivative works, distribute
46 C copies to the public, perform publicly and display publicly, and
47 C to permit others to do so. NEITHER THE UNITED STATES GOVERNMENT
48 C NOR ANY AGENCY THEREOF, NOR THE UNIVERSITY OF CHICAGO, NOR ANY OF
49 C THEIR EMPLOYEES, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR
50 C ASSUMES ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY,
51 C COMPLETENESS, OR USEFULNESS OF ANY INFORMATION, APPARATUS,
52 C PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE WOULD
53 C NOT INFRINGE PRIVATELY OWNED RIGHTS.
55 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
58 subroutine rsl_bcast_chld( pd, nd, msize, mf, pf, upf )
59 call cwrap_fbcast( pd, nd, msize, mf, pf, upf )
63 subroutine rsl_f_bcast_chld( pd, nd, msize, buf, mf, pf, upf )
65 integer pd ! parent domain
66 integer nd ! nested domain
67 integer msize ! message size in BYTES
68 integer pf ! packing function
69 integer upf ! unpacking function
70 logical mf ! mask function
74 integer retval, i, j, ig, jg, dum
75 integer njg, nig, n, pjg, pig, cn, cm
77 call rsl_to_child_info( pd, nd, msize,
78 + i,j,pig,pjg,cm,cn,nig,njg,retval )
79 do while ( retval .eq. 1 )
80 if ( mf( pd, nd, i, j, pig, pjg ) ) then
81 dum = pf ( pd, nd, i, j, pig, pjg,
83 + cm, cn, buf, msize )
84 call rsl_to_child_msg(msize,buf)
86 call rsl_to_child_info( pd, nd, msize,
87 + i,j,pig,pjg,cm,cn,nig,njg,retval )
90 c exchange the messages
93 c unpack the messages from children of points in this domain
95 call rsl_from_parent_info( i, j, nig, njg, cm, cn, pig, pjg,
97 do while ( retval .eq. 1 )
98 call rsl_from_parent_msg( msize, buf )
99 dum = upf( pd, nd, i, j, nig, njg, cm, cn, buf, msize )
100 call rsl_from_parent_info( i, j, nig, njg, cm, cn, pig, pjg,