annotate src/Mesh.cc @ 180:2676200ae226

Improve documentation for pkg release.
author gedeone-octave <marcovass89@hotmail.it>
date Thu, 07 Nov 2013 23:46:38 +0000
parents 9e944b0d0fc8
children 0de6ca5e31a2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
1 /*
151
5fe2a157f4eb Update GPL to v3
gedeone-octave <marcovass89@hotmail.it>
parents: 115
diff changeset
2 Copyright (C) 2013 Marco Vassallo <gedeone-octave@users.sourceforge.net>
10
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
3
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
4 This program is free software; you can redistribute it and/or modify it under
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
5 the terms of the GNU General Public License as published by the Free Software
151
5fe2a157f4eb Update GPL to v3
gedeone-octave <marcovass89@hotmail.it>
parents: 115
diff changeset
6 Foundation; either version 3 of the License, or (at your option) any later
10
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
7 version.
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
8
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful, but WITHOUT
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
12 details.
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
13
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License along with
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
15 this program; if not, see <http://www.gnu.org/licenses/>.
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
16 */
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
17
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
18 #include "mesh.h"
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
19
86
66e4aa87c9a1 Rename the function accordingly to dolfin
gedeone-octave <marcovass89@hotmail.it>
parents: 79
diff changeset
20 DEFUN_DLD (Mesh, args, ,"-*- texinfo -*-\n\
16
448e01d4411f Introduce the use of boost::shared_ptr for class members
gedeone-octave <marco.vassallo@outlook.com>
parents: 12
diff changeset
21 @deftypefn {Function File} {[@var{mesh_out}]} = \
86
66e4aa87c9a1 Rename the function accordingly to dolfin
gedeone-octave <marcovass89@hotmail.it>
parents: 79
diff changeset
22 Mesh (@var{mesh_in}) \n\
180
2676200ae226 Improve documentation for pkg release.
gedeone-octave <marcovass89@hotmail.it>
parents: 173
diff changeset
23 Construct a mesh from file or from (p, e, t) format.\n\
16
448e01d4411f Introduce the use of boost::shared_ptr for class members
gedeone-octave <marco.vassallo@outlook.com>
parents: 12
diff changeset
24 The @var{mesh_in} should be either\n\
448e01d4411f Introduce the use of boost::shared_ptr for class members
gedeone-octave <marco.vassallo@outlook.com>
parents: 12
diff changeset
25 @itemize @bullet \n\
180
2676200ae226 Improve documentation for pkg release.
gedeone-octave <marcovass89@hotmail.it>
parents: 173
diff changeset
26 @item a string containing the name of the file where the mesh \
2676200ae226 Improve documentation for pkg release.
gedeone-octave <marcovass89@hotmail.it>
parents: 173
diff changeset
27 is stored in .xml file\n\
2676200ae226 Improve documentation for pkg release.
gedeone-octave <marcovass89@hotmail.it>
parents: 173
diff changeset
28 If the file is not a .xml file you can try to use the command\
173
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
29 dolfin-convert directly from the terminal. \n\
180
2676200ae226 Improve documentation for pkg release.
gedeone-octave <marcovass89@hotmail.it>
parents: 173
diff changeset
30 @item a a PDE-tool like structure with matrix fields (p,e,t)\
16
448e01d4411f Introduce the use of boost::shared_ptr for class members
gedeone-octave <marco.vassallo@outlook.com>
parents: 12
diff changeset
31 @end itemize\n\
180
2676200ae226 Improve documentation for pkg release.
gedeone-octave <marcovass89@hotmail.it>
parents: 173
diff changeset
32 The output @var{mesh_out} is a representation of the\
115
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
33 @var{mesh_in} which is compatible with fem-fenics.\n\
180
2676200ae226 Improve documentation for pkg release.
gedeone-octave <marcovass89@hotmail.it>
parents: 173
diff changeset
34 The easiest way for dealing with meshes is using the msh pkg. \n\
16
448e01d4411f Introduce the use of boost::shared_ptr for class members
gedeone-octave <marco.vassallo@outlook.com>
parents: 12
diff changeset
35 @seealso{fem_get_mesh}\n\
448e01d4411f Introduce the use of boost::shared_ptr for class members
gedeone-octave <marco.vassallo@outlook.com>
parents: 12
diff changeset
36 @end deftypefn")
10
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
37 {
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
38 int nargin = args.length ();
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
39 octave_value retval = 0;
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
40
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
41 if (nargin < 1 || nargin > 1)
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
42 print_usage ();
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
43 else
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
44 {
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
45 if (!error_state)
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
46 {
115
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
47
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
48 if (! mesh_type_loaded)
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
49 {
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
50 mesh::register_type ();
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
51 mesh_type_loaded = true;
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
52 mlock ();
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
53 }
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
54
12
b7c74c0bdabd New functions which get a (p,e,t) matrix from a mesh object
gedeone-octave <marco.vassallo@outlook.com>
parents: 10
diff changeset
55 if (args(0).is_string () == true)
10
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
56 {
12
b7c74c0bdabd New functions which get a (p,e,t) matrix from a mesh object
gedeone-octave <marco.vassallo@outlook.com>
parents: 10
diff changeset
57 std::string filename = args(0).string_value ();
b7c74c0bdabd New functions which get a (p,e,t) matrix from a mesh object
gedeone-octave <marco.vassallo@outlook.com>
parents: 10
diff changeset
58 //if the filename is not valid, dolfin takes care of it
b7c74c0bdabd New functions which get a (p,e,t) matrix from a mesh object
gedeone-octave <marco.vassallo@outlook.com>
parents: 10
diff changeset
59 retval = new mesh (filename);
b7c74c0bdabd New functions which get a (p,e,t) matrix from a mesh object
gedeone-octave <marco.vassallo@outlook.com>
parents: 10
diff changeset
60 }
10
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
61
115
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
62 else if (args(0).is_map () == true)
44
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
63 {
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
64 octave_scalar_map a = args(0).scalar_map_value ();
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
65 Array<double> p = a.contents ("p").matrix_value ();
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
66 Array<octave_idx_type> t = a.contents ("t").matrix_value ();
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
67 Array<octave_idx_type> e = a.contents ("e").matrix_value ();
12
b7c74c0bdabd New functions which get a (p,e,t) matrix from a mesh object
gedeone-octave <marco.vassallo@outlook.com>
parents: 10
diff changeset
68
44
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
69 if (! error_state)
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
70 {
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
71 retval = new mesh (p, e, t);
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
72 }
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
73 }
115
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
74
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
75 else
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
76 error ("Mesh: the argument you provide is invalid");
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
77
10
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
78 }
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
79 }
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
80 return retval;
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
81 }
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
82
173
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
83 mesh::mesh (Array<double>& p,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
84 Array<octave_idx_type>& e,
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
85 Array<octave_idx_type>& t)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
86 {
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
87 std::size_t D = p.rows ();
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
88 if (D < 2 || D > 3)
115
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
89 error ("Mesh constructor: only 2D or 3D meshes are supported");
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
90 else
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
91 {
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
92 dolfin::MeshEditor editor;
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
93 boost::shared_ptr<dolfin::Mesh> msh (new dolfin::Mesh ());
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
94 editor.open (*msh, D, D);
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
95 editor.init_vertices (p.cols ());
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
96 editor.init_cells (t.cols ());
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
97
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
98 if (D == 2)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
99 {
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
100 for (uint i = 0; i < p.cols (); ++i)
173
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
101 editor.add_vertex (i,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
102 p.xelem (0, i),
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
103 p.xelem (1, i));
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
104
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
105 for (uint i = 0; i < t.cols (); ++i)
173
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
106 editor.add_cell (i,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
107 t.xelem (0, i) - 1,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
108 t.xelem (1, i) - 1,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
109 t.xelem (2, i) - 1);
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
110 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
111
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
112 if (D == 3)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
113 {
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
114 for (uint i = 0; i < p.cols (); ++i)
173
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
115 editor.add_vertex (i,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
116 p.xelem (0, i),
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
117 p.xelem (1, i),
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
118 p.xelem (2, i));
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
119
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
120 for (uint i = 0; i < t.cols (); ++i)
173
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
121 editor.add_cell (i,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
122 t.xelem (0, i) - 1,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
123 t.xelem (1, i) - 1,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
124 t.xelem (2, i) - 1,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
125 t.xelem (3, i) - 1);
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
126 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
127
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
128 editor.close ();
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
129
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
130 // store information associated with e
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
131 msh->init (D - 1);
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
132 dolfin::MeshValueCollection<std::size_t> facet (D - 1);
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
133 std::size_t num_side_edges = e.cols ();
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
134
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
135 if (D == 2)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
136 {
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
137 for (uint i = 0; i < num_side_edges; ++i)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
138 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
139 dolfin::Vertex v (*msh, e.xelem (0, i) - 1);
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
140 for (dolfin::FacetIterator f (v); ! f.end (); ++f)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
141 {
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
142 if ((*f).entities(0)[0] == e.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
143 && (*f).entities(0)[1] == e.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
144 || (*f).entities(0)[0] == e.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
145 && (*f).entities(0)[1] == e.xelem (0, i) - 1)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
146 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
147 facet.set_value ((*f).index (), e.xelem (4, i), *msh);
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
148 break;
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
149 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
150 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
151 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
152 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
153
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
154
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
155
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
156 if (D == 3)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
157 {
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
158 for (uint i = 0; i < num_side_edges; ++i)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
159 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
160 dolfin::Vertex v (*msh, e.xelem (0, i) - 1);
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
161 for (dolfin::FacetIterator f (v); ! f.end (); ++f)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
162 {
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
163 if ((*f).entities(0)[0] == e(0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
164 && (*f).entities(0)[1] == e.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
165 && (*f).entities(0)[2] == e.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
166 || (*f).entities(0)[0] == e.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
167 && (*f).entities(0)[1] == e.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
168 && (*f).entities(0)[2] == e.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
169 || (*f).entities(0)[0] == e.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
170 && (*f).entities(0)[1] == e.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
171 && (*f).entities(0)[2] == e.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
172 || (*f).entities(0)[0] == e.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
173 && (*f).entities(0)[1] == e.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
174 && (*f).entities(0)[2] == e.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
175 || (*f).entities(0)[0] == e.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
176 && (*f).entities(0)[1] == e.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
177 && (*f).entities(0)[2] == e.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
178 || (*f).entities(0)[0] == e.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
179 && (*f).entities(0)[1] == e.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
180 && (*f).entities(0)[2] == e.xelem (0, i) - 1)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
181 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
182 facet.set_value ((*f).index (), e.xelem (9, i), *msh);
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
183 break;
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
184 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
185 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
186 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
187 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
188
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
189 *(msh->domains ().markers (D - 1)) = facet;
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
190
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
191 // store information associated with t
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
192 dolfin::MeshValueCollection<std::size_t> cell (D);
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
193 std::size_t num_cells = t.cols ();
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
194
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
195 if (D == 2)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
196 {
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
197 for (uint i = 0; i < num_cells; ++i)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
198 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
199 dolfin::Vertex v (*msh, t.xelem (0, i) - 1);
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
200 for (dolfin::CellIterator f (v); ! f.end (); ++f)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
201 {
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
202 if ((*f).entities(0)[0] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
203 && (*f).entities(0)[1] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
204 && (*f).entities(0)[2] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
205 || (*f).entities(0)[0] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
206 && (*f).entities(0)[1] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
207 && (*f).entities(0)[2] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
208 || (*f).entities(0)[0] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
209 && (*f).entities(0)[1] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
210 && (*f).entities(0)[2] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
211 || (*f).entities(0)[0] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
212 && (*f).entities(0)[1] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
213 && (*f).entities(0)[2] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
214 || (*f).entities(0)[0] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
215 && (*f).entities(0)[1] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
216 && (*f).entities(0)[2] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
217 || (*f).entities(0)[0] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
218 && (*f).entities(0)[1] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
219 && (*f).entities(0)[2] == t.xelem (0, i) - 1)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
220 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
221 cell.set_value ((*f).index (), t.xelem (3, i), *msh);
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
222 break;
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
223 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
224 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
225 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
226 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
227
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
228
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
229
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
230 if (D == 3)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
231 {
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
232 for (uint i = 0; i < num_cells; ++i)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
233 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
234 dolfin::Vertex v (*msh, t.xelem (0, i) - 1);
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
235 for (dolfin::CellIterator f (v); ! f.end (); ++f)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
236 {
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
237 if ((*f).entities(0)[0] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
238 && (*f).entities(0)[1] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
239 && (*f).entities(0)[2] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
240 && (*f).entities(0)[3] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
241 || (*f).entities(0)[0] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
242 && (*f).entities(0)[1] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
243 && (*f).entities(0)[2] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
244 && (*f).entities(0)[3] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
245 || (*f).entities(0)[0] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
246 && (*f).entities(0)[1] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
247 && (*f).entities(0)[2] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
248 && (*f).entities(0)[3] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
249 || (*f).entities(0)[0] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
250 && (*f).entities(0)[1] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
251 && (*f).entities(0)[2] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
252 && (*f).entities(0)[3] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
253 || (*f).entities(0)[0] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
254 && (*f).entities(0)[1] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
255 && (*f).entities(0)[2] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
256 && (*f).entities(0)[3] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
257 || (*f).entities(0)[0] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
258 && (*f).entities(0)[1] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
259 && (*f).entities(0)[2] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
260 && (*f).entities(0)[3] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
261
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
262 || (*f).entities(0)[0] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
263 && (*f).entities(0)[1] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
264 && (*f).entities(0)[2] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
265 && (*f).entities(0)[3] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
266 || (*f).entities(0)[0] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
267 && (*f).entities(0)[1] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
268 && (*f).entities(0)[2] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
269 && (*f).entities(0)[3] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
270 || (*f).entities(0)[0] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
271 && (*f).entities(0)[1] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
272 && (*f).entities(0)[2] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
273 && (*f).entities(0)[3] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
274 || (*f).entities(0)[0] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
275 && (*f).entities(0)[1] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
276 && (*f).entities(0)[2] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
277 && (*f).entities(0)[3] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
278 || (*f).entities(0)[0] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
279 && (*f).entities(0)[1] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
280 && (*f).entities(0)[2] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
281 && (*f).entities(0)[3] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
282 || (*f).entities(0)[0] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
283 && (*f).entities(0)[1] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
284 && (*f).entities(0)[2] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
285 && (*f).entities(0)[3] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
286
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
287 || (*f).entities(0)[0] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
288 && (*f).entities(0)[1] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
289 && (*f).entities(0)[2] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
290 && (*f).entities(0)[3] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
291 || (*f).entities(0)[0] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
292 && (*f).entities(0)[1] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
293 && (*f).entities(0)[2] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
294 && (*f).entities(0)[3] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
295 || (*f).entities(0)[0] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
296 && (*f).entities(0)[1] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
297 && (*f).entities(0)[2] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
298 && (*f).entities(0)[3] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
299 || (*f).entities(0)[0] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
300 && (*f).entities(0)[1] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
301 && (*f).entities(0)[2] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
302 && (*f).entities(0)[3] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
303 || (*f).entities(0)[0] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
304 && (*f).entities(0)[1] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
305 && (*f).entities(0)[2] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
306 && (*f).entities(0)[3] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
307 || (*f).entities(0)[0] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
308 && (*f).entities(0)[1] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
309 && (*f).entities(0)[2] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
310 && (*f).entities(0)[3] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
311
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
312 || (*f).entities(0)[0] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
313 && (*f).entities(0)[1] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
314 && (*f).entities(0)[2] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
315 && (*f).entities(0)[3] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
316 || (*f).entities(0)[0] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
317 && (*f).entities(0)[1] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
318 && (*f).entities(0)[2] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
319 && (*f).entities(0)[3] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
320 || (*f).entities(0)[0] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
321 && (*f).entities(0)[1] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
322 && (*f).entities(0)[2] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
323 && (*f).entities(0)[3] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
324 || (*f).entities(0)[0] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
325 && (*f).entities(0)[1] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
326 && (*f).entities(0)[2] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
327 && (*f).entities(0)[3] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
328 || (*f).entities(0)[0] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
329 && (*f).entities(0)[1] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
330 && (*f).entities(0)[2] == t.xelem (0, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
331 && (*f).entities(0)[3] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
332 || (*f).entities(0)[0] == t.xelem (3, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
333 && (*f).entities(0)[1] == t.xelem (2, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
334 && (*f).entities(0)[2] == t.xelem (1, i) - 1
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
335 && (*f).entities(0)[3] == t.xelem (0, i) - 1)
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
336 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
337 cell.set_value ((*f).index (), t.xelem (4, i), *msh);
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
338 break;
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
339 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
340 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
341 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
342 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
343
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
344 *(msh->domains ().markers (D)) = cell;
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
345
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
346 pmsh = msh;
79
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
347 }
3e49ef16d74a The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents: 44
diff changeset
348 }