Nektar++
MoveMeshToCriticalLayer.cpp
Go to the documentation of this file.
1///////////////////////////////////////////////////////////////////////////////
2//
3// File: MoveMeshToCriticalLayer.cpp
4//
5// For more information, please see: http://www.nektar.info
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description: MoveMesh to critical layer
32//
33///////////////////////////////////////////////////////////////////////////////
34
35#include <cstdio>
36#include <cstdlib>
37#include <iomanip>
38
42#include <tinyxml.h>
43
44using namespace std;
45using namespace Nektar;
46
48
50{
55};
56
58{
59 vector<NekDouble> kspring;
60 vector<int> springVid;
62};
63
64void GetInterfaceVerts(const int compositeID,
66 vector<int> &InterfaceVerts);
67
70 string &fieldfile, Array<OneD, NekDouble> &xc,
72
73void GetNewVertexLocation(TiXmlElement *doc,
75 vector<int> &InterfaceVerts,
79 Array<OneD, NekDouble> &verty, int maxiter);
80
81void TurnOffEdges(TiXmlElement *doc, SpatialDomains::SegGeomMap &meshedges,
83
84void RedefineVertices(TiXmlElement *doc, Array<OneD, NekDouble> &dvertx,
86
90
91int main(int argc, char *argv[])
92{
93 if (argc != 4)
94 {
95 fprintf(
96 stderr,
97 "Usage: ./MoveMeshToCriticalLayer meshfile streakfile outfile\n");
98 exit(1);
99 }
100
101 //------------------------------------------------------------
102 // Create Session file by reading only first meshfile
103 //-----------------------------------------------------------
105 LibUtilities::SessionReader::CreateInstance(2, argv);
107 SpatialDomains::MeshGraphIO::Read(vSession);
108
109 //-------------------------------------------------------------
110 // Read in mesh from input file
111 //------------------------------------------------------------
112 TiXmlDocument &meshdoc = vSession->GetDocument();
113 TiXmlHandle docHandle(&meshdoc);
114 TiXmlElement *doc = docHandle.FirstChildElement("NEKTAR")
115 .FirstChildElement("GEOMETRY")
116 .Element();
117
118 //------------------------------------------------------------
119 // Get list of vertices along interface
120 //------------------------------------------------------------
121 vector<int> InterfaceVerts;
122 GetInterfaceVerts(300, mesh, InterfaceVerts);
123
124 //------------------------------------------------------------
125 // Determine location of new interface vertices
126 //------------------------------------------------------------
127 Array<OneD, NekDouble> xstreak(50), ystreak(50);
128 string fieldfile(argv[argc - 2]);
129 GetStreakLocation(vSession, mesh, fieldfile, xstreak, ystreak);
130
131 //------------------------------------------------------------
132 // Move internal mesh using critical layer info and under string analogy
133 //------------------------------------------------------------
134 Array<OneD, NekDouble> dvertx(mesh->GetNvertices(), 0.0),
135 dverty(mesh->GetNvertices(), 0.0);
136 int maxiter;
137 vSession->LoadParameter("MoveMeshMaxIterations", maxiter, 100);
138
139 GetNewVertexLocation(doc, mesh, InterfaceVerts, xstreak, ystreak, dvertx,
140 dverty, maxiter);
141
142 //------------------------------------------------------------
143 // Enforce rotational symmetry on mesh
144 //------------------------------------------------------------
145 if (vSession->DefinesSolverInfo("EnforceRotationalSymmetry"))
146 {
147 EnforceRotationalSymmetry(mesh, dvertx, dverty);
148 }
149
150 //------------------------------------------------------------
151 // Redfine vertices in doc
152 //------------------------------------------------------------
153 RedefineVertices(doc, dvertx, dverty);
154
155 //------------------------------------------------------------
156 // Write out moved mesh file
157 //------------------------------------------------------------
158 std::string outfile(argv[argc - 1]);
159 meshdoc.SaveFile(outfile);
160}
161
162void GetInterfaceVerts(const int compositeID,
164 vector<int> &InterfaceVerts)
165{
167 composite = mesh->GetComposite(compositeID);
168 int compsize = composite->m_geomVec.size();
169 map<int, int> vertmap;
170
171 for (int i = 0; i < compsize; ++i)
172 {
173 if (vertmap.count(composite->m_geomVec[i]->GetVid(0)) == 0)
174 {
175 InterfaceVerts.push_back(composite->m_geomVec[i]->GetVid(0));
176 vertmap[composite->m_geomVec[i]->GetVid(0)] = 1;
177 }
178
179 if (vertmap.count(composite->m_geomVec[i]->GetVid(1)) == 0)
180 {
181 InterfaceVerts.push_back(composite->m_geomVec[i]->GetVid(1));
182 vertmap[composite->m_geomVec[i]->GetVid(1)] = 1;
183 }
184 }
185}
186
189 string &fieldfile, Array<OneD, NekDouble> &xc,
191{
192 //-------------------------------------------------------------
193 // Define Streak Expansion
195
196 streak =
198 //---------------------------------------------------------------
199
200 //----------------------------------------------
201 // Import field file.
202 vector<LibUtilities::FieldDefinitionsSharedPtr> fielddef;
203 vector<vector<NekDouble>> fielddata;
204 LibUtilities::Import(fieldfile, fielddef, fielddata);
205 //----------------------------------------------
206
207 //----------------------------------------------
208 // Copy data from field file
209 string streak_field("w");
210 for (unsigned int i = 0; i < fielddata.size(); ++i)
211 {
212 streak->ExtractDataToCoeffs(fielddef[i], fielddata[i], streak_field,
213 streak->UpdateCoeffs());
214 }
215 //----------------------------------------------
216
217 NekDouble cr = 0.0;
218
219 cerr << "Extracting Critical Layer ";
220 Computestreakpositions(streak, xc, yc, cr);
221}
222
223void GetNewVertexLocation(TiXmlElement *doc,
225 vector<int> &InterfaceVerts,
226 Array<OneD, NekDouble> &xstreak,
227 Array<OneD, NekDouble> &ystreak,
229 Array<OneD, NekDouble> &dverty, int maxiter)
230{
231 int i, j, k;
232 int nverts = mesh->GetNvertices();
233
234 SpatialDomains::SegGeomMap meshedges = mesh->GetAllSegGeoms();
235
236 Array<OneD, MoveVerts> Verts(nverts);
237
238 // loop mesh edges and fill in verts info
241
242 int vid0, vid1;
243 NekDouble kspring;
244 NekDouble x, y, x1, y1, z1, x2, y2, z2;
245
246 // Setup intiial spring and verts
247 for (auto &segIter : meshedges)
248 {
249 vid0 = (segIter.second)->GetVid(0);
250 vid1 = (segIter.second)->GetVid(1);
251
252 v0 = (segIter.second)->GetVertex(0);
253 v1 = (segIter.second)->GetVertex(1);
254
255 kspring = 1.0 / v0->dist(*v1);
256
257 Verts[vid0].kspring.push_back(kspring);
258 Verts[vid0].springVid.push_back(vid1);
259 Verts[vid1].kspring.push_back(kspring);
260 Verts[vid1].springVid.push_back(vid0);
261 }
262
263 // Scale spring by total around vertex and turn on all vertices.
264 for (i = 0; i < nverts; ++i)
265 {
266 NekDouble invktot = 0.0;
267 for (j = 0; j < Verts[i].kspring.size(); ++j)
268 {
269 invktot += Verts[i].kspring[j];
270 }
271 invktot = 1.0 / invktot;
272 for (j = 0; j < Verts[i].kspring.size(); ++j)
273 {
274 Verts[i].kspring[j] *= invktot;
275 }
276
277 Verts[i].solve = eSolveXY;
278 }
279
280 // Turn off all edges defined by composite lists of correct dimension
281 TurnOffEdges(doc, meshedges, Verts);
282
283 NekDouble z, h0, h1, h2;
284 // Set interface vertices to lie on critical layer
285 for (i = 0; i < InterfaceVerts.size(); ++i)
286 {
287 Verts[InterfaceVerts[i]].solve = eNoSolve;
288 mesh->GetVertex(InterfaceVerts[i])->GetCoords(x, y, z);
289
290 for (j = 0; j < xstreak.size() - 1; ++j)
291 {
292 if ((x >= xstreak[j]) && (x <= xstreak[j + 1]))
293 {
294 break;
295 }
296 }
297
298 ASSERTL0(j != xstreak.size(),
299 "Did not find x location along critical layer");
300
301 k = (j == 0) ? 1 : j; // offset index at beginning
302
303 // quadraticalling interpolate points
304 h0 =
305 (x - xstreak[k]) * (x - xstreak[k + 1]) /
306 ((xstreak[k - 1] - xstreak[k]) * (xstreak[k - 1] - xstreak[k + 1]));
307 h1 = (x - xstreak[k - 1]) * (x - xstreak[k + 1]) /
308 ((xstreak[k] - xstreak[k - 1]) * (xstreak[k] - xstreak[k + 1]));
309 h2 =
310 (x - xstreak[k - 1]) * (x - xstreak[k]) /
311 ((xstreak[k + 1] - xstreak[k - 1]) * (xstreak[k + 1] - xstreak[k]));
312
313 dvertx[InterfaceVerts[i]] =
314 (xstreak[k - 1] * h0 + xstreak[k] * h1 + xstreak[k + 1] * h2) - x;
315 dverty[InterfaceVerts[i]] =
316 (ystreak[k - 1] * h0 + ystreak[k] * h1 + ystreak[k + 1] * h2) - y;
317 }
318
319 // shift quads in critical layer to move more or less rigidly
320 SpatialDomains::QuadGeomMap quadgeom = mesh->GetAllQuadGeoms();
321 for (auto &quadIter : quadgeom)
322 {
323 for (i = 0; i < 4; ++i)
324 {
325 vid0 = (quadIter.second)->GetVid(i);
326
327 switch (Verts[vid0].solve)
328 {
329 case eSolveXY:
330 {
331 mesh->GetVertex(vid0)->GetCoords(x, y, z);
332
333 // find nearest interface vert
334 mesh->GetVertex(InterfaceVerts[0])->GetCoords(x1, y1, z1);
335 for (j = 0; j < InterfaceVerts.size() - 1; ++j)
336 {
337 mesh->GetVertex(InterfaceVerts[j + 1])
338 ->GetCoords(x2, y2, z2);
339 if ((x >= x1) && (x < x2))
340 {
341 break;
342 }
343 x1 = x2;
344 y1 = y2;
345 }
346
347 // currently just shift vert as average of two sides
348 dvertx[vid0] =
349 (x2 - x) / (x2 - x1) * dvertx[InterfaceVerts[j]] +
350 (x - x1) / (x2 - x1) * dvertx[InterfaceVerts[j + 1]];
351 dverty[vid0] =
352 (x2 - x) / (x2 - x1) * dverty[InterfaceVerts[j]] +
353 (x - x1) / (x2 - x1) * dverty[InterfaceVerts[j + 1]];
354 }
355 break;
356 case eSolveY:
357 {
358 mesh->GetVertex(vid0)->GetCoords(x, y, z);
359 mesh->GetVertex(InterfaceVerts[0])->GetCoords(x1, y1, z1);
360
361 if (fabs(x - x1) < 1e-6)
362 {
363 dverty[vid0] = dverty[InterfaceVerts[0]];
364 }
365 else
366 {
367 dverty[vid0] =
368 dverty[InterfaceVerts[InterfaceVerts.size() - 1]];
369 }
370 }
371 break;
372 default:
373 break;
374 }
375 Verts[vid0].solve = eNoSolve;
376 }
377 }
378
379 // Iterate internal vertices
380 bool ContinueToIterate = true;
381 int cnt = 0;
382 int nsum = 0;
383 NekDouble dsum, dx, dy, sum, prev_sum = 0.0;
384 NekDouble tol = 1e-3, fac;
385 int blend = 50;
386
387 while (ContinueToIterate)
388 {
389
390 sum = 0.0;
391 nsum = 0;
392
393 // use a ramping function to help move interior slowly
394 fac = (cnt < blend) ? 1.0 / (blend + 1.0) * (cnt + 1) : 1.0;
395
396 for (i = 0; i < nverts; ++i)
397 {
398 if (Verts[i].solve != eNoSolve)
399 {
400 dx = dy = 0.0;
401
402 if ((Verts[i].solve == eSolveX) || (Verts[i].solve == eSolveXY))
403 {
404 for (j = 0; j < Verts[i].kspring.size(); ++j)
405 {
406 dx += fac * Verts[i].kspring[j] *
407 dvertx[Verts[i].springVid[j]];
408 }
409 }
410
411 if ((Verts[i].solve == eSolveY) || (Verts[i].solve == eSolveXY))
412 {
413 for (j = 0; j < Verts[i].kspring.size(); ++j)
414 {
415 dy += fac * Verts[i].kspring[j] *
416 dverty[Verts[i].springVid[j]];
417 }
418 }
419
420 dsum = (dx * dx + dy * dy);
421
422 dvertx[i] = dx;
423 dverty[i] = dy;
424
425 if (dsum > 1e-16)
426 {
427 // sum += dsum/(dvertx[i]*dvertx[i] + dverty[i]*dverty[i]);
428 sum += dsum;
429 nsum += 1;
430 }
431 }
432 }
433
434 if (nsum)
435 {
436 sum = sqrt(sum / (NekDouble)nsum);
437
438 NekDouble chg = sum - prev_sum;
439 prev_sum = sum;
440
441 cerr << "Iteration " << cnt << " : " << chg << endl;
442
443 if ((chg < tol) && (cnt > blend))
444 {
445 ContinueToIterate = false;
446 }
447 }
448 else if (cnt > blend)
449 {
450 ContinueToIterate = false;
451 }
452
453 if (cnt++ > maxiter)
454 {
455 ContinueToIterate = false;
456 }
457 }
458}
459
460// Read Composites from xml document and turn off verts that are along edge
461// composites.
462void TurnOffEdges(TiXmlElement *doc, SpatialDomains::SegGeomMap &meshedges,
464{
465 TiXmlElement *field = doc->FirstChildElement("COMPOSITE");
466 ASSERTL0(field, "Unable to find COMPOSITE tag in file.");
467
468 /// All elements are of the form: "<C ID = "N"> ... </C>".
469 /// Read the ID field first.
470 TiXmlElement *composite = field->FirstChildElement("C");
471
472 while (composite)
473 {
474 int indx;
475 int err = composite->QueryIntAttribute("ID", &indx);
476 ASSERTL0(err == TIXML_SUCCESS, "Unable to read attribute ID.");
477
478 TiXmlNode *compositeChild = composite->FirstChild();
479 // This is primarily to skip comments that may be present.
480 // Comments appear as nodes just like elements.
481 // We are specifically looking for text in the body
482 // of the definition.
483 while (compositeChild &&
484 compositeChild->Type() != TiXmlNode::TINYXML_TEXT)
485 {
486 compositeChild = compositeChild->NextSibling();
487 }
488
489 ASSERTL0(compositeChild, "Unable to read composite definition body.");
490 std::string compositeStr = compositeChild->ToText()->ValueStr();
491
492 /// Parse out the element components corresponding to type of element.
493 std::istringstream compositeDataStrm(compositeStr.c_str());
494
495 try
496 {
497 std::string compositeElementStr;
498 compositeDataStrm >> compositeElementStr;
499
500 std::istringstream tokenStream(compositeElementStr);
501 char type;
502
503 tokenStream >> type;
504
505 // in what follows we are assuming there is only one block of data
506 std::string::size_type indxBeg =
507 compositeElementStr.find_first_of('[') + 1;
508 std::string::size_type indxEnd =
509 compositeElementStr.find_last_of(']') - 1;
510
511 ASSERTL0(indxBeg <= indxEnd,
512 (std::string("Error reading index definition:") +
513 compositeElementStr)
514 .c_str());
515
516 std::string indxStr =
517 compositeElementStr.substr(indxBeg, indxEnd - indxBeg + 1);
518 std::vector<unsigned int> seqVector;
519
520 bool err = ParseUtils::GenerateSeqVector(indxStr, seqVector);
521
522 ASSERTL0(err, (std::string("Error reading composite elements: ") +
523 indxStr)
524 .c_str());
525
526 switch (type)
527 {
528 case 'E': // Turn off vertices along composite edges
529 {
530 int seqlen = seqVector.size();
531 NekDouble x0, y0, z0, x1, y1, z1;
532 int vid0, vid1;
533
534 for (int i = 0; i < seqlen; ++i)
535 {
536 meshedges[seqVector[i]]->GetVertex(0)->GetCoords(x0, y0,
537 z0);
538 meshedges[seqVector[i]]->GetVertex(1)->GetCoords(x1, y1,
539 z1);
540 vid0 = meshedges[seqVector[i]]->GetVid(0);
541 vid1 = meshedges[seqVector[i]]->GetVid(1);
542
543 if (fabs(x0 - x1) < 1e-8)
544 {
545 // identify corners by double visit
546 if (Verts[vid0].solve == eSolveX)
547 {
548 Verts[vid0].solve = eNoSolve;
549 }
550 else
551 {
552 Verts[vid0].solve = eSolveY;
553 }
554
555 if (Verts[vid1].solve == eSolveX)
556 {
557 Verts[vid1].solve = eNoSolve;
558 }
559 else
560 {
561 Verts[vid1].solve = eSolveY;
562 }
563 }
564
565 if (fabs(y0 - y1) < 1e-8)
566 {
567 // identify corners by double visit
568 if (Verts[vid0].solve == eSolveY)
569 {
570 Verts[vid0].solve = eNoSolve;
571 }
572 else
573 {
574 Verts[vid0].solve = eSolveX;
575 }
576
577 if (Verts[vid1].solve == eSolveY)
578 {
579 Verts[vid1].solve = eNoSolve;
580 }
581 else
582 {
583 Verts[vid1].solve = eSolveX;
584 }
585 }
586 }
587 }
588 break;
589
590 case 'T':
591 case 'Q': // do nothing
592 {
593 break;
594 }
595 default:
596 NEKERROR(ErrorUtil::efatal,
597 (std::string("Unrecognized composite token: ") +
598 compositeElementStr)
599 .c_str());
600 }
601 }
602 catch (...)
603 {
604 NEKERROR(
605 ErrorUtil::efatal,
606 (std::string("Unable to read COMPOSITE data for composite: ") +
607 compositeStr)
608 .c_str());
609 }
610
611 /// Keep looking
612 composite = composite->NextSiblingElement("C");
613 }
614}
615
616void RedefineVertices(TiXmlElement *doc, Array<OneD, NekDouble> &dvertx,
618{
619
620 TiXmlElement *element = doc->FirstChildElement("VERTEX");
621 ASSERTL0(element, "Unable to find mesh VERTEX tag in file.");
622
623 TiXmlElement *vertex = element->FirstChildElement("V");
624
625 int indx;
626 int err; /// Error value returned by TinyXML.
627
628 vector<NekDouble> xpts, ypts, zpts;
629 NekDouble xval, yval, zval;
630
631 while (vertex)
632 {
633 TiXmlAttribute *vertexAttr = vertex->FirstAttribute();
634 std::string attrName(vertexAttr->Name());
635
636 ASSERTL0(attrName == "ID",
637 (std::string("Unknown attribute name: ") + attrName).c_str());
638
639 err = vertexAttr->QueryIntValue(&indx);
640 ASSERTL0(err == TIXML_SUCCESS, "Unable to read attribute ID.");
641
642 // Now read body of vertex
643 std::string vertexBodyStr;
644
645 TiXmlNode *vertexBody = vertex->FirstChild();
646
647 while (vertexBody)
648 {
649 // Accumulate all non-comment body data.
650 if (vertexBody->Type() == TiXmlNode::TINYXML_TEXT)
651 {
652 vertexBodyStr += vertexBody->ToText()->Value();
653 vertexBodyStr += " ";
654 }
655
656 vertexBody = vertexBody->NextSibling();
657 }
658
659 ASSERTL0(!vertexBodyStr.empty(),
660 "Vertex definitions must contain vertex data.");
661
662 // Get vertex data from the data string.
663 std::istringstream vertexDataStrm(vertexBodyStr.c_str());
664
665 try
666 {
667 while (!vertexDataStrm.fail())
668 {
669 vertexDataStrm >> xval >> yval >> zval;
670 }
671
672 xval += dvertx[indx];
673 yval += dverty[indx];
674
675 stringstream s;
676 s << scientific << setprecision(8) << xval << " " << yval << " "
677 << zval;
678
679 vertex->ReplaceChild(vertex->FirstChild(), TiXmlText(s.str()));
680 }
681 catch (...)
682 {
683 ASSERTL0(false, "Unable to read VERTEX data.");
684 }
685 vertex = vertex->NextSiblingElement("V");
686 }
687}
688
692{
693 int i, j;
694 int nverts = mesh->GetNvertices();
695 Array<OneD, NekDouble> x(nverts), y(nverts);
696 NekDouble xval, yval, zval;
697
698 for (i = 0; i < nverts; ++i)
699 {
700 mesh->GetVertex(i)->GetCoords(xval, yval, zval);
701 x[i] = xval + dvertx[i];
702 y[i] = yval + dverty[i];
703 }
704
705 NekDouble xmax = Vmath::Vmax(nverts, x, 1);
706 NekDouble tol = 1e-5, dist2, xrot, yrot;
707 Array<OneD, int> index(nverts);
708 // find nearest
709 for (i = 0; i < nverts; ++i)
710 {
711 xrot = -x[i] + xmax;
712 yrot = -y[i];
713 tol = 1.0;
714
715 for (j = 0; j < nverts; ++j)
716 {
717 dist2 =
718 (x[j] - xrot) * (x[j] - xrot) + (y[j] - yrot) * (y[j] - yrot);
719 if (dist2 < tol)
720 {
721 index[i] = j;
722 tol = dist2;
723 }
724 }
725 }
726
727 // average points and recalcualte dvertx, dverty
728 for (i = 0; i < nverts; ++i)
729 {
730 mesh->GetVertex(i)->GetCoords(xval, yval, zval);
731
732 xrot = 0.5 * (-x[index[i]] + xmax + x[i]);
733 yrot = 0.5 * (-y[index[i]] + y[i]);
734
735 dvertx[i] = xrot - xval;
736 dverty[i] = yrot - yval;
737 }
738}
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:208
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
Definition: ErrorUtil.hpp:202
void Computestreakpositions(MultiRegions::ExpListSharedPtr &streak, Array< OneD, NekDouble > &xc, Array< OneD, NekDouble > &yc, NekDouble cr, NekDouble trans)
int main(int argc, char *argv[])
void GetNewVertexLocation(TiXmlElement *doc, SpatialDomains::MeshGraphSharedPtr &mesh, vector< int > &InterfaceVerts, Array< OneD, NekDouble > &xstreak, Array< OneD, NekDouble > &ystreak, Array< OneD, NekDouble > &vertx, Array< OneD, NekDouble > &verty, int maxiter)
void TurnOffEdges(TiXmlElement *doc, SpatialDomains::SegGeomMap &meshedges, Array< OneD, MoveVerts > &verts)
void EnforceRotationalSymmetry(SpatialDomains::MeshGraphSharedPtr &mesh, Array< OneD, NekDouble > &dvertx, Array< OneD, NekDouble > &dverty)
void RedefineVertices(TiXmlElement *doc, Array< OneD, NekDouble > &dvertx, Array< OneD, NekDouble > &dverty)
void GetInterfaceVerts(const int compositeID, SpatialDomains::MeshGraphSharedPtr &mesh, vector< int > &InterfaceVerts)
void GetStreakLocation(LibUtilities::SessionReaderSharedPtr &vSession, SpatialDomains::MeshGraphSharedPtr &mesh, string &fieldfile, Array< OneD, NekDouble > &xc, Array< OneD, NekDouble > &yc)
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
NekDouble dist(PointGeom &a)
return distance between this and input a
Definition: PointGeom.cpp:178
void Import(const std::string &infilename, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata, FieldMetaDataMap &fieldinfomap, const Array< OneD, int > &ElementIDs)
This function allows for data to be imported from an FLD file when a session and/or communicator is n...
Definition: FieldIO.cpp:288
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::map< int, QuadGeomSharedPtr > QuadGeomMap
Definition: QuadGeom.h:52
std::shared_ptr< Composite > CompositeSharedPtr
Definition: MeshGraph.h:135
std::map< int, SegGeomSharedPtr > SegGeomMap
Definition: SegGeom.h:49
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:174
std::shared_ptr< PointGeom > PointGeomSharedPtr
Definition: Geometry.h:57
std::vector< double > z(NPUPPER)
double NekDouble
T Vmax(int n, const T *x, const int incx)
Return the maximum element in x – called vmax to avoid conflict with max.
Definition: Vmath.hpp:644
STL namespace.
scalarT< T > sqrt(scalarT< T > in)
Definition: scalar.hpp:294
vector< int > springVid
vector< NekDouble > kspring