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::ProcessConcatenateFld Class Reference

This processing module sets up for the boundary field to be extracted. More...

#include <ProcessConcatenateFld.h>

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

Public Member Functions

 ProcessConcatenateFld (FieldSharedPtr f)
 
virtual ~ProcessConcatenateFld ()
 
virtual void Process (po::variables_map &vm)
 
virtual std::string GetModuleName ()
 
- Public Member Functions inherited from Nektar::Utilities::ProcessModule
 ProcessModule ()
 
 ProcessModule (FieldSharedPtr p_f)
 
 ProcessModule (MeshSharedPtr p_m)
 
- 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 boost::shared_ptr< Modulecreate (FieldSharedPtr f)
 Creates an instance of this class. More...
 

Static Public Attributes

static ModuleKey className
 

Additional Inherited Members

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

This processing module sets up for the boundary field to be extracted.

Definition at line 49 of file ProcessConcatenateFld.h.

Constructor & Destructor Documentation

Nektar::Utilities::ProcessConcatenateFld::ProcessConcatenateFld ( FieldSharedPtr  f)

Definition at line 56 of file ProcessConcatenateFld.cpp.

57  : ProcessModule(f)
58 {
59  // check for correct input files
60  if((f->m_inputfiles.count("xml") == 0) &&
61  (f->m_inputfiles.count("xml.gz") == 0))
62  {
63  cout << "An xml or xml.gz input file must be specified for the "
64  "concatenate module" << endl;
65  exit(3);
66  }
67 
68  if((f->m_inputfiles.count("fld") == 0) &&
69  (f->m_inputfiles.count("chk") == 0) &&
70  (f->m_inputfiles.count("rst") == 0))
71  {
72  cout << "A fld or chk or rst input file must be specified for the "
73  "concatenate module" << endl;
74 
75  exit(3);
76  }
77 
78 }
Nektar::Utilities::ProcessConcatenateFld::~ProcessConcatenateFld ( )
virtual

Definition at line 80 of file ProcessConcatenateFld.cpp.

81 {
82 }

Member Function Documentation

static boost::shared_ptr<Module> Nektar::Utilities::ProcessConcatenateFld::create ( FieldSharedPtr  f)
inlinestatic

Creates an instance of this class.

Definition at line 53 of file ProcessConcatenateFld.h.

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

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

Implements Nektar::Utilities::Module.

Definition at line 63 of file ProcessConcatenateFld.h.

64  {
65  return "ProcessConcatenateFld";
66  }
void Nektar::Utilities::ProcessConcatenateFld::Process ( po::variables_map &  vm)
virtual

Implements Nektar::Utilities::Module.

Definition at line 84 of file ProcessConcatenateFld.cpp.

References Nektar::Utilities::Module::m_f.

85 {
86  if (m_f->m_verbose)
87  {
88  if(m_f->m_comm->TreatAsRankZero())
89  {
90  cout << "ProcessConcatenateFld: Concatenating field file..."
91  << endl;
92  }
93  }
94 
95  std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
96  = m_f->m_exp[0]->GetFieldDefinitions();
97  std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
98 
99  // Copy Data into FieldData and set variable
100  for(int j = 0; j < m_f->m_exp.size(); ++j)
101  {
102  for(int i = 0; i < FieldDef.size(); ++i)
103  {
104  // Could do a search here to find correct variable
105  FieldDef[i]->m_fields.push_back(m_f->m_fielddef[0]->m_fields[j]);
106  m_f->m_exp[0]->AppendFieldData(FieldDef[i], FieldData[i],
107  m_f->m_exp[j]->UpdateCoeffs());
108  }
109  }
110 
111  m_f->m_fielddef = FieldDef;
112  m_f->m_data = FieldData;
113 }
FieldSharedPtr m_f
Field object.

Member Data Documentation

ModuleKey Nektar::Utilities::ProcessConcatenateFld::className
static
Initial value:
=
ModuleKey(eProcessModule, "concatenate"),
"Concatenate field file into single file")

Definition at line 56 of file ProcessConcatenateFld.h.