~ubuntu-branches/ubuntu/trusty/rheolef/trusty-proposed

« back to all changes in this revision

Viewing changes to nfem/lib/form_diag_manip.h

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2010-06-12 09:08:59 UTC
  • Revision ID: james.westby@ubuntu.com-20100612090859-8gpm2gc7j3ab43et
Tags: upstream-5.89
ImportĀ upstreamĀ versionĀ 5.89

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _RHEO_FORM_DIAG_MANIP_H
 
2
#define _RHEO_FORM_DIAG_MANIP_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
 
 
24
/*Class:form_diag_manip
 
25
NAME: @code{form_diag_manip} - concatenation on a product space
 
26
DESCRIPTION: 
 
27
  build a form_diag on a product space.
 
28
EXAMPLE:
 
29
  The following example builds a 3-blocks diagonal form:
 
30
  @example
 
31
    geo g("toto.geo");
 
32
    space V(g,"P1");
 
33
    space T = V*V*V;
 
34
    form_diag Iv(V) ;
 
35
    form_diag I(T) ;
 
36
    form_manip I_manip;
 
37
    I_manip << size(3) << Iv << Iv << Iv;
 
38
    I_manip >> I;
 
39
  @end example
 
40
METHODS: @form_diag_manip
 
41
SEE ALSO: 
 
42
  "space"(3), "form_diag"(3), "form_manip"(3)
 
43
DATE:   15 sept 1997
 
44
AUTHOR: 
 
45
  LMC-IMAG, 38041 Grenoble cedex 9, France
 
46
  | Nicolas.Roquet@imag.fr
 
47
  | Pierre.Saramito@imag.fr
 
48
End:
 
49
*/
 
50
 
 
51
#include "rheolef/form_diag.h"
 
52
 
 
53
//<form_diag_manip:  
 
54
class form_diag_manip {
 
55
public:
 
56
 
 
57
// typedefs:
 
58
 
 
59
    typedef form_diag::size_type size_type;
 
60
 
 
61
// constructors/destructors:
 
62
 
 
63
    form_diag_manip();
 
64
 
 
65
// accessors:
 
66
 
 
67
    size_type nbloc() const;
 
68
    size_type nform() const;
 
69
    form_diag& bloc(size_type i);
 
70
    const form_diag& bloc(size_type i) const;
 
71
 
 
72
// manipulators:
 
73
  
 
74
    form_diag_manip& operator << (const form_diag& a);
 
75
    form_diag_manip& operator >> (form_diag& a);
 
76
    friend form_diag_manip& verbose (form_diag_manip &fm);
 
77
    friend form_diag_manip& noverbose (form_diag_manip &fm);
 
78
    form_diag_manip& operator<< (form_diag_manip& (*pf)(form_diag_manip&));
 
79
 
 
80
// implementation:
 
81
 
 
82
    friend class sized;
 
83
    friend form_diag_manip& operator << (form_diag_manip &fm, const class sized& s);
 
84
 
 
85
protected:
 
86
    bool              _verbose;
 
87
    size_type         _nform;
 
88
    size_type         _nbloc;
 
89
    std::vector<form_diag> _a;
 
90
};
 
91
//>form_diag_manip:
 
92
class sized
 
93
{
 
94
public:
 
95
  typedef form_diag_manip::size_type size_type;
 
96
  sized (size_type nbloc = 0);
 
97
  friend form_diag_manip& operator << (form_diag_manip &fm, const sized& s);
 
98
protected:
 
99
  size_type _nbloc;
 
100
};
 
101
#endif // _RHEO_FORM_DIAG_MANIP_H
 
102