Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Typedefs | Enumerations | Functions | Variables
Nektar::Utilities Namespace Reference

Classes

struct  ConfigOption
 Represents a command-line configuration option. More...
 
struct  EdgeInfo
 
struct  ElmtConfigHash
 
struct  Field
 
class  FieldConvertComm
 
class  InputCAD
 
class  InputDat
 Input module for Xml files. More...
 
class  InputFld
 
class  InputGmsh
 
class  InputModule
 Abstract base class for input modules. More...
 
class  InputNek
 
class  InputNekpp
 
class  InputPly
 Converter for Ply files. More...
 
class  InputPts
 
class  InputSem
 
class  InputStar
 Converter for VTK files. More...
 
class  InputSwan
 Converter for Swansea mesh format. More...
 
class  InputTec
 Converter for VTK files. More...
 
class  InputVtk
 Converter for VTK files. More...
 
class  InputXml
 
class  Iso
 
class  IsoVertex
 
class  Module
 
class  OutputFld
 Converter from fld to vtk. More...
 
class  OutputGmsh
 Converter for Gmsh files. More...
 
class  OutputInfo
 
class  OutputModule
 Abstract base class for output modules. More...
 
class  OutputNekpp
 Converter for Gmsh files. More...
 
class  OutputPts
 Converter from fld to pts. More...
 
class  OutputStdOut
 
class  OutputTecplot
 Converter from fld to dat. More...
 
class  OutputVtk
 Converter from fld to vtk. More...
 
class  OutputXml
 Converter from fld to vtk. More...
 
class  ProcessAddFld
 This processing module scales the input fld file. More...
 
class  ProcessBL
 This processing module calculates the Jacobian of elements using SpatialDomains::GeomFactors and the Element::GetGeom method. For now it simply prints a list of elements which have negative Jacobian. More...
 
class  ProcessBoundaryExtract
 This processing module sets up for the boundary field to be extracted. More...
 
class  ProcessC0Projection
 This processing module calculates the Q Criterion and adds it as an extra-field to the output file. More...
 
class  ProcessConcatenateFld
 This processing module sets up for the boundary field to be extracted. More...
 
class  ProcessCyl
 
class  ProcessDeform
 
class  ProcessDetectSurf
 This processing module calculates the Jacobian of elements using SpatialDomains::GeomFactors and the Element::GetGeom method. For now it simply prints a list of elements which have negative Jacobian. More...
 
class  ProcessDisplacement
 
class  ProcessEquiSpacedOutput
 This processing module interpolates one field to another. More...
 
class  ProcessExtractSurf
 This processing module calculates the Jacobian of elements using SpatialDomains::GeomFactors and the Element::GetGeom method. For now it simply prints a list of elements which have negative Jacobian. More...
 
class  ProcessExtractTetPrismInterface
 Module to extract interface between prismatic and tetrahedral elements. More...
 
class  ProcessGrad
 This processing module calculates the vorticity and adds it as an extra-field to the output file. More...
 
class  ProcessHomogeneousPlane
 This processing module replaces all expansions by a single plane from 3DH1D fields, defined by the parameter planeid. More...
 
class  ProcessInnerProduct
 This processing module computes the inner product between two fields. More...
 
class  ProcessInterpField
 This processing module interpolates one field to another. More...
 
class  ProcessInterpPointDataToFld
 This processing module interpolates one field to another. More...
 
class  ProcessInterpPoints
 This processing module interpolates one field to another. More...
 
class  ProcessIsoContour
 This processing module extracts an isocontour. More...
 
class  ProcessJac
 This processing module calculates the Jacobian of elements using SpatialDomains::GeomFactors and the Element::GetGeom method. For now it simply prints a list of elements which have negative Jacobian. More...
 
class  ProcessJacobianEnergy
 This processing module scales the input fld file. More...
 
class  ProcessLinear
 This processing module removes all the high-order information from the mesh leaving just the linear elements. More...
 
class  ProcessMapping
 This processing module scales the input fld file. More...
 
class  ProcessMeanMode
 This processing module replaces all expansions by the mean mode from 3DH1D fields. More...
 
class  ProcessModule
 Abstract base class for processing modules. More...
 
class  ProcessMultiShear
 This processing module calculates the shear stress metrics and writes it to a surface output file. More...
 
class  ProcessNumModes
 This processing module calculates the vorticity and adds it as an extra-field to the output file. More...
 
class  ProcessOptiExtract
 
class  ProcessPerAlign
 
class  ProcessPointDataToFld
 This processing module interpolates one field to another. More...
 
class  ProcessPrintFldNorms
 This processing module prints the L2 and LInf norms of the variables in the field. More...
 
class  ProcessQCriterion
 This processing module calculates the Q Criterion and adds it as an extra-field to the output file. More...
 
