Nektar++
Classes | Typedefs | Enumerations | Functions | Variables
Nektar::Utilities Namespace Reference

Classes

class  Composite
 A composite is a collection of elements. More...
 
struct  Condition
 Defines a boundary condition. More...
 
struct  ConfigOption
 Represents a command-line configuration option. More...
 
class  Edge
 Represents an edge which joins two points. More...
 
struct  EdgeHash
 Defines a hash function for edges. More...
 
struct  EdgeInfo
 
class  Element
 Base class for element definitions. More...
 
struct  element_id_less_than
 Define element ordering based on ID. More...
 
struct  ElmtConfig
 Basic information about an element. More...
 
struct  ElmtConfigHash
 
class  Face
 Represents a face comprised of three or more edges. More...
 
struct  FaceHash
 
struct  Field
 
class  FieldConvertComm
 
class  Hexahedron
 A 3-dimensional six-faced element. More...
 
struct  HOSurfHash
 
struct  HOTriangle
 A lightweight struct for dealing with high-order triangle alignment. More...
 
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  Line
 A 1-dimensional line between two vertex nodes. More...
 
class  Mesh
 
class  Module
 
class  Node
 Represents a point in the domain. More...
 
struct  NodeHash
 Defines a hash function for nodes. More...
 
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  OutputTecplot
 Converter from fld to dat. More...
 
class  OutputVtk
 Converter from fld to vtk. More...
 
class  OutputXml
 Converter from fld to vtk. More...
 
class  Point
 A 0-dimensional vertex. More...
 
class  Prism
 A 3-dimensional five-faced element (2 triangles, 3 quadrilaterals). 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  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  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  ProcessPerAlign
 
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  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...
 
class  Pyramid
 A 3-dimensional square-based pyramidic element. More...
 
class  Quadrilateral
 A 2-dimensional four-sided element. More...
 
struct  SplitEdgeHelper
 
struct  SplitMapHelper
 
struct  TetOrient
 
struct  TetOrientHash
 
class  Tetrahedron
 A 3-dimensional four-faced element. More...
 
class  Triangle
 A 2-dimensional three-sided element. More...
 
struct  TriFaceHash
 
struct  TriFaceIDs
 

Typedefs

typedef boost::shared_ptr< FieldFieldSharedPtr
 
typedef boost::shared_ptr< InputModuleInputModuleSharedPtr
 
typedef pair< ModuleType, string > ModuleKey
 
typedef boost::shared_ptr< ModuleModuleSharedPtr
 
typedef LibUtilities::NekFactory< ModuleKey, Module, FieldSharedPtrModuleFactory
 
typedef boost::unordered_map< TriFaceIDs, int, TriFaceHashTriFaceMap
 
typedef boost::shared_ptr< IsoIsoSharedPtr
 
typedef HOTriangle< NodeSharedPtrHOSurf
 
typedef boost::shared_ptr< HOSurfHOSurfSharedPtr
 
typedef boost::unordered_set< HOSurfSharedPtr, HOSurfHashHOSurfSet
 
typedef boost::shared_ptr< InputPlyInputPlySharedPtr
 
typedef boost::unordered_set< struct TetOrient, TetOrientHashTetOrientSet
 
typedef boost::shared_ptr< ElementElementSharedPtr
 Shared pointer to an element. More...
 
typedef boost::shared_ptr< NodeNodeSharedPtr
 Shared pointer to a Node. More...
 
typedef boost::unordered_set< NodeSharedPtr, NodeHashNodeSet
 
typedef boost::shared_ptr< EdgeEdgeSharedPtr
 Shared pointer to an edge. More...
 
typedef boost::unordered_set< EdgeSharedPtr, EdgeHashEdgeSet
 
typedef boost::shared_ptr< FaceFaceSharedPtr
 Shared pointer to a face. More...
 
typedef boost::unordered_set< FaceSharedPtr, FaceHashFaceSet
 
typedef std::map< unsigned int, std::vector< ElementSharedPtr > > ElementMap
 Container for elements; key is expansion dimension, value is vector of elements of that dimension. More...
 
