36#ifndef NEKTAR_SPATIALDOMAINS_ZONES_H
37#define NEKTAR_SPATIALDOMAINS_ZONES_H
188 int id,
int domainID,
const CompositeMap &domain,
const int coordDim,
246 int id,
int domainID,
const CompositeMap &domain,
const int coordDim,
#define SPATIAL_DOMAINS_EXPORT
std::shared_ptr< Equation > EquationSharedPtr
const NekPoint< NekDouble > origin
std::shared_ptr< ZoneBase > ZoneBaseShPtr
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
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::array< std::set< GeometrySharedPtr >, 3 > m_constituentElements
Array of all dimension elements i.e. faces = [2], edges = [1], geom = [0].
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.
std::vector< PointGeom > & GetOriginalVertex()
Returns all points in the zone at initialisation.
CompositeMap m_domain
Zone domain.
MovementType GetMovementType() const
Returns the type of movement.
virtual std::vector< NekDouble > v_GetDisp() const
Returns zone displacment.
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.
std::array< std::set< GeometrySharedPtr >, 3 > & GetConstituentElements()
Returns constituent elements, i.e. faces + edges.
int & GetId()
Returns the zone ID.
Fixed zone: does not move.
std::vector< NekDouble > v_GetDisp() const override
Returns the displacement of the zone.
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.
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.
std::vector< NekDouble > GetDisp(NekDouble &time)
Returns the displacement of the zone.
std::vector< NekDouble > m_disp
bool v_Move(NekDouble time) final
Virtual function for movement of the zone at.
Array< OneD, LibUtilities::EquationSharedPtr > m_displacementEqns
Array< OneD, LibUtilities::EquationSharedPtr > GetDisplacementEquation() const
Returns the equation for the displacement of the translation.
Array< OneD, LibUtilities::EquationSharedPtr > m_velocityEqns
std::vector< NekDouble > v_GetDisp() const override
Returns zone displacment.
std::vector< NekDouble > GetVel(NekDouble &time) const
Returns the velocity of the zone.
~ZoneTranslate() override=default
Default destructor.
ZoneTranslate(int id, int domainID, const CompositeMap &domain, const int coordDim, const Array< OneD, LibUtilities::EquationSharedPtr > &velocityEqns, const Array< OneD, LibUtilities::EquationSharedPtr > &displacementEqns)
Array< OneD, LibUtilities::EquationSharedPtr > GetVelocityEquation() const
Returns the equation for the velocity of the translation.