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

Classes

struct  FieldPts
struct  Field
class  InputDat
 Input module for Xml files. More...
class  InputFld
class  InputPts
class  InputXml
struct  ConfigOption
 Represents a command-line configuration option. More...
class  Module
class  InputModule
 Abstract base class for input modules. More...
class  ProcessModule
 Abstract base class for processing modules. More...
class  OutputModule
 Abstract base class for output modules. More...
class  FieldConvertComm
class  OutputFld
 Converter from fld to vtk. More...
class  OutputInfo
class  OutputTecplot
 Converter from fld to dat. More...
class  OutputVtk
 Converter from fld to vtk. More...
class  ProcessAddFld
 This processing module scales the input fld file. 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  ProcessEquiSpacedOutput
 This processing module interpolates one field to another. 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  Iso
class  IsoVertex
class  ProcessIsoContour
 This processing module extracts an isocontour. More...
class  ProcessJacobianEnergy
 This processing module scales the input fld file. More...
class  ProcessQCriterion
 This processing module calculates the Q Criterion and adds it as an extra-field to the output file. More...
class  ProcessScaleInFld
 This processing module scales the input fld file. More...
class  ProcessVorticity
 This processing module calculates the vorticity and adds it as an extra-field to the output file. More...
class  InputGmsh
struct  HOSurfHash
class  InputNek
class  InputNekpp
class  InputPly
 Converter for Ply files. More...
class  InputSem
class  InputTec
 Converter for VTK files. More...
class  InputSwan
 Converter for Swansea mesh format. More...
class  InputVtk
 Converter for VTK files. More...
struct  TetOrient
struct  TetOrientHash
class  Node
 Represents a point in the domain. More...
struct  NodeHash
 Defines a hash function for nodes. More...
class  Edge
 Represents an edge which joins two points. More...
struct  EdgeHash
 Defines a hash function for edges. More...
class  Face
 Represents a face comprised of three or more edges. More...
struct  FaceHash
struct  ElmtConfig
 Basic information about an element. More...
class  Element
 Base class for element definitions. More...
struct  element_id_less_than
 Define element ordering based on ID. More...
class  Composite
 A composite is a collection of elements. More...
struct  Condition
 Defines a boundary condition. More...
class  Mesh
class  Point
 A 0-dimensional vertex. More...
class  Line
 A 1-dimensional line between two vertex nodes. More...
struct  HOTriangle
 A lightweight struct for dealing with high-order triangle alignment. More...
class  Triangle
 A 2-dimensional three-sided element. More...
class  Quadrilateral
 A 2-dimensional four-sided element. More...
class  Tetrahedron
 A 3-dimensional four-faced element. More...
class  Pyramid
 A 3-dimensional square-based pyramidic element. More...
class  Prism
 A 3-dimensional five-faced element (2 triangles, 3 quadrilaterals). More...
class  Hexahedron
 A 3-dimensional six-faced element. More...
struct  ElmtConfigHash
class  OutputGmsh
 Converter for Gmsh files. More...
class  OutputNekpp
 Converter for Gmsh files. More...
struct  SplitMapHelper
struct  SplitEdgeHelper
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  ProcessCyl
struct  EdgeInfo
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  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  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  ProcessPerAlign
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  ProcessSpherigon
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...

Typedefs

typedef boost::shared_ptr
< FieldPts
FieldPtsSharedPtr
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::shared_ptr< IsoIsoSharedPtr
typedef HOTriangle< NodeSharedPtrHOSurf
typedef boost::shared_ptr< HOSurfHOSurfSharedPtr
typedef boost::unordered_set
< HOSurfSharedPtr, HOSurfHash
HOSurfSet
typedef boost::shared_ptr
< InputPly
InputPlySharedPtr
typedef boost::unordered_set
< struct TetOrient,
TetOrientHash
TetOrientSet
typedef boost::shared_ptr
< Element
ElementSharedPtr
 Shared pointer to an element.
typedef boost::shared_ptr< NodeNodeSharedPtr
 Shared pointer to a Node.
typedef boost::unordered_set
< NodeSharedPtr, NodeHash
NodeSet
typedef boost::shared_ptr< EdgeEdgeSharedPtr
 Shared pointer to an edge.
typedef boost::unordered_set
< EdgeSharedPtr, EdgeHash
EdgeSet
typedef boost::shared_ptr< FaceFaceSharedPtr
 Shared pointer to a face.
typedef boost::unordered_set
< FaceSharedPtr, FaceHash
FaceSet
typedef std::map< unsigned int,
std::vector< ElementSharedPtr > > 
ElementMap
 Container for elements; key is expansion dimension, value is vector of elements of that dimension.
