~ubuntu-branches/ubuntu/saucy/rheolef/saucy

« back to all changes in this revision

Viewing changes to skit/ptst2/vec_set_tst.cc

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Saramito
  • Date: 2011-03-23 11:14:26 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110323111426-cjvhey7lxt6077ty
Tags: 5.93-1
* New upstream release (minor changes):
  - some extra warning message deleted in heap_allocator
  - graphic output with mayavi2 fixed
  - add doc refman in .info and .pdf format

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
19
///
20
20
/// =========================================================================
21
 
# include "rheolef/parallel.h"
 
21
# include "rheolef/distributed.h"
22
22
# include "rheolef/array.h"
23
23
using namespace rheolef;
24
24
using namespace std;
25
 
int main(int argc, char**argv)
26
 
{
27
 
    environment parallel(argc, argv);
28
 
  
 
25
int main(int argc, char**argv) {
 
26
    environment distributed(argc, argv);
29
27
    size_t n = 101;
30
 
warning_macro ("CSTOR...");
31
28
    array<Float> x(n,0.0);
32
 
warning_macro ("CSTOR done");
33
 
 
34
 
    size_t first = x.first_index();
35
 
    size_t last  = x.last_index();
36
 
warning_macro ("ADDING...");
 
29
    size_t first = x.ownership().first_index();
 
30
    size_t last  = x.ownership().last_index();
37
31
    for (size_t i_global = 0; i_global < n; i_global++) {
38
32
        if (i_global >= first && i_global < last) {
39
 
            x.set (i_global,   1000+i_global+0.5);
 
33
            x.dis_entry (i_global) = 1000+i_global+0.5;
40
34
        }
41
35
    }
42
 
warning_macro ("ADDING done");
43
 
warning_macro ("PRINTING...");
44
 
    pcout << x.par_size() << endl
 
36
    dcout << x.dis_size() << endl
45
37
          << x            << endl;
46
 
warning_macro ("PRINTING done");
47
38
}