Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Typedefs | Enumerations | Functions | Variables
Nektar::SolverUtils Namespace Reference

Classes

class  Advection
 Defines a callback function which evaluates the flux vector. More...
 
class  Advection3DHomogeneous1D
 
class  AdvectionFR
 
class  AdvectionNonConservative
 
class  AdvectionSystem
 A base class for PDEs which include an advection component. More...
 
class  AdvectionWeakDG
 
class  Diffusion
 
class  Diffusion3DHomogeneous1D
 
class  DiffusionLDG
 
class  DiffusionLDGNS
 
class  DiffusionLFR
 
class  DiffusionLFRNS
 
class  Driver
 Base class for the development of solvers. More...
 
class  DriverAdaptive
 Base class for the adaptive polynomial order driver. More...
 
class  DriverArnoldi
 Base class for the development of solvers. More...
 
class  DriverArpack
 Base class for the development of solvers. More...
 
class  DriverModifiedArnoldi
 
class  DriverStandard
 Base class for the development of solvers. More...
 
class  DriverSteadyState
 
class  EquationSystem
 A base class for describing how to solve specific equations. More...
 
class  Filter
 
class  FilterAeroForces
 
class  FilterAverageFields
 
class  FilterCheckpoint
 
class  FilterEnergy1D
 Filter for one-dimensional energy spectrum. More...
 
class  FilterEnergyBase
 
class  FilterHistoryPoints
 
class  FilterModalEnergy
 
class  FilterMovingAverage
 
class  FilterReynoldsStresses
 Append Reynolds stresses to the average fields. More...
 
class  FilterSampler
 
class  FilterThresholdMax
 
class  FilterThresholdMin
 
class  Forcing
 Defines a forcing term to be explicitly applied. More...
 
class  ForcingAbsorption
 
class  ForcingBody
 
class  ForcingNoise
 
class  ForcingProgrammatic
 
class  HomoRSScalar
 Wrapper class for Riemann solver scalars. More...
 
class  HomoRSVector
 Wrapper class for Riemann solver scalars. More...
 
class  RiemannSolver
 The RiemannSolver class provides an abstract interface under which solvers for various Riemann problems can be implemented. More...
 
class  UnsteadySystem
 Base class for unsteady solvers. More...
 
class  UpwindLDGSolver
 Upwind scheme Riemann solver for LDG. More...
 
class  UpwindSolver
 Upwind scheme Riemann solver. More...
 

Typedefs

typedef boost::shared_ptr
< Advection
AdvectionSharedPtr
 A shared pointer to an Advection object. More...
 
typedef
LibUtilities::NekFactory
< std::string, Advection,
std::string > 
AdvectionFactory
 Datatype of the NekFactory used to instantiate classes derived from the Advection class. More...
 
typedef boost::shared_ptr
< AdvectionSystem
AdvectionSystemSharedPtr
 Shared pointer to an AdvectionSystem class. More...
 
typedef std::vector< std::pair
< std::string, std::string > > 
SummaryList
 
typedef boost::function< void(const
int, const int, const Array
< OneD, Array< OneD, NekDouble >
> &, Array< OneD, Array< OneD,
NekDouble > > &, Array< OneD,
Array< OneD, NekDouble > > &)> 
DiffusionFluxVecCB
 
typedef boost::function< void(const
Array< OneD, Array< OneD,
NekDouble > > &, Array< OneD,
Array< OneD, Array< OneD,
NekDouble > > > &, Array< OneD,
Array< OneD, Array< OneD,
NekDouble > > > &)> 
DiffusionFluxVecCBNS
 
typedef boost::function< void(const
Array< OneD, Array< OneD,
NekDouble > > &, Array< OneD,
NekDouble > &)> 
DiffusionArtificialDiffusion
 
typedef boost::shared_ptr
< Diffusion
DiffusionSharedPtr
 A shared pointer to an EquationSystem object. More...
 
typedef
LibUtilities::NekFactory
< std::string, Diffusion,
std::string > 
DiffusionFactory
 Datatype of the NekFactory used to instantiate classes derived from the Diffusion class. More...
 
typedef boost::shared_ptr
< DiffusionLDGNS
DiffusionLDGNSSharedPtr
 
typedef boost::shared_ptr
< DiffusionLFRNS
DiffusionLFRNSSharedPtr
 
