Mercurial > fem-fenics-eugenio
annotate src/Mesh.cc @ 115:41614aa82191
Improved error messagging.
author | gedeone-octave <marcovass89@hotmail.it> |
---|---|
date | Tue, 27 Aug 2013 21:45:15 +0200 |
parents | af287918111e |
children | 5fe2a157f4eb |
rev | line source |
---|---|
10
277b60c6618a
New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
1 /* |
277b60c6618a
New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
2 Copyright (C) 2013 Marco Vassallo |
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 |
277b60c6618a
New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
6 Foundation; either version 2 of the License, or (at your option) any later |
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\ |
115
41614aa82191
Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents:
114
diff
changeset
|
25 @item a string containing the name of the file where the mesh is stored in .xml file\ |
41614aa82191
Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents:
114
diff
changeset
|
26 If the file is not a .xml file you can try to use the command dolfin-convert\n\ |
41614aa82191
Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents:
114
diff
changeset
|
27 directly from the bash. \n\ |
16
448e01d4411f
Introduce the use of boost::shared_ptr for class members
gedeone-octave <marco.vassallo@outlook.com>
parents:
12
diff
changeset
|
28 @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
|
29 @end itemize\n\ |
448e01d4411f
Introduce the use of boost::shared_ptr for class members
gedeone-octave <marco.vassallo@outlook.com>
parents:
12
diff
changeset
|
30 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
|
31 @var{mesh_in} which is compatible with fem-fenics.\n\ |
41614aa82191
Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents:
114
diff
changeset
|
32 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
|
33 @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
|
34 @end deftypefn") |
10
277b60c6618a
New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
35 { |
277b60c6618a
New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
36 int nargin = args.length (); |
277b60c6618a
New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
37 octave_value retval = 0; |
277b60c6618a
New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
38 |
277b60c6618a
New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
39 if (nargin < 1 || nargin > 1) |
277b60c6618a
New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
40 print_usage (); |
277b60c6618a
New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
41 else |
277b60c6618a
New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
42 { |
277b60c6618a
New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
43 if (!error_state) |
277b60c6618a
New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
44 { |
115
41614aa82191
Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents:
114
diff
changeset
|
45 |
41614aa82191
Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents:
114
diff
changeset
|
46 if (! mesh_type_loaded) |
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 mesh::register_type (); |
41614aa82191
Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents:
114
diff
changeset
|
49 mesh_type_loaded = true; |
41614aa82191
Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents:
114
diff
changeset
|
50 mlock (); |
41614aa82191
Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents:
114
diff
changeset
|
51 } |
41614aa82191
Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents:
114
diff
changeset
|
52 |
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
|
53 if (args(0).is_string () == true) |
10
277b60c6618a
New function: create a mesh
gedeone-octave <marco.vassallo@outlook.com>
parents:
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 std::string filename = args(0).string_value (); |
115
41614aa82191
Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents:
114
diff
changeset
|
56 std::cout << "Assembling the Mesh from (p, e, t) format..." << std::endl; |
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 //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 { |
115
41614aa82191
Improved error messagging.
gedeone-octave <marcovass89@hotmail.it>
parents:
114
diff
changeset
|
70 std::cout << "Assembling the Mesh from (p, e, t) format..." << std::endl; |
44
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 |
3e49ef16d74a
The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents:
44
diff
changeset
|
83 mesh::mesh (Array<double>& p, Array<octave_idx_type>& e, |
3e49ef16d74a
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 |
3e49ef16d74a
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) |
3e49ef16d74a
The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents:
44
diff
changeset
|
101 editor.add_vertex (i, p.xelem (0, i), p.xelem (1, 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
|
102 |
3e49ef16d74a
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 for (uint i = 0; i < t.cols (); ++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
|
104 editor.add_cell (i, 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
|
105 t.xelem (1, i) - 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
|
106 } |
3e49ef16d74a
The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents:
44
diff
changeset
|
107 |
3e49ef16d74a
The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents:
44
diff
changeset
|
108 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
|
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 for (uint i = 0; i < p.cols (); ++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
|
111 editor.add_vertex (i, p.xelem (0, 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
|
112 p.xelem (1, i), p.xelem (2, 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
|
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 < t.cols (); ++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
|
115 editor.add_cell (i, t.xelem (0, i) - 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
|
116 t.xelem (2, i) - 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
|
117 } |
3e49ef16d74a
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 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
|
120 |
3e49ef16d74a
The methods of the mesh class are implemented in the file where they are needed.
gedeone-octave <marcovass89@hotmail.it>
parents:
44
diff
changeset
|
121 // store information associated with e |
114
af287918111e
Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents:
86
diff
changeset
|
122 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
|
123 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
|
124 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
|
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 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
|
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 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
|
129 { |
114
af287918111e
Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents:
86
diff
changeset
|
130 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
|
131 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
|
132 { |
3e49ef16d74a
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 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
|
134 && (*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
|
135 || (*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
|
136 && (*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
|
137 { |
114
af287918111e
Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents:
86
diff
changeset
|
138 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
|
139 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
|
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 } |
3e49ef16d74a
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 } |
3e49ef16d74a
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 } |
3e49ef16d74a
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 |
3e49ef16d74a
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 |
3e49ef16d74a
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 |
3e49ef16d74a
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 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
|
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 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
|
150 { |
114
af287918111e
Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents:
86
diff
changeset
|
151 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
|
152 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
|
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 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
|
155 && (*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
|
156 && (*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
|
157 || (*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
|
158 && (*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
|
159 && (*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
|
160 || (*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
|
161 && (*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
|
162 && (*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
|
163 || (*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
|
164 && (*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
|
165 && (*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
|
166 || (*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
|
167 && (*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
|
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 (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
|
170 && (*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
|
171 && (*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
|
172 { |
114
af287918111e
Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents:
86
diff
changeset
|
173 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
|
174 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
|
175 } |
3e49ef16d74a
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 } |
3e49ef16d74a
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 } |
3e49ef16d74a
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 } |
3e49ef16d74a
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 |
114
af287918111e
Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents:
86
diff
changeset
|
180 *(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
|
181 |
3e49ef16d74a
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 // 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
|
183 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
|
184 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
|
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 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
|
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 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
|
189 { |
114
af287918111e
Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents:
86
diff
changeset
|
190 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
|
191 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
|
192 { |
3e49ef16d74a
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 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
|
194 && (*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
|
195 && (*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
|
196 || (*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
|
197 && (*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
|
198 && (*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
|
199 || (*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
|
200 && (*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
|
201 && (*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
|
202 || (*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
|
203 && (*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
|
204 && (*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
|
205 || (*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
|
206 && (*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
|
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 (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
|
209 && (*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
|
210 && (*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
|
211 { |
114
af287918111e
Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents:
86
diff
changeset
|
212 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
|
213 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
|
214 } |
3e49ef16d74a
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 } |
3e49ef16d74a
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 } |
3e49ef16d74a
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 } |
3e49ef16d74a
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 |
3e49ef16d74a
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 |
3e49ef16d74a
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 |
3e49ef16d74a
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 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
|
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 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
|
224 { |
114
af287918111e
Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents:
86
diff
changeset
|
225 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
|
226 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
|
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 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
|
229 && (*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
|
230 && (*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
|
231 && (*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
|
232 || (*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
|
233 && (*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
|
234 && (*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
|
235 && (*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
|
236 || (*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 (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
|
238 && (*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
|
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 (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
|
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 (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
|
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 (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
|
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 (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
|
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 (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
|
250 && (*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
|
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 |
3e49ef16d74a
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 (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
|
254 && (*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
|
255 && (*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
|
256 && (*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
|
257 || (*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
|
258 && (*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
|
259 && (*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
|
260 && (*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
|
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 (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
|
263 && (*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
|
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 (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
|
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 (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
|
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 (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
|
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 (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
|
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 (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
|
275 && (*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
|
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 |
3e49ef16d74a
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 (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
|
279 && (*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
|
280 && (*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
|
281 && (*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
|
282 || (*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
|
283 && (*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
|
284 && (*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
|
285 && (*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
|
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 (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
|
288 && (*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
|
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 (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
|
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 (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
|
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 (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
|
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 (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
|
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 (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
|
300 && (*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
|
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 |
3e49ef16d74a
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 (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)[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
|
305 && (*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
|
306 && (*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
|
307 || (*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
|
308 && (*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
|
309 && (*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
|
310 && (*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
|
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 (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
|
313 && (*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
|
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 (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
|
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 (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
|
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 (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
|
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 (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
|
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 (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
|
325 && (*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
|
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 { |
114
af287918111e
Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents:
86
diff
changeset
|
328 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
|
329 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
|
330 } |
3e49ef16d74a
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 } |
3e49ef16d74a
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 } |
3e49ef16d74a
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 } |
3e49ef16d74a
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 |
114
af287918111e
Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents:
86
diff
changeset
|
335 *(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
|
336 |
114
af287918111e
Use boost::shared_ptr.
gedeone-octave <marcovass89@hotmail.it>
parents:
86
diff
changeset
|
337 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
|
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 } |