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

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...

#include <ProcessLinkCheck.h>

Inheritance diagram for Nektar::Utilities::ProcessLinkCheck:
Inheritance graph
[legend]
Collaboration diagram for Nektar::Utilities::ProcessLinkCheck:
Collaboration graph
[legend]

Public Member Functions

 ProcessLinkCheck (NekMeshUtils::MeshSharedPtr m)
 
virtual ~ProcessLinkCheck ()
 
virtual void Process ()
 Write mesh to output file. More...
 
- Public Member Functions inherited from Nektar::NekMeshUtils::ProcessModule
NEKMESHUTILS_EXPORT ProcessModule (MeshSharedPtr p_m)
 
- Public Member Functions inherited from Nektar::NekMeshUtils::Module
NEKMESHUTILS_EXPORT Module (MeshSharedPtr p_m)
 
NEKMESHUTILS_EXPORT void RegisterConfig (std::string key, std::string value)
 Register a configuration option with a module. More...
 
NEKMESHUTILS_EXPORT void PrintConfig ()
 Print out all configuration options for a module. More...
 
NEKMESHUTILS_EXPORT void SetDefaults ()
 Sets default configuration options for those which have not been set. More...
 
NEKMESHUTILS_EXPORT MeshSharedPtr GetMesh ()
 
virtual NEKMESHUTILS_EXPORT void ProcessVertices ()
 Extract element vertices. More...
 
virtual NEKMESHUTILS_EXPORT void ProcessEdges (bool ReprocessEdges=true)
 Extract element edges. More...
 
virtual NEKMESHUTILS_EXPORT void ProcessFaces (bool ReprocessFaces=true)
 Extract element faces. More...
 
virtual NEKMESHUTILS_EXPORT void ProcessElements ()
 Generate element IDs. More...
 
virtual NEKMESHUTILS_EXPORT void ProcessComposites ()
 Generate composites. More...
 
virtual NEKMESHUTILS_EXPORT void ClearElementLinks ()
 

Static Public Member Functions

static boost::shared_ptr< Modulecreate (NekMeshUtils::MeshSharedPtr m)
 Creates an instance of this class. More...
 

Static Public Attributes

static NekMeshUtils::ModuleKey className
 

Additional Inherited Members

- Protected Member Functions inherited from Nektar::NekMeshUtils::Module
NEKMESHUTILS_EXPORT void ReorderPrisms (PerMap &perFaces)
 Reorder node IDs so that prisms and tetrahedra are aligned correctly. More...
 
NEKMESHUTILS_EXPORT void PrismLines (int prism, PerMap &perFaces, std::set< int > &prismsDone, std::vector< ElementSharedPtr > &line)
 
- Protected Attributes inherited from Nektar::NekMeshUtils::Module
MeshSharedPtr m_mesh
 Mesh object. More...
 
std::map< std::string,
ConfigOption
m_config
 List of configuration values. More...
 

Detailed Description

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.

Definition at line 52 of file ProcessLinkCheck.h.

Constructor & Destructor Documentation

Nektar::Utilities::ProcessLinkCheck::ProcessLinkCheck ( NekMeshUtils::MeshSharedPtr  m)

Definition at line 52 of file ProcessLinkCheck.cpp.

52  : ProcessModule(m)
53 {
54 
55 }
NEKMESHUTILS_EXPORT ProcessModule(MeshSharedPtr p_m)
Nektar::Utilities::ProcessLinkCheck::~ProcessLinkCheck ( )
virtual

Definition at line 57 of file ProcessLinkCheck.cpp.

58 {
59 }

Member Function Documentation

static boost::shared_ptr<Module> Nektar::Utilities::ProcessLinkCheck::create ( NekMeshUtils::MeshSharedPtr  m)
inlinestatic

Creates an instance of this class.

Definition at line 56 of file ProcessLinkCheck.h.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr().

57  {
59  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
void Nektar::Utilities::ProcessLinkCheck::Process ( )
virtual

Write mesh to output file.

Implements Nektar::NekMeshUtils::Module.

Definition at line 61 of file ProcessLinkCheck.cpp.

References Nektar::NekMeshUtils::Module::ClearElementLinks(), Nektar::iterator, Nektar::NekMeshUtils::Module::m_mesh, Nektar::NekMeshUtils::Module::ProcessComposites(), Nektar::NekMeshUtils::Module::ProcessEdges(), Nektar::NekMeshUtils::Module::ProcessElements(), Nektar::NekMeshUtils::Module::ProcessFaces(), and Nektar::NekMeshUtils::Module::ProcessVertices().

62 {
63  if (m_mesh->m_verbose)
64  {
65  cout << "ProcessLinkCheck: Checking links... " << endl;
66  }
67 
68  //need to reset all links first to make sure there are no bugs!
71  ProcessEdges();
72  ProcessFaces();
75 
76  int count = 0;
77 
78  if(m_mesh->m_expDim == 2)
79  {
81  for(eit = m_mesh->m_edgeSet.begin();
82  eit != m_mesh->m_edgeSet.end(); eit++)
83  {
84  if((*eit)->m_elLink.size() != 2)
85  {
86  count++;
87  }
88  }
89  }
90  else
91  {
93  for(fit = m_mesh->m_faceSet.begin();
94  fit != m_mesh->m_faceSet.end(); fit++)
95  {
96  if((*fit)->m_elLink.size() != 2)
97  {
98  count++;
99  }
100  }
101  }
102 
103 
104 
105  if (count - m_mesh->m_element[m_mesh->m_expDim-1].size() != 0)
106  {
107  cout << "Link Check Error: mesh contains incorrectly connected"
108  << " entities and is not valid: "
109  << count - m_mesh->m_element[m_mesh->m_expDim-1].size()
110  << endl;
111  }
112 }
virtual NEKMESHUTILS_EXPORT void ProcessFaces(bool ReprocessFaces=true)
Extract element faces.
virtual NEKMESHUTILS_EXPORT void ProcessElements()
Generate element IDs.
virtual NEKMESHUTILS_EXPORT void ClearElementLinks()
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
virtual NEKMESHUTILS_EXPORT void ProcessVertices()
Extract element vertices.
virtual NEKMESHUTILS_EXPORT void ProcessEdges(bool ReprocessEdges=true)
Extract element edges.
virtual NEKMESHUTILS_EXPORT void ProcessComposites()
Generate composites.

Member Data Documentation

ModuleKey Nektar::Utilities::ProcessLinkCheck::className
static
Initial value:
ModuleKey(eProcessModule, "linkcheck"),
"Checks elemental links within elements.")

Definition at line 60 of file ProcessLinkCheck.h.