Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Nektar
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
84
Issues
84
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
43
Merge Requests
43
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
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