Nektar++
CADCurveCFI.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // File: CADCurveCFI.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 curve.
32 //
33 ////////////////////////////////////////////////////////////////////////////////
34 
35 #ifndef NEKMESHUTILS_CADSYSTEM_CFI_CADCURVECFI
36 #define NEKMESHUTILS_CADSYSTEM_CFI_CADCURVECFI
37 
38 #include "../CADCurve.h"
39 #include "CADSystemCFI.h"
40 
41 namespace Nektar
42 {
43 namespace NekMeshUtils
44 {
45 class CADCurveCFI : public CADCurve
46 {
47 public:
49  {
51  }
52 
53  static std::string key;
54 
56  {
57  }
58 
60  {
61  }
62 
64  virtual void GetBounds(NekDouble &tmin, NekDouble &tmax);
65  virtual NekDouble Length(NekDouble ti, NekDouble tf);
67  virtual void P(NekDouble t, NekDouble &x, NekDouble &y, NekDouble &z);
70  {
71  ASSERTL0(false, "Function: Curvature not implemented in CFI engine");
72  return 0;
73  }
75  {
76  ASSERTL0(false, "Function: N not implemented in CFI engine");
77  return Array<OneD, NekDouble>();
78  }
79  virtual NekDouble tAtArcLength(NekDouble s);
82 
83  void Initialise(int i, cfi::Line *in, NekDouble s);
84 
85 private:
86  /// cfi object
87  cfi::Line *m_cfiEdge;
89 };
90 }
91 }
92 
93 #endif
virtual NekDouble Curvature(NekDouble t)
Calculates the radius of curvature of the curve at point t.
Definition: CADCurveCFI.h:69
virtual Array< OneD, NekDouble > N(NekDouble t)
Returns the normal to a curve, it will always point in the concave direction.
Definition: CADCurveCFI.h:74
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
base class for CAD curves.
Definition: CADCurve.h:58
virtual NekDouble tAtArcLength(NekDouble s)
Calculates the parametric coordinate and arclength location defined by s.
Definition: CADCurveCFI.cpp:56
virtual NekDouble Length(NekDouble ti, NekDouble tf)
Calculates the arclength between the two paremetric points ti and tf. ti must be less than tf...
Definition: CADCurveCFI.cpp:97
void Initialise(int i, cfi::Line *in, NekDouble s)
Definition: CADCurveCFI.cpp:47
cfi::Line * m_cfiEdge
cfi object
Definition: CADCurveCFI.h:87
virtual Array< OneD, NekDouble > P(NekDouble t)
Gets the location (x,y,z) in an array out of the curve at point t.
std::shared_ptr< CADCurve > CADCurveSharedPtr
Definition: CADCurve.h:219
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
double NekDouble
virtual Array< OneD, NekDouble > GetBounds()
Returns the minimum and maximum parametric coords t of the curve.
virtual Array< OneD, NekDouble > GetMinMax()
Gets the start and end of the curve.
virtual Array< OneD, NekDouble > D2(NekDouble t)
Gets the second derivatives at t.
virtual NekDouble loct(Array< OneD, NekDouble > xyz, NekDouble &t)
Definition: CADCurveCFI.cpp:83
static CADCurveSharedPtr create()
Definition: CADCurveCFI.h:48