Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Friends | List of all members
Nektar::ForcingStabilityCoupledLNS Class Reference

#include <ForcingStabilityCoupledLNS.h>

Inheritance diagram for Nektar::ForcingStabilityCoupledLNS:
Inheritance graph
[legend]
Collaboration diagram for Nektar::ForcingStabilityCoupledLNS:
Collaboration graph
[legend]

Static Public Member Functions

static
SolverUtils::ForcingSharedPtr 
create (const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce)
 Creates an instance of this class. More...
 
- Static Public Member Functions inherited from Nektar::SolverUtils::Forcing
static SOLVER_UTILS_EXPORT
std::vector< ForcingSharedPtr
Load (const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields=0)
 

Static Public Attributes

static std::string className
 Name of the class. More...
 

Protected Member Functions

virtual void v_InitObject (const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce)
 
virtual void v_Apply (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time)
 
- Protected Member Functions inherited from Nektar::SolverUtils::Forcing
SOLVER_UTILS_EXPORT Forcing (const LibUtilities::SessionReaderSharedPtr &)
 Constructor. More...
 
SOLVER_UTILS_EXPORT void EvaluateFunction (Array< OneD, MultiRegions::ExpListSharedPtr > pFields, LibUtilities::SessionReaderSharedPtr pSession, std::string pFieldName, Array< OneD, NekDouble > &pArray, const std::string &pFunctionName, NekDouble pTime=NekDouble(0))
 
SOLVER_UTILS_EXPORT void EvaluateTimeFunction (LibUtilities::SessionReaderSharedPtr pSession, std::string pFieldName, Array< OneD, NekDouble > &pArray, const std::string &pFunctionName, NekDouble pTime=NekDouble(0))
 
SOLVER_UTILS_EXPORT void EvaluateTimeFunction (const NekDouble pTime, const LibUtilities::EquationSharedPtr &pEqn, Array< OneD, NekDouble > &pArray)
 

Private Member Functions

 ForcingStabilityCoupledLNS (const LibUtilities::SessionReaderSharedPtr &pSession)
 

Friends

class MemoryManager< ForcingStabilityCoupledLNS >
 

Additional Inherited Members

- Public Member Functions inherited from Nektar::SolverUtils::Forcing
virtual SOLVER_UTILS_EXPORT ~Forcing ()
 
SOLVER_UTILS_EXPORT void InitObject (const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce)
 Initialise the forcing object. More...
 
SOLVER_UTILS_EXPORT void Apply (const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time)
 Apply the forcing. More...
 
- Protected Attributes inherited from Nektar::SolverUtils::Forcing
LibUtilities::SessionReaderSharedPtr m_session
 Session reader. More...
 
Array< OneD, Array< OneD,
NekDouble > > 
m_Forcing
 Evaluated forcing function. More...
 
int m_NumVariable
 Number of variables. More...
 

Detailed Description

Definition at line 47 of file ForcingStabilityCoupledLNS.h.

Constructor & Destructor Documentation

Nektar::ForcingStabilityCoupledLNS::ForcingStabilityCoupledLNS ( const LibUtilities::SessionReaderSharedPtr pSession)
private

Definition at line 47 of file ForcingStabilityCoupledLNS.cpp.

49  : Forcing(pSession)
50 {
51 }
SOLVER_UTILS_EXPORT Forcing(const LibUtilities::SessionReaderSharedPtr &)
Constructor.
Definition: Forcing.cpp:53

Member Function Documentation

static SolverUtils::ForcingSharedPtr Nektar::ForcingStabilityCoupledLNS::create ( const LibUtilities::SessionReaderSharedPtr pSession,
const Array< OneD, MultiRegions::ExpListSharedPtr > &  pFields,
const unsigned int &  pNumForcingFields,
const TiXmlElement *  pForce 
)
inlinestatic

Creates an instance of this class.

Definition at line 54 of file ForcingStabilityCoupledLNS.h.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and Nektar::SolverUtils::ForcingSharedPtr.

59  {
62  AllocateSharedPtr(pSession);
63  p->InitObject(pFields, pNumForcingFields, pForce);
64  return p;
65  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
SOLVER_UTILS_EXPORT typedef boost::shared_ptr< Forcing > ForcingSharedPtr
A shared pointer to an EquationSystem object.
Definition: Forcing.h:51
void Nektar::ForcingStabilityCoupledLNS::v_Apply ( const Array< OneD, MultiRegions::ExpListSharedPtr > &  fields,
const Array< OneD, Array< OneD, NekDouble > > &  inarray,
Array< OneD, Array< OneD, NekDouble > > &  outarray,
const NekDouble time 
)
protectedvirtual

Implements Nektar::SolverUtils::Forcing.

Definition at line 60 of file ForcingStabilityCoupledLNS.cpp.

References ASSERTL1, npts, and Vmath::Vadd().

65 {
66  int npts = fields[0]->GetTotPoints();
67 
68  ASSERTL1(fields.num_elements() == outarray.num_elements(),
69  "Fields and outarray are of different size");
70 
71  // Apply m_forcing terms
72  for (int i = 0; i < fields.num_elements(); i++)
73  {
74  Vmath::Vadd(npts, fields[i]->GetPhys(), 1, outarray[i], 1,
75  outarray[i], 1);
76  }
77 
78 }
static std::string npts
Definition: InputFld.cpp:43
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition: Vmath.cpp:285
void Nektar::ForcingStabilityCoupledLNS::v_InitObject ( const Array< OneD, MultiRegions::ExpListSharedPtr > &  pFields,
const unsigned int &  pNumForcingFields,
const TiXmlElement *  pForce 
)
protectedvirtual

Implements Nektar::SolverUtils::Forcing.

Definition at line 53 of file ForcingStabilityCoupledLNS.cpp.

57 {
58 }

Friends And Related Function Documentation

friend class MemoryManager< ForcingStabilityCoupledLNS >
friend

Definition at line 51 of file ForcingStabilityCoupledLNS.h.

Member Data Documentation

std::string Nektar::ForcingStabilityCoupledLNS::className
static
Initial value:
RegisterCreatorFunction("StabilityCoupledLNS",
"RHS forcing for coupled LNS stability solver")

Name of the class.

Definition at line 68 of file ForcingStabilityCoupledLNS.h.