typedef
Nektar::LibUtilities::NekFactory
< LibUtilities::ShapeType,
Element, ElmtConfig,
std::vector< NodeSharedPtr >
, std::vector< int > > 
ElementFactory
 Element factory definition.
typedef boost::shared_ptr
< Composite
CompositeSharedPtr
 Shared pointer to a composite.
typedef std::map< unsigned int,
CompositeSharedPtr
CompositeMap
 Container of composites; key is the composite id, value is the composite.
typedef boost::shared_ptr
< Condition
ConditionSharedPtr
typedef std::map< int,
ConditionSharedPtr
ConditionMap
typedef boost::shared_ptr< MeshMeshSharedPtr
 Shared pointer to a mesh.
typedef map< int, pair
< FaceSharedPtr, vector< int > > > 
PerMap
typedef std::pair< int, int > ipair

Enumerations

enum  PtsType {
  ePtsFile, ePtsLine, ePtsPlane, ePtsTriBlock,
  ePtsTetBlock
}
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)
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.
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.
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.
bool operator== (NodeSharedPtr const &p1, NodeSharedPtr const &p2)
 Defines equality between two NodeSharedPtr objects.
bool operator< (NodeSharedPtr const &p1, NodeSharedPtr const &p2)
 Defines ordering between two NodeSharedPtr objects.
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).
bool operator< (EdgeSharedPtr const &p1, EdgeSharedPtr const &p2)
 Defines ordering between two edges (based on ID of edges).
bool operator== (FaceSharedPtr const &p1, FaceSharedPtr const &p2)
 Defines equality of two faces (equal if IDs of vertices are the same.)
bool operator< (FaceSharedPtr const &p1, FaceSharedPtr const &p2)
 Defines ordering between two faces (depending on ID of faces).
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

static FieldPtsSharedPtr NullFieldPts
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 1050 of file MeshElements.h.

Shared pointer to a composite.

Definition at line 1047 of file MeshElements.h.

Definition at line 1082 of file MeshElements.h.

Definition at line 1081 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 997 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 994 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<FieldPts> Nektar::Utilities::FieldPtsSharedPtr

Definition at line 169 of file Field.hpp.

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

Definition at line 772 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 192 of file PostProcessing/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 184 of file ProcessIsoContour.h.

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

Shared pointer to a mesh.

Definition at line 1128 of file MeshElements.h.

Definition at line 227 of file PostProcessing/FieldConvert/Module.h.

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

Definition at line 222 of file PostProcessing/FieldConvert/Module.h.

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

Definition at line 225 of file PostProcessing/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 PreProcessing/MeshConvert/Module.h.

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

Definition at line 1157 of file MeshElements.cpp.

Enumeration Type Documentation

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

Enumerator:
eDirichlet 
eNeumann 
eRobin 
ePeriodic 
eHOPCondition 
SIZE_ConditionType 

Definition at line 1055 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 PreProcessing/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 PostProcessing/FieldConvert/Module.h.

Enumerator:
eFile 
eRecon 

Definition at line 45 of file InputNek.h.

{
};
Enumerator:
ePtsFile 
ePtsLine 
ePtsPlane 
ePtsTriBlock 
ePtsTetBlock 

Definition at line 65 of file Field.hpp.

Enumerator:
eFullBlockZone 
eFullBlockZoneEquiSpaced 
eSeperateZones 

Definition at line 46 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 PostProcessing/FieldConvert/Module.cpp.

Referenced by main().

{
typedef Loki::SingletonHolder<ModuleFactory,
Loki::CreateUsingNew,
Loki::NoDestroy > Type;
return Type::Instance();
}
int** Nektar::Utilities::helper2d ( int  lda,
int  arr[][2] 
)

Definition at line 59 of file ProcessBL.cpp.

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

{
int **ret = new int*[lda];
for (int i = 0; i < lda; ++i)
{
ret[i] = new int[2];
ret[i][0] = arr[i][0];
ret[i][1] = arr[i][1];
}
return ret;
}
int** Nektar::Utilities::helper2d ( int  lda,
int  arr[][4] 
)

Definition at line 71 of file ProcessBL.cpp.

{
int **ret = new int*[lda];
for (int i = 0; i < lda; ++i)
{
ret[i] = new int[4];
ret[i][0] = arr[i][0];
ret[i][1] = arr[i][1];
ret[i][2] = arr[i][2];
ret[i][3] = arr[i][3];
}
return ret;
}
bool Nektar::Utilities::operator!= ( const IsoVertex &  x,
const IsoVertex &  y 
)

