Nektar++
Public Member Functions | Protected Member Functions | List of all members
Nektar::SpatialDomains::RefRegionLine Class Reference

Derived class for the refinement surface region. More...

#include <RefRegionLine.h>

Inheritance diagram for Nektar::SpatialDomains::RefRegionLine:
[legend]

Public Member Functions

 RefRegionLine (const unsigned int coordim, NekDouble radius, std::vector< NekDouble > coord1, std::vector< NekDouble > coord2, std::vector< unsigned int > numModes, std::vector< unsigned int > numPoints)
 Constructor. More...
 
 ~RefRegionLine () override
 Destructor. More...
 
- Public Member Functions inherited from Nektar::SpatialDomains::RefRegion
 RefRegion (const unsigned int coordim, NekDouble m_radius, std::vector< NekDouble > coord1, std::vector< NekDouble > coord2, std::vector< unsigned int > numModes, std::vector< unsigned int > numPoints)
 Constructor. More...
 
virtual ~RefRegion ()
 Destructor. More...
 
virtual bool v_Contains (const Array< OneD, NekDouble > &coords)=0
 Pure virtual fuction. More...
 
std::vector< unsigned int > GetNumModes ()
 Get the number of modes to update expansion. More...
 
std::vector< unsigned int > GetNumPoints ()
 Get the number of quadrature points to update expansion. More...
 

Protected Member Functions

bool v_Contains (const Array< OneD, NekDouble > &coords) override
 Check if vertex is inside the surface region. More...
 

Additional Inherited Members

- Protected Attributes inherited from Nektar::SpatialDomains::RefRegion
unsigned int m_coordim
 Dimension of the coordinate (space dimension) More...
 
NekDouble m_radius
 Radius of the surface region. More...
 
std::vector< NekDoublem_coord1
 Coordinate 1. More...
 
std::vector< NekDoublem_coord2
 Coordinate 2. More...
 
std::vector< unsigned int > m_numModes
 Number of modes. More...
 
std::vector< unsigned int > m_numPoints
 Number of quadrature points. More...
 

Detailed Description

Derived class for the refinement surface region.

Definition at line 48 of file RefRegionLine.h.

Constructor & Destructor Documentation

◆ RefRegionLine()

Nektar::SpatialDomains::RefRegionLine::RefRegionLine ( const unsigned int  coordim,
NekDouble  radius,
std::vector< NekDouble coord1,
std::vector< NekDouble coord2,
std::vector< unsigned int >  numModes,
std::vector< unsigned int >  numPoints 
)

Constructor.

Definition at line 42 of file RefRegionLine.cpp.

47 : RefRegion(coordim, radius, coord1, coord2, numModes, numPoints)
48{
49}
RefRegion(const unsigned int coordim, NekDouble m_radius, std::vector< NekDouble > coord1, std::vector< NekDouble > coord2, std::vector< unsigned int > numModes, std::vector< unsigned int > numPoints)
Constructor.
Definition: RefRegion.cpp:45

◆ ~RefRegionLine()

Nektar::SpatialDomains::RefRegionLine::~RefRegionLine ( )
override

Destructor.

Definition at line 51 of file RefRegionLine.cpp.

52{
53}

Member Function Documentation

◆ v_Contains()

bool Nektar::SpatialDomains::RefRegionLine::v_Contains ( const Array< OneD, NekDouble > &  coords)
overrideprotectedvirtual

Check if vertex is inside the surface region.

Check if vertex is inside the line.

Parameters
coordscoordinates of the vertex
Returns
true or false depending on if the vertex is inside or not of the surface defined by the user.

Implements Nektar::SpatialDomains::RefRegion.

Definition at line 62 of file RefRegionLine.cpp.

63{
64 // Is P between the region below?
65 // xa, xb plus the radius
66 if (m_coord1[0] < m_coord2[0])
67 {
68 if ((m_coord1[0] - m_radius < coords[0]) &&
69 (m_coord2[0] + m_radius > coords[0]))
70 {
71 return true;
72 }
73 }
74 else
75 {
76 if ((m_coord1[0] + m_radius > coords[0]) &&
77 (m_coord2[0] - m_radius < coords[0]))
78 {
79 return true;
80 }
81 }
82
83 return false;
84}
std::vector< NekDouble > m_coord2
Coordinate 2.
Definition: RefRegion.h:87
std::vector< NekDouble > m_coord1
Coordinate 1.
Definition: RefRegion.h:85
NekDouble m_radius
Radius of the surface region.
Definition: RefRegion.h:83

References Nektar::SpatialDomains::RefRegion::m_coord1, Nektar::SpatialDomains::RefRegion::m_coord2, and Nektar::SpatialDomains::RefRegion::m_radius.