36 #ifndef NEKTAR_SPATIALDOMAINS_ZONES_H
37 #define NEKTAR_SPATIALDOMAINS_ZONES_H
44 namespace SpatialDomains
91 boost::ignore_unused(time);
190 const std::vector<NekDouble> &velocity)
200 inline std::vector<NekDouble>
GetVel()
const
std::shared_ptr< Equation > EquationSharedPtr
std::shared_ptr< ZoneBase > ZoneBaseShPtr
std::shared_ptr< ZonePrescribe > ZonePrescribeShPtr
std::shared_ptr< ZoneTranslate > ZoneTranslateShPtr
std::shared_ptr< ZoneRotate > ZoneRotateShPtr
MovementType
Enum of zone movement type.
std::shared_ptr< ZoneFixed > ZoneFixedShPtr
const std::string MovementTypeStr[]
Map of zone movement type to movement type string.
std::map< int, CompositeSharedPtr > CompositeMap
The above copyright notice and this permission notice shall be included.
NekMatrix< NekDouble, StandardMatrixTag > DNekMat
Zone base: Contains the shared functions and variables.
bool Move(NekDouble time)
Performs the movement of the zone at.
virtual ~ZoneBase()=default
Default destructor.
std::vector< GeometrySharedPtr > const & GetElements() const
Returns all highest dimension elements in the zone.
bool & GetMoved()
Returns the flag which states if the zone has moved in this timestep.
std::vector< PointGeomSharedPtr > m_verts
Vector of all points in the zone.
int m_coordDim
Coordinate dimension.
void ClearBoundingBoxes()
Clears all bounding boxes associated with the zones elements.
int & GetId()
Returns the zone ID.
std::vector< PointGeom > m_origVerts
Vector of all points in the zone at initialisation.
CompositeMap GetDomain() const
Returns the domain the zone is on.
std::vector< CurveSharedPtr > m_curves
Vector of all curves in the zone.
CompositeMap m_domain
Zone domain.
ZoneBase(MovementType type, int indx, CompositeMap domain, int coordDim)
Constructor.
MovementType GetMovementType() const
Returns the type of movement.
virtual bool v_Move(NekDouble time)
Virtual function for movement of the zone at.
std::vector< GeometrySharedPtr > m_elements
Vector of highest dimension zone elements.
MovementType m_type
Type of zone movement.
Fixed zone: does not move.
virtual bool v_Move(NekDouble time) final
Virtual function for movement of the zone at.
ZoneFixed(int id, const CompositeMap &domain, const int coordDim)
Constructor.
virtual ~ZoneFixed()=default
Default destructor.
Prescribed zone: applies equation to every point.
NekDouble GetXDeform(NekDouble x, NekDouble y, NekDouble z, NekDouble t) const
NekDouble GetYDeform(NekDouble x, NekDouble y, NekDouble z, NekDouble t) const
LibUtilities::EquationSharedPtr m_zDeform
Equation specifying prescribed motion in z-direction.
virtual ~ZonePrescribe()=default
Default destructor.
LibUtilities::EquationSharedPtr m_yDeform
Equation specifying prescribed motion in y-direction.
virtual bool v_Move(NekDouble time) final
Virtual function for movement of the zone at.
NekDouble GetZDeform(NekDouble x, NekDouble y, NekDouble z, NekDouble t) const
ZonePrescribe(int id, const CompositeMap &domain, const int coordDim, LibUtilities::EquationSharedPtr xDeform, LibUtilities::EquationSharedPtr yDeform, LibUtilities::EquationSharedPtr zDeform)
LibUtilities::EquationSharedPtr m_xDeform
Equation specifying prescribed motion in x-direction.
Rotating zone: Motion of every point around a given axis on an origin.
DNekVec m_axis
Axis rotation is performed around.
NekDouble GetAngularVel(NekDouble &time) const
Return the angular velocity of the zone at.
ZoneRotate(int id, const CompositeMap &domain, const int coordDim, const NekPoint< NekDouble > &origin, const DNekVec &axis, const LibUtilities::EquationSharedPtr &angularVelEqn)
DNekMat m_W
W matrix Rodrigues' rotation formula, cross product of axis.
NekPoint< NekDouble > m_origin
Origin point rotation is performed around.
LibUtilities::EquationSharedPtr m_angularVelEqn
Equation defining angular velocity as a function of time.
virtual ~ZoneRotate()=default
Default destructor.
virtual bool v_Move(NekDouble time) final
Virtual function for movement of the zone at.
DNekMat m_W2
W^2 matrix Rodrigues' rotation formula, cross product of axis squared.
Translating zone: addition of a constant vector to every point.
virtual bool v_Move(NekDouble time) final
Virtual function for movement of the zone at.
std::vector< NekDouble > m_velocity
virtual ~ZoneTranslate()=default
Default destructor.
std::vector< NekDouble > GetVel() const
Returns the velocity of the zone.
ZoneTranslate(int id, const CompositeMap &domain, const int coordDim, const std::vector< NekDouble > &velocity)