Nektar++
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
Nektar::FieldUtils::ProcessDeform Class Reference

#include <ProcessDeform.h>

Inheritance diagram for Nektar::FieldUtils::ProcessDeform:
[legend]

Public Member Functions

 ProcessDeform (FieldSharedPtr f)
 
 ~ProcessDeform () override
 
- Public Member Functions inherited from Nektar::FieldUtils::ProcessModule
 ProcessModule ()
 
 ProcessModule (FieldSharedPtr p_f)
 
- Public Member Functions inherited from Nektar::FieldUtils::Module
FIELD_UTILS_EXPORT Module (FieldSharedPtr p_f)
 
virtual ~Module ()=default
 
void Process (po::variables_map &vm)
 
std::string GetModuleName ()
 
std::string GetModuleDescription ()
 
const ConfigOptionGetConfigOption (const std::string &key) const
 
ModulePriority GetModulePriority ()
 
std::vector< ModuleKeyGetModulePrerequisites ()
 
FIELD_UTILS_EXPORT void RegisterConfig (std::string key, std::string value="")
 Register a configuration option with a module. More...
 
FIELD_UTILS_EXPORT void PrintConfig ()
 Print out all configuration options for a module. More...
 
FIELD_UTILS_EXPORT void SetDefaults ()
 Sets default configuration options for those which have not been set. More...
 
FIELD_UTILS_EXPORT void AddFile (std::string fileType, std::string fileName)
 
FIELD_UTILS_EXPORT void EvaluateTriFieldAtEquiSpacedPts (LocalRegions::ExpansionSharedPtr &exp, const Array< OneD, const NekDouble > &infield, Array< OneD, NekDouble > &outfield)
 

Static Public Member Functions

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

Static Public Attributes

static ModuleKey className
 

Protected Member Functions

void v_Process (po::variables_map &vm) override
 Write mesh to output file. More...
 
std::string v_GetModuleName () override
 
std::string v_GetModuleDescription () override
 
ModulePriority v_GetModulePriority () override
 
- Protected Member Functions inherited from Nektar::FieldUtils::Module
 Module ()
 
virtual void v_Process (po::variables_map &vm)
 
virtual std::string v_GetModuleName ()
 
virtual std::string v_GetModuleDescription ()
 
virtual ModulePriority v_GetModulePriority ()
 
virtual std::vector< ModuleKeyv_GetModulePrerequisites ()
 

Additional Inherited Members

- Public Attributes inherited from Nektar::FieldUtils::Module
FieldSharedPtr m_f
 Field object. More...
 
- Protected Attributes inherited from Nektar::FieldUtils::Module
std::map< std::string, ConfigOptionm_config
 List of configuration values. More...
 
std::set< std::string > m_allowedFiles
 List of allowed file formats. More...
 

Detailed Description

Definition at line 43 of file ProcessDeform.h.

Constructor & Destructor Documentation

◆ ProcessDeform()

Nektar::FieldUtils::ProcessDeform::ProcessDeform ( FieldSharedPtr  f)

Definition at line 50 of file ProcessDeform.cpp.

◆ ~ProcessDeform()

Nektar::FieldUtils::ProcessDeform::~ProcessDeform ( )
override

Definition at line 54 of file ProcessDeform.cpp.

55{
56}

Member Function Documentation

◆ create()

static std::shared_ptr< Module > Nektar::FieldUtils::ProcessDeform::create ( FieldSharedPtr  f)
inlinestatic

Creates an instance of this class.

Definition at line 47 of file ProcessDeform.h.

48 {
50 }
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.

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

◆ v_GetModuleDescription()

std::string Nektar::FieldUtils::ProcessDeform::v_GetModuleDescription ( )
inlineoverrideprotectedvirtual

Reimplemented from Nektar::FieldUtils::Module.

Definition at line 65 of file ProcessDeform.h.

66 {
67 return "Deforming grid";
68 }

◆ v_GetModuleName()

std::string Nektar::FieldUtils::ProcessDeform::v_GetModuleName ( )
inlineoverrideprotectedvirtual

Reimplemented from Nektar::FieldUtils::Module.

Definition at line 60 of file ProcessDeform.h.

61 {
62 return "ProcessDeform";
63 }

◆ v_GetModulePriority()

ModulePriority Nektar::FieldUtils::ProcessDeform::v_GetModulePriority ( )
inlineoverrideprotectedvirtual

Reimplemented from Nektar::FieldUtils::Module.

Definition at line 70 of file ProcessDeform.h.

71 {
72 return eModifyExp;
73 }

References Nektar::FieldUtils::eModifyExp.

◆ v_Process()

void Nektar::FieldUtils::ProcessDeform::v_Process ( po::variables_map &  vm)
overrideprotectedvirtual

Write mesh to output file.

Reimplemented from Nektar::FieldUtils::Module.

Definition at line 58 of file ProcessDeform.cpp.

59{
60 m_f->SetUpExp(vm);
61
62 // Skip in case of empty partition
63 if (m_f->m_exp[0]->GetNumElmts() == 0)
64 {
65 return;
66 }
67
68 Array<OneD, MultiRegions::ExpListSharedPtr> exp(m_f->m_exp.size());
69 Array<OneD, Array<OneD, NekDouble>> phys(m_f->m_exp.size());
70 for (int i = 0; i < exp.size(); ++i)
71 {
72 exp[i] = m_f->m_exp[i];
73 phys[i] = m_f->m_exp[i]->UpdatePhys();
74 }
75
76 GlobalMapping::UpdateGeometry(m_f->m_graph, exp, phys, false);
77}
FieldSharedPtr m_f
Field object.
Definition: Module.h:239
void UpdateGeometry(SpatialDomains::MeshGraphSharedPtr graph, Array< OneD, MultiRegions::ExpListSharedPtr > &fields, Array< OneD, Array< OneD, NekDouble > > &PhysVals, bool modal)
Update geometry according to displacement that is in current fields.
Definition: Deform.cpp:59

References Nektar::FieldUtils::Module::m_f, and Nektar::GlobalMapping::UpdateGeometry().

Member Data Documentation

◆ className

ModuleKey Nektar::FieldUtils::ProcessDeform::className
static
Initial value:
"Deform a mesh given an input field defining displacement")
static std::shared_ptr< Module > create(FieldSharedPtr f)
Creates an instance of this class.
Definition: ProcessDeform.h:47
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
std::pair< ModuleType, std::string > ModuleKey
Definition: Module.h:180
ModuleFactory & GetModuleFactory()
Definition: Module.cpp:47

Definition at line 51 of file ProcessDeform.h.