Nektar++
|
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <MultiRegions/ExpList.h>
#include <MultiRegions/ExpList1D.h>
#include <MultiRegions/ContField1D.h>
#include <MultiRegions/ContField2D.h>
#include <LocalRegions/SegExp.h>
#include <LocalRegions/QuadExp.h>
#include <LocalRegions/TriExp.h>
#include <LibUtilities/LinearAlgebra/Lapack.hpp>
#include <LibUtilities/BasicConst/NektarUnivTypeDefs.hpp>
#include <boost/lexical_cast.hpp>
#include <tinyxml.h>
Go to the source code of this file.
Functions | |
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 | 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 | GenerateAddPointsNewtonIt (NekDouble xi, NekDouble yi, NekDouble &xout, NekDouble &yout, MultiRegions::ExpListSharedPtr function, Array< OneD, NekDouble > derfunction, NekDouble cr) |
void | GenerateMapEidsv1v2 (MultiRegions::ExpListSharedPtr field, Array< OneD, int > &V1, Array< OneD, int > &V2) |
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) |
bool | checkcommonvert (Array< OneD, int > Vids_laybefore, Array< OneD, int > Vids_c, int Vid) |
void | Cutrepetitions (int nedges, Array< OneD, NekDouble > inarray, Array< OneD, NekDouble > &outarray) |
int | DetermineclosePointxindex (NekDouble x, Array< OneD, NekDouble > xArray) |
void | GenerateNeighbourArrays (int index, int neighpoints, Array< OneD, NekDouble > xArray, Array< OneD, NekDouble > yArray, Array< OneD, NekDouble > &Neighbour_x, Array< OneD, NekDouble > &Neighbour_y) |
NekDouble | LagrangeInterpolant (NekDouble x, int npts, Array< OneD, NekDouble > xpts, Array< OneD, NekDouble > funcvals) |
void | EvaluateTangent (int npoints, Array< OneD, NekDouble > xcQedge, Array< OneD, NekDouble > coeffsinterp, Array< OneD, NekDouble > &txQedge, Array< OneD, NekDouble > &tyQedge) |
void | PolyInterp (Array< OneD, NekDouble > xpol, Array< OneD, NekDouble > ypol, Array< OneD, NekDouble > &coeffsinterp, Array< OneD, NekDouble > &xcout, Array< OneD, NekDouble > &ycout, int edge, int npedge) |
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 | Orderfunctionx (Array< OneD, NekDouble > inarray_x, Array< OneD, NekDouble > inarray_y, Array< OneD, NekDouble > &outarray_x, Array< OneD, NekDouble > &outarray_y) |
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 | MoveLayerNfixedxpos (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 | 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 | MoveOutsidePointsfixedxpos (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 > ylaydown, Array< OneD, NekDouble > ylayup, Array< OneD, NekDouble > &xnew, Array< OneD, NekDouble > &ynew) |
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 | CheckSingularQuads (MultiRegions::ExpListSharedPtr Exp, Array< OneD, int > V1, Array< OneD, int > V2, Array< OneD, NekDouble > &xnew, Array< OneD, NekDouble > &ynew) |
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) |
int | main (int argc, char *argv[]) |
Definition at line 2646 of file MeshMove.cpp.
Referenced by MappingEVids().
void CheckSingularQuads | ( | MultiRegions::ExpListSharedPtr | Exp, |
Array< OneD, int > | V1, | ||
Array< OneD, int > | V2, | ||
Array< OneD, NekDouble > & | xnew, | ||
Array< OneD, NekDouble > & | ynew | ||
) |
Definition at line 3625 of file MeshMove.cpp.
Referenced by main().
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 | ||
) |
Definition at line 2020 of file MeshMove.cpp.
References ASSERTL0, Nektar::MultiRegions::eY, Vmath::Smul(), Vmath::Vadd(), and Vmath::Vcopy().
void Cutrepetitions | ( | int | nedges, |
Array< OneD, NekDouble > | inarray, | ||
Array< OneD, NekDouble > & | outarray | ||
) |
Definition at line 2662 of file MeshMove.cpp.
References ASSERTL0.
Referenced by main(), MoveLayerNfixedxpos(), and MoveLayerNnormpos().
Definition at line 2691 of file MeshMove.cpp.
References Vmath::Imin(), npts, Vmath::Sadd(), Vmath::Vabs(), and Vmath::Vcopy().
Referenced by main(), MoveLayerNfixedxpos(), and MoveLayerNnormpos().
void EvaluateTangent | ( | int | npoints, |
Array< OneD, NekDouble > | xcQedge, | ||
Array< OneD, NekDouble > | coeffsinterp, | ||
Array< OneD, NekDouble > & | txQedge, | ||
Array< OneD, NekDouble > & | tyQedge | ||
) |
Definition at line 2786 of file MeshMove.cpp.
Referenced by main().
void GenerateAddPointsNewtonIt | ( | NekDouble | xi, |
NekDouble | yi, | ||
NekDouble & | xout, | ||
NekDouble & | yout, | ||
MultiRegions::ExpListSharedPtr | function, | ||
Array< OneD, NekDouble > | derfunction, | ||
NekDouble | cr | ||
) |
Definition at line 2136 of file MeshMove.cpp.
References ASSERTL0.
Referenced by main().
void GenerateMapEidsv1v2 | ( | MultiRegions::ExpListSharedPtr | field, |
Array< OneD, int > & | V1, | ||
Array< OneD, int > & | V2 | ||
) |
Definition at line 2216 of file MeshMove.cpp.
References ASSERTL0, and GetEdge().
Referenced by main().
void GenerateNeighbourArrays | ( | int | index, |
int | neighpoints, | ||
Array< OneD, NekDouble > | xArray, | ||
Array< OneD, NekDouble > | yArray, | ||
Array< OneD, NekDouble > & | Neighbour_x, | ||
Array< OneD, NekDouble > & | Neighbour_y | ||
) |
Definition at line 2709 of file MeshMove.cpp.
References ASSERTL0, and Vmath::Vcopy().
Referenced by main(), MoveLayerNfixedxpos(), and MoveLayerNnormpos().
NekDouble LagrangeInterpolant | ( | NekDouble | x, |
int | npts, | ||
Array< OneD, NekDouble > | xpts, | ||
Array< OneD, NekDouble > | funcvals | ||
) |
Definition at line 2758 of file MeshMove.cpp.
References npts.
Referenced by main(), MoveLayerNfixedxpos(), and MoveLayerNnormpos().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 170 of file MeshMove.cpp.
References ASSERTL0, CheckSingularQuads(), Computestreakpositions(), Cutrepetitions(), DetermineclosePointxindex(), Nektar::SpatialDomains::eCalcBC, EvaluateTangent(), Nektar::MultiRegions::eX, Nektar::MultiRegions::eY, GenerateAddPointsNewtonIt(), GenerateMapEidsv1v2(), GenerateNeighbourArrays(), Nektar::SpatialDomains::BoundaryConditions::GetBoundaryRegions(), Nektar::StdRegions::StdExpansion::GetCoords(), Nektar::LibUtilities::Import(), LagrangeInterpolant(), MappingEVids(), MoveLayerNnormpos(), MoveLayersvertically(), MoveOutsidePointsNnormpos(), Orderfunctionx(), OrderVertices(), PolyFit(), Replacevertices(), Vmath::Sadd(), Vmath::Sdiv(), Vmath::Smul(), Vmath::Vcopy(), Vmath::Vdiv(), Vmath::Vmax(), Vmath::Vmin(), Vmath::Vmul(), Vmath::Vsqrt(), Vmath::Vvtvp(), and Vmath::Zero().
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 | ||
) |
Definition at line 2286 of file MeshMove.cpp.
References ASSERTL0, checkcommonvert(), Vmath::Imin(), Vmath::Vcopy(), and Vmath::Vmax().
Referenced by main().
void MoveLayerNfixedxpos | ( | 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 | ||
) |
Definition at line 3127 of file MeshMove.cpp.
References ASSERTL0, Cutrepetitions(), DetermineclosePointxindex(), GenerateNeighbourArrays(), LagrangeInterpolant(), and Orderfunctionx().
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 | ||
) |
Definition at line 3206 of file MeshMove.cpp.
References ASSERTL0, Cutrepetitions(), DetermineclosePointxindex(), GenerateNeighbourArrays(), LagrangeInterpolant(), and Orderfunctionx().
Referenced by main().
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 | ||
) |
Definition at line 3083 of file MeshMove.cpp.
References ASSERTL0.
Referenced by main().
void MoveOutsidePointsfixedxpos | ( | 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 > | ylaydown, | ||
Array< OneD, NekDouble > | ylayup, | ||
Array< OneD, NekDouble > & | xnew, | ||
Array< OneD, NekDouble > & | ynew | ||
) |
Definition at line 3272 of file MeshMove.cpp.
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 | ||
) |
Definition at line 3340 of file MeshMove.cpp.
References ASSERTL0, Vmath::Imin(), Vmath::Sadd(), Vmath::Vadd(), Vmath::Vmax(), Vmath::Vmin(), Vmath::Vmul(), and Vmath::Zero().
Referenced by main().
void Orderfunctionx | ( | Array< OneD, NekDouble > | inarray_x, |
Array< OneD, NekDouble > | inarray_y, | ||
Array< OneD, NekDouble > & | outarray_x, | ||
Array< OneD, NekDouble > & | outarray_y | ||
) |
Definition at line 3038 of file MeshMove.cpp.
References Vmath::Imin(), Vmath::Vcopy(), and Vmath::Vmax().
Referenced by main(), MoveLayerNfixedxpos(), and MoveLayerNnormpos().
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 | ||
) |
Definition at line 1933 of file MeshMove.cpp.
References Nektar::StdRegions::StdExpansion::GetCoords().
Referenced by main().
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 | ||
) |
Definition at line 2920 of file MeshMove.cpp.
References ASSERTL0, and Vmath::Vcopy().
Referenced by main().
void PolyInterp | ( | Array< OneD, NekDouble > | xpol, |
Array< OneD, NekDouble > | ypol, | ||
Array< OneD, NekDouble > & | coeffsinterp, | ||
Array< OneD, NekDouble > & | xcout, | ||
Array< OneD, NekDouble > & | ycout, | ||
int | edge, | ||
int | npedge | ||
) |
Definition at line 2829 of file MeshMove.cpp.
References ASSERTL0, and Vmath::Vcopy().
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 | ||
) |
Pull out lhs and rhs and eliminate any spaces.
Definition at line 3797 of file MeshMove.cpp.
Referenced by main().