Nektar++
Loading...
Searching...
No Matches
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 NEKTAR_SPATIALDOMAINS_CADSYSTEM_CFI_CADCURVECFI
36#define NEKTAR_SPATIALDOMAINS_CADSYSTEM_CFI_CADCURVECFI
37
38#include "../CADCurve.h"
39
40#ifndef NEK_CADFIXAPI_HXX
41#define NEK_CADFIXAPI_HXX
42#include "cadfixapi.hxx"
43#endif
44
45namespace Nektar::NekMesh
46{
47
48class CADCurveCFI : public CADCurve
49{
50public:
51 static CADCurveSharedPtr create()
52 {
54 }
55
56 static std::string key;
57
59 {
60 }
61
63 {
64 }
65
66 virtual std::array<NekDouble, 2> GetBounds();
67 virtual void GetBounds(NekDouble &tmin, NekDouble &tmax);
68 virtual NekDouble Length(NekDouble ti, NekDouble tf);
69 virtual std::array<NekDouble, 3> P(NekDouble t);
70 virtual void P(NekDouble t, NekDouble &x, NekDouble &y, NekDouble &z);
71 virtual std::array<NekDouble, 9> D2(NekDouble t);
72 virtual NekDouble Curvature([[maybe_unused]] NekDouble t)
73 {
74 ASSERTL0(false, "Function: Curvature not implemented in CFI engine");
75 return 0;
76 }
77 virtual std::array<NekDouble, 3> N([[maybe_unused]] NekDouble t)
78 {
79 ASSERTL0(false, "Function: N not implemented in CFI engine");
80 return std::array<NekDouble, 3>();
81 }
83 virtual std::array<NekDouble, 6> GetMinMax();
84 virtual NekDouble loct(std::array<NekDouble, 3> xyz, NekDouble &t);
85
86 void Initialise(int i, cfi::Line *in, NekDouble s);
87
88 cfi::Line *GetCfiPointer()
89 {
90 return m_cfiEdge;
91 }
92
93private:
94 /// cfi object
95 cfi::Line *m_cfiEdge;
97};
98} // namespace Nektar::NekMesh
99
100#endif
#define ASSERTL0(condition, msg)
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
virtual std::array< NekDouble, 9 > D2(NekDouble t)
void Initialise(int i, cfi::Line *in, NekDouble s)
static std::string key
Definition CADCurveCFI.h:56
virtual NekDouble Curvature(NekDouble t)
Definition CADCurveCFI.h:72
static CADCurveSharedPtr create()
Definition CADCurveCFI.h:51
virtual std::array< NekDouble, 2 > GetBounds()
virtual NekDouble tAtArcLength(NekDouble s)
virtual NekDouble Length(NekDouble ti, NekDouble tf)
virtual std::array< NekDouble, 3 > N(NekDouble t)
Definition CADCurveCFI.h:77
virtual NekDouble loct(std::array< NekDouble, 3 > xyz, NekDouble &t)
virtual std::array< NekDouble, 6 > GetMinMax()
cfi::Line * m_cfiEdge
cfi object
Definition CADCurveCFI.h:95