Nektar++
|
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <MultiRegions/ExpList.h>
#include <MultiRegions/ContField1D.h>
#include <MultiRegions/ContField2D.h>
#include <MultiRegions/ContField3D.h>
#include <LocalRegions/SegExp.h>
#include <LocalRegions/TriExp.h>
#include <LocalRegions/QuadExp.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 | |
int | main (int argc, char *argv[]) |
void | SetFields (SpatialDomains::MeshGraphSharedPtr &mesh, SpatialDomains::BoundaryConditionsSharedPtr &boundaryConditions, LibUtilities::SessionReaderSharedPtr &session, Array< OneD, MultiRegions::ExpListSharedPtr > &Exp, int nvariables) |
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 npoints, MultiRegions::ExpListSharedPtr &streak, Array< OneD, NekDouble > x, Array< OneD, NekDouble > y, 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 &x0, NekDouble &y0, MultiRegions::ExpListSharedPtr &function, Array< OneD, NekDouble > &derfunction, NekDouble cr) |
void | GenerateCurve (int npoints, int npused, Array< OneD, NekDouble > &x_c, Array< OneD, NekDouble > &y_c, Array< OneD, NekDouble > &curve) |
void | GenerateCurveSp (Array< OneD, NekDouble > &x_c, Array< OneD, NekDouble > &y_c, Array< OneD, NekDouble > &x_lay, Array< OneD, NekDouble > &y_lay) |
void | GenerateAddPoints (int region, SpatialDomains::MeshGraphSharedPtr &mesh, int np, int npused, Array< OneD, NekDouble > &curve, MultiRegions::ExpListSharedPtr &bndfield, Array< OneD, NekDouble > &outx, Array< OneD, NekDouble > &outy, Array< OneD, int > &Eids) |
void | MapEdgeVertices (MultiRegions::ExpListSharedPtr field, Array< OneD, int > &V1, Array< OneD, int > &V2) |
void | Findlay_eids (Array< OneD, Array< OneD, NekDouble > > &layers_y, Array< OneD, int > V1, Array< OneD, int > V2, Array< OneD, Array< OneD, int > > &lay_Vids, Array< OneD, Array< OneD, int > > &lay_eids) |
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 | Cutrepetitions (int nedges, Array< OneD, NekDouble > inarray, Array< OneD, NekDouble > &outarray) |
void | Orderfunctionx (Array< OneD, NekDouble > inarray_x, Array< OneD, NekDouble > inarray_y, Array< OneD, NekDouble > &outarray_x, Array< OneD, NekDouble > &outarray_y) |
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 | ChangeLayerspos (Array< OneD, NekDouble > &ynew, Array< OneD, NekDouble > yc, Array< OneD, NekDouble > Addpointsy, Array< OneD, Array< OneD, NekDouble > > &layers_y, Array< OneD, Array< OneD, int > >lay_Vids, NekDouble delt, NekDouble delt_opp, string movelay, int npedge) |
void | Replacevertices (string filename, Array< OneD, NekDouble > newx, Array< OneD, NekDouble > newy, Array< OneD, NekDouble > x_crit, Array< OneD, NekDouble > y_crit, Array< OneD, NekDouble > &Pcurvx, Array< OneD, NekDouble > &Pcurvy, 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 ChangeLayerspos | ( | Array< OneD, NekDouble > & | ynew, |
Array< OneD, NekDouble > | yc, | ||
Array< OneD, NekDouble > | Addpointsy, | ||
Array< OneD, Array< OneD, NekDouble > > & | layers_y, | ||
Array< OneD, Array< OneD, int > > | lay_Vids, | ||
NekDouble | delt, | ||
NekDouble | delt_opp, | ||
string | movelay, | ||
int | npedge | ||
) |
Definition at line 3158 of file MoveMesh.cpp.
References ASSERTL0.
Referenced by main().
void Computestreakpositions | ( | int | npoints, |
MultiRegions::ExpListSharedPtr & | streak, | ||
Array< OneD, NekDouble > | x, | ||
Array< OneD, NekDouble > | y, | ||
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 2413 of file MoveMesh.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 3009 of file MoveMesh.cpp.
References ASSERTL0, and Vmath::Vcopy().
Definition at line 3062 of file MoveMesh.cpp.
References Vmath::Imin(), npts, Vmath::Sadd(), Vmath::Vabs(), and Vmath::Vcopy().
void Findlay_eids | ( | Array< OneD, Array< OneD, NekDouble > > & | layers_y, |
Array< OneD, int > | V1, | ||
Array< OneD, int > | V2, | ||
Array< OneD, Array< OneD, int > > & | lay_Vids, | ||
Array< OneD, Array< OneD, int > > & | lay_eids | ||
) |
Definition at line 2909 of file MoveMesh.cpp.
References ASSERTL0, Vmath::Imin(), and Vmath::Vmin().
Referenced by main().
void GenerateAddPoints | ( | int | region, |
SpatialDomains::MeshGraphSharedPtr & | mesh, | ||
int | np, | ||
int | npused, | ||
Array< OneD, NekDouble > & | curve, | ||
MultiRegions::ExpListSharedPtr & | bndfield, | ||
Array< OneD, NekDouble > & | outx, | ||
Array< OneD, NekDouble > & | outy, | ||
Array< OneD, int > & | Eids | ||
) |
Definition at line 2776 of file MoveMesh.cpp.
References ASSERTL0, and Nektar::StdRegions::StdExpansion::GetCoords().
Referenced by main().
void GenerateAddPointsNewtonIt | ( | NekDouble & | xi, |
NekDouble & | yi, | ||
NekDouble & | x0, | ||
NekDouble & | y0, | ||
MultiRegions::ExpListSharedPtr & | function, | ||
Array< OneD, NekDouble > & | derfunction, | ||
NekDouble | cr | ||
) |
Definition at line 2591 of file MoveMesh.cpp.
References ASSERTL0.
void GenerateCurve | ( | int | npoints, |
int | npused, | ||
Array< OneD, NekDouble > & | x_c, | ||
Array< OneD, NekDouble > & | y_c, | ||
Array< OneD, NekDouble > & | curve | ||
) |
Definition at line 2663 of file MoveMesh.cpp.
References ASSERTL0, and Vmath::Vcopy().
Referenced by main().
void GenerateCurveSp | ( | Array< OneD, NekDouble > & | x_c, |
Array< OneD, NekDouble > & | y_c, | ||
Array< OneD, NekDouble > & | x_lay, | ||
Array< OneD, NekDouble > & | y_lay | ||
) |
Definition at line 2747 of file MoveMesh.cpp.
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 3081 of file MoveMesh.cpp.
References ASSERTL0, and Vmath::Vcopy().
NekDouble LagrangeInterpolant | ( | NekDouble | x, |
int | npts, | ||
Array< OneD, NekDouble > | xpts, | ||
Array< OneD, NekDouble > | funcvals | ||
) |
Definition at line 3131 of file MoveMesh.cpp.
References npts.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 20 of file MoveMesh.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, ChangeLayerspos(), Computestreakpositions(), Nektar::LibUtilities::SessionReader::CreateInstance(), Cutrepetitions(), DetermineclosePointxindex(), Nektar::SpatialDomains::eCalcBC, Nektar::MultiRegions::eY, Findlay_eids(), GenerateAddPoints(), GenerateAddPointsNewtonIt(), GenerateCurve(), GenerateCurveSp(), GenerateNeighbourArrays(), Nektar::StdRegions::StdExpansion::GetCoords(), Nektar::LibUtilities::Import(), LagrangeInterpolant(), MapEdgeVertices(), MoveLayersvertically(), npts, Orderfunctionx(), OrderVertices(), Nektar::SpatialDomains::MeshGraph::Read(), Replacevertices(), Vmath::Sadd(), Vmath::Sdiv(), SetFields(), Vmath::Smul(), Vmath::Vcopy(), Vmath::Vdiv(), Vmath::Vmax(), Vmath::Vmin(), Vmath::Vmul(), Vmath::Vsqrt(), and Vmath::Vvtvp().
void MapEdgeVertices | ( | MultiRegions::ExpListSharedPtr | field, |
Array< OneD, int > & | V1, | ||
Array< OneD, int > & | V2 | ||
) |
Definition at line 2847 of file MoveMesh.cpp.
References ASSERTL0, and GetEdge().
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 2967 of file MoveMesh.cpp.
References ASSERTL0.
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 MoveMesh.cpp.
References Vmath::Imin(), Vmath::Vcopy(), and Vmath::Vmax().
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 2326 of file MoveMesh.cpp.
References Nektar::StdRegions::StdExpansion::GetCoords().
void Replacevertices | ( | string | filename, |
Array< OneD, NekDouble > | newx, | ||
Array< OneD, NekDouble > | newy, | ||
Array< OneD, NekDouble > | x_crit, | ||
Array< OneD, NekDouble > | y_crit, | ||
Array< OneD, NekDouble > & | Pcurvx, | ||
Array< OneD, NekDouble > & | Pcurvy, | ||
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 3274 of file MoveMesh.cpp.
References ASSERTL0, Nektar::LibUtilities::AnalyticExpressionEvaluator::DefineFunction(), Nektar::LibUtilities::AnalyticExpressionEvaluator::Evaluate(), and Nektar::lhs.
void SetFields | ( | SpatialDomains::MeshGraphSharedPtr & | mesh, |
SpatialDomains::BoundaryConditionsSharedPtr & | boundaryConditions, | ||
LibUtilities::SessionReaderSharedPtr & | session, | ||
Array< OneD, MultiRegions::ExpListSharedPtr > & | Exp, | ||
int | nvariables | ||
) |
< physical length in X direction (if homogeneous)
< physical length in Y direction (if homogeneous)
< physical length in Z direction (if homogeneous)
< number of points in X direction (if homogeneous)
< number of points in Y direction (if homogeneous)
< number of points in Z direction (if homogeneous)
Parameter for homogeneous expansions
Definition at line 2152 of file MoveMesh.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and ASSERTL0.