Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Nektar
Nektar
Commits
1cdcfdf5
Commit
1cdcfdf5
authored
Dec 06, 2014
by
Chris Cantwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tidy up code.
parent
2ccec3d4
Changes
33
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
2238 additions
and
2187 deletions
+2238
-2187
cmake/FindWin32Lapack.cmake
cmake/FindWin32Lapack.cmake
+1
-1
library/SolverUtils/Advection/Advection.cpp
library/SolverUtils/Advection/Advection.cpp
+81
-49
library/SolverUtils/Advection/Advection.h
library/SolverUtils/Advection/Advection.h
+117
-108
library/SolverUtils/Advection/Advection3DHomogeneous1D.h
library/SolverUtils/Advection/Advection3DHomogeneous1D.h
+2
-3
library/SolverUtils/Advection/AdvectionFR.h
library/SolverUtils/Advection/AdvectionFR.h
+2
-3
library/SolverUtils/Advection/AdvectionNonConservative.h
library/SolverUtils/Advection/AdvectionNonConservative.h
+2
-3
library/SolverUtils/Advection/AdvectionWeakDG.h
library/SolverUtils/Advection/AdvectionWeakDG.h
+2
-3
library/SolverUtils/AdvectionSystem.cpp
library/SolverUtils/AdvectionSystem.cpp
+30
-18
library/SolverUtils/AdvectionSystem.h
library/SolverUtils/AdvectionSystem.h
+25
-21
library/SolverUtils/DriverSteadyState.cpp
library/SolverUtils/DriverSteadyState.cpp
+4
-13
library/SolverUtils/EquationSystem.cpp
library/SolverUtils/EquationSystem.cpp
+0
-1
solvers/ADRSolver/EquationSystems/UnsteadyAdvection.cpp
solvers/ADRSolver/EquationSystems/UnsteadyAdvection.cpp
+15
-14
solvers/ADRSolver/EquationSystems/UnsteadyAdvection.h
solvers/ADRSolver/EquationSystems/UnsteadyAdvection.h
+12
-15
solvers/ADRSolver/EquationSystems/UnsteadyAdvectionDiffusion.cpp
.../ADRSolver/EquationSystems/UnsteadyAdvectionDiffusion.cpp
+18
-15
solvers/ADRSolver/EquationSystems/UnsteadyAdvectionDiffusion.h
...rs/ADRSolver/EquationSystems/UnsteadyAdvectionDiffusion.h
+21
-25
solvers/ADRSolver/EquationSystems/UnsteadyInviscidBurger.cpp
solvers/ADRSolver/EquationSystems/UnsteadyInviscidBurger.cpp
+15
-10
solvers/ADRSolver/EquationSystems/UnsteadyInviscidBurger.h
solvers/ADRSolver/EquationSystems/UnsteadyInviscidBurger.h
+5
-7
solvers/CompressibleFlowSolver/EquationSystems/CompressibleFlowSystem.h
...ssibleFlowSolver/EquationSystems/CompressibleFlowSystem.h
+1
-2
solvers/IncNavierStokesSolver/AdvectionTerms/AdjointAdvection.cpp
...IncNavierStokesSolver/AdvectionTerms/AdjointAdvection.cpp
+654
-664
solvers/IncNavierStokesSolver/AdvectionTerms/AdjointAdvection.h
...s/IncNavierStokesSolver/AdvectionTerms/AdjointAdvection.h
+79
-69
solvers/IncNavierStokesSolver/AdvectionTerms/LinearisedAdvection.cpp
...NavierStokesSolver/AdvectionTerms/LinearisedAdvection.cpp
+672
-669
solvers/IncNavierStokesSolver/AdvectionTerms/LinearisedAdvection.h
...ncNavierStokesSolver/AdvectionTerms/LinearisedAdvection.h
+130
-125
solvers/IncNavierStokesSolver/AdvectionTerms/NavierStokesAdvection.h
...NavierStokesSolver/AdvectionTerms/NavierStokesAdvection.h
+35
-42
solvers/IncNavierStokesSolver/AdvectionTerms/NoAdvection.cpp
solvers/IncNavierStokesSolver/AdvectionTerms/NoAdvection.cpp
+45
-37
solvers/IncNavierStokesSolver/AdvectionTerms/NoAdvection.h
solvers/IncNavierStokesSolver/AdvectionTerms/NoAdvection.h
+30
-30
solvers/IncNavierStokesSolver/AdvectionTerms/SkewSymmetricAdvection.cpp
...ierStokesSolver/AdvectionTerms/SkewSymmetricAdvection.cpp
+155
-147
solvers/IncNavierStokesSolver/AdvectionTerms/SkewSymmetricAdvection.h
...avierStokesSolver/AdvectionTerms/SkewSymmetricAdvection.h
+43
-49
solvers/IncNavierStokesSolver/EquationSystems/CoupledLinearNS.cpp
...IncNavierStokesSolver/EquationSystems/CoupledLinearNS.cpp
+17
-16
solvers/IncNavierStokesSolver/EquationSystems/Extrapolate.h
solvers/IncNavierStokesSolver/EquationSystems/Extrapolate.h
+13
-14
solvers/IncNavierStokesSolver/EquationSystems/IncNavierStokes.cpp
...IncNavierStokesSolver/EquationSystems/IncNavierStokes.cpp
+6
-5
solvers/IncNavierStokesSolver/EquationSystems/VelocityCorrectionScheme.cpp
...StokesSolver/EquationSystems/VelocityCorrectionScheme.cpp
+6
-5
solvers/ShallowWaterSolver/EquationSystems/ShallowWaterSystem.h
...s/ShallowWaterSolver/EquationSystems/ShallowWaterSystem.h
+0
-1
solvers/VortexWaveInteraction/CMakeLists.txt
solvers/VortexWaveInteraction/CMakeLists.txt
+0
-3
No files found.
cmake/FindWin32Lapack.cmake
View file @
1cdcfdf5
...
...
@@ -58,4 +58,4 @@ GET_FILENAME_COMPONENT(LAPACK_DIR ${WIN32_LAPACK} PATH CACHE)
LINK_DIRECTORIES
(
${
LAPACK_DIR
}
)
MESSAGE
(
STATUS
"Found Win32 BLAS:
${
WIN32_BLAS
}
"
)
MESSAGE
(
STATUS
"Found Win32 Lapack:
${
WIN32_LAPACK
}
"
)
\ No newline at end of file
MESSAGE
(
STATUS
"Found Win32 Lapack:
${
WIN32_LAPACK
}
"
)
library/SolverUtils/Advection/Advection.cpp
View file @
1cdcfdf5
...
...
@@ -37,61 +37,93 @@
namespace
Nektar
{
namespace
SolverUtils
{
AdvectionFactory
&
GetAdvectionFactory
()
{
typedef
Loki
::
SingletonHolder
<
AdvectionFactory
,
Loki
::
CreateUsingNew
,
Loki
::
NoDestroy
>
Type
;
return
Type
::
Instance
();
}
namespace
SolverUtils
{
/**
* @returns The advection factory.
*/
AdvectionFactory
&
GetAdvectionFactory
()
{
typedef
Loki
::
SingletonHolder
<
AdvectionFactory
,
Loki
::
CreateUsingNew
,
Loki
::
NoDestroy
>
Type
;
return
Type
::
Instance
();
}
/**
* @param pSession Session configuration data.
* @param pFields Array of ExpList objects.
*/
void
Advection
::
InitObject
(
const
LibUtilities
::
SessionReaderSharedPtr
pSession
,
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
pFields
)
{
v_InitObject
(
pSession
,
pFields
);
}
/**
* @param nConvectiveFields Number of velocity components.
* @param pFields Expansion lists for scalar fields.
* @param pAdvVel Advection velocity.
* @param pInarray Scalar data to advect.
* @param pOutarray Advected scalar data.
* @param pTime Simulation time.
*/
void
Advection
::
Advect
(
const
int
nConvectiveFields
,
const
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
&
pFields
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
pAdvVel
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
pInarray
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
pOutarray
,
const
NekDouble
&
pTime
)
{
v_Advect
(
nConvectiveFields
,
pFields
,
pAdvVel
,
pInarray
,
pOutarray
,
pTime
);
}
void
Advection
::
InitObject
(
const
LibUtilities
::
SessionReaderSharedPtr
pSession
,
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
pFields
)
/**
* This function should be overridden in derived classes to initialise the
* specific advection data members. However, this base class function should
* be called as the first statement of the overridden function to ensure the
* base class is correctly initialised in order.
*
* @param pSession Session information.
* @param pFields Expansion lists for scalar fields.
*/
void
Advection
::
v_InitObject
(
const
LibUtilities
::
SessionReaderSharedPtr
pSession
,
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
pFields
)
{
m_spaceDim
=
pFields
[
0
]
->
GetCoordim
(
0
);
if
(
pSession
->
DefinesSolverInfo
(
"HOMOGENEOUS"
))
{
std
::
string
HomoStr
=
pSession
->
GetSolverInfo
(
"HOMOGENEOUS"
);
if
(
HomoStr
==
"HOMOGENEOUS1D"
||
HomoStr
==
"Homogeneous1D"
||
HomoStr
==
"1D"
||
HomoStr
==
"Homo1D"
)
{
v_InitObject
(
pSession
,
pFields
)
;
m_spaceDim
++
;
}
void
Advection
::
Advect
(
const
int
nConvectiveFields
,
const
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
&
fields
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
advVel
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
inarray
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
outarray
,
const
NekDouble
&
time
)
else
{
v_Advect
(
nConvectiveFields
,
fields
,
advVel
,
inarray
,
outarray
,
time
);
ASSERTL0
(
false
,
"Only 1D homogeneous dimension supported."
);
}
}
}
void
Advection
::
v_InitObject
(
const
LibUtilities
::
SessionReaderSharedPtr
pSession
,
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
pFields
)
{
m_spaceDim
=
pFields
[
0
]
->
GetCoordim
(
0
);
if
(
pSession
->
DefinesSolverInfo
(
"HOMOGENEOUS"
))
{
std
::
string
HomoStr
=
pSession
->
GetSolverInfo
(
"HOMOGENEOUS"
);
if
(
HomoStr
==
"HOMOGENEOUS1D"
||
HomoStr
==
"Homogeneous1D"
||
HomoStr
==
"1D"
||
HomoStr
==
"Homo1D"
)
{
m_spaceDim
++
;
}
else
{
ASSERTL0
(
false
,
"Only 1D homogeneous dimension supported."
);
}
}
}
void
Advection
::
v_SetBaseFlow
(
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
inarray
)
{
ASSERTL0
(
false
,
"A baseflow is not appropriate for this advection type."
);
}
/**
*
*/
void
Advection
::
v_SetBaseFlow
(
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
inarray
)
{
ASSERTL0
(
false
,
"A baseflow is not appropriate for this advection type."
);
}
}
}
}
library/SolverUtils/Advection/Advection.h
View file @
1cdcfdf5
...
...
@@ -47,116 +47,125 @@
namespace
Nektar
{
namespace
SolverUtils
namespace
SolverUtils
{
/// Defines a callback function which evaluates the flux vector \f$ F(u)
/// \f$ in a conservative advection of the form \f$ \nabla\cdot F(u)
/// \f$.
typedef
boost
::
function
<
void
(
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>&
,
Array
<
OneD
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
>&
)
>
AdvectionFluxVecCB
;
/**
* @brief An abstract base class encapsulating the concept of advection
* of a vector field.
*
* Subclasses override the Advection::v_InitObject function to
* initialise the object and the Advection::v_Advect function to
* evaluate the advection of the vector field.
*/
class
Advection
{
public:
/// Interface function to initialise the advection object.
SOLVER_UTILS_EXPORT
void
InitObject
(
LibUtilities
::
SessionReaderSharedPtr
pSession
,
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
pFields
);
/// Interface function to advect the vector field.
SOLVER_UTILS_EXPORT
void
Advect
(
const
int
nConvectiveFields
,
const
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
&
fields
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
advVel
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
inarray
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
outarray
,
const
NekDouble
&
time
);
/**
* @brief Set the flux vector callback function.
*
* This routine is a utility function to avoid the explicit use of
* boost::bind. A function and object can be passed to this function
* instead.
*/
template
<
typename
FuncPointerT
,
typename
ObjectPointerT
>
void
SetFluxVector
(
FuncPointerT
func
,
ObjectPointerT
obj
)
{
m_fluxVector
=
boost
::
bind
(
func
,
obj
,
_1
,
_2
);
}
/**
* @brief Set a Riemann solver object for this advection object.
*
* @param riemann The RiemannSolver object.
*/
inline
void
SetRiemannSolver
(
RiemannSolverSharedPtr
riemann
)
{
m_riemann
=
riemann
;
}
/**
* @brief Set the flux vector callback function.
*
* @param fluxVector The callback function to override.
*/
inline
void
SetFluxVector
(
AdvectionFluxVecCB
fluxVector
)
{
/// Defines a callback function which evaluates the flux vector \f$ F(u)
/// \f$ in a conservative advection of the form \f$ \nabla\cdot F(u)
/// \f$.
typedef
boost
::
function
<
void
(
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>&
,
Array
<
OneD
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
>&
)
>
AdvectionFluxVecCB
;
/**
* @brief An abstract base class encapsulating the concept of advection
* of a vector field.
*
* Subclasses override the Advection::v_InitObject function to
* initialise the object and the Advection::v_Advect function to
* evaluate the advection of the vector field.
*/
class
Advection
{
public:
SOLVER_UTILS_EXPORT
void
InitObject
(
LibUtilities
::
SessionReaderSharedPtr
pSession
,
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
pFields
);
SOLVER_UTILS_EXPORT
void
Advect
(
const
int
nConvectiveFields
,
const
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
&
fields
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
advVel
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
inarray
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
outarray
,
const
NekDouble
&
time
);
/**
* @brief Set the flux vector callback function.
*
* This routine is a utility function to avoid the explicit use of
* boost::bind. A function and object can be passed to this function
* instead.
*/
template
<
typename
FuncPointerT
,
typename
ObjectPointerT
>
void
SetFluxVector
(
FuncPointerT
func
,
ObjectPointerT
obj
)
{
m_fluxVector
=
boost
::
bind
(
func
,
obj
,
_1
,
_2
);
}
/**
* @brief Set a Riemann solver object for this advection object.
*
* @param riemann The RiemannSolver object.
*/
inline
void
SetRiemannSolver
(
RiemannSolverSharedPtr
riemann
)
{
m_riemann
=
riemann
;
}
/**
* @brief Set the flux vector callback function.
*
* @param fluxVector The callback function to override.
*/
inline
void
SetFluxVector
(
AdvectionFluxVecCB
fluxVector
)
{
m_fluxVector
=
fluxVector
;
}
/**
* @brief Set the base flow used for linearised advection objects.
*
* @param inarray Vector to use as baseflow
*/
inline
void
SetBaseFlow
(
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>&
inarray
)
{
v_SetBaseFlow
(
inarray
);
}
protected:
/// Callback function to the flux vector (set when advection is in
/// conservative form).
AdvectionFluxVecCB
m_fluxVector
;
/// Riemann solver for DG-type schemes.
RiemannSolverSharedPtr
m_riemann
;
/// Storage for space dimension. Used for homogeneous extension.
int
m_spaceDim
;
SOLVER_UTILS_EXPORT
virtual
void
v_InitObject
(
LibUtilities
::
SessionReaderSharedPtr
pSession
,
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
pFields
);
SOLVER_UTILS_EXPORT
virtual
void
v_Advect
(
const
int
nConvectiveFields
,
const
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
&
fields
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
advVel
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
inarray
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
outarray
,
const
NekDouble
&
time
)
=
0
;
SOLVER_UTILS_EXPORT
virtual
void
v_SetBaseFlow
(
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
inarray
);
};
/// A shared pointer to an Advection object.
typedef
boost
::
shared_ptr
<
Advection
>
AdvectionSharedPtr
;
/// Datatype of the NekFactory used to instantiate classes derived
/// from the Advection class.
typedef
LibUtilities
::
NekFactory
<
std
::
string
,
Advection
,
std
::
string
>
AdvectionFactory
;
SOLVER_UTILS_EXPORT
AdvectionFactory
&
GetAdvectionFactory
();
m_fluxVector
=
fluxVector
;
}
/**
* @brief Set the base flow used for linearised advection objects.
*
* @param inarray Vector to use as baseflow
*/
inline
void
SetBaseFlow
(
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>&
inarray
)
{
v_SetBaseFlow
(
inarray
);
}
protected:
/// Callback function to the flux vector (set when advection is in
/// conservative form).
AdvectionFluxVecCB
m_fluxVector
;
/// Riemann solver for DG-type schemes.
RiemannSolverSharedPtr
m_riemann
;
/// Storage for space dimension. Used for homogeneous extension.
int
m_spaceDim
;
/// Initialises the advection object.
SOLVER_UTILS_EXPORT
virtual
void
v_InitObject
(
LibUtilities
::
SessionReaderSharedPtr
pSession
,
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
pFields
);
/// Advects a vector field.
SOLVER_UTILS_EXPORT
virtual
void
v_Advect
(
const
int
nConvectiveFields
,
const
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
&
fields
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
advVel
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
inarray
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
outarray
,
const
NekDouble
&
time
)
=
0
;
/// Overrides the base flow used during linearised advection
SOLVER_UTILS_EXPORT
virtual
void
v_SetBaseFlow
(
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
inarray
);
};
/// A shared pointer to an Advection object.
typedef
boost
::
shared_ptr
<
Advection
>
AdvectionSharedPtr
;
/// Datatype of the NekFactory used to instantiate classes derived
/// from the Advection class.
typedef
LibUtilities
::
NekFactory
<
std
::
string
,
Advection
,
std
::
string
>
AdvectionFactory
;
/// Gets the factory for initialising advection objects.
SOLVER_UTILS_EXPORT
AdvectionFactory
&
GetAdvectionFactory
();
}
}
#endif
library/SolverUtils/Advection/Advection3DHomogeneous1D.h
View file @
1cdcfdf5
...
...
@@ -36,8 +36,7 @@
#ifndef NEKTAR_SOLVERUTILS_ADVECTION3DHOMOGENEOUS1D
#define NEKTAR_SOLVERUTILS_ADVECTION3DHOMOGENEOUS1D
#include <SolverUtils/AdvectionSystem.h>
/// #include <SolverUtils/Advection/Advection.h>
#include <SolverUtils/Advection/Advection.h>
#include <SolverUtils/Advection/HomogeneousRSScalar.hpp>
#include <LibUtilities/BasicUtils/SessionReader.h>
#include <LibUtilities/BasicUtils/SharedArray.hpp>
...
...
@@ -74,7 +73,7 @@ namespace Nektar
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
m_advVelPlane
;
Array
<
OneD
,
Array
<
OneD
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
>
>
m_fluxVecPlane
;
virtual
void
v_InitObject
(
LibUtilities
::
SessionReaderSharedPtr
pSession
,
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
pFields
);
...
...
library/SolverUtils/Advection/AdvectionFR.h
View file @
1cdcfdf5
...
...
@@ -36,8 +36,7 @@
#ifndef NEKTAR_SOLVERUTILS_ADVECTIONFR
#define NEKTAR_SOLVERUTILS_ADVECTIONFR
#include <SolverUtils/AdvectionSystem.h>
/// #include <SolverUtils/Advection/Advection.h>
#include <SolverUtils/Advection/Advection.h>
#include <LibUtilities/BasicUtils/SessionReader.h>
#include <LibUtilities/BasicUtils/SharedArray.hpp>
...
...
@@ -88,7 +87,7 @@ namespace Nektar
const
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
&
fields
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
advVel
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
inarray
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
outarray
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
outarray
,
const
NekDouble
&
time
);
virtual
void
v_SetupMetrics
(
...
...
library/SolverUtils/Advection/AdvectionNonConservative.h
View file @
1cdcfdf5
...
...
@@ -36,8 +36,7 @@
#ifndef NEKTAR_SOLVERUTILS_ADVECTIONNONCONSERVATIVE
#define NEKTAR_SOLVERUTILS_ADVECTIONNONCONSERVATIVE
#include <SolverUtils/AdvectionSystem.h>
/// #include <SolverUtils/Advection/Advection.h>
#include <SolverUtils/Advection/Advection.h>
namespace
Nektar
{
...
...
@@ -65,7 +64,7 @@ namespace Nektar
const
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
&
fields
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
advVel
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
inarray
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
outarray
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
outarray
,
const
NekDouble
&
time
);
};
}
...
...
library/SolverUtils/Advection/AdvectionWeakDG.h
View file @
1cdcfdf5
...
...
@@ -36,8 +36,7 @@
#ifndef NEKTAR_SOLVERUTILS_ADVECTIONWEAKDG
#define NEKTAR_SOLVERUTILS_ADVECTIONWEAKDG
#include <SolverUtils/AdvectionSystem.h>
/// #include <SolverUtils/Advection/Advection.h>
#include <SolverUtils/Advection/Advection.h>
namespace
Nektar
{
...
...
@@ -65,7 +64,7 @@ namespace Nektar
const
Array
<
OneD
,
MultiRegions
::
ExpListSharedPtr
>
&
fields
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
advVel
,
const
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
inarray
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
outarray
,
Array
<
OneD
,
Array
<
OneD
,
NekDouble
>
>
&
outarray
,
const
NekDouble
&
time
);
};
}
...
...
library/SolverUtils/AdvectionSystem.cpp
View file @
1cdcfdf5
...
...
@@ -8,22 +8,34 @@
#include <SolverUtils/AdvectionSystem.h>
namespace
Nektar
{
namespace
SolverUtils
{
AdvectionSystem
::
AdvectionSystem
(
const
LibUtilities
::
SessionReaderSharedPtr
&
pSession
)
:
UnsteadySystem
(
pSession
)
{
}
AdvectionSystem
::~
AdvectionSystem
()
{
}
void
AdvectionSystem
::
v_InitObject
()
{
UnsteadySystem
::
v_InitObject
();
}
}
namespace
SolverUtils
{
/**
*
*/
AdvectionSystem
::
AdvectionSystem
(
const
LibUtilities
::
SessionReaderSharedPtr
&
pSession
)
:
UnsteadySystem
(
pSession
)
{
}
/**
*
*/
AdvectionSystem
::~
AdvectionSystem
()
{
}
/**
*
*/
void
AdvectionSystem
::
v_InitObject
()
{
UnsteadySystem
::
v_InitObject
();
}
}
}
library/SolverUtils/AdvectionSystem.h
View file @
1cdcfdf5
...
...
@@ -39,31 +39,35 @@
#include <SolverUtils/UnsteadySystem.h>
#include <SolverUtils/Advection/Advection.h>
namespace
Nektar
{
namespace
SolverUtils
{
class
AdvectionSystem
:
public
UnsteadySystem
{
public:
SOLVER_UTILS_EXPORT
AdvectionSystem
(
const
LibUtilities
::
SessionReaderSharedPtr
&
pSession
);
SOLVER_UTILS_EXPORT
virtual
~
AdvectionSystem
();
SOLVER_UTILS_EXPORT
virtual
void
v_InitObject
();
namespace
SolverUtils
{
/// A base class for PDEs which include an advection component
class
AdvectionSystem
:
virtual
public
UnsteadySystem
{
public:
SOLVER_UTILS_EXPORT
AdvectionSystem
(
const
LibUtilities
::
SessionReaderSharedPtr
&
pSession
);
AdvectionSharedPtr
GetAdvObject
()
{
return
m_advObject
;
}
SOLVER_UTILS_EXPORT
virtual
~
AdvectionSystem
();
protected:
/// Advection term
SolverUtils
::
AdvectionSharedPtr
m_advObject
;
};
typedef
boost
::
shared_ptr
<
AdvectionSystem
>
AdvectionSystemSharedPtr
;
SOLVER_UTILS_EXPORT
virtual
void
v_InitObject
();
/// Returns the advection object held by this instance.
AdvectionSharedPtr
GetAdvObject
()
{
return
m_advObject
;
}
protected:
/// Advection term
SolverUtils
::
AdvectionSharedPtr
m_advObject
;
};
/// Shared pointer to an AdvectionSystem class
typedef
boost
::
shared_ptr
<
AdvectionSystem
>
AdvectionSystemSharedPtr
;
}
}
#endif
library/SolverUtils/DriverSteadyState.cpp
View file @
1cdcfdf5
...
...
@@ -78,14 +78,9 @@ namespace Nektar
m_equ
[
0
]
->
PrintSummary
(
out
);
m_equ
[
0
]
->
DoInitialise
();
////////////////////////////////////////////////////////////////////////////////////////////////////////////
AdvectionSystemSharedPtr
A
=
boost
::
dynamic_pointer_cast
<
AdvectionSystem
>
(
m_equ
[
0
]);
////////////////////////////////////////////////////////////////////////////////////////////////////////////
// - SFD Routine -
// Compressible case
NumVar_SFD
=
m_equ
[
0
]
->
UpdateFields
()[
0
]
->
GetCoordim
(
0
);
...
...
@@ -141,13 +136,9 @@ namespace Nektar
MaxNormDiff_q_qBar
=
1.0
;
MaxNormDiff_q1_q0
=
1.0
;
Min_MaxNormDiff_q_qBar
=
MaxNormDiff_q_qBar
;