Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Nektar
Nektar
Commits
b9a2c5eb
Commit
b9a2c5eb
authored
Jun 06, 2018
by
David Moxey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some changes to remove Tester dependency on Nektar++
parent
47bbe1d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
+25
-6
tests/Metric.h
tests/Metric.h
+23
-5
tests/TestData.cpp
tests/TestData.cpp
+2
-1
No files found.
tests/Metric.h
View file @
b9a2c5eb
...
...
@@ -38,10 +38,11 @@
#include <tinyxml.h>
#include <string>
#include <LibUtilities/BasicUtils/NekFactory.hpp>
#include <map>
#include <boost/filesystem.hpp>
#define ASSERTL0(condition,msg)
namespace
fs
=
boost
::
filesystem
;
std
::
string
PortablePath
(
const
boost
::
filesystem
::
path
&
path
);
...
...
@@ -75,11 +76,28 @@ namespace Nektar
/// A shared pointer to an EquationSystem object
typedef
std
::
shared_ptr
<
Metric
>
MetricSharedPtr
;
/// Datatype of the NekFactory used to instantiate classes derived from the
/// Advection class.
typedef
LibUtilities
::
NekFactory
<
std
::
string
,
Metric
,
TiXmlElement
*
,
bool
>
MetricFactory
;
struct
MetricFactory
{
typedef
MetricSharedPtr
(
*
CreatorFunction
)(
TiXmlElement
*
,
bool
);
std
::
string
RegisterCreatorFunction
(
std
::
string
key
,
CreatorFunction
func
)
{
m_map
[
key
]
=
func
;
return
key
;
}
MetricSharedPtr
CreateInstance
(
std
::
string
key
,
TiXmlElement
*
elmt
,
bool
generate
)
{
return
m_map
[
key
](
elmt
,
generate
);
}
private:
std
::
map
<
std
::
string
,
CreatorFunction
>
m_map
;
};
MetricFactory
&
GetMetricFactory
();
}
...
...
tests/TestData.cpp
View file @
b9a2c5eb
...
...
@@ -35,10 +35,11 @@
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
#include <LibUtilities/BasicUtils/ErrorUtil.hpp>
#include <TestData.h>
#define ASSERTL0(condition,msg)
using
namespace
std
;
namespace
Nektar
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment