36#ifndef NEKTAR_SPATIALDOMAINS_ZONES_H
37#define NEKTAR_SPATIALDOMAINS_ZONES_H
162 int id,
int domainID,
const CompositeMap &domain,
const int coordDim,
220 const int coordDim,
const std::vector<NekDouble> &
velocity)
230 inline std::vector<NekDouble>
GetVel()
const
#define SPATIAL_DOMAINS_EXPORT
std::shared_ptr< Equation > EquationSharedPtr
const std::vector< NekDouble > velocity
const NekPoint< NekDouble > origin
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
std::vector< double > z(NPUPPER)
NekMatrix< NekDouble, StandardMatrixTag > DNekMat
Zone base: Contains the shared functions and variables.
ZoneBase(MovementType type, int indx, int domainID, CompositeMap domain, int coordDim)
Constructor.
bool Move(NekDouble time)
Performs the movement of the zone at.
virtual ~ZoneBase()=default
Default destructor.
std::vector< PointGeomSharedPtr > m_verts
Vector of all points in the zone.
int m_coordDim
Coordinate dimension.
std::vector< GeometrySharedPtr > const & GetElements() const
Returns all highest dimension elements in the zone.
void ClearBoundingBoxes()
Clears all bounding boxes associated with the zones elements.
std::vector< PointGeom > m_origVerts
Vector of all points in the zone at initialisation.
CompositeMap GetDomain() const
Returns the domain the zone is on.
bool & GetMoved()
Returns the flag which states if the zone has moved in this timestep.
std::vector< CurveSharedPtr > m_curves
Vector of all curves in the zone.
int m_domainID
ID for the composite making up this zone.
CompositeMap m_domain
Zone domain.
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.
int & GetDomainID()
Returns the ID of the domain making up this Zone.
int & GetId()
Returns the zone ID.
Fixed zone: does not move.
bool v_Move(NekDouble time) final
Virtual function for movement of the zone at.
~ZoneFixed() override=default
Default destructor.
ZoneFixed(int id, int domainID, const CompositeMap &domain, const int coordDim)
Constructor.
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.
LibUtilities::EquationSharedPtr GetYDeformEquation() const
Returns the equation for the prescribed motion in the y-coordinate.
LibUtilities::EquationSharedPtr m_yDeform
Equation specifying prescribed motion in y-direction.
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() override=default
Default destructor.
ZonePrescribe(int id, int domainID, const CompositeMap &domain, const int coordDim, LibUtilities::EquationSharedPtr xDeform, LibUtilities::EquationSharedPtr yDeform, LibUtilities::EquationSharedPtr zDeform)
LibUtilities::EquationSharedPtr GetZDeformEquation() const
Returns the equation for the prescribed motion in the z-coordinate.
LibUtilities::EquationSharedPtr GetXDeformEquation() const
Returns the equation for the prescribed motion in the x-coordinate.
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.
DNekMat m_W
W matrix Rodrigues' rotation formula, cross product of axis.
LibUtilities::EquationSharedPtr GetAngularVelEqn() const
Returns the equation for the angular velocity of the rotation.
NekPoint< NekDouble > m_origin
Origin point rotation is performed around.
LibUtilities::EquationSharedPtr m_angularVelEqn
Equation defining angular velocity as a function of time.
const DNekVec & GetAxis() const
Returns the axis the zone rotates about.
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.
~ZoneRotate() override=default
Default destructor.
ZoneRotate(int id, int domainID, const CompositeMap &domain, const int coordDim, const NekPoint< NekDouble > &origin, const DNekVec &axis, const LibUtilities::EquationSharedPtr &angularVelEqn)
const NekPoint< NekDouble > & GetOrigin() const
Returns the origin the zone rotates about.
Translating zone: addition of a constant vector to every point.
bool v_Move(NekDouble time) final
Virtual function for movement of the zone at.
std::vector< NekDouble > m_velocity
ZoneTranslate(int id, int domainID, const CompositeMap &domain, const int coordDim, const std::vector< NekDouble > &velocity)
~ZoneTranslate() override=default
Default destructor.
std::vector< NekDouble > GetVel() const
Returns the velocity of the zone.