annotate src/Mesh.cc @ 173:9e944b0d0fc8

Some Formatting improvements (?)
author gedeone-octave <marcovass89@hotmail.it>
date Sat, 12 Oct 2013 16:06:00 +0100
parents 67944f307560
children 2676200ae226
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\
16
448e01d4411f Introduce the use of boost::shared_ptr for class members
gedeone-octave <marco.vassallo@outlook.com>
parents: 12
diff changeset
23 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
24 @itemize @bullet \n\
173
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
25 @item a string containing the name of the file where the mesh \n\
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
26 is stored in .xml file\
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
27 If the file is not a .xml file you can try to use the command\n\
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
28 dolfin-convert directly from the terminal. \n\
16
448e01d4411f Introduce the use of boost::shared_ptr for class members
gedeone-octave <marco.vassallo@outlook.com>
parents: 12
diff changeset
29 @item a a PDE-tool like structure with matrix fields (p,e,t)\n\
448e01d4411f Introduce the use of boost::shared_ptr for class members
gedeone-octave <marco.vassallo@outlook.com>
parents: 12
diff changeset
30 @end itemize\n\
448e01d4411f Introduce the use of boost::shared_ptr for class members
gedeone-octave <marco.vassallo@outlook.com>
parents: 12
diff changeset
31 The output @var{mesh_out} is a representation of the\n\
115
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
32 @var{mesh_in} which is compatible with fem-fenics.\n\
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
33 The easiest way for dealing with mesh 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
34 @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
35 @end deftypefn")
10
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
36 {
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
37 int nargin = args.length ();
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
38 octave_value retval = 0;
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
39
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
40 if (nargin < 1 || nargin > 1)
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
41 print_usage ();
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
42 else
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
43 {
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
44 if (!error_state)
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
45 {
115
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
46
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
47 if (! mesh_type_loaded)
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
48 {
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
49 mesh::register_type ();
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
50 mesh_type_loaded = true;
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
51 mlock ();
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
52 }
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
53
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
54 if (args(0).is_string () == true)
10
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
55 {
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
56 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
57 //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
58 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
59 }
10
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
60
115
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
61 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
62 {
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
63 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
64 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
65 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
66 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
67
44
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
68 if (! error_state)
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
69 {
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
70 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
71 }
fca8c3d75036 register_type is called before every type is used.
gedeone-octave <marco.vassallo@outlook.com>
parents: 16
diff changeset
72 }
115
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
73
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
74 else
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
75 error ("Mesh: the argument you provide is invalid");
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
76
10
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
77 }
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 return retval;
277b60c6618a New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff changeset
80 }
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
81
173
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
82 mesh::mesh (Array<double>& p,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
83 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
84 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
85 {
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 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
87 if (D < 2 || D > 3)
115
41614aa82191 Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents: 114
diff changeset
88 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
89 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
90 {
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 dolfin::MeshEditor editor;
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
92 boost::shared_ptr<dolfin::Mesh> msh (new dolfin::Mesh ());
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
93 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
94 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
95 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
96
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 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
98 {
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 for (uint i = 0; i < p.cols (); ++i)
173
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
100 editor.add_vertex (i,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
101 p.xelem (0, i),
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
102 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
103
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 for (uint i = 0; i < t.cols (); ++i)
173
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
105 editor.add_cell (i,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
106 t.xelem (0, i) - 1,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
107 t.xelem (1, i) - 1,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
108 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
109 }
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 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
112 {
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 for (uint i = 0; i < p.cols (); ++i)
173
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
114 editor.add_vertex (i,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
115 p.xelem (0, i),
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
116 p.xelem (1, i),
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
117 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
118
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 for (uint i = 0; i < t.cols (); ++i)
173
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
120 editor.add_cell (i,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
121 t.xelem (0, i) - 1,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
122 t.xelem (1, i) - 1,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
123 t.xelem (2, i) - 1,
9e944b0d0fc8 Some Formatting improvements (?)
gedeone-octave <marcovass89@hotmail.it>
parents: 168
diff changeset
124 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
125 }
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 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
128
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 // store information associated with e
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
130 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
131 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
132 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
133
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 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
135 {
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 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
137 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
138 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
139 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
140 {
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 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
142 && (*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
143 || (*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
144 && (*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
145 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
146 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
147 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
148 }
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 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
156 {
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 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
158 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
159 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
160 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
161 {
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 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
163 && (*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
164 && (*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
165 || (*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
166 && (*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
167 && (*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
168 || (*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
169 && (*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
170 && (*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
171 || (*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
172 && (*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
173 && (*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
174 || (*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
175 && (*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
176 && (*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
177 || (*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
178 && (*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
179 && (*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
180 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
181 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
182 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
183 }
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
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
188 *(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
189
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 // 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
191 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
192 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
193
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 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
195 {
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 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
197 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
198 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
199 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
200 {
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 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
202 && (*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
203 && (*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
204 || (*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
205 && (*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
206 && (*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
207 || (*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
208 && (*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
209 && (*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
210 || (*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
211 && (*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
212 && (*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
213 || (*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
214 && (*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
215 && (*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
216 || (*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
217 && (*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
218 && (*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
219 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
220 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
221 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
222 }
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 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
230 {
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 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
232 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
233 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
234 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
235 {
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 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
237 && (*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
238 && (*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
239 && (*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
240 || (*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
241 && (*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
242 && (*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
243 && (*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
244 || (*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
245 && (*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
246 && (*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
247 && (*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
248 || (*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
249 && (*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
250 && (*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
251 && (*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
252 || (*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
253 && (*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
254 && (*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
255 && (*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
256 || (*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
257 && (*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
258 && (*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
259 && (*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
260
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 || (*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
262 && (*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
263 && (*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
264 && (*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
265 || (*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
266 && (*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
267 && (*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
268 && (*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
269 || (*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
270 && (*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
271 && (*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
272 && (*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
273 || (*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
274 && (*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
275 && (*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
276 && (*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
277 || (*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
278 && (*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
279 && (*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
280 && (*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
281 || (*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
282 && (*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
283 && (*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
284 && (*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
285
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 || (*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
287 && (*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
288 && (*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
289 && (*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
290 || (*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
291 && (*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
292 && (*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
293 && (*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
294 || (*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
295 && (*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
296 && (*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
297 && (*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
298 || (*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
299 && (*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
300 && (*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
301 && (*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
302 || (*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
303 && (*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
304 && (*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
305 && (*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
306 || (*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
307 && (*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
308 && (*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
309 && (*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
310
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 || (*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
312 && (*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
313 && (*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
314 && (*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
315 || (*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
316 && (*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
317 && (*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
318 && (*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
319 || (*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
320 && (*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
321 && (*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
322 && (*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
323 || (*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
324 && (*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
325 && (*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
326 && (*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
327 || (*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
328 && (*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
329 && (*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
330 && (*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
331 || (*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
332 && (*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
333 && (*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
334 && (*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
335 {
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
336 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
337 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
338 }
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
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
343 *(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
344
114
af287918111e Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents: 86
diff changeset
345 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
346 }
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 }