Nektar++
RefRegion.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////////////
2//
3// File: RefRegion.h
4//
5// For more information, please see: http://www.nektar.info/
6//
7// The MIT License
8//
9// Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10// Department of Aeronautics, Imperial College London (UK), and Scientific
11// Computing and Imaging Institute, University of Utah (USA).
12//
13// Permission is hereby granted, free of charge, to any person obtaining a
14// copy of this software and associated documentation files (the "Software"),
15// to deal in the Software without restriction, including without limitation
16// the rights to use, copy, modify, merge, publish, distribute, sublicense,
17// and/or sell copies of the Software, and to permit persons to whom the
18// Software is furnished to do so, subject to the following conditions:
19//
20// The above copyright notice and this permission notice shall be included
21// in all copies or substantial portions of the Software.
22//
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29// DEALINGS IN THE SOFTWARE.
30//
31// Description: Abstract base class for the refinement region.
32//
33////////////////////////////////////////////////////////////////////////////////
34
35#ifndef NEKTAR_SPATIALDOMAINS_REFREGION_H
36#define NEKTAR_SPATIALDOMAINS_REFREGION_H
37
41#include <vector>
42
44{
45
46/**
47 * @class RefRegion
48 * @brief Abstract base class for the refinement surface region.
49 */
51{
52public:
53 /// Constructor
54 SPATIAL_DOMAINS_EXPORT RefRegion(const unsigned int coordim,
56 std::vector<NekDouble> coord1,
57 std::vector<NekDouble> coord2,
58 std::vector<unsigned int> numModes,
59 std::vector<unsigned int> numPoints);
60 /// Destructor
62
63 /// Pure virtual fuction
65 const Array<OneD, NekDouble> &coords) = 0;
66
67 /// Get the number of modes to update expansion
68 SPATIAL_DOMAINS_EXPORT std::vector<unsigned int> GetNumModes()
69 {
70 return m_numModes;
71 }
72
73 /// Get the number of quadrature points to update expansion
74 SPATIAL_DOMAINS_EXPORT std::vector<unsigned int> GetNumPoints()
75 {
76 return m_numPoints;
77 }
78
79protected:
80 /// Dimension of the coordinate (space dimension)
81 unsigned int m_coordim;
82 /// Radius of the surface region
84 /// Coordinate 1
85 std::vector<NekDouble> m_coord1;
86 /// Coordinate 2
87 std::vector<NekDouble> m_coord2;
88 /// Number of modes
89 std::vector<unsigned int> m_numModes;
90 /// Number of quadrature points
91 std::vector<unsigned int> m_numPoints;
92};
93
94} // namespace Nektar::SpatialDomains
95
96#endif // NEKTAR_SPATIALDOMAINS_REFREGION_H
#define SPATIAL_DOMAINS_EXPORT
Abstract base class for the refinement surface region.
Definition: RefRegion.h:51
virtual bool v_Contains(const Array< OneD, NekDouble > &coords)=0
Pure virtual fuction.
std::vector< unsigned int > GetNumPoints()
Get the number of quadrature points to update expansion.
Definition: RefRegion.h:74
unsigned int m_coordim
Dimension of the coordinate (space dimension)
Definition: RefRegion.h:81
std::vector< unsigned int > m_numPoints
Number of quadrature points.
Definition: RefRegion.h:91
std::vector< NekDouble > m_coord2
Coordinate 2.
Definition: RefRegion.h:87
std::vector< unsigned int > m_numModes
Number of modes.
Definition: RefRegion.h:89
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
std::vector< NekDouble > m_coord1
Coordinate 1.
Definition: RefRegion.h:85
NekDouble m_radius
Radius of the surface region.
Definition: RefRegion.h:83
std::vector< unsigned int > GetNumModes()
Get the number of modes to update expansion.
Definition: RefRegion.h:68
virtual ~RefRegion()
Destructor.
Definition: RefRegion.cpp:55
double NekDouble