Definition at line 641 of file ProcessIsoContour.cpp.

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

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

Defines ordering between two NodeSharedPtr objects.

Definition at line 162 of file MeshElements.cpp.

{
return *p1 < *p2;
}
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.

{
return p1->m_id < p2->m_id;
}
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.

{
return p1->m_id < p2->m_id;
}
std::ostream & Nektar::Utilities::operator<< ( std::ostream &  os,
const ModuleKey &  rhs 
)

Prints a given module key to a stream.

Definition at line 60 of file PostProcessing/FieldConvert/Module.cpp.

References ModuleTypeMap.

{
return os << ModuleTypeMap[rhs.first] << ": " << rhs.second;
}
std::ostream & Nektar::Utilities::operator<< ( std::ostream &  os,
const NodeSharedPtr &  n 
)

Definition at line 167 of file MeshElements.cpp.

{
os << n->m_x << " " << n->m_y << " " << n->m_z;
return os;
}
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.

{
return p1.m_e == p2.m_e &&
p1.m_faceNodes == p2.m_faceNodes &&
p1.m_volumeNodes == p2.m_volumeNodes &&
p1.m_order == p2.m_order;
}
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.

{
int i, n = c1->type.size();
if (n != c2->type.size())
{
return false;
}
for (i = 0; i < n; ++i)
{
if (c1->type[i] != c2->type[i])
{
return false;
}
if (c1->field[i] != c2->field[i] || c1->value[i] != c2->value[i])
{
return false;
}
}
return true;
}
bool Nektar::Utilities::operator== ( NodeSharedPtr const &  p1,
NodeSharedPtr const &  p2 
)

Defines equality between two NodeSharedPtr objects.

Definition at line 154 of file MeshElements.cpp.

{
return *p1 == *p2;
}
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.

{
return ( ((*(p1->m_n1) == *(p2->m_n1)) && (*(p1->m_n2) == *(p2->m_n2)))
|| ((*(p1->m_n2) == *(p2->m_n1)) && (*(p1->m_n1) == *(p2->m_n2))));
}
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.

{
for (it1 = p1->m_vertexList.begin(); it1 != p1->m_vertexList.end(); ++it1)
{
if (find(p2->m_vertexList.begin(), p2->m_vertexList.end(), *it1)
== p2->m_vertexList.end())
{
return false;
}
}
return true;
}
bool Nektar::Utilities::operator== ( const IsoVertex &  x,
const IsoVertex &  y 
)

Definition at line 634 of file ProcessIsoContour.cpp.

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

{
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) +
(x.m_z-y.m_z)*(x.m_z-y.m_z) < SQ_PNT_TOL)? true:false;
}
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 1084 of file InputNek.cpp.

{
if (p1->vertId.size() != p2->vertId.size())
{
return false;
}
vector<int> ids1 = p1->vertId;
vector<int> ids2 = p2->vertId;
sort(ids1.begin(), ids1.end());
sort(ids2.begin(), ids2.end());
for (int i = 0; i < ids1.size(); ++i)
{
if (ids1[i] != ids2[i])
return false;
}
return true;
}
bool Nektar::Utilities::operator== ( const struct TetOrient &  a,
const struct TetOrient &  b 
)

Definition at line 1159 of file MeshElements.cpp.

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

{
if (a.nid.size() != b.nid.size())
{
return false;
}
for (int i = 0; i < a.nid.size(); ++i)
{
if (a.nid[i] != b.nid[i])
{
return false;
}
}
return true;
}
void Nektar::Utilities::PrismLineFaces ( int  prismid,
map< int, int > &  facelist,
vector< vector< int > > &  FacesToPrisms,
vector< vector< int > > &  PrismsToFaces,
vector< bool > &  PrismDone 
)

Definition at line 647 of file InputStarTec.cpp.

Referenced by Nektar::Utilities::InputTec::ResetNodes().