typedef boost::shared_ptr< DriverDriverSharedPtr
 A shared pointer to a Driver object. More...
 
typedef
LibUtilities::NekFactory
< std::string, Driver, const
LibUtilities::SessionReaderSharedPtr & > 
DriverFactory
 Datatype of the NekFactory used to instantiate classes derived from the Driver class. More...
 
typedef boost::shared_ptr
< EquationSystem
EquationSystemSharedPtr
 A shared pointer to an EquationSystem object. More...
 
typedef
LibUtilities::NekFactory
< std::string, EquationSystem,
const
LibUtilities::SessionReaderSharedPtr & > 
EquationSystemFactory
 Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class. More...
 
typedef boost::shared_ptr< FilterFilterSharedPtr
 A shared pointer to a Driver object. More...
 
typedef
LibUtilities::NekFactory
< std::string, Filter, const
LibUtilities::SessionReaderSharedPtr
&, const std::map< std::string,
std::string > & > 
FilterFactory
 Datatype of the NekFactory used to instantiate classes derived from the Driver class. More...
 
typedef boost::shared_ptr
< FilterAeroForces
FilterAeroForcesSharedPtr
 
typedef
LibUtilities::NekFactory
< std::string, Forcing, const
LibUtilities::SessionReaderSharedPtr
&, const Array< OneD,
MultiRegions::ExpListSharedPtr >
&, const unsigned int
&, const TiXmlElement * > 
ForcingFactory
 Declaration of the forcing factory. More...
 
typedef boost::function< const
Array< OneD, const NekDouble > &()> 
RSScalarFuncType
 
typedef boost::function< const
Array< OneD, const Array< OneD,
NekDouble > > &()> 
RSVecFuncType
 
typedef boost::function
< NekDouble()> 
RSParamFuncType
 
typedef boost::shared_ptr
< RiemannSolver
RiemannSolverSharedPtr
 A shared pointer to an EquationSystem object. More...
 
typedef
LibUtilities::NekFactory
< std::string, RiemannSolver
RiemannSolverFactory
 Datatype of the NekFactory used to instantiate classes derived from the RiemannSolver class. More...
 

Enumerations

enum  EvolutionOperatorType {
  eNonlinear, eDirect, eAdjoint, eTransientGrowth,
  eSkewSymmetric, eAdaptiveSFD
}
 

Functions

AdvectionFactoryGetAdvectionFactory ()
 Gets the factory for initialising advection objects. More...
 
void UpdateGeometry (SpatialDomains::MeshGraphSharedPtr graph, Array< OneD, MultiRegions::ExpListSharedPtr > &fields, bool modal)
 Update geometry according to displacement that is in current fields. More...
 
void AddSummaryItem (SummaryList &l, const std::string &name, const std::string &value)
 Adds a summary item to the summary info list. More...
 
void AddSummaryItem (SummaryList &l, const std::string &name, const int &value)
 Adds a summary item to the summary info list. More...
 
void AddSummaryItem (SummaryList &l, const std::string &name, const NekDouble &value)
 Adds a summary item to the summary info list. More...
 
DiffusionFactoryGetDiffusionFactory ()
 
DriverFactoryGetDriverFactory ()
 
EquationSystemFactoryGetEquationSystemFactory ()
 
FilterFactoryGetFilterFactory ()
 
ForcingFactoryGetForcingFactory ()
 Declaration of the forcing factory singleton. More...
 
RiemannSolverFactoryGetRiemannSolverFactory ()
 

Variables

SOLVER_UTILS_EXPORT typedef
boost::shared_ptr< Forcing
ForcingSharedPtr
 A shared pointer to an EquationSystem object. More...
 
SOLVER_UTILS_EXPORT typedef
boost::shared_ptr
< ForcingProgrammatic
ForcingProgrammaticSharedPtr
 A shared pointer to an EquationSystem object. More...
 

Typedef Documentation

Datatype of the NekFactory used to instantiate classes derived from the Advection class.

Definition at line 163 of file Advection.h.

A shared pointer to an Advection object.

Definition at line 158 of file Advection.h.

Shared pointer to an AdvectionSystem class.

Definition at line 68 of file AdvectionSystem.h.

Definition at line 69 of file Diffusion.h.

Datatype of the NekFactory used to instantiate classes derived from the Diffusion class.

