Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
Nektar::Utilities::HOSurf Struct Reference

#include <InputNek.h>

Collaboration diagram for Nektar::Utilities::HOSurf:
Collaboration graph
[legend]

Public Member Functions

 HOSurf (vector< unsigned int > pVertId, vector< NodeSharedPtr > pSurfVerts)
 HOSurf (vector< unsigned int > pVertId)
void Rotate (int i)
void Reflect ()

Public Attributes

vector< unsigned int > vertId
vector< NodeSharedPtrsurfVerts

Detailed Description

Wrapper structure for high-order mesh information stored in a hsf file.

Definition at line 49 of file InputNek.h.

Constructor & Destructor Documentation

Nektar::Utilities::HOSurf::HOSurf ( vector< unsigned int >  pVertId,
vector< NodeSharedPtr pSurfVerts 
)
inline

Definition at line 51 of file InputNek.h.

:
vertId(pVertId), surfVerts(pSurfVerts) {}
Nektar::Utilities::HOSurf::HOSurf ( vector< unsigned int >  pVertId)
inline

Definition at line 55 of file InputNek.h.

: vertId(pVertId) {}

Member Function Documentation

void Nektar::Utilities::HOSurf::Reflect ( )

Definition at line 1163 of file InputNek.cpp.

References surfVerts.

{
int i, j, cnt;
int np = ((int)sqrt(8.0*surfVerts.size()+1.0)-1)/2;
NodeSharedPtr* tmp = new NodeSharedPtr[np*np];
for (cnt = i = 0; i < np; ++i)
{
for (j = 0; j < np-i; ++j,cnt++)
{
tmp[i*np+np-i-1-j] = surfVerts[cnt];
}
}
for(cnt = i = 0; i < np; ++i)
{
for(j = 0; j < np-i; ++j,cnt++)
{
surfVerts[cnt] = tmp[i*np+j];
}
}
delete[] tmp;
}
void Nektar::Utilities::HOSurf::Rotate ( int  nrot)

Rotates the triangle of data points inside surfVerts counter-clockwise nrot times.

Parameters
nrotNumber of times to rotate triangle.

Definition at line 1135 of file InputNek.cpp.

References surfVerts.

{
int n, i, j, cnt;
int np = ((int)sqrt(8.0*surfVerts.size()+1.0)-1)/2;
NodeSharedPtr* tmp = new NodeSharedPtr[np*np];
//NodeSharedPtr tmp[np][np];
for (n = 0; n < nrot; ++n)
{
for (cnt = i = 0; i < np; ++i)
{
for (j = 0; j < np-i; ++j, cnt++)
{
tmp[i*np+j] = surfVerts[cnt];
}
}
for (cnt = i = 0; i < np; ++i)
{
for (j = 0; j < np-i; ++j,cnt++)
{
surfVerts[cnt] = tmp[(np-1-i-j)*np+i];
}
}
}
delete[] tmp;
}

Member Data Documentation

vector<NodeSharedPtr> Nektar::Utilities::HOSurf::surfVerts

Vector of surface nodal points. These are electrostatically distributed.

Definition at line 67 of file InputNek.h.

Referenced by Reflect(), and Rotate().

vector<unsigned int> Nektar::Utilities::HOSurf::vertId

Felisa vertex ids for this face. Comparing these to those stored in the rea file determines the orientation of the face.

Definition at line 61 of file InputNek.h.