class  ProcessQualityMetric
 This processing module scales the input fld file. More...
 
class  ProcessScalar
 This processing module calculates the Jacobian of elements using SpatialDomains::GeomFactors and the Element::GetGeom method. For now it simply prints a list of elements which have negative Jacobian. More...
 
class  ProcessScaleInFld
 This processing module scales the input fld file. More...
 
class  ProcessScalGrad
 This processing module calculates the scalar gradient field and writes it to a surface output file. More...
 
class  ProcessSpherigon
 
class  ProcessSurfDistance
 This processing module calculates the height of an element connected to a surface and adds it as an extra-field to the output file. More...
 
class  ProcessTetSplit
 This processing module calculates the Jacobian of elements using SpatialDomains::GeomFactors and the Element::GetGeom method. For now it simply prints a list of elements which have negative Jacobian. More...
 
class  ProcessVorticity
 This processing module calculates the vorticity and adds it as an extra-field to the output file. More...
 
class  ProcessWSS
 This processing module calculates the wall shear stress and adds it as an extra-field to the output file, and writes it to a surface output file. More...
 
struct  SplitEdgeHelper
 
struct  SplitMapHelper
 
struct  TriFaceHash
 
struct  TriFaceIDs
 

Typedefs

typedef boost::shared_ptr< FieldFieldSharedPtr
 
typedef boost::shared_ptr
< InputModule
InputModuleSharedPtr
 
typedef pair< ModuleType, string > ModuleKey
 
typedef boost::shared_ptr< ModuleModuleSharedPtr
 
typedef
LibUtilities::NekFactory
< ModuleKey, Module,
FieldSharedPtr
ModuleFactory
 
typedef boost::unordered_map
< TriFaceIDs, int, TriFaceHash
TriFaceMap
 
typedef boost::shared_ptr< IsoIsoSharedPtr
 
typedef boost::shared_ptr
< InputPly
InputPlySharedPtr
 
typedef map< int, pair
< FaceSharedPtr, vector< int > > > 
PerMap
 
typedef std::pair< int, int > ipair
 

Enumerations

enum  ModuleType {
  eInputModule, eProcessModule, eOutputModule, SIZE_ModuleType,
  eInputModule, eProcessModule, eOutputModule, SIZE_ModuleType
}
 
enum  TecOutType { eFullBlockZone, eFullBlockZoneEquiSpaced, eSeperateZones }
 
enum  NekCurve { eFile, eRecon }
 
enum  ModuleType {
  eInputModule, eProcessModule, eOutputModule, SIZE_ModuleType,
  eInputModule, eProcessModule, eOutputModule, SIZE_ModuleType
}
 

Functions

ModuleFactoryGetModuleFactory ()
 
std::ostream & operator<< (std::ostream &os, const ModuleKey &rhs)
 
bool operator== (TriFaceIDs const &p1, TriFaceIDs const &p2)
 
void TwoPairs (Array< OneD, NekDouble > &cx, Array< OneD, NekDouble > &cy, Array< OneD, NekDouble > &cz, int &pr)
 
void ThreeSimilar (const int i, const int j, const int k, int &pr, int &ps)
 
bool operator== (const IsoVertex &x, const IsoVertex &y)
 
bool operator!= (const IsoVertex &x, const IsoVertex &y)
 
bool same (NekDouble x1, NekDouble y1, NekDouble z1, NekDouble x2, NekDouble y2, NekDouble z2)
 
vector< DNekMatMappingIdealToRef (SpatialDomains::GeometrySharedPtr geom, StdRegions::StdExpansionSharedPtr chi)
 
std::vector< int > quadTensorNodeOrdering (const std::vector< int > &nodes, int n)
 Reorder a quadrilateral to appear in Nektar++ ordering from Gmsh. More...
 
std::vector< int > triTensorNodeOrdering (const std::vector< int > &nodes, int n)
 
static void PrismLineFaces (int prismid, map< int, int > &facelist, vector< vector< int > > &FacesToPrisms, vector< vector< int > > &PrismsToFaces, vector< bool > &PrismDone)
 
static void PrismLineFaces (int prismid, map< int, int > &facelist, vector< vector< int > > &FacesToPrisms, vector< vector< int > > &PrismsToFaces, vector< bool > &PrismDone)
 
bool operator== (ElmtConfig const &p1, ElmtConfig const &p2)
 
template<typename T >
void TestElmts (SpatialDomains::MeshGraphSharedPtr &graph)
 
int ** helper2d (int lda, int arr[][2])
 
int ** helper2d (int lda, int arr[][4])
 

Variables

const char *const ModuleTypeMap []
 
NekDouble SQ_PNT_TOL =1e-16
 

Typedef Documentation

typedef boost::shared_ptr<Field> Nektar::Utilities::FieldSharedPtr

Definition at line 695 of file Field.hpp.

Definition at line 195 of file FieldConvert/Module.h.

typedef boost::shared_ptr<InputPly> Nektar::Utilities::InputPlySharedPtr

Definition at line 68 of file InputPly.h.

typedef std::pair<int, int> Nektar::Utilities::ipair

Definition at line 55 of file ProcessTetSplit.cpp.

typedef boost::shared_ptr<Iso> Nektar::Utilities::IsoSharedPtr

Definition at line 187 of file ProcessIsoContour.h.

Definition at line 230 of file FieldConvert/Module.h.

typedef std::pair< ModuleType, std::string > Nektar::Utilities::ModuleKey

Definition at line 225 of file FieldConvert/Module.h.

typedef boost::shared_ptr< Module > Nektar::Utilities::ModuleSharedPtr

Definition at line 228 of file FieldConvert/Module.h.

typedef map<int, pair<FaceSharedPtr, vector<int> > > Nektar::Utilities::PerMap

Definition at line 74 of file NekMesh/Module.h.

typedef boost::unordered_map<TriFaceIDs, int, TriFaceHash> Nektar::Utilities::TriFaceMap

Definition at line 100 of file ProcessDisplacement.cpp.

Enumeration Type Documentation

Denotes different types of mesh converter modules: so far only input, output and process modules are defined.

Enumerator
eInputModule 
eProcessModule 
eOutputModule 
SIZE_ModuleType 
eInputModule 
eProcessModule 
eOutputModule 
SIZE_ModuleType 

Definition at line 60 of file NekMesh/Module.h.

Denotes different types of mesh converter modules: so far only input, output and process modules are defined.

Enumerator
eInputModule 
eProcessModule 
eOutputModule 
SIZE_ModuleType 
eInputModule 
eProcessModule 
eOutputModule 
SIZE_ModuleType 

Definition at line 66 of file FieldConvert/Module.h.

Enumerator
eFile 
eRecon 

Definition at line 51 of file InputNek.h.

Enumerator
eFullBlockZone 
eFullBlockZoneEquiSpaced 
eSeperateZones 

Definition at line 47 of file OutputTecplot.h.

Function Documentation

ModuleFactory & Nektar::Utilities::GetModuleFactory ( )

Returns an instance of the module factory, held as a singleton.

Definition at line 49 of file FieldConvert/Module.cpp.

Referenced by main(), Nektar::Utilities::InputCAD::Process(), and Nektar::Utilities::ProcessOptiExtract::Process().

50  {
51  typedef Loki::SingletonHolder<ModuleFactory,
52  Loki::CreateUsingNew,
53  Loki::NoDestroy,
54  Loki::SingleThreaded> Type;
55  return Type::Instance();
56  }
LibUtilities::NekFactory< ModuleKey, Module, FieldSharedPtr > ModuleFactory
int** Nektar::Utilities::helper2d ( int  lda,
int  arr[][2] 
)

Definition at line 61 of file ProcessBL.cpp.

Referenced by Nektar::Utilities::ProcessBL::Process().

62 {
63  int **ret = new int *[lda];
64  for (int i = 0; i < lda; ++i)
65  {
66  ret[i] = new int[2];
67  ret[i][0] = arr[i][0];
68  ret[i][1] = arr[i][1];
69  }
70  return ret;
71 }
int** Nektar::Utilities::helper2d ( int  lda,
int  arr[][4] 
)

Definition at line 73 of file ProcessBL.cpp.

74 {
75  int **ret = new int *[lda];
76  for (int i = 0; i < lda; ++i)
77  {
78  ret[i] = new int[4];
79  ret[i][0] = arr[i][0];
80  ret[i][1] = arr[i][1];
81  ret[i][2] = arr[i][2];
82  ret[i][3] = arr[i][3];
83  }
84  return ret;
85 }
vector<DNekMat> Nektar::Utilities::MappingIdealToRef ( SpatialDomains::GeometrySharedPtr  geom,
StdRegions::StdExpansionSharedPtr  chi 
)
inline

Definition at line 109 of file ProcessQualityMetric.cpp.

References ASSERTL0, Nektar::eFULL, Nektar::LibUtilities::ePrism, Nektar::LibUtilities::eQuadrilateral, Nektar::LibUtilities::eTetrahedron, and Nektar::LibUtilities::eTriangle.

Referenced by Nektar::Utilities::ProcessQualityMetric::GetQ().