Definition at line 168 of file Diffusion.h.

typedef boost::function<void ( const int, const int, const Array<OneD, Array<OneD, NekDouble> >&, Array<OneD, Array<OneD, NekDouble> >&, Array<OneD, Array<OneD, NekDouble> >&)> Nektar::SolverUtils::DiffusionFluxVecCB

Definition at line 58 of file Diffusion.h.

Definition at line 64 of file Diffusion.h.

Definition at line 123 of file DiffusionLDGNS.h.

Definition at line 201 of file DiffusionLFRNS.h.

A shared pointer to an EquationSystem object.

Definition at line 164 of file Diffusion.h.

Datatype of the NekFactory used to instantiate classes derived from the Driver class.

Definition at line 60 of file Driver.h.

typedef boost::shared_ptr<Driver> Nektar::SolverUtils::DriverSharedPtr

A shared pointer to a Driver object.

Definition at line 52 of file Driver.h.

Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class.

Definition at line 65 of file EquationSystem.h.

A shared pointer to an EquationSystem object.

Definition at line 56 of file EquationSystem.h.

Definition at line 131 of file FilterAeroForces.h.

typedef LibUtilities::NekFactory< std::string, Filter, const LibUtilities::SessionReaderSharedPtr&, const std::map<std::string, std::string>& > Nektar::SolverUtils::FilterFactory

Datatype of the NekFactory used to instantiate classes derived from the Driver class.

Definition at line 61 of file Filter.h.

typedef boost::shared_ptr<Filter> Nektar::SolverUtils::FilterSharedPtr

A shared pointer to a Driver object.

Definition at line 50 of file Filter.h.

Declaration of the forcing factory.

Definition at line 61 of file Forcing.h.

Datatype of the NekFactory used to instantiate classes derived from the RiemannSolver class.

Definition at line 198 of file RiemannSolver.h.

A shared pointer to an EquationSystem object.

Definition at line 194 of file RiemannSolver.h.

typedef boost::function< NekDouble ()> Nektar::SolverUtils::RSParamFuncType

Definition at line 60 of file RiemannSolver.h.

typedef boost::function< const Array<OneD, const NekDouble>& ()> Nektar::SolverUtils::RSScalarFuncType

Definition at line 56 of file RiemannSolver.h.

typedef boost::function< const Array<OneD, const Array<OneD, NekDouble> >& ()> Nektar::SolverUtils::RSVecFuncType

Definition at line 58 of file RiemannSolver.h.

typedef std::vector<std::pair<std::string, std::string> > Nektar::SolverUtils::SummaryList

Definition at line 47 of file Misc.h.

Enumeration Type Documentation

Enumerator
eNonlinear 
eDirect 
eAdjoint 
eTransientGrowth 
eSkewSymmetric 
eAdaptiveSFD 

Definition at line 5 of file SolverUtils.hpp.

Function Documentation

SOLVER_UTILS_EXPORT void Nektar::SolverUtils::AddSummaryItem ( SummaryList &  l,
const std::string &  name,
const std::string &  value 
)
SOLVER_UTILS_EXPORT void Nektar::SolverUtils::AddSummaryItem ( SummaryList &  l,
const std::string &  name,
const int &  value 
)

Adds a summary item to the summary info list.

Definition at line 59 of file Misc.cpp.

63  {
64  l.push_back(std::make_pair(name, boost::lexical_cast<std::string>(value)));
65  }
SOLVER_UTILS_EXPORT void Nektar::SolverUtils::AddSummaryItem ( SummaryList &  l,
const std::string &  name,
const NekDouble &  value 
)

Adds a summary item to the summary info list.

Definition at line 68 of file Misc.cpp.

72  {
73  l.push_back(std::make_pair(
74  name, str(boost::format("%g") % value)));
75  }
SOLVER_UTILS_EXPORT AdvectionFactory & Nektar::SolverUtils::GetAdvectionFactory ( )

Gets the factory for initialising advection objects.

Returns
The advection factory.

Definition at line 46 of file Advection.cpp.

