176{
178
179 cr = 0;
180
181 if (argc > 6 || argc < 5)
182 {
183 fprintf(stderr, "Usage: ./MoveMesh meshfile fieldfile changefile "
184 "alpha cr(optional)\n");
185 exit(1);
186 }
187
188
189
194
195
196 if (argc == 6 && vSession->DefinesSolverInfo("INTERFACE") &&
197 vSession->GetSolverInfo("INTERFACE") == "phase")
198 {
199 cr = std::stod(argv[argc - 1]);
200 argc = 5;
201 }
202
203
205 boundaryConditions =
207 vSession, graphShPt);
209
210
211
212
213
214
215
216
217 string changefile(argv[argc - 2]);
218
219
220
221 string charalp(argv[argc - 1]);
222
223 cout << "read alpha=" << charalp << endl;
224
225
226
227 string fieldfile(argv[argc - 3]);
228 vector<LibUtilities::FieldDefinitionsSharedPtr> fielddef;
229 vector<vector<NekDouble>> fielddata;
230
231
234 vSession, graphShPt, "w", true);
235
237
238 for (int i = 0; i < fielddata.size(); i++)
239 {
240 streak->ExtractDataToCoeffs(fielddef[i], fielddata[i],
241 fielddef[i]->m_fields[0],
242 streak->UpdateCoeffs());
243 }
244 streak->BwdTrans(streak->GetCoeffs(), streak->UpdatePhys());
245
246
247
248
249
250 int nIregions, lastIregion = 0;
252 streak->GetBndConditions();
254
255 nIregions = 0;
256 int nbnd = bndConditions.size();
257 for (int r = 0; r < nbnd; r++)
258 {
259 if (bndConditions[r]->GetUserDefined() == "CalcBC")
260 {
261 lastIregion = r;
262 Iregions[r] = r;
263 nIregions++;
264 }
265 }
266
268 "there is any boundary region with the tag USERDEFINEDTYPE="
269 "CalcBC"
270 " specified");
271 cout << "nIregions=" << nIregions << endl;
272
274 streak->GetBndCondExpansions();
275
276
277 int nedges = bndfieldx[lastIregion]->GetExpSize();
278 int nvertl = nedges + 1;
283
284
287 int lastedge = -1;
288 int v1, v2;
289
290 x_connect = 0;
292 ((bndfieldx[lastIregion]->GetExp(0)->as<LocalRegions::SegExp>())
293 ->GetGeom1D())
294 ->GetVid(0));
296 if (x0 != 0.0)
297 {
298 cout << "WARNING x0=" << x0 << endl;
299 x_connect = x0;
300 }
301 v1 = 0;
302 v2 = 1;
303 OrderVertices(nedges, graphShPt, bndfieldx[lastIregion - 1], Vids_low, v1,
304 v2, x_connect, lastedge, xold_low, yold_low);
305 ASSERTL0(Vids_low[v2] != -10,
"Vids_low[v2] is wrong");
307
308
309 cout << "x_conn=" << x_connect << " yt=" << yt << " zt=" << zt
310 << " vid=" << Vids_low[v2] << endl;
312
313 int i = 2;
314 while (i < nvertl)
315 {
316 v1 = i;
317 OrderVertices(nedges, graphShPt, bndfieldx[lastIregion - 1], Vids_low,
318 v1, v2, x_connect, lastedge, xold_low, yold_low);
320 graphShPt->GetPointGeom(Vids_low[v1]);
321
323 i++;
324 }
325
326
327
328
332
333 x_connect = 0;
334 vertex0 = graphShPt->GetPointGeom(
335 ((bndfieldx[lastIregion]->GetExp(0)->as<LocalRegions::SegExp>())
336 ->GetGeom1D())
337 ->GetVid(0));
339 if (x0 != 0.0)
340 {
341 cout << "WARNING x0=" << x0 << endl;
342 x_connect = x0;
343 }
344 lastedge = -1;
345
346 v1 = 0;
347 v2 = 1;
348 OrderVertices(nedges, graphShPt, bndfieldx[lastIregion - 2], Vids_up, v1,
349 v2, x_connect, lastedge, xold_up, yold_up);
352
353 i = 2;
354 while (i < nvertl)
355 {
356 v1 = i;
357 OrderVertices(nedges, graphShPt, bndfieldx[lastIregion - 2], Vids_up,
358 v1, v2, x_connect, lastedge, xold_up, yold_up);
360 graphShPt->GetPointGeom(Vids_up[v1]);
361
362
364 i++;
365 }
366
367
368
369
373
374 x_connect = 0;
375 vertex0 = graphShPt->GetPointGeom(
376 ((bndfieldx[lastIregion]->GetExp(0)->as<LocalRegions::SegExp>())
377 ->GetGeom1D())
378 ->GetVid(0));
380 if (x0 != 0.0)
381 {
382 cout << "WARNING x0=" << x0 << endl;
383 x_connect = x0;
384 }
385 lastedge = -1;
386
387 v1 = 0;
388 v2 = 1;
389
390 OrderVertices(nedges, graphShPt, bndfieldx[lastIregion], Vids_c, v1, v2,
391 x_connect, lastedge, xold_c, yold_c);
393
394
396
397 i = 2;
398 while (i < nvertl)
399 {
400 v1 = i;
401 OrderVertices(nedges, graphShPt, bndfieldx[lastIregion], Vids_c, v1, v2,
402 x_connect, lastedge, xold_c, yold_c);
404
405
407 i++;
408 }
409
410
411
414
415 for (int r = 0; r < nvertl; r++)
416 {
417
418
419
420 Deltaup[r] = yold_up[r] - yold_c[r];
421 Deltalow[r] = yold_c[r] - yold_low[r];
423 "distance between upper and layer curve is not positive");
425 "distance between lower and layer curve is not positive");
426 }
427
428
429
431 bcs.GetBoundaryRegions();
434
436 vSession, *(bregions.find(lastIregion)->second), graphShPt, true);
438 *yexp);
439
440
441
442
443
444
445
446 int npedge;
447 if (vSession->DefinesParameter("npedge"))
448 {
449 npedge = (int)vSession->GetParameter("npedge");
450 }
451 else
452 {
453 npedge = 5;
454 }
455
456
457
458 int nq = streak->GetTotPoints();
461 streak->GetCoords(x, y);
467
469 xold_c, yold_c, x_c, y_c, cr, true);
470
472 for (
int q = 0;
q < nvertl;
q++)
473 {
474 if (y_c[q] < yold_c[q])
475 {
477 }
478
479 Delta_c[
q] =
abs(yold_c[q] - y_c[q]);
480
482 cout << x_c[
q] <<
" " << y_c[
q] << endl;
483 }
484
485 if (shift < 0.001)
486 {
487 cout << "Warning: the critical layer is stationary" << endl;
488 }
489
490
491
497
500
502
503 int Eid, id1, id2;
508 for (int r = 0; r < nedges; r++)
509 {
510
511 bndSegExp =
513 Eid = (bndSegExp->GetGeom1D())->GetGlobalID();
514 id1 = (bndSegExp->GetGeom1D())->GetVid(0);
515 id2 = (bndSegExp->GetGeom1D())->GetVid(1);
516 vertex1 = graphShPt->GetPointGeom(id1);
517 vertex2 = graphShPt->GetPointGeom(id2);
520
521
522 cout << "edge=" << r << " x1=" << x1 << " y1=" << y1 << " x2=" << x2
523 << " y2=" << y2 << endl;
524 if (x2 > x1)
525 {
526 Cpointsx[r] = x1 + (x2 - x1) / 2;
527
528
529
530 if (Cpointsx[r] > x2 || Cpointsx[r] < x1)
531 {
532 Cpointsx[r] = -Cpointsx[r];
533 }
534 for (
int w = 0;
w < npedge - 2;
w++)
535 {
536
537 Addpointsx[r * (npedge - 2) + w] =
538 x1 + ((x2 - x1) / (npedge - 1)) * (
w + 1);
539 if (Addpointsx[r * (npedge - 2) +
w] > x2 ||
540 Addpointsx[r * (npedge - 2) + w] < x1)
541 {
542 Addpointsx[r * (npedge - 2) + w] =
543 -Addpointsx[r * (npedge - 2) +
w];
544 }
545
546 Addpointsy[r * (npedge - 2) + w] =
547 y_c[r] + ((y_c[r + 1] - y_c[r]) / (x_c[r + 1] - x_c[r])) *
548 (Addpointsx[r * (npedge - 2) + w] - x1);
549
550
552 Addpointsy[r * (npedge - 2) + w],
553 Addpointsx[r * (npedge - 2) + w],
554 Addpointsy[r * (npedge - 2) + w],
555 streak, dU, cr);
556
557
558
559
560 }
561
562
563
564
565 }
566 else if (x1 > x2)
567 {
568 Cpointsx[r] = x2 + (x1 - x2) / 2;
569
570 if (Cpointsx[r] > x1 || Cpointsx[r] < x2)
571 {
572 Cpointsx[r] = -Cpointsx[r];
573 }
574 for (
int w = 0;
w < npedge - 2;
w++)
575 {
576 Addpointsx[r * (npedge - 2) + w] =
577 x2 + ((x1 - x2) / (npedge - 1)) * (
w + 1);
578 if (Addpointsx[r * (npedge - 2) +
w] > x1 ||
579 Addpointsx[r * (npedge - 2) + w] < x2)
580 {
581 Addpointsx[r * (npedge - 2) + w] =
582 -Addpointsx[r * (npedge - 2) +
w];
583 }
584
585
586 Addpointsy[r * (npedge - 2) + w] =
587 y_c[r + 1] +
588 ((y_c[r] - y_c[r + 1]) / (x_c[r] - x_c[r + 1])) *
589 (Addpointsx[r * (npedge - 2) + w] - x2);
590
591
592
594 Addpointsy[r * (npedge - 2) + w],
595 Addpointsx[r * (npedge - 2) + w],
596 Addpointsy[r * (npedge - 2) + w],
597 streak, dU, cr);
598
599
600
601 }
602
603
604
605
606 }
607 else
608 {
609 ASSERTL0(
false,
"point not generated");
610 }
611
612
613
614
615
616
617
618
619 Eids[r] = Eid;
620 }
621
622
623
626
627 for (int a = 0; a < nedges; a++)
628 {
629
630 xcPhys[a * npedge + 0] = x_c[a];
631 ycPhys[a * npedge + 0] = y_c[a];
632
633 xcPhys[a * npedge + npedge - 1] = x_c[a + 1];
634 ycPhys[a * npedge + npedge - 1] = y_c[a + 1];
635
636 for (int b = 0; b < npedge - 2; b++)
637 {
638 xcPhys[a * npedge + b + 1] = Addpointsx[a * (npedge - 2) + b];
639 ycPhys[a * npedge + b + 1] = Addpointsy[a * (npedge - 2) + b];
640 }
641 }
642
643 cout << "xc,yc before tanevaluate" << endl;
644 for (int v = 0; v < xcPhys.size(); v++)
645 {
646 cout << xcPhys[v] << " " << ycPhys[v] << endl;
647 }
648
649
650
651
654
658 int nlays = 0;
659 MappingEVids(xold_up, yold_up, xold_low, yold_low, xold_c, yold_c, Vids_c,
660 graphShPt, streak, V1, V2, nlays, lay_Eids, lay_Vids);
661
662 cout << "nlays=" << nlays << endl;
665
666 for (int g = 0; g < nlays; g++)
667 {
669 }
670
671
672
673
674
675
677 if (vSession->DefinesParameter("Delta"))
678 {
679 Delta0 = vSession->GetParameter("Delta");
680 }
681 else
682 {
683 Delta0 = 0.1;
684 }
685
686
687
688
689
690
691 int nVertTot = graphShPt->GetNvertices();
692
695
700 int cntup = 0;
701 int cntlow = 0;
702
707 for (int i = 0; i < nVertTot; i++)
708 {
709 bool mvpoint = false;
713
714 xold[i] = x;
715 yold[i] = y;
716
717
718 xnew[i] = x;
719
720
721 if (x == 0 && y < yold_low[0] && y > bleft)
722 {
723 bleft = y;
724 }
725
726 if (x == xold_c[nvertl - 1] && y > yold_up[nvertl - 1] && y < tright)
727 {
728 tright = y;
729 }
730
731 if (x == xold_c[nvertl - 1] && y < yold_low[nvertl - 1] && y > bright)
732 {
733 bright = y;
734 }
735
736 if (x == 0 && y > yold_up[0] && y < tleft)
737 {
738 tleft = y;
739 }
740
741 for (int j = 0; j < nvertl; j++)
742 {
743 if ((xold_up[j] == x) && (yold_up[j] == y))
744 {
745
746
747 ynew[i] = y_c[j] + Delta0;
748 mvpoint = true;
749 Up[j] = i;
750 }
751 if ((xold_low[j] == x) && (yold_low[j] == y))
752 {
753
754
755 ynew[i] = y_c[j] - Delta0;
756 mvpoint = true;
757 Down[j] = i;
758 }
759 if ((xold_c[j] == x) && (yold_c[j] == y))
760 {
761 ynew[i] = y_c[j];
762 mvpoint = true;
763 }
764 }
765 if (mvpoint == false)
766 {
767
769 int qp_closer = 0;
770 for (int k = 0; k < nvertl; k++)
771 {
772 if (
abs(x - xold_up[k]) < diff)
773 {
774 diff =
abs(x - xold_up[k]);
775 qp_closer = k;
776 }
777 }
778 if (y > yold_up[qp_closer] && y < 1)
779 {
780
781
782
783
784
785
786
787
788 ynew[i] = y_c[qp_closer] + (y - yold_c[qp_closer]) *
789 (1 - y_c[qp_closer]) /
790 (1 - yold_c[qp_closer]);
791
792 }
793 else if (y < yold_low[qp_closer] && y > -1)
794 {
795
796
797
798
799
800
801
802
803 ynew[i] = y_c[qp_closer] + (y - yold_c[qp_closer]) *
804 (-1 - y_c[qp_closer]) /
805 (-1 - yold_c[qp_closer]);
806 }
807
808 else if (y > yold_c[qp_closer] && y < yold_up[qp_closer])
809 {
810 if (x == 0)
811 {
812 cntup++;
813 }
814
815
816
817 }
818 else if (y < yold_c[qp_closer] && y > yold_low[qp_closer])
819 {
820 if (x == 0)
821 {
822 cntlow++;
823 }
824
825
826
827 }
828 else if (y == 1 || y == -1)
829 {
830 ynew[i] = y;
831
832
833 }
834
835
836 if ((ynew[i] > 1 || ynew[i] < -1) &&
837 (y > yold_up[qp_closer] || y < yold_low[qp_closer]))
838 {
839 cout << "point x=" << xnew[i] << " y=" << y
840 << " closer x=" << xold_up[qp_closer]
841 << " ynew=" << ynew[i] << endl;
842 ASSERTL0(
false,
"shifting out of range");
843 }
844 }
845 }
846
847 int nqedge = streak->GetExp(0)->GetNumPoints(0);
848 int nquad_lay = (nvertl - 1) * nqedge;
850
851 bool curv_lay = true;
852 bool move_norm = true;
853 int np_lay = (nvertl - 1) * npedge;
854
862
863 if (move_norm == true)
864 {
865
866
869
872
874
875 cout << "nquad per edge=" << nqedge << endl;
876 for (int l = 0; l < 2; l++)
877 {
878 Edge_newcoords[l] = bndfieldx[lastIregion]
879 ->GetExp(0)
881 }
889
896
899
901
902 bndfieldx[lastIregion]->GetCoords(xcQ, ycQ, zcQ);
903
904
911 for (int l = 0; l < xcQ.size(); l++)
912 {
916
917
919
921 }
922
923
924
925 Vmath::Vcopy(nquad_lay, ycQ, 1, Cont_y->UpdatePhys(), 1);
927
928 Cont_y->FwdTransLocalElmt(Cont_y->GetPhys(), coeffsy);
929 Cont_y->BwdTrans(coeffsy, Cont_y->UpdatePhys());
931
932 cout << "xcQ, ycQ" << endl;
933 for (int s = 0; s < xcQ.size(); s++)
934 {
935 cout << xcQ[s] << " " << ycQ[s] << endl;
936 }
937
938 bool evaluatetan = false;
941 int wrong = 0;
942 for (int k = 0; k < nedges; k++)
943 {
944 Vmath::Vcopy(nqedge, &xcQ[k * nqedge], 1, &xcedgeQ[0], 1);
945 Vmath::Vcopy(nqedge, &ycQ[k * nqedge], 1, &ycedgeQ[0], 1);
946
947 Edge_newcoords[0]->StdPhysDeriv(xcedgeQ, txedgeQ);
948 Edge_newcoords[1]->StdPhysDeriv(ycedgeQ, tyedgeQ);
949
950 Vmath::Vmul(nqedge, txedgeQ, 1, txedgeQ, 1, normsQ, 1);
951
952 Vmath::Vvtvp(nqedge, tyedgeQ, 1, tyedgeQ, 1, normsQ, 1, normsQ, 1);
953
956
957 Vmath::Vmul(nqedge, txedgeQ, 1, normsQ, 1, txedgeQ, 1);
958 Vmath::Vmul(nqedge, tyedgeQ, 1, normsQ, 1, tyedgeQ, 1);
959
960
961
962 evaluatetan = false;
963 for (int u = 0; u < nqedge - 1; u++)
964 {
965 incratio = (ycedgeQ[u + 1] - ycedgeQ[u]) /
966 (xcedgeQ[u + 1] - xcedgeQ[u]);
967 cout << "incratio=" << incratio << endl;
968 if (
abs(incratio) > 4.0 && evaluatetan ==
false)
969 {
970 cout << "wrong=" << wrong << endl;
971 evaluatetan = true;
972 ASSERTL0(wrong < 2,
"number edges to change is too high!!");
973 edgeinterp[wrong] = k;
974 wrong++;
975 }
976 }
977
978 if (evaluatetan)
979 {
980 cout << "tan bef" << endl;
981 for (int e = 0; e < nqedge; e++)
982 {
983 cout << xcedgeQ[e] << " " << ycedgeQ[e] << " "
984 << txedgeQ[e] << endl;
985 }
986
987
988 int polyorder = 3;
992 Vmath::Vcopy(npedge, &xcPhysMOD[k * npedge + 0], 1, &xPedges[0],
993 1);
994 Vmath::Vcopy(npedge, &ycPhysMOD[k * npedge + 0], 1, &yPedges[0],
995 1);
996
997 PolyFit(polyorder, nqedge, xcedgeQ, ycedgeQ, coeffsinterp,
998 xPedges, yPedges, npedge);
999
1000 Vmath::Vcopy(npedge, &xPedges[0], 1, &xcPhysMOD[k * npedge + 0],
1001 1);
1002 Vmath::Vcopy(npedge, &yPedges[0], 1, &ycPhysMOD[k * npedge + 0],
1003 1);
1004
1006 tyedgeQ);
1007 }
1008
1009 Vmath::Vcopy(nqedge, &(txedgeQ[0]), 1, &(txQ[nqedge * k]), 1);
1010 Vmath::Vcopy(nqedge, &(tyedgeQ[0]), 1, &(tyQ[nqedge * k]), 1);
1011 }
1012
1015 for (
int w = 0;
w < fz.size();
w++)
1016 {
1017 txQ[
w] = cos(atan(fz[w]));
1018 tyQ[
w] = sin(atan(fz[w]));
1019 cout << xcQ[
w] <<
" " << ycQ[
w] <<
" " << fz[
w] << endl;
1020 }
1021
1022
1023
1024 Vmath::Vcopy(nquad_lay, txQ, 1, Cont_y->UpdatePhys(), 1);
1025 Cont_y->FwdTransLocalElmt(Cont_y->GetPhys(), coeffsy);
1026 Cont_y->BwdTrans(coeffsy, Cont_y->UpdatePhys());
1028
1029 Vmath::Vcopy(nquad_lay, tyQ, 1, Cont_y->UpdatePhys(), 1);
1030 Cont_y->FwdTransLocalElmt(Cont_y->GetPhys(), coeffsy);
1031 Cont_y->BwdTrans(coeffsy, Cont_y->UpdatePhys());
1033
1034
1036
1037
1038
1039
1040 int edgebef;
1041
1042 for (
int q = 0;
q < 2;
q++)
1043 {
1044 edgebef = edgeinterp[
q] - 1;
1045 incbefore =
1046 (txQ[edgebef * nqedge + nqedge - 1] - txQ[edgebef * nqedge]) /
1047 (xcQ[edgebef * nqedge + nqedge - 1] - xcQ[edgebef * nqedge]);
1048 inc = (txQ[edgeinterp[
q] * nqedge + nqedge - 1] -
1049 txQ[edgeinterp[
q] * nqedge]) /
1050 (xcQ[edgeinterp[q] * nqedge + nqedge - 1] -
1051 xcQ[edgeinterp[q] * nqedge]);
1052 int npoints = 2 * nqedge;
1053
1058 cout << "inc=" << inc << " incbef=" << incbefore << endl;
1059 if ((inc / incbefore) > 0.)
1060 {
1061 cout << "before!!" << edgebef << endl;
1062 int polyorder = 2;
1065 &xQedges[0], 1);
1067 &yQedges[0], 1);
1069 &txQedges[0], 1);
1071 &tyQedges[0], 1);
1072
1073 PolyFit(polyorder, npoints, xQedges, txQedges, coeffsinterp,
1074 xQedges, txQedges, npoints);
1075
1076
1078 &txQ[edgebef * nqedge + 0], 1);
1079
1080 PolyFit(polyorder, npoints, xQedges, tyQedges, coeffsinterp,
1081 xQedges, tyQedges, npoints);
1082
1083
1085 &tyQ[edgebef * nqedge + 0], 1);
1086 }
1087 else
1088 {
1089 cout << "after!!" << endl;
1090 int polyorder = 2;
1092 Vmath::Vcopy(npoints, &xcQ[edgeinterp[q] * nqedge + 0], 1,
1093 &xQedges[0], 1);
1094 Vmath::Vcopy(npoints, &ycQ[edgeinterp[q] * nqedge + 0], 1,
1095 &yQedges[0], 1);
1096 Vmath::Vcopy(npoints, &txQ[edgeinterp[q] * nqedge + 0], 1,
1097 &txQedges[0], 1);
1098 Vmath::Vcopy(npoints, &tyQ[edgeinterp[q] * nqedge + 0], 1,
1099 &tyQedges[0], 1);
1100
1101 PolyFit(polyorder, npoints, xQedges, txQedges, coeffsinterp,
1102 xQedges, txQedges, npoints);
1103
1104
1106 &txQ[edgeinterp[q] * nqedge + 0], 1);
1107
1108 PolyFit(polyorder, npoints, xQedges, tyQedges, coeffsinterp,
1109 xQedges, tyQedges, npoints);
1110
1111
1113 &tyQ[edgeinterp[q] * nqedge + 0], 1);
1114 }
1115 }
1116
1117
1118 Vmath::Vcopy(nquad_lay, tyQ, 1, Cont_y->UpdatePhys(), 1);
1119 Cont_y->FwdTransLocalElmt(Cont_y->GetPhys(), coeffstmp);
1120 Cont_y->BwdTrans(coeffstmp, Cont_y->UpdatePhys());
1122
1123 Vmath::Vcopy(nquad_lay, txQ, 1, Cont_y->UpdatePhys(), 1);
1124 Cont_y->FwdTransLocalElmt(Cont_y->GetPhys(), coeffstmp);
1125 Cont_y->BwdTrans(coeffstmp, Cont_y->UpdatePhys());
1127
1128 for (int k = 0; k < nedges; k++)
1129 {
1130
1131
1132
1133
1134
1135 Vmath::Vcopy(nqedge, &(txQ[nqedge * k]), 1, &(txedgeQ[0]), 1);
1136 Vmath::Vcopy(nqedge, &(tyQ[nqedge * k]), 1, &(tyedgeQ[0]), 1);
1137
1138 Vmath::Vdiv(nqedge, txedgeQ, 1, tyedgeQ, 1, tx_tyedgeQ, 1);
1139 Vmath::Vmul(nqedge, tx_tyedgeQ, 1, tx_tyedgeQ, 1, tx_tyedgeQ, 1);
1140 Vmath::Sadd(nqedge, 1.0, tx_tyedgeQ, 1, nxedgeQ, 1);
1143
1144 Vmath::Smul(nqedge, -1.0, nxedgeQ, 1, nxedgeQ, 1);
1145 Vmath::Vcopy(nqedge, &(nxedgeQ[0]), 1, &(nxQ[nqedge * k]), 1);
1146
1147 Vmath::Vmul(nqedge, nxedgeQ, 1, nxedgeQ, 1, nyedgeQ, 1);
1148 Vmath::Smul(nqedge, -1.0, nyedgeQ, 1, nyedgeQ, 1);
1151
1152 Vmath::Smul(nqedge, -1.0, nyedgeQ, 1, nyedgeQ, 1);
1153 Vmath::Vcopy(nqedge, &(nyedgeQ[0]), 1, &(nyQ[nqedge * k]), 1);
1154
1155 cout << "edge:" << k << endl;
1156 cout << "tan/normal" << endl;
1157 for (int r = 0; r < nqedge; r++)
1158 {
1159 cout << xcQ[k * nqedge + r] << " " << txedgeQ[r] << " "
1160 << tyedgeQ[r] << " " << nxedgeQ[r] << " "
1161 << nyedgeQ[r] << endl;
1162 }
1163 }
1164
1165
1166
1167 Vmath::Vcopy(nquad_lay, nyQ, 1, Cont_y->UpdatePhys(), 1);
1168
1169 Cont_y->FwdTransLocalElmt(Cont_y->GetPhys(), coeffstmp);
1170 Cont_y->BwdTrans(coeffstmp, Cont_y->UpdatePhys());
1172
1174 Vmath::Zero(Cont_y->GetNcoeffs(), Cont_y->UpdateCoeffs(), 1);
1175 Vmath::Vcopy(nquad_lay, nxQ, 1, Cont_y->UpdatePhys(), 1);
1176 Cont_y->FwdTransLocalElmt(Cont_y->GetPhys(), coeffstmp);
1177 Cont_y->BwdTrans(coeffstmp, Cont_y->UpdatePhys());
1179
1180
1181 for (int k = 0; k < nedges; k++)
1182 {
1183 if (k > 0)
1184 {
1185
1186
1187 nyQ[(k - 1) * nqedge + nqedge - 1] = nyQ[k * nqedge + 0];
1188
1189
1190
1191 nxQ[(k - 1) * nqedge + nqedge - 1] = nxQ[k * nqedge + 0];
1192 }
1193 }
1194
1196
1198
1199 cout << "nx,yQbefore" << endl;
1200 for (int u = 0; u < xcQ.size(); u++)
1201 {
1202 cout << xcQ[u] << " " << nyQ[u] << " " << txQ[u] << endl;
1203 }
1204
1206
1208 cout << "nx,yQ" << endl;
1209 for (int u = 0; u < x_tmpQ.size(); u++)
1210 {
1211 cout << x_tmpQ[u] << " " << tmpnyQ[u] << endl;
1212 }
1213
1214
1215 for (int k = 0; k < nedges; k++)
1216 {
1217
1218 for (int a = 0; a < npedge; a++)
1219 {
1220 if (a == 0)
1221 {
1222 nxPhys[k * npedge + a] = nxQ[k * nqedge + 0];
1223 nyPhys[k * npedge + a] = nyQ[k * nqedge + 0];
1224 }
1225 else if (a == npedge - 1)
1226 {
1227 nxPhys[k * npedge + a] = nxQ[k * nqedge + nqedge - 1];
1228 nyPhys[k * npedge + a] = nyQ[k * nqedge + nqedge - 1];
1229
1230 }
1231 else
1232 {
1233
1234
1235
1236
1237
1238
1239 int index;
1240
1241
1243 Addpointsx[k * (npedge - 2) + a - 1], x_tmpQ);
1244
1247
1248
1250 Pyinterp);
1251
1253 Addpointsx[k * (npedge - 2) + a - 1], 4, Pxinterp,
1254 Pyinterp);
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264 nxPhys[k * npedge + a] = -
sqrt(
abs(
1265 1 - nyPhys[k * npedge + a] * nyPhys[k * npedge + a]));
1266
1267
1268
1269
1270
1271
1272
1273 }
1274
1275
1276 if (k > 0)
1277 {
1278
1279
1280 nyPhys[(k - 1) * npedge + npedge - 1] =
1281 nyPhys[k * npedge + 0];
1282
1283
1284
1285 nxPhys[(k - 1) * npedge + npedge - 1] =
1286 nxPhys[k * npedge + 0];
1287 }
1288 }
1289 }
1290 cout << "xcPhys,," << endl;
1291 for (int s = 0; s < np_lay; s++)
1292 {
1293
1294 cout << xcPhysMOD[s] << " " << ycPhysMOD[s] << " "
1295 << nxPhys[s] << " " << nyPhys[s] << endl;
1296 }
1297
1298
1299
1300
1301
1302
1303
1307 for (int m = 0; m < nlays; m++)
1308 {
1309
1310
1311
1312 if (m < cntlow + 1)
1313 {
1314 delta[m] = -(cntlow + 1 - m) * Delta0 / (cntlow + 1);
1315 }
1316 else
1317 {
1318 delta[m] = (m - (cntlow)) * Delta0 / (cntlow + 1);
1319 }
1320
1322
1323
1324 for (int h = 0; h < nvertl; h++)
1325 {
1326
1327
1328
1329
1330
1331
1332 if (move_norm == false)
1333 {
1334 ynew[lay_Vids[m][h]] = y_c[h] + delta[m];
1335 xnew[lay_Vids[m][h]] = x_c[h];
1336 }
1337 else
1338 {
1339 if (h == 0 || h == nvertl - 1)
1340 {
1341 ynew[lay_Vids[m][h]] = y_c[h] + delta[m];
1342 xnew[lay_Vids[m][h]] = x_c[h];
1343 }
1344 else
1345 {
1346 ynew[lay_Vids[m][h]] =
1347 y_c[h] + delta[m] *
abs(nyPhys[h * npedge + 0]);
1348 xnew[lay_Vids[m][h]] =
1349 x_c[h] + delta[m] *
abs(nxPhys[h * npedge + 0]);
1350 }
1351 }
1352 cout << "Vid x=" << xnew[lay_Vids[m][h]]
1353 << " y=" << ynew[lay_Vids[m][h]] << endl;
1354 if (h < nedges
1355
1356 )
1357 {
1358 cout << "edge==" << h << endl;
1359 if (h > 0)
1360 {
1362 nyPhys[(h - 1) * npedge + npedge - 1],
1363 " normaly wrong");
1365 nxPhys[(h - 1) * npedge + npedge - 1],
1366 " normalx wrong");
1367 }
1368 if (move_norm == false)
1369 {
1370
1371 layers_y[m][h * npedge + 0] = y_c[h] + delta[m];
1372 layers_x[m][h * npedge + 0] = xnew[lay_Vids[m][h]];
1373
1374 layers_y[m][h * npedge + npedge - 1] =
1375 y_c[h + 1] + delta[m];
1376 layers_x[m][h * npedge + npedge - 1] =
1377 xnew[lay_Vids[m][h + 1]];
1378
1379 for (
int d = 0;
d < npedge - 2;
d++)
1380 {
1381 layers_y[m][h * npedge +
d + 1] =
1382 ycPhysMOD[h * npedge +
d + 1] + delta[m];
1383
1384 layers_x[m][h * npedge +
d + 1] =
1385 xcPhysMOD[h * npedge +
d + 1];
1386
1387 }
1388 }
1389 else
1390 {
1391 if (h == 0)
1392 {
1393
1394 tmpy_lay[h * npedge + 0] = y_c[h] + delta[m];
1395 tmpx_lay[h * npedge + 0] = xnew[lay_Vids[m][h]];
1396
1397 tmpy_lay[h * npedge + npedge - 1] =
1398 y_c[h + 1] +
1399 delta[m] *
abs(nyPhys[h * npedge + npedge - 1]);
1400 tmpx_lay[h * npedge + npedge - 1] =
1401 x_c[h + 1] +
1402 delta[m] *
abs(nxPhys[h * npedge + npedge - 1]);
1403 }
1404 else if (h == nedges - 1)
1405 {
1406
1407 tmpy_lay[h * npedge + 0] =
1408 y_c[h] + delta[m] *
abs(nyPhys[h * npedge + 0]);
1409 tmpx_lay[h * npedge + 0] =
1410 x_c[h] + delta[m] *
abs(nxPhys[h * npedge + 0]);
1411
1412 tmpy_lay[h * npedge + npedge - 1] =
1413 y_c[h + 1] + delta[m];
1414 tmpx_lay[h * npedge + npedge - 1] =
1415 xnew[lay_Vids[m][h + 1]];
1416 }
1417 else
1418 {
1419
1420 tmpy_lay[h * npedge + 0] =
1421 y_c[h] + delta[m] *
abs(nyPhys[h * npedge + 0]);
1422 tmpx_lay[h * npedge + 0] =
1423 x_c[h] + delta[m] *
abs(nxPhys[h * npedge + 0]);
1424
1425 tmpy_lay[h * npedge + npedge - 1] =
1426 y_c[h + 1] +
1427 delta[m] *
abs(nyPhys[h * npedge + npedge - 1]);
1428 tmpx_lay[h * npedge + npedge - 1] =
1429 x_c[h + 1] +
1430 delta[m] *
abs(nxPhys[h * npedge + npedge - 1]);
1431 }
1432
1433
1434 for (
int d = 0;
d < npedge - 2;
d++)
1435 {
1436
1437 tmpy_lay[h * npedge +
d + 1] =
1438 ycPhysMOD[h * npedge +
d + 1] +
1439 delta[m] *
abs(nyPhys[h * npedge + d + 1]);
1440
1441
1442 tmpx_lay[h * npedge +
d + 1] =
1443 xcPhysMOD[h * npedge +
d + 1] +
1444 delta[m] *
abs(nxPhys[h * npedge + d + 1]);
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457 }
1458 }
1459 }
1460 }
1461
1462 for (int s = 0; s < np_lay; s++)
1463 {
1464 cout << tmpx_lay[s] << " " << tmpy_lay[s] << endl;
1465 }
1467 cout << "fisrt interp" << endl;
1468 for (int s = 0; s < np_lay; s++)
1469 {
1470 cout << tmpx_lay[s] << " " << tmpy_lay[s] << endl;
1471 }
1472
1473
1474
1475
1476
1477
1478
1479
1480
1482 NekDouble boundright = xcPhysMOD[np_lay - 1];
1483 bool outboundleft = false;
1484 bool outboundright = false;
1485 if (tmpx_lay[1] < boundleft)
1486 {
1487 outboundleft = true;
1488 }
1489 if (tmpx_lay[np_lay - 2] > boundright)
1490 {
1491 outboundright = true;
1492 }
1493
1494 int outvert = 0;
1495 int outmiddle = 0;
1496 int outcount = 0;
1497
1499 for (int r = 0; r < nedges; r++)
1500 {
1501
1502 if (tmpx_lay[r * npedge + npedge - 1] < boundleft &&
1503 outboundleft == true)
1504 {
1505 vertout[outvert] = r;
1506 outvert++;
1507
1508 if (r < nedges - 1)
1509 {
1510
1511 if (tmpx_lay[(r + 1) * npedge + npedge - 1] > boundleft)
1512 {
1513 for (int s = 0; s < npedge - 2; s++)
1514 {
1515 if (tmpx_lay[(r + 1) * npedge + s + 1] <
1516 boundleft)
1517 {
1518 outmiddle++;
1519 }
1520 }
1521 }
1522 }
1523 }
1524
1525 if (tmpx_lay[r * npedge + 0] > boundright &&
1526 outboundright == true)
1527 {
1528 vertout[outvert] = r;
1529 outvert++;
1530
1531 if (r > 0)
1532 {
1533
1534 if (tmpx_lay[(r - 1) * npedge + 0] < boundright)
1535 {
1536 for (int s = 0; s < npedge - 2; s++)
1537 {
1538 if (tmpx_lay[(r - 1) * npedge + s + 1] >
1539 boundright)
1540 {
1541 outmiddle++;
1542 }
1543 }
1544 }
1545 }
1546 }
1547 }
1548
1549
1550 outcount = outvert * npedge + 1 + outmiddle;
1551
1552 int replacepointsfromindex = 0;
1553 for (int c = 0; c < nedges; c++)
1554 {
1555
1556 if (xcPhysMOD[c * npedge + npedge - 1] <=
1557 tmpx_lay[c * (npedge - (npedge - 2)) + 2] &&
1558 outboundright == true)
1559 {
1560 replacepointsfromindex = c * (npedge - (npedge - 2)) + 2;
1561 break;
1562 }
1563
1564
1565 if (xcPhysMOD[(nedges - 1 - c) * npedge + 0] >=
1566 tmpx_lay[np_lay - 1 -
1567 (c * (npedge - (npedge - 2)) + 2)] &&
1568 outboundleft == true)
1569 {
1570 replacepointsfromindex =
1571 np_lay - 1 - (c * (npedge - (npedge - 2)) + 2);
1572 break;
1573 }
1574 }
1575
1576
1577
1578
1579
1580 if (outcount > 1)
1581 {
1582
1583
1584 int pstart, shift;
1586
1587 if (outboundright == true)
1588 {
1589 pstart = replacepointsfromindex;
1590 shift = np_lay - outcount;
1591 increment =
1592 (xcPhysMOD[np_lay - outcount] - xcPhysMOD[pstart]) /
1593 (outcount + 1);
1594 outcount = outcount - 1;
1595 ASSERTL0(tmpx_lay[np_lay - outcount] >
1596 xcPhysMOD[(nedges - 1) * npedge + 0],
1597 "no middle points in the last edge");
1598 }
1599 else
1600 {
1601 shift = 1;
1602 pstart = outcount - 1;
1603 increment = (xcPhysMOD[replacepointsfromindex] -
1604 xcPhysMOD[pstart]) /
1605 (outcount + 1);
1607 xcPhysMOD[0 * npedge + npedge - 1],
1608 "no middle points in the first edge");
1609 }
1610
1611
1614
1621
1625 NekDouble xctmp, ycinterp, nxinterp, nyinterp;
1626
1627 for (int v = 0; v < outcount; v++)
1628 {
1629 xctmp = xcPhysMOD[pstart] + (v + 1) * increment;
1630
1631
1633
1634
1635
1637 closeny);
1638
1639
1641
1642
1643 nxinterp =
sqrt(
abs(1 - nyinterp * nyinterp));
1644
1645
1647 closey);
1648
1650
1651 replace_x[v] = xctmp + delta[m] *
abs(nxinterp);
1652 replace_y[v] = ycinterp + delta[m] *
abs(nyinterp);
1653 tmpx_lay[v + shift] = replace_x[v];
1654 tmpy_lay[v + shift] = replace_y[v];
1655
1656
1657
1658 }
1659 }
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674 int closepoints = 4;
1675
1678
1679
1680 int pointscount = 0;
1681 for (
int q = 0;
q < np_lay;
q++)
1682 {
1683 for (int e = 0; e < nedges; e++)
1684 {
1685 if (tmpx_lay[q] <= x_c[e + 1] && tmpx_lay[q] >= x_c[e])
1686 {
1687 pointscount++;
1688 }
1689 if (q == e * npedge + npedge - 1 && pointscount != npedge)
1690 {
1691
1692 pointscount = 0;
1693 }
1694 else if (q == e * npedge + npedge - 1)
1695 {
1696 pointscount = 0;
1697 }
1698 }
1699 }
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1715 lay_Vids[m], layers_x[m], layers_y[m], xnew,
1716 ynew);
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795 if (curv_lay == true)
1796 {
1797
1798
1799
1800
1801 }
1802
1803
1804 int npoints = npedge;
1807 for (int f = 0; f < nedges; f++)
1808 {
1809 int polyorder = 2;
1810
1812
1814 &xPedges[0], 1);
1816 &yPedges[0], 1);
1817
1818 PolyFit(polyorder, npoints, xPedges, yPedges, coeffsinterp,
1819 xPedges, yPedges, npoints);
1820
1821
1823 &layers_y[m][(f)*npedge + 0], 1);
1824
1825
1826 layers_y[m][f * npedge + 0] = ynew[lay_Vids[m][f]];
1827 layers_y[m][f * npedge + npedge - 1] = ynew[lay_Vids[m][f + 1]];
1828 }
1829
1830 cout << " xlay ylay lay:" << m << endl;
1831 for (int l = 0; l < np_lay; l++)
1832 {
1833
1834 cout << std::setprecision(8) << layers_x[m][l] << " "
1835 << layers_y[m][l] << endl;
1836 }
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871 cout << "lay=" << m << endl;
1874 " different layer ymin val");
1877 " different layer ymax val");
1880 " different layer xmin val");
1883 " different layer xmax val");
1884 }
1885
1886
1887
1888
1889
1890
1891
1893 npedge, graphShPt, xold_c, yold_c, xold_low, yold_low, xold_up,
1894 yold_up, layers_x[0], layers_y[0], layers_x[nlays - 1],
1895 layers_y[nlays - 1], nxPhys, nyPhys, xnew, ynew);
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972 }
1973 else
1974 {
1976 Down, Up, xnew, ynew, layers_x, layers_y);
1977 }
1978
1979
1981
1982
1983
1984
1985
1986 cout << std::setprecision(8) <<
"xmin=" <<
Vmath::Vmin(nVertTot, xnew, 1)
1987 << endl;
1989 " different xmin val");
1991 " different ymin val");
1993 " different xmax val");
1995 " different ymax val");
1996
1997
1998
2000 charalp, layers_x, layers_y, lay_Eids, curv_lay);
2001}
void GenerateMapEidsv1v2(MultiRegions::ExpListSharedPtr field, Array< OneD, int > &V1, Array< OneD, int > &V2)
void MoveLayerNnormpos(int nvertl, int npedge, Array< OneD, NekDouble > xcPhys, Array< OneD, NekDouble > tmpx_lay, Array< OneD, NekDouble > tmpy_lay, Array< OneD, int > Vids, Array< OneD, NekDouble > &xlay, Array< OneD, NekDouble > &ylay, Array< OneD, NekDouble > &xnew, Array< OneD, NekDouble > &ynew)
void EvaluateTangent(int npoints, Array< OneD, NekDouble > xcQedge, Array< OneD, NekDouble > coeffsinterp, Array< OneD, NekDouble > &txQedge, Array< OneD, NekDouble > &tyQedge)
NekDouble LagrangeInterpolant(NekDouble x, int npts, Array< OneD, NekDouble > xpts, Array< OneD, NekDouble > funcvals)
void Computestreakpositions(int nvertl, MultiRegions::ExpListSharedPtr streak, Array< OneD, NekDouble > xold_up, Array< OneD, NekDouble > yold_up, Array< OneD, NekDouble > xold_low, Array< OneD, NekDouble > yold_low, Array< OneD, NekDouble > xold_c, Array< OneD, NekDouble > yold_c, Array< OneD, NekDouble > &xc, Array< OneD, NekDouble > &yc, NekDouble cr, bool verts)
void Cutrepetitions(int nedges, Array< OneD, NekDouble > inarray, Array< OneD, NekDouble > &outarray)
void MoveOutsidePointsNnormpos(int npedge, SpatialDomains::MeshGraphSharedPtr mesh, Array< OneD, NekDouble > xcold, Array< OneD, NekDouble > ycold, Array< OneD, NekDouble > xolddown, Array< OneD, NekDouble > yolddown, Array< OneD, NekDouble > xoldup, Array< OneD, NekDouble > yoldup, Array< OneD, NekDouble > xlaydown, Array< OneD, NekDouble > ylaydown, Array< OneD, NekDouble > xlayup, Array< OneD, NekDouble > ylayup, Array< OneD, NekDouble > nxPhys, Array< OneD, NekDouble > nyPhys, Array< OneD, NekDouble > &xnew, Array< OneD, NekDouble > &ynew)
void MappingEVids(Array< OneD, NekDouble > xoldup, Array< OneD, NekDouble > yoldup, Array< OneD, NekDouble > xolddown, Array< OneD, NekDouble > yolddown, Array< OneD, NekDouble > xcold, Array< OneD, NekDouble > ycold, Array< OneD, int > Vids_c, SpatialDomains::MeshGraphSharedPtr mesh, MultiRegions::ExpListSharedPtr streak, Array< OneD, int > V1, Array< OneD, int > V2, int &nlays, Array< OneD, Array< OneD, int > > &Eids_lay, Array< OneD, Array< OneD, int > > &Vids_lay)
void CheckSingularQuads(MultiRegions::ExpListSharedPtr Exp, Array< OneD, int > V1, Array< OneD, int > V2, Array< OneD, NekDouble > &xnew, Array< OneD, NekDouble > &ynew)
void Orderfunctionx(Array< OneD, NekDouble > inarray_x, Array< OneD, NekDouble > inarray_y, Array< OneD, NekDouble > &outarray_x, Array< OneD, NekDouble > &outarray_y)
void Replacevertices(string filename, Array< OneD, NekDouble > newx, Array< OneD, NekDouble > newy, Array< OneD, NekDouble > xcPhys, Array< OneD, NekDouble > ycPhys, Array< OneD, int > Eids, int Npoints, string s_alp, Array< OneD, Array< OneD, NekDouble > > x_lay, Array< OneD, Array< OneD, NekDouble > > y_lay, Array< OneD, Array< OneD, int > > lay_eids, bool curv_lay)
void OrderVertices(int nedges, SpatialDomains::MeshGraphSharedPtr graphShPt, MultiRegions::ExpListSharedPtr &bndfield, Array< OneD, int > &Vids, int v1, int v2, NekDouble x_connect, int &lastedge, Array< OneD, NekDouble > &x, Array< OneD, NekDouble > &y)
void PolyFit(int polyorder, int npoints, Array< OneD, NekDouble > xin, Array< OneD, NekDouble > fin, Array< OneD, NekDouble > &coeffsinterp, Array< OneD, NekDouble > &xout, Array< OneD, NekDouble > &fout, int npout)
void GenerateAddPointsNewtonIt(NekDouble xi, NekDouble yi, NekDouble &xout, NekDouble &yout, MultiRegions::ExpListSharedPtr function, Array< OneD, NekDouble > derfunction, NekDouble cr)
void MoveLayersvertically(int nlays, int nvertl, int cntlow, int cntup, Array< OneD, Array< OneD, int > > lay_Vids, Array< OneD, NekDouble > xc, Array< OneD, NekDouble > yc, Array< OneD, int > Down, Array< OneD, int > Up, Array< OneD, NekDouble > &xnew, Array< OneD, NekDouble > &ynew, Array< OneD, Array< OneD, NekDouble > > &layers_x, Array< OneD, Array< OneD, NekDouble > > &layers_y)
void GenerateNeighbourArrays(int index, int neighpoints, Array< OneD, NekDouble > xArray, Array< OneD, NekDouble > yArray, Array< OneD, NekDouble > &Neighbour_x, Array< OneD, NekDouble > &Neighbour_y)
int DetermineclosePointxindex(NekDouble x, Array< OneD, NekDouble > xArray)
static SessionReaderSharedPtr CreateInstance(int argc, char *argv[])
Creates an instance of the SessionReader class.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
static MeshGraphSharedPtr Read(const LibUtilities::SessionReaderSharedPtr pSession, LibUtilities::DomainRangeShPtr rng=LibUtilities::NullDomainRangeShPtr, bool fillGraph=true, SpatialDomains::MeshGraphSharedPtr partitionedGraph=nullptr)
void GetCoords(NekDouble &x, NekDouble &y, NekDouble &z)
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...
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< SegExp > SegExpSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::shared_ptr< ContField > ContFieldSharedPtr
std::map< int, BoundaryRegionShPtr > BoundaryRegionCollection
std::shared_ptr< BoundaryConditions > BoundaryConditionsSharedPtr
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::vector< double > z(NPUPPER)
void Vsqrt(int n, const T *x, const int incx, T *y, const int incy)
sqrt y = sqrt(x)
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
T Vmin(int n, const T *x, const int incx)
Return the minimum element in x - called vmin to avoid conflict with min.
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
void Sdiv(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha/x.
void Vdiv(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x/y.
void Zero(int n, T *x, const int incx)
Zero vector.
T Vmax(int n, const T *x, const int incx)
Return the maximum element in x – called vmax to avoid conflict with max.
scalarT< T > sqrt(scalarT< T > in)