typedef Nektar::LibUtilities::NekFactory< LibUtilities::ShapeType, Element, ElmtConfig, std::vector< NodeSharedPtr >, std::vector< int > > ElementFactory
 Element factory definition. More...
 
typedef boost::shared_ptr< CompositeCompositeSharedPtr
 Shared pointer to a composite. More...
 
typedef std::map< unsigned int, CompositeSharedPtrCompositeMap
 Container of composites; key is the composite id, value is the composite. More...
 
typedef boost::shared_ptr< ConditionConditionSharedPtr
 
typedef std::map< int, ConditionSharedPtrConditionMap
 
typedef boost::shared_ptr< MeshMeshSharedPtr
 Shared pointer to a mesh. More...
 
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  ConditionType {
  eDirichlet, eNeumann, eRobin, ePeriodic,
  eHOPCondition, SIZE_ConditionType
}
 
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)
 
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)
 
bool operator== (HOSurfSharedPtr const &p1, HOSurfSharedPtr const &p2)
 Compares two HOSurf objects referred to as shared pointers. More...
 
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)
 
ElementFactoryGetElementFactory ()
 
bool operator== (ConditionSharedPtr const &c1, ConditionSharedPtr const &c2)
 Test equality of two conditions - i.e. compare types, fields and values but not composite ids. More...
 
bool operator== (NodeSharedPtr const &p1, NodeSharedPtr const &p2)
 Defines equality between two NodeSharedPtr objects. More...
 
bool operator< (NodeSharedPtr const &p1, NodeSharedPtr const &p2)
 Defines ordering between two NodeSharedPtr objects. More...
 
std::ostream & operator<< (std::ostream &os, const NodeSharedPtr &n)
 
bool operator== (EdgeSharedPtr const &p1, EdgeSharedPtr const &p2)
 Defines equality of two edges (equal if IDs of end nodes match in either ordering). More...
 
bool operator< (EdgeSharedPtr const &p1, EdgeSharedPtr const &p2)
 Defines ordering between two edges (based on ID of edges). More...
 
bool operator== (FaceSharedPtr const &p1, FaceSharedPtr const &p2)
 Defines equality of two faces (equal if IDs of vertices are the same.) More...
 
bool operator< (FaceSharedPtr const &p1, FaceSharedPtr const &p2)
 Defines ordering between two faces (depending on ID of faces). More...
 
bool operator== (const struct TetOrient &a, const struct TetOrient &b)
 
bool operator== (ElmtConfig const &p1, ElmtConfig const &p2)
 
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 std::map<unsigned int, CompositeSharedPtr> Nektar::Utilities::CompositeMap

Container of composites; key is the composite id, value is the composite.

Definition at line 1065 of file MeshElements.h.

Shared pointer to a composite.

Definition at line 1062 of file MeshElements.h.

Definition at line 1097 of file MeshElements.h.

Definition at line 1096 of file MeshElements.h.

typedef boost::unordered_set<EdgeSharedPtr, EdgeHash> Nektar::Utilities::EdgeSet

Definition at line 342 of file MeshElements.h.

typedef boost::shared_ptr<Edge> Nektar::Utilities::EdgeSharedPtr

Shared pointer to an edge.

Definition at line 318 of file MeshElements.h.

Element factory definition.

Definition at line 1010 of file MeshElements.h.

typedef std::map<unsigned int, std::vector<ElementSharedPtr> > Nektar::Utilities::ElementMap

Container for elements; key is expansion dimension, value is vector of elements of that dimension.

Definition at line 1007 of file MeshElements.h.

typedef boost::shared_ptr<Element> Nektar::Utilities::ElementSharedPtr

Shared pointer to an element.

Definition at line 63 of file MeshElements.h.

typedef boost::unordered_set<FaceSharedPtr, FaceHash> Nektar::Utilities::FaceSet

Definition at line 574 of file MeshElements.h.

typedef boost::shared_ptr<Face> Nektar::Utilities::FaceSharedPtr

Shared pointer to a face.

Definition at line 550 of file MeshElements.h.

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

Definition at line 677 of file Field.hpp.

Definition at line 51 of file InputNek.h.

Definition at line 78 of file InputNek.h.

