Rheolef  7.2
an efficient C++ finite element environment
field_rdof.icc
Go to the documentation of this file.
1 # ifndef _RHEOLEF_FIELD_RDOF_ICC
2 # define _RHEOLEF_FIELD_RDOF_ICC
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 
24 #include "rheolef/field_rdof.h"
25 #include "rheolef/field_wdof_indirect.h"
26 #include "rheolef/field_wdof_sliced.h"
27 
28 namespace rheolef { namespace details {
29 
30 template<class Derived>
31 field_rdof_indirect_const<Derived>
32 field_rdof_base<Derived>::operator[] (const std::string& dom_name) const
33 {
34  return field_rdof_indirect_const<Derived> (derived(), derived().get_geo().operator[](dom_name));
35 }
36 template<class Derived>
39 {
40  return field_rdof_indirect_const<Derived> (derived(), dom);
41 }
42 template<class Derived>
45 {
46  return field_rdof_sliced_const<Derived> (derived(), i_comp);
47 }
48 template<class Derived>
51 {
52  space_constant::coordinate_type sys_coord = derived().get_geo().coordinate_system();
53  size_type ij_comp = space_constant::tensor_index (derived().valued_tag(), sys_coord, i_comp, j_comp);
54  return field_rdof_sliced_const<Derived> (derived(), ij_comp);
55 }
56 
57 }}// namespace rheolef::details
58 # endif /* _RHEOLEF_FIELD_RDOF_ICC */
field_rdof_sliced_const< Derived > operator()(size_type i_comp, size_type j_comp) const
Definition: field_rdof.icc:50
field_rdof_indirect_const< Derived > operator[](const std::string &dom_name) const
Definition: field_rdof.icc:32
typename field_traits< Derived >::size_type size_type
Definition: field_rdof.h:45
void get_geo(istream &in, my_geo &omega)
string sys_coord
Definition: mkgeo_grid.sh:171
size_type tensor_index(valued_type valued_tag, coordinate_type sys_coord, size_type i, size_type j)
This file is part of Rheolef.
space_constant::valued_type valued_tag() const