Rheolef  7.2
an efficient C++ finite element environment
eye.h
Go to the documentation of this file.
1 # ifndef _RHEOLEF_EYE_H
2 # define _RHEOLEF_EYE_H
3 //
4 // This file is part of Rheolef.
5 //
6 // Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
7 //
8 // Rheolef is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
12 //
13 // Rheolef is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with Rheolef; if not, write to the Free Software
20 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 //
22 // =========================================================================
23 // AUTHOR: Pierre.Saramito@imag.fr
24 // DATE: 28 january 1997
25 
26 namespace rheolef {
51 } // namespace rheolef
52 
53 # include "rheolef/vec.h"
54 # include "rheolef/solver.h"
55 
56 namespace rheolef {
57 
58 template<class T, class M = rheo_default_memory_model>
59 class solver_eye_rep: public solver_abstract_rep<T,M> {
60 public:
61  explicit solver_eye_rep (const solver_option& opt = solver_option());
63  bool good() const { return true; }
64  void update_values (const csr<T,M>&) {}
65  vec<T,M> operator* (const vec<T,M>& x) const { return x; }
66  vec<T,M> solve (const vec<T,M>& x) const { return x; }
67  vec<T,M> trans_solve (const vec<T,M>& x) const { return x; }
68 };
69 
70 template <class T, class M = rheo_default_memory_model>
71 solver_basic<T,M> eye_basic();
72 
74 inline solver_basic<Float> eye() { return eye_basic<Float>(); }
75 
76 template<class T, class M>
77 inline
79  : solver_abstract_rep<T,M>(opt)
80 {
81 }
82 template <class T, class M>
83 inline
86 {
87  typedef solver_eye_rep<T,M> rep;
88  return new_macro (rep(*this));
89 }
90 template <class T, class M>
91 inline
94 {
95  using rep = solver_eye_rep<T,M>;
97  p.solver_basic<T,M>::base::operator= (new_macro(rep()));
98  return p;
99 }
100 
101 }// namespace rheolef
102 # endif // _RHEOLEF_EYE_H
solver_eye_rep(const solver_option &opt=solver_option())
Definition: eye.h:78
vec< T, M > operator*(const vec< T, M > &x) const
Definition: eye.h:65
vec< T, M > trans_solve(const vec< T, M > &x) const
Definition: eye.h:67
bool good() const
Definition: eye.h:63
vec< T, M > solve(const vec< T, M > &x) const
Definition: eye.h:66
void update_values(const csr< T, M > &)
Definition: eye.h:64
solver_abstract_rep< T, M > * clone() const
Definition: eye.h:85
see the solver_option page for the full documentation
Expr1::float_type T
Definition: field_expr.h:230
This file is part of Rheolef.
solver_basic< Float > eye()
see the eye page for the full documentation
Definition: eye.h:74
solver_basic< T, M > eye_basic()
Definition: eye.h:93
Definition: sphere.icc:25
Expr1::memory_type M
Definition: vec_expr_v2.h:416