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
43namespace Nektar
44{
45namespace SpatialDomains
46{
47
48/**
49 * @class RefRegion
50 * @brief Abstract base class for the refinement surface region.
51 */
53{
54public:
55 /// Constructor
56 SPATIAL_DOMAINS_EXPORT RefRegion(const unsigned int coordim,
58 std::vector<NekDouble> coord1,
59 std::vector<NekDouble> coord2,
60 std::vector<unsigned int> numModes,
61 std::vector<unsigned int> numPoints);
62 /// Destructor
64
65 /// Pure virtual fuction
67 const Array<OneD, NekDouble> &coords) = 0;
68
69 /// Get the number of modes to update expansion
70 SPATIAL_DOMAINS_EXPORT std::vector<unsigned int> GetNumModes()
71 {
72 return m_numModes;
73 }
74
75 /// Get the number of quadrature points to update expansion
76 SPATIAL_DOMAINS_EXPORT std::vector<unsigned int> GetNumPoints()
77 {
78 return m_numPoints;
79 }
80
81protected:
82 /// Dimension of the coordinate (space dimension)
83 unsigned int m_coordim;
84 /// Radius of the surface region
86 /// Coordinate 1
87 std::vector<NekDouble> m_coord1;
88 /// Coordinate 2
89 std::vector<NekDouble> m_coord2;
90 /// Number of modes
91 std::vector<unsigned int> m_numModes;
92 /// Number of quadrature points
93 std::vector<unsigned int> m_numPoints;
94};
95
96} // namespace SpatialDomains
97} // namespace Nektar
98
99#endif // NEKTAR_SPATIALDOMAINS_REFREGION_H
#define SPATIAL_DOMAINS_EXPORT
Abstract base class for the refinement surface region.
Definition: RefRegion.h:53
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:76
unsigned int m_coordim
Dimension of the coordinate (space dimension)
Definition: RefRegion.h:83
std::vector< unsigned int > m_numPoints
Number of quadrature points.
Definition: RefRegion.h:93
std::vector< NekDouble > m_coord2
Coordinate 2.
Definition: RefRegion.h:89
std::vector< unsigned int > m_numModes
Number of modes.
Definition: RefRegion.h:91
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:47
std::vector< NekDouble > m_coord1
Coordinate 1.
Definition: RefRegion.h:87
NekDouble m_radius
Radius of the surface region.
Definition: RefRegion.h:85
std::vector< unsigned int > GetNumModes()
Get the number of modes to update expansion.
Definition: RefRegion.h:70
virtual ~RefRegion()
Destructor.
Definition: RefRegion.cpp:57
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:2
double NekDouble