~ubuntu-branches/ubuntu/wily/dolfin/wily-proposed

« back to all changes in this revision

Viewing changes to dolfin/fem/AssemblerBase.h

  • Committer: Package Import Robot
  • Author(s): Johannes Ring
  • Date: 2015-03-17 07:57:11 UTC
  • mfrom: (1.1.18) (19.1.24 experimental)
  • Revision ID: package-import@ubuntu.com-20150317075711-1v207zbty9qmygow
Tags: 1.5.0-1
* New upstream release (closes: #780359).
* debian/control:
  - Bump Standards-Version to 3.9.6 (no changes needed).
  - Bump X-Python-Version to >= 2.7.
  - Update package names for new SONAME 1.5 (libdolfin1.4 ->
    libdolfin1.5, libdolfin1.4-dbg -> libdolfin1.5-dbg and
    libdolfin1.4-dev -> libdolfin1.5-dev).
  - Bump minimum required version for python-instant, python-ufl and
    python-ffc to 1.5.0.
  - Add python-sympy and python-six to Depends for binary package
    python-dolfin.
  - Add dh-python to Build-Depends.
  - Remove libcgal-dev from {Build-}Depends.
* Remove CSGCGALMeshGenerator3D-oom.patch since CGAL is no longer used
  by DOLFIN.
* Move debian/libdolfin1.4.install -> debian/libdolfin1.5.install.
* debian/rules: No longer any non DFSG-free stuff to remove, so update
  get-orig-source target (update debian/watch accordingly).
* Update debian/copyright and debian/copyright_hints.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
  class GenericTensor;
38
38
  class Form;
39
39
 
40
 
  /// This class provides type compatible with boolean used for announcing
41
 
  /// deprecation warning for deprecated bool member variable
42
 
 
43
 
  // TODO: Remove when not needed.
44
 
  class bool_deprecated
45
 
  {
46
 
  public:
47
 
 
48
 
    bool_deprecated(const bool& value, const std::string& what,
49
 
                    const std::string& ver_deprecated,
50
 
                    const std::string& ver_removed,
51
 
                    const std::string& reason)
52
 
      : _value(value), _what(what),
53
 
        _ver_deprecated(ver_deprecated),
54
 
        _ver_removed(ver_removed), _reason(reason)
55
 
    { }
56
 
 
57
 
    bool_deprecated(const bool_deprecated& that)
58
 
      : _value(that._value), _what(that._what),
59
 
        _ver_deprecated(that._ver_deprecated),
60
 
        _ver_removed(that._ver_removed), _reason(that._reason)
61
 
    { }
62
 
 
63
 
    ~bool_deprecated() { }
64
 
 
65
 
    bool_deprecated& operator=(const bool_deprecated& that)
66
 
    { 
67
 
      _value          = that._value;
68
 
      _what           = that._what;
69
 
      _ver_deprecated = that._ver_deprecated;
70
 
      _ver_removed    = that._ver_removed;
71
 
      _reason         = that._reason;
72
 
      return *this;
73
 
    }
74
 
 
75
 
    bool_deprecated& operator=(const bool& value)
76
 
    {
77
 
      deprecation(_what,
78
 
                  _ver_deprecated,
79
 
                  _ver_removed,
80
 
                  _reason);
81
 
      _value = value;
82
 
      return *this;
83
 
    }
84
 
 
85
 
    operator bool() const { return _value; }
86
 
 
87
 
  private:
88
 
 
89
 
    bool _value;
90
 
 
91
 
    std::string _what;
92
 
    std::string _ver_deprecated;
93
 
    std::string _ver_removed;
94
 
    std::string _reason;
95
 
 
96
 
  };
97
 
 
98
 
  /// This class provides some common functions used in
99
 
  /// assembler classes.
100
 
 
 
40
  /// This class provides some common functions used in assembler
 
41
  /// classes.
101
42
  class AssemblerBase
102
43
  {
103
44
  public:
104
45
 
105
 
    // Check form
106
 
    AssemblerBase() :
107
 
      reset_sparsity(true, "Parameter reset_sparsity of assembler",
108
 
                     "1.4", "1.5", "Parameter reset_sparsity of assembler"
109
 
                     " is no longer used. Tensor is reset iff empty()."),
110
 
      add_values(false),
111
 
      finalize_tensor(true),
 
46
    /// Constructor
 
47
    AssemblerBase() : add_values(false), finalize_tensor(true),
112
48
      keep_diagonal(false) {}
113
49
 
114
 
    /// reset_sparsity (bool)
115
 
    ///     Deprecated. Sparsity pattern of the tensor is reset
116
 
    ///     iff the tensor is empty().
117
 
    bool_deprecated reset_sparsity;
118
 
 
119
50
    /// add_values (bool)
120
51
    ///     Default value is false.
121
52
    ///     This controls whether values are added to the given
145
76
    static void check(const Form& a);
146
77
 
147
78
    // Pretty-printing for progress bar
148
 
    static std::string progress_message(std::size_t rank, std::string integral_type);
 
79
    static std::string progress_message(std::size_t rank,
 
80
                                        std::string integral_type);
149
81
 
150
82
  };
151
83