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

This processing module scales the input fld file. More...

#include <ProcessJacobianEnergy.h>

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

Public Member Functions

 ProcessJacobianEnergy (FieldSharedPtr f)
virtual ~ProcessJacobianEnergy ()
virtual void Process (po::variables_map &vm)
 Write mesh to output file.
- 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.
void PrintConfig ()
 Print out all configuration options for a module.
void SetDefaults ()
 Sets default configuration options for those which have not been set.
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 (string key, string value)
void PrintConfig ()
void SetDefaults ()
MeshSharedPtr GetMesh ()
virtual void ProcessVertices ()
 Extract element vertices.

Static Public Member Functions

static boost::shared_ptr< Modulecreate (FieldSharedPtr f)
 Creates an instance of this class.

Static Public Attributes

static ModuleKey className

Additional Inherited Members

- Protected Member Functions inherited from Nektar::Utilities::Module
 Module ()
virtual void ProcessEdges (bool ReprocessEdges=true)
 Extract element edges.
virtual void ProcessFaces (bool ReprocessFaces=true)
 Extract element faces.
virtual void ProcessElements ()
 Generate element IDs.
virtual void ProcessComposites ()
 Generate composites.
void ReorderPrisms (PerMap &perFaces)
 Reorder node IDs so that prisms and tetrahedra are aligned correctly.
void PrismLines (int prism, PerMap &perFaces, set< int > &prismsDone, vector< ElementSharedPtr > &line)
- Protected Attributes inherited from Nektar::Utilities::Module
FieldSharedPtr m_f
 Field object.
map< string, ConfigOptionm_config
 List of configuration values.
bool m_requireEquiSpaced
MeshSharedPtr m_mesh
 Mesh object.

Detailed Description

This processing module scales the input fld file.

Definition at line 47 of file ProcessJacobianEnergy.h.

Constructor & Destructor Documentation

Nektar::Utilities::ProcessJacobianEnergy::ProcessJacobianEnergy ( FieldSharedPtr  f)

Definition at line 56 of file ProcessJacobianEnergy.cpp.

References Nektar::Utilities::Module::m_config.

:
{
m_config["topmodes"] = ConfigOption(false, "1",
"how many top modes to keep ");
}
Nektar::Utilities::ProcessJacobianEnergy::~ProcessJacobianEnergy ( )
virtual

Definition at line 63 of file ProcessJacobianEnergy.cpp.

{
}

Member Function Documentation

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

Creates an instance of this class.

Definition at line 51 of file ProcessJacobianEnergy.h.

void Nektar::Utilities::ProcessJacobianEnergy::Process ( po::variables_map &  vm)
virtual

Write mesh to output file.

Implements Nektar::Utilities::Module.

Definition at line 67 of file ProcessJacobianEnergy.cpp.

References Nektar::SpatialDomains::eDeformed, Nektar::SpatialDomains::eRegular, Vmath::Fill(), Nektar::Utilities::Module::m_f, Vmath::Vcopy(), Vmath::Vmax(), and Vmath::Vmin().

{
if (m_f->m_verbose)
{
cout << "ProcessJacobianEnergy: Process Jacobian fld" << endl;
}
Array<OneD, NekDouble> phys = m_f->m_exp[0]->UpdatePhys();
Array<OneD, NekDouble> coeffs = m_f->m_exp[0]->UpdateCoeffs();
Array<OneD, NekDouble> tmp,tmp1;
for(int i =0; i < m_f->m_exp[0]->GetExpSize(); ++i)
{
// copy Jacobian into field
StdRegions::StdExpansionSharedPtr Elmt = m_f->m_exp[0]->GetExp(i);
int ncoeffs = Elmt->GetNcoeffs();
int nquad = Elmt->GetTotPoints();
int coeffoffset = m_f->m_exp[0]->GetCoeff_Offset(i);
Array<OneD, NekDouble> coeffs1(ncoeffs);
Array<OneD, const NekDouble> Jac =
Elmt->GetMetricInfo()->GetJac(Elmt->GetPointsKeys());
if(Elmt->GetMetricInfo()->GetGtype() == SpatialDomains::eRegular)
{
Vmath::Fill(nquad,Jac[0],phys,1);
}
else
{
Vmath::Vcopy(nquad,Jac,1,phys,1);
}
if(Elmt->GetMetricInfo()->GetGtype() == SpatialDomains::eDeformed)
{
NekDouble jacmax = Vmath::Vmax(nquad,Jac,1);
NekDouble jacmin = Vmath::Vmin(nquad,Jac,1);
NekDouble jacmeasure = jacmax/jacmin -1.0;
Vmath::Fill(nquad,jacmeasure,phys,1);
}
else
{
Vmath::Fill(nquad,0.0,phys,1);
}
Elmt->FwdTrans(phys,tmp = coeffs + coeffoffset);
}
std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
= m_f->m_exp[0]->GetFieldDefinitions();
std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
for (int i = 0; i < FieldDef.size(); ++i)
{
FieldDef[i]->m_fields.push_back("JacobianEnergy");
m_f->m_exp[0]->AppendFieldData(FieldDef[i], FieldData[i]);
}
m_f->m_fielddef = FieldDef;
m_f->m_data = FieldData;
}

Member Data Documentation

ModuleKey Nektar::Utilities::ProcessJacobianEnergy::className
static
Initial value:
ModuleKey(eProcessModule, "jacobianenergy"),
"Show high frequency energy of Jacobian.")

Definition at line 55 of file ProcessJacobianEnergy.h.