typedef boost::shared_ptr<HOSurf> Nektar::Utilities::HOSurfSharedPtr

Definition at line 52 of file InputNek.h.

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

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

Definition at line 65 of file InputPly.h.

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

Definition at line 54 of file ProcessTetSplit.cpp.

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

Definition at line 186 of file ProcessIsoContour.h.

typedef boost::shared_ptr<Mesh> Nektar::Utilities::MeshSharedPtr

Shared pointer to a mesh.

Definition at line 1147 of file MeshElements.h.

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

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

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

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

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

typedef boost::unordered_set<NodeSharedPtr, NodeHash> Nektar::Utilities::NodeSet

Definition at line 218 of file MeshElements.h.

typedef boost::shared_ptr<Node> Nektar::Utilities::NodeSharedPtr

Shared pointer to a Node.

Definition at line 195 of file MeshElements.h.

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

Definition at line 67 of file MeshConvert/Module.h.

typedef boost::unordered_set<struct TetOrient, TetOrientHash> Nektar::Utilities::TetOrientSet

Definition at line 1158 of file MeshElements.cpp.

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

Definition at line 100 of file ProcessDisplacement.cpp.

Enumeration Type Documentation

Enumeration of condition types (Dirichlet, Neumann, etc).

Enumerator
eDirichlet 
eNeumann 
eRobin 
ePeriodic 
eHOPCondition 
SIZE_ConditionType 

Definition at line 1070 of file MeshElements.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 53 of file MeshConvert/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 64 of file FieldConvert/Module.h.

Enumerator
eFile 
eRecon 

Definition at line 45 of file InputNek.h.

Enumerator
eFullBlockZone 
eFullBlockZoneEquiSpaced 
eSeperateZones 

Definition at line 47 of file OutputTecplot.h.

Function Documentation

ElementFactory & Nektar::Utilities::GetElementFactory ( )
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().

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 59 of file ProcessBL.cpp.

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

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

Definition at line 71 of file ProcessBL.cpp.

72  {
73  int **ret = new int*[lda];
74  for (int i = 0; i < lda; ++i)
75  {
76  ret[i] = new int[4];
77  ret[i][0] = arr[i][0];
78  ret[i][1] = arr[i][1];
79  ret[i][2] = arr[i][2];
80  ret[i][3] = arr[i][3];
81  }
82  return ret;
83  }
bool Nektar::Utilities::operator!= ( const IsoVertex x,
const IsoVertex y 
)

Definition at line 644 of file ProcessIsoContour.cpp.

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

645 {
646  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) +
647  (x.m_z-y.m_z)*(x.m_z-y.m_z) < SQ_PNT_TOL)? 0:1;
648 }
bool Nektar::Utilities::operator< ( NodeSharedPtr const &  p1,
NodeSharedPtr const &  p2 
)

Defines ordering between two NodeSharedPtr objects.

Definition at line 162 of file MeshElements.cpp.

163  {
164  return *p1 < *p2;
165  }
bool Nektar::Utilities::operator< ( EdgeSharedPtr const &  p1,
EdgeSharedPtr const &  p2 
)

Defines ordering between two edges (based on ID of edges).

Definition at line 186 of file MeshElements.cpp.

187  {
188  return p1->m_id < p2->m_id;
189  }
bool Nektar::Utilities::operator< ( FaceSharedPtr const &  p1,
FaceSharedPtr const &  p2 
)

Defines ordering between two faces (depending on ID of faces).

Definition at line 213 of file MeshElements.cpp.

214  {
215  return p1->m_id < p2->m_id;
216  }
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[]
std::ostream & Nektar::Utilities::operator<< ( std::ostream &  os,
const NodeSharedPtr n 
)

Definition at line 167 of file MeshElements.cpp.

168  {
169  os << n->m_x << " " << n->m_y << " " << n->m_z;
170  return os;
171  }
bool Nektar::Utilities::operator== ( ElmtConfig const &  p1,
ElmtConfig const &  p2 
)

Definition at line 60 of file OutputGmsh.h.

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