Referenced by Nektar::SolverUtils::Advection3DHomogeneous1D::Advection3DHomogeneous1D(), Nektar::SolverUtils::EquationSystem::SessionSummary(), Nektar::NonlinearSWE::v_InitObject(), Nektar::LinearSWE::v_InitObject(), Nektar::APE::v_InitObject(), Nektar::NonlinearPeregrine::v_InitObject(), Nektar::UnsteadyInviscidBurger::v_InitObject(), Nektar::UnsteadyAdvection::v_InitObject(), Nektar::IncNavierStokes::v_InitObject(), Nektar::UnsteadyAdvectionDiffusion::v_InitObject(), Nektar::UnsteadyViscousBurgers::v_InitObject(), and Nektar::CompressibleFlowSystem::v_InitObject().

47 {
48  typedef Loki::SingletonHolder<AdvectionFactory,
49  Loki::CreateUsingNew,
50  Loki::NoDestroy,
51  Loki::SingleThreaded> Type;
52  return Type::Instance();
53 }
LibUtilities::NekFactory< std::string, Advection, std::string > AdvectionFactory
Datatype of the NekFactory used to instantiate classes derived from the Advection class...
Definition: Advection.h:163
SOLVER_UTILS_EXPORT DiffusionFactory & Nektar::SolverUtils::GetDiffusionFactory ( )

Definition at line 42 of file Diffusion.cpp.

Referenced by Nektar::SolverUtils::Diffusion3DHomogeneous1D::Diffusion3DHomogeneous1D(), Nektar::SolverUtils::EquationSystem::SessionSummary(), Nektar::UnsteadyDiffusion::v_InitObject(), Nektar::UnsteadyAdvectionDiffusion::v_InitObject(), Nektar::UnsteadyViscousBurgers::v_InitObject(), and Nektar::CompressibleFlowSystem::v_InitObject().

43  {
44  typedef Loki::SingletonHolder<DiffusionFactory,
45  Loki::CreateUsingNew,
46  Loki::NoDestroy,
47  Loki::SingleThreaded> Type;
48  return Type::Instance();
49  }
LibUtilities::NekFactory< std::string, Diffusion, std::string > DiffusionFactory
Datatype of the NekFactory used to instantiate classes derived from the Diffusion class...
Definition: Diffusion.h:168
SOLVER_UTILS_EXPORT DriverFactory & Nektar::SolverUtils::GetDriverFactory ( )

Definition at line 64 of file Driver.cpp.

Referenced by Nektar::VortexWaveInteraction::ExecuteStreak(), Nektar::VortexWaveInteraction::ExecuteWave(), and main().

65 {
66  typedef Loki::SingletonHolder<DriverFactory,
67  Loki::CreateUsingNew,
68  Loki::NoDestroy,
69  Loki::SingleThreaded> Type;
70  return Type::Instance();
71 }
LibUtilities::NekFactory< std::string, Driver, const LibUtilities::SessionReaderSharedPtr & > DriverFactory
Datatype of the NekFactory used to instantiate classes derived from the Driver class.
Definition: Driver.h:60
SOLVER_UTILS_EXPORT EquationSystemFactory & Nektar::SolverUtils::GetEquationSystemFactory ( )

Definition at line 83 of file EquationSystem.cpp.

Referenced by Nektar::VortexWaveInteraction::ExecuteRoll(), Nektar::VortexWaveInteraction::ExecuteStreak(), main(), Nektar::SolverUtils::Driver::v_InitObject(), and Nektar::VortexWaveInteraction::VortexWaveInteraction().

84  {
85  typedef Loki::SingletonHolder<EquationSystemFactory,
86  Loki::CreateUsingNew,
87  Loki::NoDestroy,
88  Loki::ClassLevelLockable> Type;
89  return Type::Instance();
90  }
LibUtilities::NekFactory< std::string, EquationSystem, const LibUtilities::SessionReaderSharedPtr & > EquationSystemFactory
Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class...
SOLVER_UTILS_EXPORT FilterFactory & Nektar::SolverUtils::GetFilterFactory ( )

Definition at line 42 of file Filter.cpp.

Referenced by Nektar::SolverUtils::UnsteadySystem::v_InitObject().

43 {
44  typedef Loki::SingletonHolder<FilterFactory,
45  Loki::CreateUsingNew,
46  Loki::NoDestroy,
47  Loki::SingleThreaded> Type;
48  return Type::Instance();
49 }
LibUtilities::NekFactory< std::string, Filter, const LibUtilities::SessionReaderSharedPtr &, const std::map< std::string, std::string > & > FilterFactory
Datatype of the NekFactory used to instantiate classes derived from the Driver class.
Definition: Filter.h:61
SOLVER_UTILS_EXPORT ForcingFactory & Nektar::SolverUtils::GetForcingFactory ( )

