Nektar++
Public Member Functions | Private Attributes | List of all members
Nektar::SolverUtils::FrameTransform Class Reference

#include <ForcingMovingReferenceFrame.h>

Public Member Functions

 FrameTransform ()
 
 ~FrameTransform ()
 
void SetAngle (const Array< OneD, NekDouble > theta)
 
void BodyToInerital (const int dim, const Array< OneD, NekDouble > &body, Array< OneD, NekDouble > &inertial)
 
void IneritalToBody (const int dim, const Array< OneD, NekDouble > &inertial, Array< OneD, NekDouble > &body)
 

Private Attributes

Array< OneD, NekDoublem_matrix
 

Detailed Description

Definition at line 90 of file ForcingMovingReferenceFrame.h.

Constructor & Destructor Documentation

◆ FrameTransform()

Nektar::SolverUtils::FrameTransform::FrameTransform ( )

Definition at line 1170 of file ForcingMovingReferenceFrame.cpp.

1171{
1172 m_matrix = Array<OneD, NekDouble>(2, 0.);
1173}

References m_matrix.

◆ ~FrameTransform()

Nektar::SolverUtils::FrameTransform::~FrameTransform ( )
inline

Definition at line 94 of file ForcingMovingReferenceFrame.h.

94{};

Member Function Documentation

◆ BodyToInerital()

void Nektar::SolverUtils::FrameTransform::BodyToInerital ( const int  dim,
const Array< OneD, NekDouble > &  body,
Array< OneD, NekDouble > &  inertial 
)

Definition at line 1181 of file ForcingMovingReferenceFrame.cpp.

1184{
1185 NekDouble xi = body[0], eta = body[1];
1186 inertial[0] = xi * m_matrix[0] - eta * m_matrix[1];
1187 inertial[1] = eta * m_matrix[0] + xi * m_matrix[1];
1188 if (body != inertial && dim > 2)
1189 {
1190 for (int i = 2; i < dim; ++i)
1191 {
1192 inertial[i] = body[i];
1193 }
1194 }
1195}
double NekDouble

References m_matrix.

Referenced by Nektar::SolverUtils::ForcingMovingReferenceFrame::SolveBodyMotion().

◆ IneritalToBody()

void Nektar::SolverUtils::FrameTransform::IneritalToBody ( const int  dim,
const Array< OneD, NekDouble > &  inertial,
Array< OneD, NekDouble > &  body 
)

Definition at line 1197 of file ForcingMovingReferenceFrame.cpp.

1200{
1201 NekDouble x = inertial[0], y = inertial[1];
1202 body[0] = x * m_matrix[0] + y * m_matrix[1];
1203 body[1] = y * m_matrix[0] - x * m_matrix[1];
1204 if (body != inertial && dim > 2)
1205 {
1206 for (int i = 2; i < dim; ++i)
1207 {
1208 body[i] = inertial[i];
1209 }
1210 }
1211}

References m_matrix.

Referenced by Nektar::SolverUtils::ForcingMovingReferenceFrame::UpdateFluidInterface(), and Nektar::SolverUtils::ForcingMovingReferenceFrame::UpdateFrameVelocity().

◆ SetAngle()

void Nektar::SolverUtils::FrameTransform::SetAngle ( const Array< OneD, NekDouble theta)

Member Data Documentation

◆ m_matrix

Array<OneD, NekDouble> Nektar::SolverUtils::FrameTransform::m_matrix
private