MCPcopy Create free account
hub / github.com/FreeFem/FreeFem-sources / build_layer_map_triangle

Function build_layer_map_triangle

plugin/seq/LayerMesh.cpp:178–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178void build_layer_map_triangle(const Mesh &Th2, map< int, int > &maptrimil,
179 map< int, int > &maptrizmax, map< int, int > &maptrizmin) {
180 int numero_label = 0;
181
182 for (int ii = 0; ii < Th2.nt; ii++) {
183 const Mesh::Triangle &K(Th2.t(ii));
184 map< int, int >::const_iterator imap = maptrizmax.find(K.lab);
185
186 if (imap == maptrizmax.end( )) {
187 maptrizmax[K.lab] = numero_label;
188 numero_label = numero_label + 1;
189 }
190 }
191
192 for (int ii = 0; ii < Th2.nt; ii++) {
193 const Mesh::Triangle &K(Th2.t(ii));
194 map< int, int >::const_iterator imap = maptrizmin.find(K.lab);
195
196 if (imap == maptrizmin.end( )) {
197 maptrizmin[K.lab] = numero_label;
198 numero_label = numero_label + 1;
199 }
200 }
201
202 for (int ii = 0; ii < Th2.neb; ii++) {
203 const Mesh::BorderElement &K(Th2.be(ii));
204 map< int, int >::const_iterator imap = maptrimil.find(K.lab);
205
206 if (imap == maptrimil.end( )) {
207 maptrimil[K.lab] = numero_label;
208 numero_label = numero_label + 1;
209 }
210 }
211
212 map< int, int >::iterator ip;
213 cout << "maptrizmax." << endl;
214
215 for (ip = maptrizmax.begin( ); ip != maptrizmax.end( ); ip++) {
216 cout << ip->first << "<->" << ip->second << endl;
217 }
218
219 cout << "maptrizmin." << endl;
220
221 for (ip = maptrizmin.begin( ); ip != maptrizmin.end( ); ip++) {
222 cout << ip->first << "<->" << ip->second << endl;
223 }
224
225 cout << "number of triangle label =" << numero_label << endl;
226}
227
228void build_layer_map_edge(const Mesh &Th2, map< int, int > &mapemil, map< int, int > &mapezmax,
229 map< int, int > &mapezmin) {

Callers 1

buildlayer.cppFile · 0.70

Calls 3

findMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected