| 
            Last change
 on this file since 5d30c1 was             5d30c1, checked in by Frederik Heber <heber@…>, 13 years ago           | 
        
        
          | 
             
Initial commit based on 3.0.0alpha (here claimed as 2.4). 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            940 bytes
           | 
        
      
      
| Rev | Line |   | 
|---|
| [5d30c1] | 1 | 
 | 
|---|
 | 2 | #include <math/symmetry/pointgrp.h>
 | 
|---|
 | 3 | #include <math/symmetry/corrtab.h>
 | 
|---|
 | 4 | 
 | 
|---|
 | 5 | using namespace sc;
 | 
|---|
 | 6 | 
 | 
|---|
 | 7 | main(int argc, char *argv[])
 | 
|---|
 | 8 | {
 | 
|---|
 | 9 |   Ref<PointGroup> pg = new PointGroup(argv[1]);
 | 
|---|
 | 10 |   Ref<PointGroup> pg2;
 | 
|---|
 | 11 |   if (argc > 2) pg2 = new PointGroup(argv[2]);
 | 
|---|
 | 12 | 
 | 
|---|
 | 13 |   //pg.char_table().print();
 | 
|---|
 | 14 | 
 | 
|---|
 | 15 |   CharacterTable ct = pg->char_table();
 | 
|---|
 | 16 |   CharacterTable ct2;
 | 
|---|
 | 17 |   ct2=ct;
 | 
|---|
 | 18 | 
 | 
|---|
 | 19 |   ct.print();
 | 
|---|
 | 20 | 
 | 
|---|
 | 21 |   if (pg2.nonnull()) {
 | 
|---|
 | 22 |       pg2->char_table().print();
 | 
|---|
 | 23 |       if (argc <= 3) {
 | 
|---|
 | 24 |           CorrelationTable corrtab(pg,pg2);
 | 
|---|
 | 25 |           corrtab.print();
 | 
|---|
 | 26 |         }
 | 
|---|
 | 27 |     }
 | 
|---|
 | 28 | 
 | 
|---|
 | 29 |   // test given axis rearrangements
 | 
|---|
 | 30 |   for (int i=3; i<argc; i++) {
 | 
|---|
 | 31 |       pg2->symm_frame().zero();
 | 
|---|
 | 32 |       for (int j=0; j<3; j++) {
 | 
|---|
 | 33 |           if (argv[i][j] == 'x') pg2->symm_frame()(j,0) = 1.0;
 | 
|---|
 | 34 |           else if (argv[i][j] == 'y') pg2->symm_frame()(j,1) = 1.0;
 | 
|---|
 | 35 |           else if (argv[i][j] == 'z') pg2->symm_frame()(j,2) = 1.0;
 | 
|---|
 | 36 |         }
 | 
|---|
 | 37 |       CorrelationTable corrtab(pg,pg2);
 | 
|---|
 | 38 |       corrtab.print();
 | 
|---|
 | 39 |     }
 | 
|---|
 | 40 | }
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.