{
if(PrismDone[prismid] == false)
{
PrismDone[prismid] = true;
// Add faces0
int face = PrismToFaces[prismid][0];
facelist[face] = face;
for(int i = 0; i < FaceToPrisms[face].size(); ++i)
{
PrismLineFaces(FaceToPrisms[face][i], facelist, FaceToPrisms,
PrismToFaces, PrismDone);
}
// Add faces1
face = PrismToFaces[prismid][1];
facelist[face] = face;
for(int i = 0; i < FaceToPrisms[face].size(); ++i)
{
PrismLineFaces(FaceToPrisms[face][i], facelist, FaceToPrisms,
PrismToFaces, 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().

{
std::vector<int> nodeList;
// Triangle
nodeList.resize(nodes.size());
// Vertices and edges
nodeList[0] = nodes[0];
if (n > 1)
{
nodeList[n-1] = nodes[1];
nodeList[n*n-1] = nodes[2];
nodeList[n*(n-1)] = nodes[3];
}
for (int i = 1; i < n-1; ++i)
{
nodeList[i] = nodes[4+i-1];
}
for (int i = 1; i < n-1; ++i)
{
nodeList[n*n-1-i] = nodes[4+2*(n-2)+i-1];
}
// Interior (recursion)
if (n > 2)
{
// Reorder interior nodes
std::vector<int> interior((n-2)*(n-2));
std::copy(nodes.begin() + 4+4*(n-2), nodes.end(), interior.begin());
interior = quadTensorNodeOrdering(interior, n-2);
// Copy into full node list
for (int j = 1; j < n-1; ++j)
{
nodeList[j*n] = nodes[4+3*(n-2)+n-2-j];
for (int i = 1; i < n-1; ++i)
{
nodeList[j*n+i] = interior[(j-1)*(n-2)+(i-1)];
}
nodeList[(j+1)*n-1] = nodes[4+(n-2)+j-1];
}
}
return nodeList;
}
bool Nektar::Utilities::same ( NekDouble  x1,
NekDouble  y1,
NekDouble  z1,
NekDouble  x2,
NekDouble  y2,
NekDouble  z2 
)

Definition at line 648 of file ProcessIsoContour.cpp.

References SQ_PNT_TOL.

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

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

Definition at line 224 of file ProcessIsoContour.cpp.

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

{
switch (i + j + k)
{
case (3):
pr = 3;
ps = 4;
break;
case (4):
pr = 2;
ps = 4;
break;
case (5):
if (j == 1)
{
pr = 2;
ps = 3;
}
else
{
pr = 1;
ps = 4;
}
break;
case (6):
if (i == 0)
{
pr = 1;
ps = 3;
}
else
{
pr = 0;
ps = 4;
}
break;
case (7):
if (i == 0)
{
pr = 1;
ps = 2;
}
else
{
pr = 0;
ps = 3;
}
break;
case (8):
pr = 0;
ps = 2;
break;
case (9):
pr = 0;
ps = 1;
break;
default:
printf("Error in 5-point triangulation in ThreeSimilar");
break;
}
}
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().

{
std::vector<int> nodeList;
int cnt2;
nodeList.resize(nodes.size());
// Vertices
nodeList[0] = nodes[0];
if (n > 1)
{
nodeList[n-1] = nodes[1];
nodeList[n*(n+1)/2 - 1] = nodes[2];
}
// Edges
int cnt = n;
for (int i = 1; i < n-1; ++i)
{
nodeList[i] = nodes[3+i-1];
nodeList[cnt] = nodes[3+3*(n-2)-i];
nodeList[cnt+n-i-1] = nodes[3+(n-2)+i-1];
cnt += n-i;
}
// Interior (recursion)
if (n > 3)
{
// Reorder interior nodes
std::vector<int> interior((n-3)*(n-2)/2);
std::copy(nodes.begin() + 3+3*(n-2), nodes.end(), interior.begin());
interior = triTensorNodeOrdering(interior, n-3);
// Copy into full node list
cnt = n;
cnt2 = 0;
for (int j = 1; j < n-2; ++j)
{
for (int i = 0; i < n-j-2; ++i)
{
nodeList[cnt+i+1] = interior[cnt2+i];
}
cnt += n-j;
cnt2 += n-2-j;
}
}
return nodeList;
}
void Nektar::Utilities::TwoPairs ( Array< OneD, NekDouble > &  cx,
Array< OneD, NekDouble > &  cy,
Array< OneD, NekDouble > &  cz,
int &  pr 
)

Definition at line 193 of file ProcessIsoContour.cpp.

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

{
if (((cx[0]-cx[1])==0.0)&&
((cy[0]-cy[1])==0.0)&&
((cz[0]-cz[1])==0.0))
{
if (((cx[2]-cx[3])==0.0)&&
((cy[2]-cy[3])==0.0)&&
((cz[2]-cz[3])==0.0))
{
pr=4;
} else
{
pr=3;
}
}
else
{
pr=1;
}
}

Variable Documentation

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

Definition at line 71 of file PostProcessing/FieldConvert/Module.h.

Referenced by operator<<().

FieldPtsSharedPtr Nektar::Utilities::NullFieldPts
static
NekDouble Nektar::Utilities::SQ_PNT_TOL = 1e-16

Definition at line 631 of file ProcessIsoContour.cpp.

Referenced by operator!=(), operator==(), and same().