Nektar++
Public Member Functions | Private Attributes | List of all members
Nektar::SolverUtils::ALETranslate Struct Referencefinal

#include <ALEHelper.h>

Inheritance diagram for Nektar::SolverUtils::ALETranslate:
[legend]

Public Member Functions

 ALETranslate (SpatialDomains::ZoneBaseShPtr zone)
 
void v_UpdateGridVel (const NekDouble time, Array< OneD, MultiRegions::ExpListSharedPtr > &fields, Array< OneD, Array< OneD, NekDouble > > &gridVelocity) final
 
- Public Member Functions inherited from Nektar::SolverUtils::ALEBase
virtual ~ALEBase ()=default
 
void UpdateGridVel (const NekDouble time, Array< OneD, MultiRegions::ExpListSharedPtr > &fields, Array< OneD, Array< OneD, NekDouble > > &gridVelocity)
 

Private Attributes

SpatialDomains::ZoneTranslateShPtr m_zone
 

Detailed Description

Definition at line 131 of file ALEHelper.h.

Constructor & Destructor Documentation

◆ ALETranslate()

Nektar::SolverUtils::ALETranslate::ALETranslate ( SpatialDomains::ZoneBaseShPtr  zone)

Definition at line 307 of file ALEHelper.cpp.

308 : m_zone(std::static_pointer_cast<SpatialDomains::ZoneTranslate>(zone))
309{
310}
SpatialDomains::ZoneTranslateShPtr m_zone
Definition: ALEHelper.h:141

Member Function Documentation

◆ v_UpdateGridVel()

void Nektar::SolverUtils::ALETranslate::v_UpdateGridVel ( const NekDouble  time,
Array< OneD, MultiRegions::ExpListSharedPtr > &  fields,
Array< OneD, Array< OneD, NekDouble > > &  gridVelocity 
)
finalvirtual

Implements Nektar::SolverUtils::ALEBase.

Definition at line 312 of file ALEHelper.cpp.

315{
316 boost::ignore_unused(time);
317
318 auto vel = m_zone->GetVel(time);
319 auto exp = fields[0]->GetExp();
320
321 auto elements = m_zone->GetElements();
322 for (auto &el : elements)
323 {
324 int indx = fields[0]->GetElmtToExpId(el->GetGlobalID());
325 int offset = fields[0]->GetPhys_Offset(indx);
326 auto expansion = (*exp)[indx];
327
328 int nq = expansion->GetTotPoints();
329 for (int i = 0; i < nq; ++i)
330 {
331 for (int j = 0; j < gridVelocity.size(); ++j)
332 {
333 gridVelocity[j][offset + i] += vel[j];
334 }
335 }
336 }
337}

References m_zone.

Member Data Documentation

◆ m_zone

SpatialDomains::ZoneTranslateShPtr Nektar::SolverUtils::ALETranslate::m_zone
private

Definition at line 141 of file ALEHelper.h.

Referenced by v_UpdateGridVel().