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

#include <InputPts.h>

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

Public Member Functions

 InputPts (FieldSharedPtr f)
 Set up InputPts object. More...
 
virtual ~InputPts ()
 
virtual void Process (po::variables_map &vm)
 
virtual std::string GetModuleName ()
 
- Public Member Functions inherited from Nektar::Utilities::InputModule
 InputModule (FieldSharedPtr p_m)
 
void AddFile (string fileType, string fileName)
 
 InputModule (MeshSharedPtr p_m)
 
void OpenStream ()
 Open a file for input. More...
 
- Public Member Functions inherited from Nektar::Utilities::Module
 Module (FieldSharedPtr p_f)
 
void RegisterConfig (string key, string value)
 Register a configuration option with a module. More...
 
void PrintConfig ()
 Print out all configuration options for a module. More...
 
void SetDefaults ()
 Sets default configuration options for those which have not been set. More...
 
bool GetRequireEquiSpaced (void)
 
void SetRequireEquiSpaced (bool pVal)
 
void EvaluateTriFieldAtEquiSpacedPts (LocalRegions::ExpansionSharedPtr &exp, const Array< OneD, const NekDouble > &infield, Array< OneD, NekDouble > &outfield)
 
 Module (MeshSharedPtr p_m)
 
virtual void Process ()=0
 
void RegisterConfig (std::string key, std::string value)
 
void PrintConfig ()
 
void SetDefaults ()
 
MeshSharedPtr GetMesh ()
 
virtual void ProcessVertices ()
 Extract element vertices. More...
 
virtual void ProcessEdges (bool ReprocessEdges=true)
 Extract element edges. More...
 
virtual void ProcessFaces (bool ReprocessFaces=true)
 Extract element faces. More...
 
virtual void ProcessElements ()
 Generate element IDs. More...
 
virtual void ProcessComposites ()
 Generate composites. More...
 
virtual void ClearElementLinks ()
 

Static Public Member Functions

static ModuleSharedPtr create (FieldSharedPtr f)
 Creates an instance of this class. More...
 

Static Public Attributes

static ModuleKey m_className []
 ModuleKey for class. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Nektar::Utilities::InputModule
void PrintSummary ()
 Print summary of elements. More...
 
void PrintSummary ()
 Print summary of elements. More...
 
- Protected Member Functions inherited from Nektar::Utilities::Module
 Module ()
 
void ReorderPrisms (PerMap &perFaces)
 Reorder node IDs so that prisms and tetrahedra are aligned correctly. More...
 
void PrismLines (int prism, PerMap &perFaces, std::set< int > &prismsDone, std::vector< ElementSharedPtr > &line)
 
- Protected Attributes inherited from Nektar::Utilities::InputModule
set< string > m_allowedFiles
 
std::ifstream m_mshFile
 Input stream. More...
 
- Protected Attributes inherited from Nektar::Utilities::Module
FieldSharedPtr m_f
 Field object. More...
 
map< string, ConfigOptionm_config
 List of configuration values. More...
 
bool m_requireEquiSpaced
 
MeshSharedPtr m_mesh
 Mesh object. More...
 
std::map< std::string,
ConfigOption
m_config
 List of configuration values. More...
 

Detailed Description

Input module for Xml files.

Definition at line 50 of file InputPts.h.

Constructor & Destructor Documentation

Nektar::Utilities::InputPts::InputPts ( FieldSharedPtr  f)

Set up InputPts object.

Definition at line 64 of file InputPts.cpp.

References Nektar::Utilities::InputModule::m_allowedFiles.

64  : InputModule(f)
65 {
66  m_allowedFiles.insert("pts");
67 }
Nektar::Utilities::InputPts::~InputPts ( )
virtual

Definition at line 73 of file InputPts.cpp.

74 {
75 }

Member Function Documentation

static ModuleSharedPtr Nektar::Utilities::InputPts::create ( FieldSharedPtr  f)
inlinestatic

Creates an instance of this class.

Definition at line 58 of file InputPts.h.

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

59  {
61  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
virtual std::string Nektar::Utilities::InputPts::GetModuleName ( )
inlinevirtual

Implements Nektar::Utilities::Module.

Definition at line 65 of file InputPts.h.

66  {
67  return "InputPts";
68  }
void Nektar::Utilities::InputPts::Process ( po::variables_map &  vm)
virtual

Implements Nektar::Utilities::Module.

Definition at line 81 of file InputPts.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::LibUtilities::NekFactory< tKey, tBase, >::CreateInstance(), Nektar::LibUtilities::GetCommFactory(), and Nektar::Utilities::Module::m_f.

82 {
83  if (m_f->m_verbose)
84  {
85  if(m_f->m_comm->TreatAsRankZero())
86  {
87  cout << "Processing input pts file" << endl;
88  }
89  }
90 
91  string inFile = (m_f->m_inputfiles["pts"][0]).c_str();
92 
93  if(m_f->m_session)
94  {
96  AllocateSharedPtr(m_f->m_session->GetComm());
97 
98  }
99  else // serial communicator
100  {
104  }
105 
106  m_f->m_ptsIO->Import(inFile, m_f->m_fieldPts);
107 }
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:162
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
CommFactory & GetCommFactory()
Definition: Comm.cpp:64
FieldSharedPtr m_f
Field object.
boost::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
Definition: Comm.h:53

Member Data Documentation

ModuleKey Nektar::Utilities::InputPts::m_className
static
Initial value:

ModuleKey for class.

Definition at line 63 of file InputPts.h.