Nektar++
InputNek.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // File: InputNek.h
4 //
5 // For more information, please see: http://www.nektar.info/
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 //
31 // Description: Nektar file format converter.
32 //
33 ////////////////////////////////////////////////////////////////////////////////
34 
35 #ifndef UTILITIES_NEKMESH_INPUTNEK
36 #define UTILITIES_NEKMESH_INPUTNEK
37 
38 #include <algorithm>
39 #include <boost/unordered_set.hpp>
40 #include <boost/unordered_map.hpp>
41 
44 
45 namespace Nektar
46 {
47 namespace Utilities
48 {
49 
51 {
54 };
55 
56 /**
57  * Converter class for Nektar session files.
58  */
60 {
61 public:
63  virtual ~InputNek();
64  virtual void Process();
65 
66  /// Creates an instance of this class.
68  {
70  }
71  /// %ModuleKey for class.
73 
74 private:
75  void LoadHOSurfaces();
77 
78  /**
79  * Maps a curve tag to a filename containing surface information.
80  */
81  std::map<std::string, std::pair<NekCurve, std::string> > curveTags;
82 
83  /**
84  * Maps a curve tag to the high-order surface data for that tag.
85  */
86  std::map<std::string, NekMeshUtils::HOSurfSet> hoData;
87 
88  /**
89  * Maps ordering of hsf standard element to Nektar++ ordering.
90  */
91  std::map<int, int> hoMap;
92 };
93 }
94 }
95 
96 #endif
static NekMeshUtils::ModuleKey className
ModuleKey for class.
Definition: InputNek.h:72
std::shared_ptr< Module > ModuleSharedPtr
std::shared_ptr< Mesh > MeshSharedPtr
Shared pointer to a mesh.
Definition: Mesh.h:156
std::map< int, int > hoMap
Definition: InputNek.h:91
std::map< std::string, NekMeshUtils::HOSurfSet > hoData
Definition: InputNek.h:86
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
virtual void Process()
Processes Nektar file format.
Definition: InputNek.cpp:78
Abstract base class for input modules.
static NekMeshUtils::ModuleSharedPtr create(NekMeshUtils::MeshSharedPtr m)
Creates an instance of this class.
Definition: InputNek.h:67
int GetNnodes(LibUtilities::ShapeType elType)
Definition: InputNek.cpp:1114
std::map< std::string, std::pair< NekCurve, std::string > > curveTags
Definition: InputNek.h:81
std::pair< ModuleType, std::string > ModuleKey
InputNek(NekMeshUtils::MeshSharedPtr p_m)
Definition: InputNek.cpp:59