Nektar++
Loading...
Searching...
No Matches
PointGeom.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////////////
2//
3// File: PointGeom.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: Point geometry information
32//
33//
34////////////////////////////////////////////////////////////////////////////////
35
36#ifndef NEKTAR_SPATIALDOMAINS_POINTGEOM_H
37#define NEKTAR_SPATIALDOMAINS_POINTGEOM_H
38
41
42#include <memory>
43
45{
46
47class PointGeom;
48class SegGeom;
49
50class PointGeom : public Geometry0D, public NekPoint<NekDouble>
51{
52public:
54 SPATIAL_DOMAINS_EXPORT PointGeom(const int coordim, const int vid,
57
58 SPATIAL_DOMAINS_EXPORT ~PointGeom() override = default;
59
61 NekDouble &z);
64 NekDouble z);
65
69 SPATIAL_DOMAINS_EXPORT void Rotate(PointGeom &a, int dir, NekDouble angle);
72
74 const PointGeom &y);
76 const PointGeom *y);
78 const PointGeom &y);
80 const PointGeom &y);
82 const PointGeom *y);
84 const PointGeom &y);
85
86protected:
87 int v_GetVid([[maybe_unused]] int i) const override
88 {
89 return m_globalID;
90 }
91
92 void v_GenGeomFactors() override;
93};
94
95} // namespace Nektar::SpatialDomains
96
97#endif // NEKTAR_SPATIALDOMAINS_POINTGEOM_H
#define SPATIAL_DOMAINS_EXPORT
boost::call_traits< DataType >::const_reference x() const
Definition NekPoint.hpp:160
boost::call_traits< DataType >::const_reference a() const
Definition NekPoint.hpp:178
boost::call_traits< DataType >::const_reference z() const
Definition NekPoint.hpp:172
boost::call_traits< DataType >::const_reference b() const
Definition NekPoint.hpp:184
boost::call_traits< DataType >::const_reference y() const
Definition NekPoint.hpp:166
1D geometry information
Definition Geometry0D.h:47
void Sub(PointGeom &a, PointGeom &b)
void GetCoords(NekDouble &x, NekDouble &y, NekDouble &z)
Definition PointGeom.cpp:69
void Mult(PointGeom &a, PointGeom &b)
_this = a x b
friend bool operator==(const PointGeom &x, const PointGeom &y)
Determine equivalence by the ids. No matter what the position, if the ids are the same,...
void Rotate(PointGeom &a, int dir, NekDouble angle)
_this = rotation of a by angle 'angle' around axis dir
NekDouble dot(PointGeom &a)
retun the dot product between this and input a
void Add(PointGeom &a, PointGeom &b)
friend bool operator!=(const PointGeom &x, const PointGeom &y)
void UpdatePosition(NekDouble x, NekDouble y, NekDouble z)
NekDouble dist(PointGeom &a)
return distance between this and input a
int v_GetVid(int i) const override
Get the ID of vertex i of this object.
Definition PointGeom.h:87