diff options
author | schnetter <> | 2002-01-01 15:48:00 +0000 |
---|---|---|
committer | schnetter <> | 2002-01-01 15:48:00 +0000 |
commit | d32f908366804837c207124dcc4b1ac34b7e8293 (patch) | |
tree | 11c11ff048c54728d17915ce5a89e32788ec806d /Carpet/Carpet/src/carpet_public.hh | |
parent | 6e0c5ba27d37954c2a06c9e98c53bd8127b8e748 (diff) |
Fixed bugs on multiple processors:
Fixed bugs on multiple processors:
prolongate_*.F77: Less strict error checking.
reduce.cc: Loop only over local components.
Other small assorted changes.
darcs-hash:20020101154828-07bb3-dab9578946dadf407b1fbf19d68d723beb2f942b.gz
Diffstat (limited to 'Carpet/Carpet/src/carpet_public.hh')
-rw-r--r-- | Carpet/Carpet/src/carpet_public.hh | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Carpet/Carpet/src/carpet_public.hh b/Carpet/Carpet/src/carpet_public.hh index d5deb2b17..f82096cb4 100644 --- a/Carpet/Carpet/src/carpet_public.hh +++ b/Carpet/Carpet/src/carpet_public.hh @@ -1,4 +1,4 @@ -// $Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/carpet_public.hh,v 1.10 2001/12/17 13:34:01 schnetter Exp $ +// $Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/carpet_public.hh,v 1.11 2002/01/01 16:48:30 schnetter Exp $ // It is assumed that the number of components of all arrays is equal // to the number of components of the grid functions, and that their @@ -201,6 +201,26 @@ namespace Carpet { assert (component==-1); \ _cl = 0; \ } while (0) + + + +#define BEGIN_LOCAL_COMPONENT_LOOP(cgh) \ + do { \ + int _lcl; \ + assert (reflevel>=0 && reflevel<hh->reflevels()); \ + assert (component==-1); \ + set_component ((cGH*)(cgh), 0); \ + for (;;) { \ + if (hh->is_local(reflevel,component)) { +#define END_LOCAL_COMPONENT_LOOP(cgh) \ + } \ + if (component==hh->components(reflevel)-1) break; \ + set_component ((cGH*)(cgh), component+1); \ + } \ + set_component ((cGH*)(cgh), -1); \ + assert (component==-1); \ + _lcl = 0; \ + } while (0) } // namespace Carpet |