Nektar++
Loading...
Searching...
No Matches
CADSurfCFI.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////////////
2//
3// File: CADSurfCFI.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: CAD object surface.
32//
33////////////////////////////////////////////////////////////////////////////////
34
35#ifndef NEKTAR_SPATIALDOMAINS_CADSYSTEM_CFI_CADSURFCFI
36#define NEKTAR_SPATIALDOMAINS_CADSYSTEM_CFI_CADSURFCFI
37
38#include "../CADSurf.h"
39
40#ifndef NEK_CADFIXAPI_HXX
41#define NEK_CADFIXAPI_HXX
42#include "cadfixapi.hxx"
43#endif
44namespace Nektar::NekMesh
45{
46
47class CADSurfCFI : public CADSurf
48{
49public:
50 static CADSurfSharedPtr create()
51 {
53 }
54
55 static std::string key;
56
58
60
61 void Initialise(int i, cfi::Face *in, NekDouble s);
63 {
64 m_scal = i;
65 }
66
67 std::array<NekDouble, 4> GetBounds();
68
69 void GetBounds(NekDouble &umin, NekDouble &umax, NekDouble &vmin,
70 NekDouble &vmax);
71
72 std::array<NekDouble, 3> N(std::array<NekDouble, 2> uv);
73
74 std::array<NekDouble, 9> D1(std::array<NekDouble, 2> uv);
75
76 std::array<NekDouble, 18> D2(std::array<NekDouble, 2> uv);
77
78 std::array<NekDouble, 3> P(std::array<NekDouble, 2> uv);
79
80 void P(std::array<NekDouble, 2> uv, NekDouble &x, NekDouble &y,
81 NekDouble &z);
82
83 std::array<NekDouble, 2> locuv(std::array<NekDouble 3> p, NekDouble &dist);
84
85 NekDouble Curvature(std::array<NekDouble, 2> uv);
86
87 std::array<NekDouble, 6> BoundingBox()
88 {
89 ASSERTL0(false, "Not implemented in CFI");
90 return std::array<NekDouble, 6>();
91 }
92
93 bool IsPlanar()
94 {
95 ASSERTL0(false, "Not implemented in CFI");
96 return false;
97 }
98
99 cfi::Face *GetCfiPointer()
100 {
101 return m_cfiSurface;
102 }
103
104private:
105 /// Function which tests the the value of uv used is within the surface
106 void Test([[maybe_unused]] std::array<NekDouble, 2> uv)
107 {
108 }
109 /// CFI object for surface.
110 cfi::Face *m_cfiSurface;
112};
113} // namespace Nektar::NekMesh
114
115#endif
#define ASSERTL0(condition, msg)
#define N
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
void P(std::array< NekDouble, 2 > uv, NekDouble &x, NekDouble &y, NekDouble &z)
std::array< NekDouble, 9 > D1(std::array< NekDouble, 2 > uv)
std::array< NekDouble, 4 > GetBounds()
static CADSurfSharedPtr create()
Definition CADSurfCFI.h:50
NekDouble Curvature(std::array< NekDouble, 2 > uv)
cfi::Face * GetCfiPointer()
Definition CADSurfCFI.h:99
std::array< NekDouble, 2 > locuv(std::array< NekDouble 3 > p, NekDouble &dist)
std::array< NekDouble, 3 > P(std::array< NekDouble, 2 > uv)
void Test(std::array< NekDouble, 2 > uv)
Function which tests the the value of uv used is within the surface.
Definition CADSurfCFI.h:106
void SetScaling(NekDouble i)
Definition CADSurfCFI.h:62
static std::string key
Definition CADSurfCFI.h:55
void Initialise(int i, cfi::Face *in, NekDouble s)
std::array< NekDouble, 6 > BoundingBox()
Definition CADSurfCFI.h:87
cfi::Face * m_cfiSurface
CFI object for surface.
Definition CADSurfCFI.h:110
std::array< NekDouble, 18 > D2(std::array< NekDouble, 2 > uv)