Mercurial > fem-fenics-eugenio
comparison src/subdomain.h @ 267:53039ac90368
Mark meshfunction using subdomain
* src/SubDomain.cc: return subdomain to use for marking
* src/MeshFunction.cc: return a user defined meshfunction
* src/mark.cc: with the information from subdomain, mark a meshfunction
author | Eugenio Gianniti <eugenio.gianniti@mail.polimi.it> |
---|---|
date | Tue, 12 Aug 2014 15:42:50 +0200 |
parents | |
children | 61830a4f9ab9 |
comparison
equal
deleted
inserted
replaced
266:6b37560b7cbb | 267:53039ac90368 |
---|---|
1 /* | |
2 Copyright (C) 2014 Eugenio Gianniti <eugenio.gianniti@mail.polimi.it> | |
3 | |
4 This program is free software; you can redistribute it and/or modify it under | |
5 the terms of the GNU General Public License as published by the Free Software | |
6 Foundation; either version 3 of the License, or (at your option) any later | |
7 version. | |
8 | |
9 This program is distributed in the hope that it will be useful, but WITHOUT | |
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | |
12 details. | |
13 | |
14 You should have received a copy of the GNU General Public License along with | |
15 this program; if not, see <http://www.gnu.org/licenses/>. | |
16 */ | |
17 | |
18 #ifndef _SUBDOMAIN_OCTAVE_ | |
19 #define _SUBDOMAIN_OCTAVE_ | |
20 | |
21 #include "subdomain_rep.h" | |
22 #include "dolfin_compat.h" | |
23 | |
24 class subdomain : public octave_base_value | |
25 { | |
26 public: | |
27 | |
28 subdomain () | |
29 : octave_base_value () {} | |
30 | |
31 subdomain (octave_fcn_handle const & fh, bool on_boundary) | |
32 : octave_base_value (), rep (new subdomain_rep (fh, on_boundary)) {} | |
33 | |
34 ~subdomain (void) {} | |
35 | |
36 void | |
37 print (std::ostream& os, bool pr_as_read_syntax = false) const | |
38 { | |
39 os << "SubDomain" << std::endl; | |
40 } | |
41 | |
42 bool | |
43 is_defined (void) const | |
44 { return true; } | |
45 | |
46 SHARED_PTR <subdomain_rep const> const & | |
47 get_psd (void) const | |
48 { return rep; } | |
49 | |
50 private: | |
51 | |
52 SHARED_PTR <subdomain_rep const> rep; | |
53 | |
54 DECLARE_OCTAVE_ALLOCATOR; | |
55 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA; | |
56 }; | |
57 | |
58 static bool subdomain_type_loaded = false; | |
59 | |
60 DEFINE_OCTAVE_ALLOCATOR (subdomain); | |
61 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (subdomain, | |
62 "subdomain", | |
63 "subdomain"); | |
64 | |
65 #endif |