Declaration of the forcing factory singleton.

Definition at line 42 of file Forcing.cpp.

Referenced by Nektar::VortexWaveInteraction::ExecuteRoll(), and Nektar::SolverUtils::Forcing::Load().

43  {
44  typedef Loki::SingletonHolder<ForcingFactory,
45  Loki::CreateUsingNew,
46  Loki::NoDestroy,
47  Loki::SingleThreaded> Type;
48  return Type::Instance();
49  }
LibUtilities::NekFactory< std::string, Forcing, const LibUtilities::SessionReaderSharedPtr &, const Array< OneD, MultiRegions::ExpListSharedPtr > &, const unsigned int &, const TiXmlElement * > ForcingFactory
Declaration of the forcing factory.
Definition: Forcing.h:61
SOLVER_UTILS_EXPORT RiemannSolverFactory & Nektar::SolverUtils::GetRiemannSolverFactory ( )

Retrieves the singleton instance of the Riemann solver factory.

Definition at line 63 of file RiemannSolver.cpp.

Referenced by Nektar::LinearSWE::v_InitObject(), Nektar::NonlinearSWE::v_InitObject(), Nektar::APE::v_InitObject(), Nektar::NonlinearPeregrine::v_InitObject(), Nektar::UnsteadyInviscidBurger::v_InitObject(), Nektar::UnsteadyAdvection::v_InitObject(), Nektar::UnsteadyAdvectionDiffusion::v_InitObject(), Nektar::UnsteadyViscousBurgers::v_InitObject(), and Nektar::CompressibleFlowSystem::v_InitObject().

64  {
65  typedef Loki::SingletonHolder<RiemannSolverFactory,
66  Loki::CreateUsingNew,
67  Loki::NoDestroy,
68  Loki::SingleThreaded> Type;
69  return Type::Instance();
70  }
LibUtilities::NekFactory< std::string, RiemannSolver > RiemannSolverFactory
Datatype of the NekFactory used to instantiate classes derived from the RiemannSolver class...
SOLVER_UTILS_EXPORT void Nektar::SolverUtils::UpdateGeometry ( SpatialDomains::MeshGraphSharedPtr  graph,
Array< OneD, MultiRegions::ExpListSharedPtr > &  fields,
bool  modal 
)

Update geometry according to displacement that is in current fields.

Adds a summary item to the summary info list.

Parameters
graphThe MeshGraph of the current geometry.
fieldsThe fields containing the displacement.

Definition at line 57 of file Deform.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL1, Nektar::NekMeshUtils::curve, Nektar::StdRegions::eBackwards, Nektar::LibUtilities::eGaussLobattoLegendre, Nektar::LibUtilities::eGaussRadauMAlpha1Beta0, Nektar::LibUtilities::eModified_A, Nektar::LibUtilities::eNodalTriElec, Nektar::LibUtilities::eOrtho_A, Nektar::LibUtilities::eOrtho_B, Nektar::LibUtilities::eTriangle, Nektar::StdRegions::StdExpansion::FwdTrans(), Nektar::SpatialDomains::Geometry2D::GetEdge(), Nektar::SpatialDomains::Geometry3D::GetFace(), Nektar::LibUtilities::BasisKey::GetNumPoints(), Nektar::LibUtilities::BasisKey::GetPointsType(), Nektar::LibUtilities::Interp2D(), Nektar::StdRegions::StdNodalTriExp::ModalToNodal(), Vmath::Vadd(), and Nektar::NekMeshUtils::vert.

Referenced by Nektar::Utilities::ProcessDeform::Process(), and Nektar::IterativeElasticSystem::v_DoSolve().