61  {
62  return p1.m_e == p2.m_e &&
63  p1.m_faceNodes == p2.m_faceNodes &&
64  p1.m_volumeNodes == p2.m_volumeNodes &&
65  p1.m_order == p2.m_order;
66  }
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== ( ConditionSharedPtr const &  c1,
ConditionSharedPtr const &  c2 
)

Test equality of two conditions - i.e. compare types, fields and values but not composite ids.

Definition at line 126 of file MeshElements.cpp.

127  {
128  int i, n = c1->type.size();
129 
130  if (n != c2->type.size())
131  {
132  return false;
133  }
134 
135  for (i = 0; i < n; ++i)
136  {
137  if (c1->type[i] != c2->type[i])
138  {
139  return false;
140  }
141 
142  if (c1->field[i] != c2->field[i] || c1->value[i] != c2->value[i])
143  {
144  return false;
145  }
146  }
147 
148  return true;
149  }
bool Nektar::Utilities::operator== ( NodeSharedPtr const &  p1,
NodeSharedPtr const &  p2 
)

Defines equality between two NodeSharedPtr objects.

Definition at line 154 of file MeshElements.cpp.

155  {
156  return *p1 == *p2;
157  }
bool Nektar::Utilities::operator== ( EdgeSharedPtr const &  p1,
EdgeSharedPtr const &  p2 
)

Defines equality of two edges (equal if IDs of end nodes match in either ordering).

Definition at line 177 of file MeshElements.cpp.

178  {
179  return ( ((*(p1->m_n1) == *(p2->m_n1)) && (*(p1->m_n2) == *(p2->m_n2)))
180  || ((*(p1->m_n2) == *(p2->m_n1)) && (*(p1->m_n1) == *(p2->m_n2))));
181  }
bool Nektar::Utilities::operator== ( FaceSharedPtr const &  p1,
FaceSharedPtr const &  p2 
)

Defines equality of two faces (equal if IDs of vertices are the same.)

Definition at line 195 of file MeshElements.cpp.

References Nektar::StdRegions::find(), and Nektar::iterator.

196  {
198  for (it1 = p1->m_vertexList.begin(); it1 != p1->m_vertexList.end(); ++it1)
199  {
200  if (find(p2->m_vertexList.begin(), p2->m_vertexList.end(), *it1)
201  == p2->m_vertexList.end())
202  {
203  return false;
204  }
205  }
206  return true;
207  }
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
InputIterator find(InputIterator first, InputIterator last, InputIterator startingpoint, const EqualityComparable &value)
Definition: StdRegions.hpp:312
bool Nektar::Utilities::operator== ( const IsoVertex x,
const IsoVertex y 
)

Definition at line 637 of file ProcessIsoContour.cpp.

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

638 {
639  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) +
640  (x.m_z-y.m_z)*(x.m_z-y.m_z) < SQ_PNT_TOL)? true:false;
641 }
bool Nektar::Utilities::operator== ( HOSurfSharedPtr const &  p1,
HOSurfSharedPtr const &  p2 
)

Compares two HOSurf objects referred to as shared pointers.

Two HOSurf objects are defined to be equal if they contain identical vertex ids contained in HOSurf::vertId.

Definition at line 1086 of file InputNek.cpp.

1087  {
1088  if (p1->vertId.size() != p2->vertId.size())
1089  {
1090  return false;
1091  }
1092 
1093  vector<int> ids1 = p1->vertId;
1094  vector<int> ids2 = p2->vertId;
1095  sort(ids1.begin(), ids1.end());
1096  sort(ids2.begin(), ids2.end());
1097 
1098  for (int i = 0; i < ids1.size(); ++i)
1099  {
1100  if (ids1[i] != ids2[i])
1101  return false;
1102  }
1103 
1104  return true;
1105  }
bool Nektar::Utilities::operator== ( const struct TetOrient a,
const struct TetOrient b 
)

Definition at line 1160 of file MeshElements.cpp.

References Nektar::Utilities::TetOrient::nid.

