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

This processing module prints the L2 and LInf norms of the variables in the field. More...

#include <ProcessPrintFldNorms.h>

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

Public Member Functions

 ProcessPrintFldNorms (FieldSharedPtr f)
 
virtual ~ProcessPrintFldNorms ()
 
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 prints the L2 and LInf norms of the variables in the field.

Definition at line 50 of file ProcessPrintFldNorms.h.

Constructor & Destructor Documentation

Nektar::Utilities::ProcessPrintFldNorms::ProcessPrintFldNorms ( FieldSharedPtr  f)

Definition at line 56 of file ProcessPrintFldNorms.cpp.

Nektar::Utilities::ProcessPrintFldNorms::~ProcessPrintFldNorms ( )
virtual

Definition at line 61 of file ProcessPrintFldNorms.cpp.

62 {
63 }

Member Function Documentation

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

Creates an instance of this class.

Definition at line 54 of file ProcessPrintFldNorms.h.

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

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

Implements Nektar::Utilities::Module.

Definition at line 65 of file ProcessPrintFldNorms.h.

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

Implements Nektar::Utilities::Module.

Definition at line 65 of file ProcessPrintFldNorms.cpp.

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

66 {
67  if (m_f->m_verbose)
68  {
69  if(m_f->m_comm->GetRank() == 0)
70  {
71  cout << "ProcessPrintFldNorms: Printing norms..." << endl;
72  }
73  }
74 
75  // Evaluate norms and print
76  for(int j = 0; j < m_f->m_exp.size(); ++j)
77  {
78  m_f->m_exp[j]->BwdTrans(m_f->m_exp[j]->GetCoeffs(),
79  m_f->m_exp[j]->UpdatePhys());
80  NekDouble L2 = m_f->m_exp[j]->L2 (m_f->m_exp[j]->GetPhys());
81  NekDouble LInf = m_f->m_exp[j]->Linf(m_f->m_exp[j]->GetPhys());
82 
83  cout << "L 2 error (variable " << m_f->m_session->GetVariable(j)
84  << ") : " << L2 << endl;
85  cout << "L inf error (variable " << m_f->m_session->GetVariable(j)
86  << ") : " << LInf << endl;
87  }
88 }
FieldSharedPtr m_f
Field object.
double NekDouble

Member Data Documentation

ModuleKey Nektar::Utilities::ProcessPrintFldNorms::className
static
Initial value:
=
ModuleKey(eProcessModule, "printfldnorms"),
"Print L2 and LInf norms to stdout.")

Definition at line 58 of file ProcessPrintFldNorms.h.