Nektar++
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 NEKMESHUTILS_CADSYSTEM_CFI_CADSURFCFI
36 #define NEKMESHUTILS_CADSYSTEM_CFI_CADSURFCFI
37 
38 #include "../CADSurf.h"
39 #include "CADSystemCFI.h"
40 
41 namespace Nektar
42 {
43 namespace NekMeshUtils
44 {
45 
46 class CADSurfCFI : public CADSurf
47 {
48 public:
50  {
52  }
53 
54  static std::string key;
55 
57 
59 
60  void Initialise(int i, cfi::Face *in, NekDouble s);
62  {
63  m_scal = i;
64  }
65 
67 
68  virtual void GetBounds(NekDouble &umin, NekDouble &umax, NekDouble &vmin,
69  NekDouble &vmax);
70 
72 
74 
76 
78 
80 
82 
84 
86  {
87  ASSERTL0(false, "Not implemented in CFI");
88  return Array<OneD, NekDouble>();
89  }
90 
91  bool IsPlanar()
92  {
93  ASSERTL0(false, "Not implemented in CFI");
94  return false;
95  }
96 
97 private:
98  /// Function which tests the the value of uv used is within the surface
100  {
101  }
102  /// CFI object for surface.
103  cfi::Face *m_cfiSurface;
105 };
106 }
107 }
108 
109 #endif
std::shared_ptr< CADSurf > CADSurfSharedPtr
Definition: CADCurve.h:51
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
Array< OneD, NekDouble > N(Array< OneD, NekDouble > uv)
Get the normal vector at parametric point u,v.
Definition: CADSurfCFI.cpp:130
void Initialise(int i, cfi::Face *in, NekDouble s)
Definition: CADSurfCFI.cpp:47
void SetScaling(NekDouble i)
Definition: CADSurfCFI.h:61
Array< OneD, NekDouble > GetBounds()
Get the limits of the parametric space for the surface.
Definition: CADSurfCFI.cpp:54
Array< OneD, NekDouble > BoundingBox()
Returns the bounding box of the surface.
Definition: CADSurfCFI.h:85
base class for a cad surface
Definition: CADSurf.h:71
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
void Test(Array< OneD, NekDouble > uv)
Function which tests the the value of uv used is within the surface.
Definition: CADSurfCFI.h:99
Array< OneD, NekDouble > D2(Array< OneD, NekDouble > uv)
Get the set of second derivatives at parametric point u,v.
Definition: CADSurfCFI.cpp:162
double NekDouble
static CADSurfSharedPtr create()
Definition: CADSurfCFI.h:49
Array< OneD, NekDouble > locuv(Array< OneD, NekDouble > p, NekDouble &dist)
Performs a reverse look up to find u,v and x,y,z. if xyz is off the surface it will return the closes...
Definition: CADSurfCFI.cpp:77
cfi::Face * m_cfiSurface
CFI object for surface.
Definition: CADSurfCFI.h:103
bool IsPlanar()
Is the surface defined by a planar surface (i.e not nurbs and is flat)
Definition: CADSurfCFI.h:91
Array< OneD, NekDouble > D1(Array< OneD, NekDouble > uv)
Get the set of first derivatives at parametric point u,v.
Definition: CADSurfCFI.cpp:143
NekDouble Curvature(Array< OneD, NekDouble > uv)
returns curvature at point uv
Definition: CADSurfCFI.cpp:101
Array< OneD, NekDouble > P(Array< OneD, NekDouble > uv)
Get the x,y,z at parametric point u,v.
Definition: CADSurfCFI.cpp:109