1161  {
1162  if (a.nid.size() != b.nid.size())
1163  {
1164  return false;
1165  }
1166 
1167  for (int i = 0; i < a.nid.size(); ++i)
1168  {
1169  if (a.nid[i] != b.nid[i])
1170  {
1171  return false;
1172  }
1173  }
1174 
1175  return true;
1176  }
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 423 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], facelist, FaceToPrisms,
438  PrismToFaces, PrismDone);
439  }
440 
441  // Add faces1
442  face = PrismToFaces[prismid][1];
443  facelist[face] = face;
444  for(int i = 0; i < FaceToPrisms[face].size(); ++i)
445  {
446  PrismLineFaces(FaceToPrisms[face][i], facelist, FaceToPrisms,
447  PrismToFaces, PrismDone);
448  }
449  }
450  }
static void PrismLineFaces(int prismid, map< int, int > &facelist, vector< vector< int > > &FacesToPrisms, vector< vector< int > > &PrismsToFaces, vector< bool > &PrismDone)
Definition: InputStar.cpp:423
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 647 of file InputStarTec.cpp.

References PrismLineFaces().

651  {
652  if(PrismDone[prismid] == false)
653  {
654  PrismDone[prismid] = true;
655 
656  // Add faces0
657  int face = PrismToFaces[prismid][0];
658  facelist[face] = face;
659  for(int i = 0; i < FaceToPrisms[face].size(); ++i)
660  {
661  PrismLineFaces(FaceToPrisms[face][i], facelist, FaceToPrisms,
662  PrismToFaces, PrismDone);
663  }
664 
665  // Add faces1
666  face = PrismToFaces[prismid][1];
667  facelist[face] = face;
668  for(int i = 0; i < FaceToPrisms[face].size(); ++i)
669  {
670  PrismLineFaces(FaceToPrisms[face][i], facelist, FaceToPrisms,
671  PrismToFaces, PrismDone);
672  }
673  }
674  }
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 59 of file InputGmsh.cpp.

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

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

Definition at line 651 of file ProcessIsoContour.cpp.

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

653 {
654  if((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) + (z1-z2)*(z1-z2) < SQ_PNT_TOL)
655  {
656  return true;
657  }
658 
659  return false;
660 }
void Nektar::Utilities::ThreeSimilar ( const int  i,
const int  j,
const int  k,
int &  pr,
int &  ps 
)

Definition at line 227 of file ProcessIsoContour.cpp.

References ASSERTL0.

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

231 {
232  switch (i + j + k)
233  {
234  case (3):
235  pr = 3;
236  ps = 4;
237  break;
238  case (4):
239  pr = 2;
240  ps = 4;
241  break;
242  case (5):
243  if (j == 1)
244  {
245  pr = 2;
246  ps = 3;
247  }
248  else
249  {
250  pr = 1;
251  ps = 4;
252  }
253  break;
254  case (6):
255  if (i == 0)
256  {
257  pr = 1;
258  ps = 3;
259  }
260  else
261  {
262  pr = 0;
263  ps = 4;
264  }
265  break;
266  case (7):
267  if (i == 0)
268  {
269  pr = 1;
270  ps = 2;
271  }
272  else
273  {
274  pr = 0;
275  ps = 3;
276  }
277  break;
278  case (8):
279  pr = 0;
280  ps = 2;
281  break;
282  case (9):
283  pr = 0;
284  ps = 1;
285  break;
286  default:
287  ASSERTL0(false,"Error in 5-point triangulation in ThreeSimilar");
288  break;
289  }
290 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
std::vector<int> Nektar::Utilities::triTensorNodeOrdering ( const std::vector< int > &  nodes,
int  n 
)

Definition at line 107 of file InputGmsh.cpp.

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

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

Definition at line 195 of file ProcessIsoContour.cpp.

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

201 {
202  if (((cx[0]-cx[1])==0.0)&&
203  ((cy[0]-cy[1])==0.0)&&
204  ((cz[0]-cz[1])==0.0))
205  {
206  if (((cx[2]-cx[3])==0.0)&&
207  ((cy[2]-cy[3])==0.0)&&
208  ((cz[2]-cz[3])==0.0))
209  {
210  pr=4;
211  }
212  else
213  {
214  pr=3;
215  }
216  }
217  else
218  {
219  pr=1;
220  }
221 }

Variable Documentation

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

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

Referenced by operator<<().

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

Definition at line 634 of file ProcessIsoContour.cpp.