DOpE
dopetypes.h
Go to the documentation of this file.
1 
24 #ifndef DOPETYPES_H_
25 #define DOPETYPES_H_
26 
27 #include <string>
28 
29 #include "dopeexception.h"
30 
31 namespace DOpE
32 {
33  namespace DOpEtypes
34  {
35  //TODO typedef for dealii-boundary-type
36  // (see changes after version 7.1 in deal.ii).
37 
51  {
53  };
54 
55 
66  enum EETerms
67  {
69  };
70 
81  {
83  };
84 
92  {
94  };
95 
104  {
108  };
109 
121  {
125  };
126 
127  }//End of namespace DOpEtypes
128 
129 
133  template<typename C>
134  inline std::string DOpEtypesToString(const C& /*t*/)
135  {
136  throw DOpEException("Not implemented!","DOpEtypesToString");
137  }
138 
139  template <>
140  inline std::string DOpEtypesToString(const DOpEtypes::VectorStorageType& t)
141  {
143  {
144  return "fullmem";
145  }
147  {
148  return "store_on_disc";
149  }
151  {
152  return "only_recent";
153  }
154  else
155  {
156  std::stringstream out;
157  out<<"Unknown DOpEtypes::VectorStorageType"<< std::endl;
158  out<<"Code given is "<< t<<std::endl;
159  throw DOpEException(out.str(),"DOpEtypesToString<DOpEtypes::VectorStorageType");
160  }
161  }
162 
163  template <>
164  inline std::string DOpEtypesToString(const DOpEtypes::ControlType& t)
165  {
167  {
168  return "initial";
169  }
170  else if( DOpEtypes::ControlType::stationary == t )
171  {
172  return "stationary";
173  }
175  {
176  return "nonstationary";
177  }
178  else
179  {
180  std::stringstream out;
181  out<<"Unknown DOpEtypes::ControlType"<< std::endl;
182  out<<"Code given is "<< t<<std::endl;
183  throw DOpEException(out.str(),"DOpEtypesToString<DOpEtypes::ControlType");
184  }
185  }
186 
187  template <>
188  inline std::string DOpEtypesToString(const DOpEtypes::RefinementType& t)
189  {
191  {
192  return "global";
193  }
195  {
196  return "fixed_fraction";
197  }
199  {
200  return "fixed_number";
201  }
203  {
204  return "optimized";
205  }
207  {
208  return "finest_of_both";
209  }
210  else
211  {
212  std::stringstream out;
213  out<<"Unknown DOpEtypes::RefinementType"<< std::endl;
214  out<<"Code given is "<< t<<std::endl;
215  throw DOpEException(out.str(),"DOpEtypesToString<DOpEtypes::RefinementType>");
216  }
217  }
218 
219 }//End of Namespace DOpE
220 
221 #endif /* DOPETYPES_H_ */
Definition: dopetypes.h:68
Definition: dopetypes.h:52
Definition: dopetypes.h:122
Definition: dopetypes.h:106
Definition: dopetypes.h:123
ControlType
Definition: dopetypes.h:103
Definition: dopetypes.h:52
Definition: dopetypes.h:52
Definition: dopetypes.h:68
Definition: dopetypes.h:82
Definition: dopetypes.h:105
RefinementType
Definition: dopetypes.h:50
Definition: dopetypes.h:82
Definition: dopetypes.h:68
Definition: dopetypes.h:93
Definition: dopetypes.h:107
Definition: dopetypes.h:52
EETerms
Definition: dopetypes.h:66
Definition: dopetypes.h:68
Definition: dopetypes.h:124
ResidualEvaluation
Definition: dopetypes.h:91
VectorStorageType
Definition: dopetypes.h:120
WeightComputation
Definition: dopetypes.h:80
Definition: dopeexception.h:35
Definition: dopetypes.h:52
std::string DOpEtypesToString(const C &)
Definition: dopetypes.h:134