Nektar++
PointExp.cpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File PointExp.cpp
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: Definition of a Point expansion
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
35 #include <LocalRegions/PointExp.h>
36 
37 namespace Nektar
38 {
39  namespace LocalRegions
40  {
41 
43  StdExpansion (1,0),
44  StdExpansion0D(),
45  StdRegions::StdPointExp(),
46  Expansion (geom),
47  Expansion0D (geom)
48  {
49  m_ncoeffs = 1;
50  }
51 
53  {
54  }
55 
57  Array<OneD, NekDouble> &coords_1,
58  Array<OneD, NekDouble> &coords_2)
59  {
60  ASSERTL1(coords_0.num_elements() > 0,
61  "Coords_0 is of insufficient size.");
62  ASSERTL1(GetCoordim() < 2 || coords_1.num_elements() > 0,
63  "Coords_1 is of insufficient size.");
64  ASSERTL1(GetCoordim() < 3 || coords_2.num_elements() > 0,
65  "Coords_2 is of insufficient size.");
66 
68  NekDouble tmp;
69  switch(GetCoordim())
70  {
71  case 1:
72  v->GetCoords(coords_0[0], tmp, tmp);
73  break;
74  case 2:
75  v->GetCoords(coords_0[0], coords_1[0], tmp);
76  break;
77  case 3:
78  v->GetCoords(coords_0[0], coords_1[0], coords_2[0]);
79  break;
80  }
81  }
82 
85  Array<OneD, NekDouble> &outarray)
86  {
88  &normals =
91  outarray[0] = Fx[0]*normals[0][0];
92  }
93 
94  }
95 }
const NormalVector & GetVertexNormal(const int vertex) const
PointExp(const SpatialDomains::PointGeomSharedPtr &m_geom)
Definition: PointExp.cpp:42
void GetCoords(NekDouble &x, NekDouble &y, NekDouble &z)
Definition: PointGeom.cpp:76
SpatialDomains::GeometrySharedPtr m_geom
Definition: Expansion.h:127
Expansion1DSharedPtr GetLeftAdjacentElementExp() const
Definition: Expansion0D.h:85
double NekDouble
std::shared_ptr< PointGeom > PointGeomSharedPtr
Definition: Geometry.h:59
virtual void v_NormVectorIProductWRTBase(const Array< OneD, const NekDouble > &Fx, Array< OneD, NekDouble > &outarray)
Definition: PointExp.cpp:83
virtual void v_GetCoords(Array< OneD, NekDouble > &coords_0, Array< OneD, NekDouble > &coords_1, Array< OneD, NekDouble > &coords_2)
Definition: PointExp.cpp:56
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:250