/[escript]/trunk/escript/src/DataFactory.cpp
ViewVC logotype

Diff of /trunk/escript/src/DataFactory.cpp

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

revision 1871 by ksteube, Thu Sep 25 23:11:13 2008 UTC revision 1872 by jfenwick, Mon Oct 13 00:18:55 2008 UTC
# Line 45  Vector(double value, Line 45  Vector(double value,
45         const FunctionSpace& what,         const FunctionSpace& what,
46         bool expanded)         bool expanded)
47  {  {
48      DataTypes::ShapeType shape(1,what.getDomain().getDim());      DataTypes::ShapeType shape(1,what.getDomain()->getDim());
49      return Data(value,shape,what,expanded);      return Data(value,shape,what,expanded);
50  }  }
51    
# Line 54  Tensor(double value, Line 54  Tensor(double value,
54         const FunctionSpace& what,         const FunctionSpace& what,
55         bool expanded)         bool expanded)
56  {  {
57      DataTypes::ShapeType shape(2,what.getDomain().getDim());      DataTypes::ShapeType shape(2,what.getDomain()->getDim());
58      return Data(value,shape,what,expanded);      return Data(value,shape,what,expanded);
59  }  }
60    
# Line 63  Tensor3(double value, Line 63  Tensor3(double value,
63          const FunctionSpace& what,          const FunctionSpace& what,
64          bool expanded)          bool expanded)
65  {  {
66      DataTypes::ShapeType shape(3,what.getDomain().getDim());      DataTypes::ShapeType shape(3,what.getDomain()->getDim());
67      return Data(value,shape,what,expanded);      return Data(value,shape,what,expanded);
68  }  }
69    
# Line 72  Tensor4(double value, Line 72  Tensor4(double value,
72          const FunctionSpace& what,          const FunctionSpace& what,
73          bool expanded)          bool expanded)
74  {  {
75      DataTypes::ShapeType shape(4,what.getDomain().getDim());      DataTypes::ShapeType shape(4,what.getDomain()->getDim());
76      return Data(value,shape,what,expanded);      return Data(value,shape,what,expanded);
77  }  }
78    
# Line 102  load(const std::string fileName, Line 102  load(const std::string fileName,
102     /* test if function space id is valid and create function space instance */     /* test if function space id is valid and create function space instance */
103     if (! domain.isValidFunctionSpaceType(function_space_type) )     if (! domain.isValidFunctionSpaceType(function_space_type) )
104          throw DataException("Error - load:: function space type code in netCDF file is invalid for given domain.");          throw DataException("Error - load:: function space type code in netCDF file is invalid for given domain.");
105     FunctionSpace function_space=FunctionSpace(domain, function_space_type);     FunctionSpace function_space=FunctionSpace(domain.getPtr(), function_space_type);
106     /* recover rank */     /* recover rank */
107     if (! (rank_att=dataFile.get_att("rank")) )     if (! (rank_att=dataFile.get_att("rank")) )
108          throw DataException("Error - load:: cannot recover rank attribute from escript netCDF file.");          throw DataException("Error - load:: cannot recover rank attribute from escript netCDF file.");

Legend:
Removed from v.1871  
changed lines
  Added in v.1872

  ViewVC Help
Powered by ViewVC 1.1.26