HOSurfaceMesh.cpp 18.1 KB
Newer Older
Michael Turner's avatar
Michael Turner committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
////////////////////////////////////////////////////////////////////////////////
//
//  File: SurfaceMeshing.cpp
//
//  For more information, please see: http://www.nektar.info/
//
//  The MIT License
//
//  Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
//  Department of Aeronautics, Imperial College London (UK), and Scientific
//  Computing and Imaging Institute, University of Utah (USA).
//
//  License for the specific language governing rights and limitations under
//  Permission is hereby granted, free of charge, to any person obtaining a
//  copy of this software and associated documentation files (the "Software"),
//  to deal in the Software without restriction, including without limitation
//  the rights to use, copy, modify, merge, publish, distribute, sublicense,
//  and/or sell copies of the Software, and to permit persons to whom the
//  Software is furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included
//  in all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
//  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
//  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
//  DEALINGS IN THE SOFTWARE.
//
//  Description: surfacemeshing object methods.
//
////////////////////////////////////////////////////////////////////////////////

#include <list>
Michael Turner's avatar
Michael Turner committed
37
#include <algorithm>
Michael Turner's avatar
Michael Turner committed
38
39

#include <NekMeshUtils/SurfaceMeshing/HOSurfaceMesh.h>
Michael Turner's avatar
Michael Turner committed
40
#include <NekMeshUtils/Optimisation/BGFS-B.h>
41
#include <NekMeshUtils/SurfaceMeshing/OptimiseFunctions.h>
Michael Turner's avatar
Michael Turner committed
42
43
#include <NekMeshUtils/CADSystem/CADCurve.h>
#include <NekMeshUtils/CADSystem/CADSurf.h>
Michael Turner's avatar
Michael Turner committed
44
45
46
47
48
49
50
51

#include <LibUtilities/BasicUtils/Progressbar.hpp>
#include <LocalRegions/MatrixKey.h>
#include <LibUtilities/Foundations/ManagerAccess.h>

