/[escript]/trunk/esys2/bruce/src/Bruce/BruceFactory.cpp
ViewVC logotype

Diff of /trunk/esys2/bruce/src/Bruce/BruceFactory.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 150 by jgs, Thu Sep 15 03:44:45 2005 UTC revision 151 by jgs, Thu Sep 22 01:55:00 2005 UTC
# Line 25  using namespace escript; Line 25  using namespace escript;
25    
26  namespace bruce {  namespace bruce {
27    
28  AbstractContinuousDomain* brick(int n0,int n1,int n2,  AbstractContinuousDomain* brick(int n0, int n1, int n2,
29                                  double l0,double l1,double l2)                                  double l0, double l1, double l2)
30  {  {
31      int numElements[]={n0,n1,n2};    int numElements[]={n0,n1,n2};
32      double length[]={l0,l1,l2};    double length[]={l0,l1,l2};
33    
34      AbstractContinuousDomain* temp=new Bruce();    Bruce::DimVec v0;
35      return temp;    Bruce::DimVec v1;
36      Bruce::DimVec v2;
37      Bruce::DimVec origin;
38    
39      origin.push_back(0);
40      origin.push_back(0);
41      origin.push_back(0);
42    
43      v0.push_back(l0/n0);
44      v0.push_back(0);
45      v0.push_back(0);
46    
47      v1.push_back(0);
48      v1.push_back(l1/n1);
49      v1.push_back(0);
50    
51      v2.push_back(0);
52      v2.push_back(0);
53      v2.push_back(l2/n2);
54    
55      AbstractContinuousDomain* temp=new Bruce(v0, v1, v2, n0, n1, n2, origin);
56      return temp;
57  }  }
58    
59  AbstractContinuousDomain* rectangle(int n0,int n1,  AbstractContinuousDomain* rectangle(int n0, int n1,
60                                      double l0, double l1)                                      double l0, double l1)
61  {  {
62      int numElements[]={n0,n1};    int numElements[]={n0,n1};
63      double length[]={l0,l1};    double length[]={l0,l1};
64    
65      Bruce::DimVec v0;
66      Bruce::DimVec v1;
67      Bruce::DimVec v2;
68      Bruce::DimVec origin;
69    
70      origin.push_back(0);
71      origin.push_back(0);
72    
73      v0.push_back(l0/n0);
74      v0.push_back(0);
75    
76      v1.push_back(0);
77      v1.push_back(l1/n1);
78    
79      AbstractContinuousDomain* temp=new Bruce();    AbstractContinuousDomain* temp=new Bruce(v0, v1, v2, n0, n1, 0, origin);
80      return temp;    return temp;
81  }  }
82    
83  }  // end of namespace  }  // end of namespace

Legend:
Removed from v.150  
changed lines
  Added in v.151

  ViewVC Help
Powered by ViewVC 1.1.26