111 {
112  vector<DNekMat> ret;
113 
114  if(geom->GetShapeType() == LibUtilities::eQuadrilateral)
115  {
116  vector<Array<OneD, NekDouble> > xy;
117  for(int i = 0; i < geom->GetNumVerts(); i++)
118  {
119  Array<OneD, NekDouble> loc(2);
120  SpatialDomains::PointGeomSharedPtr p = geom->GetVertex(i);
121  p->GetCoords(loc);
122  xy.push_back(loc);
123  }
124 
126  Array<OneD, NekDouble> u = b[0]->GetZ();
127  Array<OneD, NekDouble> v = b[1]->GetZ();
128 
129  for(int j = 0; j < b[1]->GetNumPoints(); j++)
130  {
131  for(int i = 0; i < b[0]->GetNumPoints(); i++)
132  {
133  NekDouble a1 = 0.5*(1.0-u[i]), a2 = 0.5*(1.0+u[i]);
134  NekDouble b1 = 0.5*(1.0-v[j]), b2 = 0.5*(1.0+v[j]);
135  DNekMat dxdz(2,2,1.0,eFULL);
136 
137  dxdz(0,0) = 0.5*(-b1*xy[0][0] + b1*xy[1][0] + b2*xy[2][0] - b2*xy[3][0]);
138  dxdz(1,0) = 0.5*(-b1*xy[0][1] + b1*xy[1][1] + b2*xy[2][1] - b2*xy[3][1]);
139 
140  dxdz(0,1) = 0.5*(-a1*xy[0][0] - a2*xy[1][0] + a2*xy[2][0] + a1*xy[3][0]);
141  dxdz(1,1) = 0.5*(-a1*xy[0][1] - a2*xy[1][1] + a2*xy[2][1] + a1*xy[3][1]);
142 
143  dxdz.Invert();
144  ret.push_back(dxdz);
145  }
146  }
147  }
148  else if(geom->GetShapeType() == LibUtilities::eTriangle)
149  {
150  vector<Array<OneD, NekDouble> > xy;
151  for(int i = 0; i < geom->GetNumVerts(); i++)
152  {
153  Array<OneD, NekDouble> loc(2);
154  SpatialDomains::PointGeomSharedPtr p = geom->GetVertex(i);
155  p->GetCoords(loc);
156  xy.push_back(loc);
157  }
158 
160  Array<OneD, NekDouble> u = b[0]->GetZ();
161  Array<OneD, NekDouble> v = b[1]->GetZ();
162 
163  for(int i = 0; i < b[0]->GetNumPoints(); i++)
164  {
165  for(int j = 0; j < b[1]->GetNumPoints(); j++)
166  {
167  DNekMat dxdz(2,2,1.0,eFULL);
168  dxdz(0,0) = -xy[0][0]/2.0 + xy[1][0]/2.0;
169 
170  dxdz(0,1) = -xy[0][0]/2.0 + xy[2][0]/2.0;
171 
172  dxdz(1,0) = -xy[0][1]/2.0 + xy[1][1]/2.0;
173 
174  dxdz(1,1) = -xy[0][1]/2.0 + xy[2][1]/2.0;
175 
176  dxdz.Invert();
177  ret.push_back(dxdz);
178  }
179  }
180  }
181  else if(geom->GetShapeType() == LibUtilities::eTetrahedron)
182  {
183  vector<Array<OneD, NekDouble> > xyz;
184  for(int i = 0; i < geom->GetNumVerts(); i++)
185  {
186  Array<OneD, NekDouble> loc(3);
187  SpatialDomains::PointGeomSharedPtr p = geom->GetVertex(i);
188  p->GetCoords(loc);
189  xyz.push_back(loc);
190  }
191 
193  Array<OneD, NekDouble> u = b[0]->GetZ();
194  Array<OneD, NekDouble> v = b[1]->GetZ();
195  Array<OneD, NekDouble> z = b[2]->GetZ();
196 
197  for(int i = 0; i < b[0]->GetNumPoints(); i++)
198  {
199  for(int j = 0; j < b[1]->GetNumPoints(); j++)
200  {
201  for(int k = 0; k < b[2]->GetNumPoints(); k++)
202  {
203  DNekMat dxdz(3,3,1.0,eFULL);
204  dxdz(0,0) = -xyz[0][0]/2.0 + xyz[1][0]/2.0;
205 
206  dxdz(0,1) = -xyz[0][0]/2.0 + xyz[2][0]/2.0;
207 
208  dxdz(0,2) = -xyz[0][0]/2.0 + xyz[3][0]/2.0;
209 
210 
211  dxdz(1,0) = -xyz[0][1]/2.0 + xyz[1][1]/2.0;
212 
213  dxdz(1,1) = -xyz[0][1]/2.0 + xyz[2][1]/2.0;
214 
215  dxdz(1,2) = -xyz[0][1]/2.0 + xyz[3][1]/2.0;
216 
217 
218  dxdz(2,0) = -xyz[0][2]/2.0 + xyz[1][2]/2.0;
219 
220  dxdz(2,1) = -xyz[0][2]/2.0 + xyz[2][2]/2.0;
221 
222  dxdz(2,2) = -xyz[0][2]/2.0 + xyz[3][2]/2.0;
223 
224  dxdz.Invert();
225  ret.push_back(dxdz);
226  }
227  }
228  }
229  }
230  else if(geom->GetShapeType() == LibUtilities::ePrism)
231  {
232  vector<Array<OneD, NekDouble> > xyz;
233  for(int i = 0; i < geom->GetNumVerts(); i++)
234  {
235  Array<OneD, NekDouble> loc(3);
236  SpatialDomains::PointGeomSharedPtr p = geom->GetVertex(i);
237  p->GetCoords(loc);
238  xyz.push_back(loc);
239  }
240 
242  Array<OneD, NekDouble> eta1 = b[0]->GetZ();
243  Array<OneD, NekDouble> eta2 = b[1]->GetZ();
244  Array<OneD, NekDouble> eta3 = b[2]->GetZ();
245 
246  for(int k = 0; k < b[2]->GetNumPoints(); k++)
247  {
248  for(int j = 0; j < b[1]->GetNumPoints(); j++)
249  {
250  for(int i = 0; i < b[0]->GetNumPoints(); i++)
251  {
252  NekDouble xi1 = 0.5*(1+eta1[i])*(1-eta3[k])-1.0;
253  NekDouble a2 = 0.5*(1+xi1);
254  NekDouble b1 = 0.5*(1-eta2[j]), b2 = 0.5*(1+eta2[j]);
255  NekDouble c1 = 0.5*(1-eta3[k]), c2 = 0.5*(1+eta3[k]);
256 
257  DNekMat dxdz(3,3,1.0,eFULL);
258 
259  dxdz(0,0) = 0.5*(-b1*xyz[0][0] + b1*xyz[1][0] + b2*xyz[2][0] - b2*xyz[3][0]);
260  dxdz(1,0) = 0.5*(-b1*xyz[0][1] + b1*xyz[1][1] + b2*xyz[2][1] - b2*xyz[3][1]);
261  dxdz(2,0) = 0.5*(-b1*xyz[0][2] + b1*xyz[1][2] + b2*xyz[2][2] - b2*xyz[3][2]);
262 
263  dxdz(0,1) = 0.5*((a2-c1)*xyz[0][0] - a2*xyz[1][0] + a2*xyz[2][0] + (c1-a2)*xyz[3][0] - c2*xyz[4][0] + c2*xyz[5][0]);
264  dxdz(1,1) = 0.5*((a2-c1)*xyz[0][1] - a2*xyz[1][1] + a2*xyz[2][1] + (c1-a2)*xyz[3][1] - c2*xyz[4][1] + c2*xyz[5][1]);
265  dxdz(2,1) = 0.5*((a2-c1)*xyz[0][2] - a2*xyz[1][2] + a2*xyz[2][2] + (c1-a2)*xyz[3][2] - c2*xyz[4][2] + c2*xyz[5][2]);
266 
267  dxdz(0,2) = 0.5*(-b1*xyz[0][0] - b2*xyz[3][0] + b1*xyz[4][0] + b2*xyz[5][0]);
268  dxdz(1,2) = 0.5*(-b1*xyz[0][1] - b2*xyz[3][1] + b1*xyz[4][1] + b2*xyz[5][1]);
269  dxdz(2,2) = 0.5*(-b1*xyz[0][2] - b2*xyz[3][2] + b1*xyz[4][2] + b2*xyz[5][2]);
270 
271  dxdz.Invert();
272  ret.push_back(dxdz);
273  }
274  }
275  }
276  }
277  else
278  {
279  ASSERTL0(false,"not coded");
280  }
281 
282 
283 
284  return ret;
285 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
double NekDouble
boost::shared_ptr< PointGeom > PointGeomSharedPtr
Definition: Geometry.h:60
bool Nektar::Utilities::operator!= ( const IsoVertex &  x,
const IsoVertex &  y 
)

Definition at line 759 of file ProcessIsoContour.cpp.

References Nektar::Utilities::IsoVertex::m_x, Nektar::Utilities::IsoVertex::m_y, and Nektar::Utilities::IsoVertex::m_z.

760 {
761  return ((x.m_x-y.m_x)*(x.m_x-y.m_x) + (x.m_y-y.m_y)*(x.m_y-y.m_y) +
762  (x.m_z-y.m_z)*(x.m_z-y.m_z) < SQ_PNT_TOL)? 0:1;
763 }
std::ostream & Nektar::Utilities::operator<< ( std::ostream &  os,
const ModuleKey &  rhs 
)

Prints a given module key to a stream.

Definition at line 61 of file FieldConvert/Module.cpp.

References ModuleTypeMap.

62  {
63  return os << ModuleTypeMap[rhs.first] << ": " << rhs.second;
64  }
const char *const ModuleTypeMap[]
bool Nektar::Utilities::operator== ( ElmtConfig const &  p1,
ElmtConfig const &  p2 
)

Definition at line 61 of file OutputGmsh.h.

References Nektar::NekMeshUtils::ElmtConfig::m_e, Nektar::NekMeshUtils::ElmtConfig::m_faceNodes, Nektar::NekMeshUtils::ElmtConfig::m_order, and Nektar::NekMeshUtils::ElmtConfig::m_volumeNodes.

62 {
63  return p1.m_e == p2.m_e &&
64  p1.m_faceNodes == p2.m_faceNodes &&
65  p1.m_volumeNodes == p2.m_volumeNodes &&
66  p1.m_order == p2.m_order;
67 }
bool Nektar::Utilities::operator== ( TriFaceIDs const &  p1,
TriFaceIDs const &  p2 
)

Definition at line 81 of file ProcessDisplacement.cpp.

References Nektar::Utilities::TriFaceIDs::a, Nektar::Utilities::TriFaceIDs::b, and Nektar::Utilities::TriFaceIDs::c.

82  {
83  std::vector<int> ids1(3), ids2(3);
84 
85  ids1[0] = p1.a;
86  ids1[1] = p1.b;
87  ids1[2] = p1.c;
88  ids2[0] = p2.a;
89  ids2[1] = p2.b;
90  ids2[2] = p2.c;
91 
92  std::sort(ids1.begin(), ids1.end());
93  std::sort(ids2.begin(), ids2.end());
94 
95  return ids1[0] == ids2[0] &&
96  ids1[1] == ids2[1] &&
97  ids1[2] == ids2[2];
98  }
bool Nektar::Utilities::operator== ( const IsoVertex &  x,
const IsoVertex &  y 
)

Definition at line 752 of file ProcessIsoContour.cpp.

References Nektar::Utilities::IsoVertex::m_x, Nektar::Utilities::IsoVertex::m_y, and Nektar::Utilities::IsoVertex::m_z.

753 {
754  return ((x.m_x-y.m_x)*(x.m_x-y.m_x) + (x.m_y-y.m_y)*(x.m_y-y.m_y) +
755  (x.m_z-y.m_z)*(x.m_z-y.m_z) < SQ_PNT_TOL)? true:false;
756 }
static void Nektar::Utilities::PrismLineFaces ( int  prismid,
map< int, int > &  facelist,
vector< vector< int > > &  FacesToPrisms,
vector< vector< int > > &  PrismsToFaces,
vector< bool > &  PrismDone 
)
static

Definition at line 422 of file InputStar.cpp.

Referenced by PrismLineFaces(), Nektar::Utilities::InputStar::ResetNodes(), and Nektar::Utilities::InputTec::ResetNodes().

427 {
428  if (PrismDone[prismid] == false)
429  {
430  PrismDone[prismid] = true;
431 
432  // Add faces0
433  int face = PrismToFaces[prismid][0];
434  facelist[face] = face;
435  for (int i = 0; i < FaceToPrisms[face].size(); ++i)
436  {
437  PrismLineFaces(FaceToPrisms[face][i],
438  facelist,
439  FaceToPrisms,
440  PrismToFaces,
441  PrismDone);
442  }
443 
444  // Add faces1
445  face = PrismToFaces[prismid][1];
446  facelist[face] = face;
447  for (int i = 0; i < FaceToPrisms[face].size(); ++i)
448  {
449  PrismLineFaces(FaceToPrisms[face][i],
450  facelist,
451  FaceToPrisms,
452  PrismToFaces,
453  PrismDone);
454  }
455  }
456 }
static void PrismLineFaces(int prismid, map< int, int > &facelist, vector< vector< int > > &FacesToPrisms, vector< vector< int > > &PrismsToFaces, vector< bool > &PrismDone)
Definition: InputStar.cpp:422
static void Nektar::Utilities::PrismLineFaces ( int  prismid,
map< int, int > &  facelist,
vector< vector< int > > &  FacesToPrisms,
vector< vector< int > > &  PrismsToFaces,
vector< bool > &  PrismDone 
)
static

Definition at line 637 of file InputStarTec.cpp.

References PrismLineFaces().

642 {
643  if (PrismDone[prismid] == false)
644  {
645  PrismDone[prismid] = true;
646 
647  // Add faces0
648  int face = PrismToFaces[prismid][0];
649  facelist[face] = face;
650  for (int i = 0; i < FaceToPrisms[face].size(); ++i)
651  {
652  PrismLineFaces(FaceToPrisms[face][i],
653  facelist,
654  FaceToPrisms,
655  PrismToFaces,
656  PrismDone);
657  }
658 
659  // Add faces1
660  face = PrismToFaces[prismid][1];
661  facelist[face] = face;
662  for (int i = 0; i < FaceToPrisms[face].size(); ++i)
663  {
664  PrismLineFaces(FaceToPrisms[face][i],
665  facelist,
666  FaceToPrisms,
667  PrismToFaces,
668  PrismDone);
669  }
670  }
671 }
static void PrismLineFaces(int prismid, map< int, int > &facelist, vector< vector< int > > &FacesToPrisms, vector< vector< int > > &PrismsToFaces, vector< bool > &PrismDone)
std::vector<int> Nektar::Utilities::quadTensorNodeOrdering ( const std::vector< int > &  nodes,
int  n 
)

Reorder a quadrilateral to appear in Nektar++ ordering from Gmsh.

Definition at line 68 of file InputGmsh.cpp.

Referenced by Nektar::Utilities::InputGmsh::HexReordering(), and Nektar::Utilities::InputGmsh::QuadReordering().

69 {
70  std::vector<int> nodeList;
71 
72  // Triangle
73  nodeList.resize(nodes.size());
74 
75  // Vertices and edges
76  nodeList[0] = nodes[0];
77  if (n > 1)
78  {
79  nodeList[n - 1] = nodes[1];
80  nodeList[n * n - 1] = nodes[2];
81  nodeList[n * (n - 1)] = nodes[3];
82  }
83  for (int i = 1; i < n - 1; ++i)
84  {
85  nodeList[i] = nodes[4 + i - 1];
86  }
87  for (int i = 1; i < n - 1; ++i)
88  {
89  nodeList[n * n - 1 - i] = nodes[4 + 2 * (n - 2) + i - 1];
90  }
91 
92  // Interior (recursion)
93  if (n > 2)
94  {
95  // Reorder interior nodes
96  std::vector<int> interior((n - 2) * (n - 2));
97  std::copy(
98  nodes.begin() + 4 + 4 * (n - 2), nodes.end(), interior.begin());
99  interior = quadTensorNodeOrdering(interior, n - 2);
100 
101  // Copy into full node list
102  for (int j = 1; j < n - 1; ++j)
103  {
104  nodeList[j * n] = nodes[4 + 3 * (n - 2) + n - 2 - j];
105  for (int i = 1; i < n - 1; ++i)
106  {
107  nodeList[j * n + i] = interior[(j - 1) * (n - 2) + (i - 1)];
108  }
109  nodeList[(j + 1) * n - 1] = nodes[4 + (n - 2) + j - 1];
110  }
111  }
112 
113  return nodeList;
114 }
std::vector< int > quadTensorNodeOrdering(const std::vector< int > &nodes, int n)
Reorder a quadrilateral to appear in Nektar++ ordering from Gmsh.
Definition: InputGmsh.cpp:68
bool Nektar::Utilities::same ( NekDouble  x1,
NekDouble  y1,
NekDouble  z1,
NekDouble  x2,
NekDouble  y2,
NekDouble  z2 
)

Definition at line 766 of file ProcessIsoContour.cpp.

Referenced by Nektar::SpatialDomains::GeomFactors::ComputeDeriv(), and Nektar::Utilities::Iso::globalcondense().

768 {
769  if((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) + (z1-z2)*(z1-z2) < SQ_PNT_TOL)
770  {
771  return true;
772  }
773 
774  return false;
775 }
template<typename T >
void Nektar::Utilities::TestElmts ( SpatialDomains::MeshGraphSharedPtr &  graph)

Definition at line 77 of file OutputNekpp.cpp.

78 {
79  const std::map<int, boost::shared_ptr<T> > &tmp =
80  graph->GetAllElementsOfType<T>();
81  typename std::map<int, boost::shared_ptr<T> >::const_iterator it1, it2;
82 
83  SpatialDomains::CurveMap &curvedEdges = graph->GetCurvedEdges();
84  SpatialDomains::CurveMap &curvedFaces = graph->GetCurvedFaces();
85 
86  for (it1 = tmp.begin(), it2 = tmp.end(); it1 != it2; ++it1)
87  {
88  SpatialDomains::GeometrySharedPtr geom = it1->second;
89  geom->FillGeom();
90  geom->Reset(curvedEdges, curvedFaces);
91  }
92 }
boost::unordered_map< int, CurveSharedPtr > CurveMap
Definition: Curve.hpp:63
boost::shared_ptr< Geometry > GeometrySharedPtr
Definition: Geometry.h:53
void Nektar::Utilities::ThreeSimilar ( const int  i,
const int  j,
const int  k,
int &  pr,
int &  ps 
)

Definition at line 290 of file ProcessIsoContour.cpp.

References ASSERTL0.

Referenced by Nektar::Utilities::ProcessIsoContour::ExtractContour().

294 {
295  switch (i + j + k)
296  {
297  case (3):
298  pr = 3;
299  ps = 4;
300  break;
301  case (4):
302  pr = 2;
303  ps = 4;
304  break;
305  case (5):
306  if (j == 1)
307  {
308  pr = 2;
309  ps = 3;
310  }
311  else
312  {
313  pr = 1;
314  ps = 4;
315  }
316  break;
317  case (6):
318  if (i == 0)
319  {
320  pr = 1;
321  ps = 3;
322  }
323  else
324  {
325  pr = 0;
326  ps = 4;
327  }
328  break;
329  case (7):
330  if (i == 0)
331  {
332  pr = 1;
333  ps = 2;
334  }
335  else
336  {
337  pr = 0;
338  ps = 3;
339  }
340  break;
341  case (8):
342  pr = 0;
343  ps = 2;
344  break;
345  case (9):
346  pr = 0;
347  ps = 1;
348  break;
349  default:
350  ASSERTL0(false,"Error in 5-point triangulation in ThreeSimilar");
351  break;
352  }
353 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
std::vector<int> Nektar::Utilities::triTensorNodeOrdering ( const std::vector< int > &  nodes,
int  n 
)

Definition at line 116 of file InputGmsh.cpp.

Referenced by Nektar::Utilities::InputGmsh::TetReordering(), and Nektar::Utilities::InputGmsh::TriReordering().

117 {
118  std::vector<int> nodeList;
119  int cnt2;
120 
121  nodeList.resize(nodes.size());
122 
123  // Vertices
124  nodeList[0] = nodes[0];
125  if (n > 1)
126  {
127  nodeList[n - 1] = nodes[1];
128  nodeList[n * (n + 1) / 2 - 1] = nodes[2];
129  }
130 
131  // Edges
132  int cnt = n;
133  for (int i = 1; i < n - 1; ++i)
134  {
135  nodeList[i] = nodes[3 + i - 1];
136  nodeList[cnt] = nodes[3 + 3 * (n - 2) - i];
137  nodeList[cnt + n - i - 1] = nodes[3 + (n - 2) + i - 1];
138  cnt += n - i;
139  }
140 
141  // Interior (recursion)
142  if (n > 3)
143  {
144  // Reorder interior nodes
145  std::vector<int> interior((n - 3) * (n - 2) / 2);
146  std::copy(
147  nodes.begin() + 3 + 3 * (n - 2), nodes.end(), interior.begin());
148  interior = triTensorNodeOrdering(interior, n - 3);
149 
150  // Copy into full node list
151  cnt = n;
152  cnt2 = 0;
153  for (int j = 1; j < n - 2; ++j)
154  {
155  for (int i = 0; i < n - j - 2; ++i)
156  {
157  nodeList[cnt + i + 1] = interior[cnt2 + i];
158  }
159  cnt += n - j;
160  cnt2 += n - 2 - j;
161  }
162  }
163 
164  return nodeList;
165 }
std::vector< int > triTensorNodeOrdering(const std::vector< int > &nodes, int n)
Definition: InputGmsh.cpp:116
void Nektar::Utilities::TwoPairs ( Array< OneD, NekDouble > &  cx,
Array< OneD, NekDouble > &  cy,
Array< OneD, NekDouble > &  cz,
int &  pr 
)

Definition at line 258 of file ProcessIsoContour.cpp.

Referenced by Nektar::Utilities::ProcessIsoContour::ExtractContour().

264 {
265  if (((cx[0]-cx[1])==0.0)&&
266  ((cy[0]-cy[1])==0.0)&&
267  ((cz[0]-cz[1])==0.0))
268  {
269  if (((cx[2]-cx[3])==0.0)&&
270  ((cy[2]-cy[3])==0.0)&&
271  ((cz[2]-cz[3])==0.0))
272  {
273  pr=4;
274  }
275  else
276  {
277  pr=3;
278  }
279  }
280  else
281  {
282  pr=1;
283  }
284 }

Variable Documentation

const char *const Nektar::Utilities::ModuleTypeMap
Initial value:
=
{
"Input",
"Process",
"Output"
}

Definition at line 74 of file FieldConvert/Module.h.

Referenced by operator<<().

NekDouble Nektar::Utilities::SQ_PNT_TOL =1e-16

Definition at line 749 of file ProcessIsoContour.cpp.