comparison src/meshfunction.h @ 268:61830a4f9ab9

Improve formatting
author Eugenio Gianniti <eugenio.gianniti@mail.polimi.it>
date Thu, 14 Aug 2014 12:26:55 +0200
parents 53039ac90368
children
comparison
equal deleted inserted replaced
267:53039ac90368 268:61830a4f9ab9
22 #include <octave/oct.h> 22 #include <octave/oct.h>
23 #include "dolfin_compat.h" 23 #include "dolfin_compat.h"
24 24
25 class meshfunction : public octave_base_value 25 class meshfunction : public octave_base_value
26 { 26 {
27 public: 27 public:
28 28
29 meshfunction (void) 29 meshfunction (void)
30 : octave_base_value () {} 30 : octave_base_value () {}
31 31
32 meshfunction (std::string const & label, 32 meshfunction (std::string const & label,
48 pmf (new dolfin::MeshFunction <std::size_t> (mesh, dim, value)), 48 pmf (new dolfin::MeshFunction <std::size_t> (mesh, dim, value)),
49 str (label) {} 49 str (label) {}
50 50
51 bool 51 bool
52 is_defined (void) const 52 is_defined (void) const
53 { return true; } 53 { return true; }
54 54
55 void 55 void
56 print (std::ostream& os, bool pr_as_read_syntax = false) const 56 print (std::ostream & os, bool pr_as_read_syntax = false) const
57 { os << "MeshFunction <std::size_t>: " << get_pmf ()->str (true) << std::endl; } 57 { os << "MeshFunction <std::size_t>: " << get_pmf ()->str (true) << std::endl; }
58 58
59 dolfin::MeshFunction <std::size_t> const & 59 dolfin::MeshFunction <std::size_t> const &
60 get_mf (void) const 60 get_mf (void) const
61 { return *pmf; } 61 { return *pmf; }
62 62
63 SHARED_PTR <dolfin::MeshFunction <std::size_t> const> const & 63 SHARED_PTR <dolfin::MeshFunction <std::size_t> const> const &
64 get_pmf (void) const 64 get_pmf (void) const
65 { return pmf; } 65 { return pmf; }
66 66
67 std::string const & 67 std::string const &
68 get_str (void) const 68 get_str (void) const
69 { return str; } 69 { return str; }
70 70
71 private: 71 private:
72 72
73 SHARED_PTR <dolfin::MeshFunction <std::size_t> const> pmf; 73 SHARED_PTR <dolfin::MeshFunction <std::size_t> const> pmf;
74 std::string str; 74 std::string str;
75 75
76 DECLARE_OCTAVE_ALLOCATOR; 76 DECLARE_OCTAVE_ALLOCATOR;