61  {
62  // Clear existing curvature.
63  SpatialDomains::CurveMap &curvedEdges = graph->GetCurvedEdges();
64  SpatialDomains::CurveMap &curvedFaces = graph->GetCurvedFaces();
65  curvedEdges.clear();
66  curvedFaces.clear();
67 
68  int i, j, k, l, dim;
69 
70  // Sets to hold IDs of updated vertices to avoid duplicating effort.
71  set<int> updatedVerts, updatedEdges, updatedFaces;
72 
73  dim = graph->GetSpaceDimension();
76 
77  for (i = 0; i < fields[0]->GetExpSize(); ++i)
78  {
79  LocalRegions::ExpansionSharedPtr exp = fields[0]->GetExp(i);
80  int offset = fields[0]->GetPhys_Offset(i);
81  int nquad = exp->GetTotPoints();
82 
83  // Extract displacement for this element, allocate storage for
84  // elemental coordinates.
85  for (j = 0; j < dim; ++j)
86  {
87  phys[j] = Array<OneD, NekDouble>(
88  nquad, fields[j]->UpdatePhys() + offset);
89  coord[j] = Array<OneD, NekDouble>(nquad);
90  }
91 
92  // In 2D loop over edges.
93  if (dim == 2)
94  {
95  exp->GetCoords(coord[0], coord[1]);
96 
98  boost::dynamic_pointer_cast<SpatialDomains::Geometry2D>(
99  exp->GetGeom());
100 
101  for (j = 0; j < exp->GetNedges(); ++j)
102  {
104 
105  // This edge has already been processed.
106  if (updatedEdges.find(edge->GetGlobalID()) !=
107  updatedEdges.end())
108  {
109  continue;
110  }
111 
112  // Extract edge displacement.
113  int nEdgePts = exp->GetEdgeNumPoints(j);
114  Array<OneD, Array<OneD, NekDouble> > edgePhys (dim);
115  Array<OneD, Array<OneD, NekDouble> > edgeCoord(dim);
116 
117  const LibUtilities::BasisKey B(
118  LibUtilities::eModified_A, nEdgePts,
122  StdRegions::StdSegExp>::AllocateSharedPtr(B);
123 
124  for (k = 0; k < dim; ++k)
125  {
126  edgePhys [k] = Array<OneD, NekDouble>(nEdgePts);
127  edgeCoord[k] = Array<OneD, NekDouble>(nEdgePts);
128  exp->GetEdgePhysVals(j, seg, phys [k], edgePhys [k]);
129  exp->GetEdgePhysVals(j, seg, coord[k], edgeCoord[k]);
130  }
131 
132  // Update verts
133  for (k = 0; k < 2; ++k)
134  {
135  int id = edge->GetVid(k);
136  if (updatedVerts.find(id) != updatedVerts.end())
137  {
138  continue;
139  }
140 
142  edge->GetVertex(k);
143 
144  pt->UpdatePosition(
145  (*pt)(0) + edgePhys[0][k*(nEdgePts-1)],
146  (*pt)(1) + edgePhys[1][k*(nEdgePts-1)],
147  (*pt)(2));
148 
149  updatedVerts.insert(id);
150  }
151 
152  // Update curve
154  SpatialDomains::Curve>::AllocateSharedPtr(
155  edge->GetGlobalID(),
157 
158  for (k = 0; k < nEdgePts; ++k)
159  {
163  dim, edge->GetGlobalID(),
164  edgeCoord[0][k] + edgePhys[0][k],
165  edgeCoord[1][k] + edgePhys[1][k], 0.0);
166 
167  curve->m_points.push_back(vert);
168  }
169 
170  curvedEdges[edge->GetGlobalID()] = curve;
171  updatedEdges.insert(edge->GetGlobalID());
172  }
173  }
174  else if (dim == 3)
175  {
176  exp->GetCoords(coord[0], coord[1], coord[2]);
177 
179  boost::dynamic_pointer_cast<SpatialDomains::Geometry3D>(
180  exp->GetGeom());
181 
182  for (j = 0; j < exp->GetNfaces(); ++j)
183  {
185 
186  // This edge has already been processed.
187  if (updatedFaces.find(face->GetGlobalID()) !=
188  updatedFaces.end())
189  {
190  continue;
191  }
192 
193  // Extract face displacement.
194  LibUtilities::BasisKey B0 = exp->DetFaceBasisKey(j,0);
195  LibUtilities::BasisKey B1 = exp->DetFaceBasisKey(j,1);
196  int nq0 = B0.GetNumPoints();
197  int nq1 = B1.GetNumPoints();
198 
201  B1.GetPointsType()
203  "Deformation requires GLL points in both "
204  "directions on a face.");
205 
207 
209  StdRegions::Orientation orient = exp->GetForient(j);
210 
211  if (face->GetShapeType() == LibUtilities::eTriangle)
212  {
214  AllocateSharedPtr(B0, B1);
215  }
216  else
217  {
219  AllocateSharedPtr(B0, B1);
220  }
221 
222  for (k = 0; k < dim; ++k)
223  {
224  Array<OneD, NekDouble> tmp(nq0*nq1);
225  newPos[k] = Array<OneD, NekDouble>(nq0*nq1);
226  exp->GetFacePhysVals(
227  j, faceexp, phys [k], tmp, orient);
228  exp->GetFacePhysVals(
229  j, faceexp, coord[k], newPos[k], orient);
230  Vmath::Vadd(
231  nq0*nq1, tmp, 1, newPos[k], 1, newPos[k], 1);
232  }
233 
234  // Now interpolate face onto a more reasonable set of
235  // points.
236  int nq = max(nq0, nq1);
237  if(!modal)
238  nq--;
239 
240  LibUtilities::PointsKey edgePts(
244 
246 
247  for (k = 0; k < dim; ++k)
248  {
249  intPos[k] = Array<OneD, NekDouble>(nq*nq);
251  faceexp->GetPointsKeys()[0],
252  faceexp->GetPointsKeys()[1],
253  newPos[k], edgePts, edgePts, intPos[k]);
254  }
255 
256  int edgeOff[2][4][2] = {
257  {
258  {0, 1},
259  {nq-1, nq},
260  {nq*(nq-1), -nq},
261  {-1,-1}
262  },
263  {
264  {0, 1},
265  {nq-1, nq},
266  {nq*nq-1, -1},
267  {nq*(nq-1), -nq}
268  }
269  };
270 
271  for (k = 0; k < face->GetNumVerts(); ++k)
272  {
273  // Update verts
274  int id = face->GetVid(k);
275  const int o =
276  face->GetShapeType() - LibUtilities::eTriangle;
277 
278  if (updatedVerts.find(id) == updatedVerts.end())
279  {
281  face->GetVertex(k);
282  pt->UpdatePosition(
283  intPos[0][edgeOff[o][k][0]],
284  intPos[1][edgeOff[o][k][0]],
285  intPos[2][edgeOff[o][k][0]]);
286  updatedVerts.insert(id);
287  }
288 
289  // Update edges
290  id = face->GetEid(k);
291  if (updatedEdges.find(id) == updatedEdges.end())
292  {
294  = face->GetEdge(k);
298  edge->GetGlobalID(),
300 
301  const int offset = edgeOff[o][k][0];
302  const int pos = edgeOff[o][k][1];
303 
304  if (face->GetEorient(k) == StdRegions::eBackwards)
305  {
306  for (l = nq-1; l >= 0; --l)
307  {
308  int m = offset + pos*l;
312  dim, edge->GetGlobalID(),
313  intPos[0][m], intPos[1][m],
314  intPos[2][m]);
315  curve->m_points.push_back(vert);
316  }
317  }
318  else
319  {
320  for (l = 0; l < nq; ++l)
321  {
322  int m = offset + pos*l;
326  dim, edge->GetGlobalID(),
327  intPos[0][m], intPos[1][m],
328  intPos[2][m]);
329  curve->m_points.push_back(vert);
330  }
331  }
332 
333  curvedEdges[edge->GetGlobalID()] = curve;
334  updatedEdges.insert(edge->GetGlobalID());
335  }
336  }
337 
338  // Update face-interior curvature
340  face->GetShapeType() == LibUtilities::eTriangle ?
343 
345  SpatialDomains::Curve>::AllocateSharedPtr(
346  face->GetGlobalID(),
347  pType);
348 
349  if (face->GetShapeType() == LibUtilities::eTriangle)
350  {
351  // This code is probably pretty crappy. Have to go from
352  // GLL-GLL points -> GLL-Gauss-Radau -> nodal triangle
353  // points.
354  const LibUtilities::BasisKey B0(
358  const LibUtilities::BasisKey B1(
362  StdRegions::StdNodalTriExp nodalTri(B0, B1, pType);
363  StdRegions::StdTriExp tri (B0, B1);
364 
365  for (k = 0; k < dim; ++k)
366  {
367  Array<OneD, NekDouble> nodal(nq*nq);
368 
370  faceexp->GetBasis(0)->GetBasisKey(),
371  faceexp->GetBasis(1)->GetBasisKey(),
372  newPos[k], B0, B1, nodal);
373 
374  Array<OneD, NekDouble> tmp1(nq*(nq+1)/2);
375  Array<OneD, NekDouble> tmp2(nq*(nq+1)/2);
376 
377  tri.FwdTrans(nodal, tmp1);
378  nodalTri.ModalToNodal(tmp1, tmp2);
379  newPos[k] = tmp2;
380  }
381 
382  for (l = 0; l < nq*(nq+1)/2; ++l)
383  {
387  dim, face->GetGlobalID(),
388  newPos[0][l], newPos[1][l], newPos[2][l]);
389  curve->m_points.push_back(vert);
390  }
391  }
392  else
393  {
394  for (l = 0; l < nq*nq; ++l)
395  {
399  dim, face->GetGlobalID(),
400  intPos[0][l], intPos[1][l], intPos[2][l]);
401  curve->m_points.push_back(vert);
402  }
403  }
404 
405  curvedFaces[face->GetGlobalID()] = curve;
406  updatedFaces.insert(face->GetGlobalID());
407  }
408  }
409  }
410 
411  // Reset geometry information
412  for (i = 0; i < fields.num_elements(); ++i)
413  {
414  fields[i]->Reset();
415  }
416  }
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
Principle Modified Functions .
Definition: BasisType.h:49
Geometry2DSharedPtr GetFace(int i)
Return face i in this element.
Definition: Geometry3D.cpp:79
PointsType GetPointsType() const
Return type of quadrature.
Definition: Basis.h:151
boost::shared_ptr< Curve > CurveSharedPtr
Definition: Curve.hpp:62
Gauss Radau pinned at x=-1, .
Definition: PointsType.h:57
Principle Orthogonal Functions .
Definition: BasisType.h:47
Class representing a segment element in reference space.
Definition: StdSegExp.h:54
void Interp2D(const BasisKey &fbasis0, const BasisKey &fbasis1, const Array< OneD, const NekDouble > &from, const BasisKey &tbasis0, const BasisKey &tbasis1, Array< OneD, NekDouble > &to)
this function interpolates a 2D function evaluated at the quadrature points of the 2D basis...
Definition: Interp.cpp:116
boost::shared_ptr< StdExpansion2D > StdExpansion2DSharedPtr
int GetNumPoints() const
Return points order at which basis is defined.
Definition: Basis.h:128
boost::shared_ptr< StdExpansion1D > StdExpansion1DSharedPtr
Principle Orthogonal Functions .
Definition: BasisType.h:46
Defines a specification for a set of points.
Definition: Points.h:58
boost::shared_ptr< Expansion > ExpansionSharedPtr
Definition: Expansion.h:68
boost::shared_ptr< Geometry2D > Geometry2DSharedPtr
Definition: Geometry2D.h:59
3D geometry information
Definition: Geometry3D.h:70
2D geometry information
Definition: Geometry2D.h:65
const Geometry1DSharedPtr GetEdge(int i) const
Definition: Geometry2D.cpp:80
boost::shared_ptr< Geometry1D > Geometry1DSharedPtr
Definition: Geometry1D.h:48
boost::unordered_map< int, CurveSharedPtr > CurveMap
Definition: Curve.hpp:63
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:191
Describes the specification for a Basis.
Definition: Basis.h:50
boost::shared_ptr< PointGeom > PointGeomSharedPtr
Definition: Geometry.h:60
1D Gauss-Lobatto-Legendre quadrature points
Definition: PointsType.h:50
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
Definition: Vmath.cpp:285
2D Nodal Electrostatic Points on a Triangle
Definition: PointsType.h:68
boost::shared_ptr< Geometry3D > Geometry3DSharedPtr
Definition: Geometry3D.h:52

Variable Documentation

SOLVER_UTILS_EXPORT typedef boost::shared_ptr<ForcingProgrammatic> Nektar::SolverUtils::ForcingProgrammaticSharedPtr

A shared pointer to an EquationSystem object.

Definition at line 52 of file ForcingProgrammatic.h.

SOLVER_UTILS_EXPORT typedef boost::shared_ptr<Forcing> Nektar::SolverUtils::ForcingSharedPtr