~ubuntu-branches/ubuntu/saucy/rheolef/saucy

« back to all changes in this revision

Viewing changes to nfem/plib/geo_domain_indirect_seq.cc

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Saramito
  • Date: 2011-03-23 11:14:26 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110323111426-cjvhey7lxt6077ty
Tags: 5.93-1
* New upstream release (minor changes):
  - some extra warning message deleted in heap_allocator
  - graphic output with mayavi2 fixed
  - add doc refman in .info and .pdf format

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
///
 
2
/// This file is part of Rheolef.
 
3
///
 
4
/// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
 
5
///
 
6
/// Rheolef is free software; you can redistribute it and/or modify
 
7
/// it under the terms of the GNU General Public License as published by
 
8
/// the Free Software Foundation; either version 2 of the License, or
 
9
/// (at your option) any later version.
 
10
///
 
11
/// Rheolef is sequential in the hope that it will be useful,
 
12
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
/// GNU General Public License for more details.
 
15
///
 
16
/// You should have received a copy of the GNU General Public License
 
17
/// along with Rheolef; if not, write to the Free Software
 
18
/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
19
/// 
 
20
/// =========================================================================
 
21
#include "rheolef/geo_domain_indirect.h"
 
22
 
 
23
namespace rheolef {
 
24
 
 
25
template <class T, class M>
 
26
const distributor&
 
27
geo_domain_indirect_base_rep<T,M>::geo_element_ownership (size_type dim) const 
 
28
{
 
29
  if (dim == map_dimension()) return  _indirect.ownership();
 
30
  check_macro (dim  < map_dimension(), "unexpected dimension = " << dim << " > domain dimension = " << map_dimension());
 
31
  return _omega.geo_element_ownership(dim);
 
32
}
 
33
template <class T, class M>
 
34
typename geo_domain_indirect_base_rep<T,M>::const_reference
 
35
geo_domain_indirect_base_rep<T,M>::get_geo_element (size_type dim, size_type ige) const
 
36
{
 
37
  if (dim == map_dimension()) return  _omega.get_geo_element (dim, _indirect.oige(ige).index());
 
38
  check_macro (dim  < map_dimension(), "unexpected dimension = " << dim << " > domain dimension = " << map_dimension());
 
39
  return _omega.get_geo_element (dim, ige);
 
40
}
 
41
template <class T, class M>
 
42
typename geo_domain_indirect_base_rep<T,M>::const_iterator
 
43
geo_domain_indirect_base_rep<T,M>::begin (size_type dim) const
 
44
{
 
45
  error_macro ("domain.begin: not yet");
 
46
  return _omega.begin (dim); // (not reached) 
 
47
  // Note: here, not valid for dim=map_dimension ; requires a proxy_reference
 
48
}
 
49
template <class T, class M>
 
50
typename geo_domain_indirect_base_rep<T,M>::const_iterator
 
51
geo_domain_indirect_base_rep<T,M>::end (size_type dim) const
 
52
{
 
53
  error_macro ("domain.end: not yet");
 
54
  return _omega.end (dim); // (not reached) 
 
55
  // Note: here, not valid for dim=map_dimension ; requires a proxy_reference
 
56
}
 
57
template <class T, class M>
 
58
typename geo_domain_indirect_base_rep<T,M>::size_type
 
59
geo_domain_indirect_base_rep<T,M>::n_domain_indirect () const
 
60
{
 
61
  return 0;
 
62
}
 
63
template <class T, class M>
 
64
const domain_indirect_basic<M>&
 
65
geo_domain_indirect_base_rep<T,M>::get_domain_indirect (size_type i) const
 
66
{
 
67
  error_macro ("domain[domain] aka sub-sub-domain: not yet");
 
68
  return _indirect; // not reached
 
69
}
 
70
template <class T, class M>
 
71
const domain_indirect_basic<M>&
 
72
geo_domain_indirect_base_rep<T,M>::get_domain_indirect (const std::string& name) const
 
73
{
 
74
  error_macro ("domain[domain] aka sub-sub-domain: not yet");
 
75
  return _indirect; // not reached
 
76
}
 
77
template <class T, class M>
 
78
odiststream&
 
79
geo_domain_indirect_base_rep<T,M>::put (odiststream& ops) const
 
80
{
 
81
  error_macro ("domain.put: not yet");
 
82
  return ops;
 
83
}
 
84
// ----------------------------------------------------------------------------
 
85
// instanciation in library
 
86
// ----------------------------------------------------------------------------
 
87
template class geo_domain_indirect_base_rep<Float,sequential>;
 
88
#ifdef _RHEOLEF_HAVE_MPI
 
89
template class geo_domain_indirect_base_rep<Float,distributed>;
 
90
#endif // _RHEOLEF_HAVE_MPI
 
91
template class geo_domain_indirect_rep<Float,sequential>;
 
92
 
 
93
} // namespace rheolef