using namespace std;
namespace Nektar
{
52
namespace NekMeshUtils
Michael Turner's avatar
Michael Turner committed
53
54
{

Michael Turner's avatar
Michael Turner committed
55
56
57
58
59
60
61
ModuleKey HOSurfaceMesh::className = GetModuleFactory().RegisterCreatorFunction(
    ModuleKey(eProcessModule, "hosurface"),
    HOSurfaceMesh::create,
    "Generates a high-order surface mesh based on CAD");

HOSurfaceMesh::HOSurfaceMesh(MeshSharedPtr m) : ProcessModule(m)
{
Michael Turner's avatar
Michael Turner committed
62
63
    m_config["opti"] =
        ConfigOption(true, "0", "Perform edge node optimisation.");
Michael Turner's avatar
Michael Turner committed
64
65
66
67
68
69
70
}

HOSurfaceMesh::~HOSurfaceMesh()
{
}

void HOSurfaceMesh::Process()
Michael Turner's avatar
Michael Turner committed
71
{
72
    if (m_mesh->m_verbose)
Michael Turner's avatar
Michael Turner committed
73
74
        cout << endl << "\tHigh-Order Surface meshing" << endl;

Michael Turner's avatar
Michael Turner committed
75
    LibUtilities::PointsKey ekey(m_mesh->m_nummode,
Michael Turner's avatar
Michael Turner committed
76
77
78
79
80
                                 LibUtilities::eGaussLobattoLegendre);
    Array<OneD, NekDouble> gll;

    LibUtilities::PointsManager()[ekey]->GetPoints(gll);

81
    LibUtilities::PointsKey pkey(m_mesh->m_nummode,
Michael Turner's avatar
Michael Turner committed
82
83
                                 LibUtilities::eNodalTriElec);

84
    Array<OneD, NekDouble> u, v;
Michael Turner's avatar
Michael Turner committed
85

86
    int nq = m_mesh->m_nummode;
Michael Turner's avatar
Michael Turner committed
87

Michael Turner's avatar
Michael Turner committed
88
89
90
91
    int np = nq * (nq + 1) / 2;

    int ni = (nq-2)*(nq-3) / 2;

Michael Turner's avatar
Michael Turner committed
92
93
94
95
    int npq = nq * nq;

    int niq = npq - 4 - 4*(nq-2);

96
    LibUtilities::PointsManager()[pkey]->GetPoints(u, v);
Michael Turner's avatar
Michael Turner committed
97

Michael Turner's avatar
Michael Turner committed
98
    bool qOpti = m_config["opti"].beenSet;
99

100
    // loop over all the faces in the surface mesh, check all three edges for
101
    // high order info, if nothing high-order the edge.
Michael Turner's avatar
Michael Turner committed
102

Michael Turner's avatar
Michael Turner committed
103
104
105
106
107
108
109
110
111
112
    EdgeSet surfaceEdges;
    EdgeSet completedEdges;

    for(int i = 0; i < m_mesh->m_element[2].size(); i++)
    {
        vector<EdgeSharedPtr> es = m_mesh->m_element[2][i]->GetEdgeList();
        for(int j = 0; j < es.size(); j++)
            surfaceEdges.insert(es[j]);
    }

113
    for (int i = 0; i < m_mesh->m_element[2].size(); i++)
Michael Turner's avatar
Michael Turner committed
114
    {
115
        if (m_mesh->m_verbose)
116
        {
117
118
            LibUtilities::PrintProgressbar(
                i, m_mesh->m_element[2].size(), "\t\tSurface elements");
119
120
        }

Michael Turner's avatar
Michael Turner committed
121
122
123
        CADObjectSharedPtr o = m_mesh->m_element[2][i]->m_parentCAD;
        CADSurfSharedPtr s = boost::dynamic_pointer_cast<CADSurf>(o);
        int surf = s->GetId();
124

125
        FaceSharedPtr f = m_mesh->m_element[2][i]->GetFaceLink();
Michael Turner's avatar
Michael Turner committed
126

127
128
129
130
131
132
133
134
        if(!f)
        {
            f = boost::shared_ptr<Face>(new Face(m_mesh->m_element[2][i]->GetVertexList(),
                                                 vector<NodeSharedPtr>(),
                                                 m_mesh->m_element[2][i]->GetEdgeList(),
                                                 LibUtilities::ePolyEvenlySpaced));
        }

Michael Turner's avatar
Michael Turner committed
135
        f->m_parentCAD = s;
Michael Turner's avatar
Michael Turner committed
136

137
        vector<EdgeSharedPtr> edges = f->m_edgeList;
138
        for (int j = 0; j < edges.size(); j++)
139
        {
Michael Turner's avatar
Michael Turner committed
140
            EdgeSharedPtr e = edges[j];
141
142
143
            // test insert the edge into completedEdges
            // if the edge already exists move on
            // if not figure out its high-order information
144

Michael Turner's avatar
Michael Turner committed
145
            EdgeSet::iterator test = completedEdges.find(e);
146

147
            if (test != completedEdges.end())
148
            {
149
150
151
                continue;
            }

152
153
            // the edges in the element are different to those in the face
            // the cad information is stored in the element edges which are not
Michael Turner's avatar
Michael Turner committed
154
            // in the m_mesh->m_edgeSet groups
155
156
            // need to link them together and copy the cad information to be
            // able to identify how to make it high-order
Michael Turner's avatar
Michael Turner committed
157
158
            EdgeSet::iterator it = surfaceEdges.find(e);
            ASSERTL0(it != surfaceEdges.end(),"could not find edge in surface");
Michael Turner's avatar
Michael Turner committed
159
160
161
162
163
164
165
166
167

            if((*it)->m_parentCAD)
            {
                e->m_parentCAD = (*it)->m_parentCAD;
            }
            else
            {
                e->m_parentCAD = s;
            }
Michael Turner's avatar
Michael Turner committed
168
169

            vector<NodeSharedPtr> honodes(m_mesh->m_nummode - 2);
170

Michael Turner's avatar
Michael Turner committed
171
            if (e->m_parentCAD->GetType() == CADType::eCurve)
172
            {
Michael Turner's avatar
Michael Turner committed
173
174
                int cid             = e->m_parentCAD->GetId();
                CADCurveSharedPtr c = boost::dynamic_pointer_cast<CADCurve>(e->m_parentCAD);
175
176
                NekDouble tb        = e->m_n1->GetCADCurveInfo(cid);
                NekDouble te        = e->m_n2->GetCADCurveInfo(cid);
177

178
                // distrobute points along curve as inital guess
179
                Array<OneD, NekDouble> ti(m_mesh->m_nummode);
180
                for (int k = 0; k < m_mesh->m_nummode; k++)
181
                {
182
183
                    ti[k] =
                        tb * (1.0 - gll[k]) / 2.0 + te * (1.0 + gll[k]) / 2.0;
184
                }
185

Michael Turner's avatar
Michael Turner committed
186
                if(qOpti)
187
                {
Michael Turner's avatar
Michael Turner committed
188
189
190
191
192
                    Array<OneD, NekDouble> xi(nq - 2);
                    for (int k = 1; k < nq - 1; k++)
                    {
                        xi[k - 1] = ti[k];
                    }
Michael Turner's avatar
Michael Turner committed
193

Michael Turner's avatar
Michael Turner committed
194
195
                    OptiEdgeSharedPtr opti =
                        MemoryManager<OptiEdge>::AllocateSharedPtr(ti, gll, c);
Michael Turner's avatar
changes    
Michael Turner committed
196

Michael Turner's avatar
Michael Turner committed
197
198
                    DNekMat B(
                        nq - 2, nq - 2, 0.0); // approximate hessian (I to start)
199
                    for (int k = 0; k < nq - 2; k++)
200
                    {
Michael Turner's avatar
Michael Turner committed
201
                        B(k, k) = 1.0;
202
                    }
Michael Turner's avatar
Michael Turner committed
203
204
205
206
                    DNekMat H(nq - 2,
                              nq - 2,
                              0.0); // approximate inverse hessian (I to start)
                    for (int k = 0; k < nq - 2; k++)
207
                    {
Michael Turner's avatar
Michael Turner committed
208
                        H(k, k) = 1.0;
209
                    }
Michael Turner's avatar
Michael Turner committed
210
211
212

                    DNekMat J = opti->dF(xi);

mike turner's avatar
mike turner committed
213
                    Array<OneD, NekDouble> bnds = c->GetBounds();
Michael Turner's avatar
Michael Turner committed
214
215
216
217

                    bool repeat = true;
                    int itct = 0;
                    while (repeat)
Michael Turner's avatar
Michael Turner committed
218
                    {
Michael Turner's avatar
Michael Turner committed
219
220
                        NekDouble Norm = 0;
                        for (int k = 0; k < nq - 2; k++)
Michael Turner's avatar
Michael Turner committed
221
                        {
Michael Turner's avatar
Michael Turner committed
222
223
                            Norm += J(k, 0) * J(k, 0) / (bnds[1] - bnds[0]) /
                                    (bnds[1] - bnds[0]);
Michael Turner's avatar
Michael Turner committed
224
                        }
Michael Turner's avatar
Michael Turner committed
225
                        Norm = sqrt(Norm);
226

Michael Turner's avatar
Michael Turner committed
227
228
229
230
231
232
                        if (Norm < 1E-8)
                        {
                            repeat = false;
                            break;
                        }
                        if (itct > 1000)
233
                        {
Michael Turner's avatar
Michael Turner committed
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
                            cout << "failed to optimise on curve" << endl;
                            for (int k = 0; k < nq; k++)
                            {
                                ti[k] = tb * (1.0 - gll[k]) / 2.0 +
                                        te * (1.0 + gll[k]) / 2.0;
                            }
                            break;
                        }
                        itct++;

                        if (!BGFSUpdate(opti, J, B, H))
                        {
                            if(m_mesh->m_verbose)
                            {
                                cout << "BFGS reported no update, curve on "
                                    << c->GetId() << endl;
                            }
                            break;
252
                        }
Michael Turner's avatar
changes    
Michael Turner committed
253
                    }
Michael Turner's avatar
Michael Turner committed
254
255
                    // need to pull the solution out of opti
                    ti = opti->GetSolution();
256
                }
257
                vector<pair<CADSurfSharedPtr, CADOrientation::Orientation> > s = c->GetAdjSurf();
258

259
                for (int k = 1; k < m_mesh->m_nummode - 1; k++)
260
261
                {
                    Array<OneD, NekDouble> loc = c->P(ti[k]);
262
263
                    NodeSharedPtr nn = boost::shared_ptr<Node>(
                        new Node(0, loc[0], loc[1], loc[2]));
264
265

                    nn->SetCADCurve(cid, c, ti[k]);
266
267
                    for(int m = 0; m < s.size(); m++)
                    {
mike turner's avatar
mike turner committed
268
269
                        Array<OneD, NekDouble> uv = s[m].first->locuv(loc);
                        nn->SetCADSurf(s[m].first->GetId(), s[m].first, uv);
270
271
                    }

272
                    honodes[k - 1] = nn;
273
274
275
276
                }
            }
            else
            {
277
278
                // edge is on surface and needs 2d optimisation
                Array<OneD, NekDouble> uvb, uve;
279
280
                uvb = e->m_n1->GetCADSurfInfo(surf);
                uve = e->m_n2->GetCADSurfInfo(surf);
Michael Turner's avatar
Michael Turner committed
281

282
                Array<OneD, Array<OneD, NekDouble> > uvi(nq);
283
                for (int k = 0; k < nq; k++)
284
                {
285
286
287
288
289
290
                    Array<OneD, NekDouble> uv(2);
                    uv[0] = uvb[0] * (1.0 - gll[k]) / 2.0 +
                            uve[0] * (1.0 + gll[k]) / 2.0;
                    uv[1] = uvb[1] * (1.0 - gll[k]) / 2.0 +
                            uve[1] * (1.0 + gll[k]) / 2.0;
                    uvi[k] = uv;
291
292
                }

Michael Turner's avatar
Michael Turner committed
293
                if(qOpti)
294
                {
Michael Turner's avatar
Michael Turner committed
295
296
297
298
299
300
301
                    Array<OneD, NekDouble> bnds = s->GetBounds();
                    Array<OneD, NekDouble> all(2 * nq);
                    for (int k = 0; k < nq; k++)
                    {
                        all[k * 2 + 0] = uvi[k][0];
                        all[k * 2 + 1] = uvi[k][1];
                    }
302

Michael Turner's avatar
Michael Turner committed
303
304
305
306
307
308
                    Array<OneD, NekDouble> xi(2 * (nq - 2));
                    for (int k = 1; k < nq - 1; k++)
                    {
                        xi[(k - 1) * 2 + 0] = all[k * 2 + 0];
                        xi[(k - 1) * 2 + 1] = all[k * 2 + 1];
                    }
309

Michael Turner's avatar
Michael Turner committed
310
311
                    OptiEdgeSharedPtr opti =
                        MemoryManager<OptiEdge>::AllocateSharedPtr(all, gll, s);
312

Michael Turner's avatar
Michael Turner committed
313
314
315
316
317
318
319
320
321
322
323
324
325
326
                    DNekMat B(2 * (nq - 2),
                              2 * (nq - 2),
                              0.0); // approximate hessian (I to start)
                    for (int k = 0; k < 2 * (nq - 2); k++)
                    {
                        B(k, k) = 1.0;
                    }
                    DNekMat H(2 * (nq - 2),
                              2 * (nq - 2),
                              0.0); // approximate inverse hessian (I to start)
                    for (int k = 0; k < 2 * (nq - 2); k++)
                    {
                        H(k, k) = 1.0;
                    }
Michael Turner's avatar
Michael Turner committed
327

Michael Turner's avatar
Michael Turner committed
328
                    DNekMat J = opti->dF(xi);
Michael Turner's avatar
Michael Turner committed
329

Michael Turner's avatar
Michael Turner committed
330
331
332
                    bool repeat = true;
                    int itct    = 0;
                    while (repeat)
333
                    {
Michael Turner's avatar
Michael Turner committed
334
335
                        NekDouble Norm = 0;
                        for (int k = 0; k < 2 * (nq - 2); k++)
Michael Turner's avatar
changes    
Michael Turner committed
336
                        {
Michael Turner's avatar
Michael Turner committed
337
338
339
340
341
342
343
344
345
346
                            if (k % 2 == 0)
                            {
                                Norm += J(k, 0) * J(k, 0) / (bnds[1] - bnds[0]) /
                                        (bnds[1] - bnds[0]);
                            }
                            else
                            {
                                Norm += J(k, 0) * J(k, 0) / (bnds[3] - bnds[2]) /
                                        (bnds[3] - bnds[2]);
                            }
Michael Turner's avatar
changes    
Michael Turner committed
347
                        }
Michael Turner's avatar
Michael Turner committed
348
349
350
                        Norm = sqrt(Norm);

                        if (Norm < 1E-8)
Michael Turner's avatar
changes    
Michael Turner committed
351
                        {
Michael Turner's avatar
Michael Turner committed
352
353
                            repeat = false;
                            break;
Michael Turner's avatar
changes    
Michael Turner committed
354
                        }
355

Michael Turner's avatar
Michael Turner committed
356
                        if (itct > 1000)
357
                        {
Michael Turner's avatar
Michael Turner committed
358
359
360
361
362
363
364
365
366
367
368
                            cout << "failed to optimise on edge" << endl;
                            for (int k = 0; k < nq; k++)
                            {
                                Array<OneD, NekDouble> uv(2);
                                uv[0] = uvb[0] * (1.0 - gll[k]) / 2.0 +
                                        uve[0] * (1.0 + gll[k]) / 2.0;
                                uv[1] = uvb[1] * (1.0 - gll[k]) / 2.0 +
                                        uve[1] * (1.0 + gll[k]) / 2.0;
                                uvi[k] = uv;
                            }
                            break;
369
                        }
Michael Turner's avatar
Michael Turner committed
370
                        itct++;
371

Michael Turner's avatar
Michael Turner committed
372
                        if (!BGFSUpdate(opti, J, B, H))
373
                        {
Michael Turner's avatar
Michael Turner committed
374
375
376
377
378
379
380
                            if(m_mesh->m_verbose)
                            {
                                cout << "BFGS reported no update, edge on " << surf
                                    << endl;
                            }
                            // exit(-1);
                            break;
381
                        }
Michael Turner's avatar
changes    
Michael Turner committed
382
                    }
383

Michael Turner's avatar
Michael Turner committed
384
                    all = opti->GetSolution();
385

Michael Turner's avatar
Michael Turner committed
386
387
388
389
390
391
392
                    // need to put all backinto uv
                    for (int k = 0; k < nq; k++)
                    {
                        uvi[k][0] = all[k * 2 + 0];
                        uvi[k][1] = all[k * 2 + 1];
                    }
                }
393

394
                for (int k = 1; k < nq - 1; k++)
395
396
                {
                    Array<OneD, NekDouble> loc;
397
398
399
                    loc              = s->P(uvi[k]);
                    NodeSharedPtr nn = boost::shared_ptr<Node>(
                        new Node(0, loc[0], loc[1], loc[2]));
400
                    nn->SetCADSurf(s->GetId(), s, uvi[k]);
401
                    honodes[k - 1] = nn;
402
403
                }
            }
Michael Turner's avatar
Michael Turner committed
404
405
406
407

            e->m_edgeNodes = honodes;
            e->m_curveType = LibUtilities::eGaussLobattoLegendre;
            completedEdges.insert(e);
Michael Turner's avatar
Michael Turner committed
408
409
        }

Michael Turner's avatar
Michael Turner committed
410
        //just add the face interior nodes through interp and project
Michael Turner's avatar
Michael Turner committed
411
        vector<NodeSharedPtr> vertices = f->m_vertexList;
412

Michael Turner's avatar
Michael Turner committed
413
        SpatialDomains::GeometrySharedPtr geom = f->GetGeom(3);
414
415
416
417
418
419
        geom->FillGeom();
        StdRegions::StdExpansionSharedPtr xmap = geom->GetXmap();
        Array<OneD, NekDouble> coeffs0 = geom->GetCoeffs(0);
        Array<OneD, NekDouble> coeffs1 = geom->GetCoeffs(1);
        Array<OneD, NekDouble> coeffs2 = geom->GetCoeffs(2);

Michael Turner's avatar
Michael Turner committed
420
421
422
        Array<OneD, NekDouble> xc(xmap->GetTotPoints());
        Array<OneD, NekDouble> yc(xmap->GetTotPoints());
        Array<OneD, NekDouble> zc(xmap->GetTotPoints());
423
424
425
426
427

        xmap->BwdTrans(coeffs0,xc);
        xmap->BwdTrans(coeffs1,yc);
        xmap->BwdTrans(coeffs2,zc);

Michael Turner's avatar
Michael Turner committed
428
        if(vertices.size() == 3)
Michael Turner's avatar
Michael Turner committed
429
        {
Michael Turner's avatar
Michael Turner committed
430
431
432
            //build an array of all uvs
            vector<Array<OneD, NekDouble> > uvi;
            for(int j = np-ni; j < np; j++)
433
            {
Michael Turner's avatar
Michael Turner committed
434
435
436
437
438
439
440
441
442
443
444
445
446
                Array<OneD, NekDouble> xp(2);
                xp[0] = u[j];
                xp[1] = v[j];

                Array<OneD, NekDouble> loc(3);
                loc[0] = xmap->PhysEvaluate(xp, xc);
                loc[1] = xmap->PhysEvaluate(xp, yc);
                loc[2] = xmap->PhysEvaluate(xp, zc);

                Array<OneD, NekDouble> uv(2);
                s->ProjectTo(loc,uv);
                uvi.push_back(uv);

447
            }
Michael Turner's avatar
Michael Turner committed
448
449
450

            vector<NodeSharedPtr> honodes;
            for(int j = 0; j < ni; j++)
451
            {
Michael Turner's avatar
Michael Turner committed
452
453
454
455
456
457
                Array<OneD, NekDouble> loc;
                loc = s->P(uvi[j]);
                NodeSharedPtr nn = boost::shared_ptr<Node>(new
                                                Node(0,loc[0],loc[1],loc[2]));
                nn->SetCADSurf(surf, s, uvi[j]);
                honodes.push_back(nn);
Michael Turner's avatar
Michael Turner committed
458
459
            }

Michael Turner's avatar
Michael Turner committed
460
461
            f->m_faceNodes = honodes;
            f->m_curveType = LibUtilities::eNodalTriElec;
462
        }
Michael Turner's avatar
Michael Turner committed
463
        else if(vertices.size() == 4)
464
        {
Michael Turner's avatar
Michael Turner committed
465
466
467
468
469
470
471
472
473
            //build an array of all uvs
            vector<Array<OneD, NekDouble> > uvi;
            for(int i = 1; i < nq - 1; i++)
            {
                for(int j = 1; j < nq - 1; j++)
                {
                    Array<OneD, NekDouble> xp(2);
                    xp[0] = gll[j];
                    xp[1] = gll[i];
474

Michael Turner's avatar
Michael Turner committed
475
476
477
478
                    Array<OneD, NekDouble> loc(3);
                    loc[0] = xmap->PhysEvaluate(xp, xc);
                    loc[1] = xmap->PhysEvaluate(xp, yc);
                    loc[2] = xmap->PhysEvaluate(xp, zc);
479

Michael Turner's avatar
Michael Turner committed
480
481
482
                    Array<OneD, NekDouble> uv(2);
                    s->ProjectTo(loc,uv);
                    uvi.push_back(uv);
483

Michael Turner's avatar
Michael Turner committed
484
                }
Michael Turner's avatar
Michael Turner committed
485
            }
486

Michael Turner's avatar
Michael Turner committed
487
488
            vector<NodeSharedPtr> honodes;
            for(int j = 0; j < niq; j++)
489
            {
Michael Turner's avatar
Michael Turner committed
490
491
492
493
494
495
                Array<OneD, NekDouble> loc;
                loc = s->P(uvi[j]);
                NodeSharedPtr nn = boost::shared_ptr<Node>(new
                                                Node(0,loc[0],loc[1],loc[2]));
                nn->SetCADSurf(surf, s, uvi[j]);
                honodes.push_back(nn);
496
            }
497

Michael Turner's avatar
Michael Turner committed
498
499
            f->m_faceNodes = honodes;
            f->m_curveType = LibUtilities::eGaussLobattoLegendre;
500
        }
501
    }
Michael Turner's avatar
Michael Turner committed
502

503
    if (m_mesh->m_verbose)
504
        cout << endl;
505
}
Michael Turner's avatar
Michael Turner committed
506
507
}
}