Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
Nektar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Spencer Sherwin
Nektar
Commits
f3d6c6df
Commit
f3d6c6df
authored
9 years ago
by
Chris Cantwell
Browse files
Options
Downloads
Patches
Plain Diff
Fix for eigenvalue regex.
parent
e63d105e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/MetricEigenvalue.cpp
+8
-5
8 additions, 5 deletions
tests/MetricEigenvalue.cpp
with
8 additions
and
5 deletions
tests/MetricEigenvalue.cpp
+
8
−
5
View file @
f3d6c6df
...
...
@@ -51,11 +51,14 @@ namespace Nektar
// We do not mind which order the converged eigenvalues are listed.
m_unordered
=
true
;
// Set up the regular expression. This (optionally) matches a variable
// name if it exists: first field is variable name, second field is L2
// error.
std
::
string
fp
=
"([+-]?
\\
d*
\\
.?
\\
d*(?:e[+-]
\\
d*)?)"
;
m_regex
=
"^EV:
\\
s+
\\
d*
\\
s+"
+
fp
+
"
\\
s+"
+
fp
+
"
\\
s+.*"
;
// Regex for FP numbers of forms: 120, -23, 4.345, 2.4563e-01, -nan
std
::
string
fp
=
"-?
\\
d+
\\
.?
\\
d*(?:e[+-]
\\
d+)?|-?nan"
;
// Set up the regular expression. This matches lines beginning with EV:
// followed by an eigenvalue index and then at least 2 floating-point
// values comprising real and imaginary components of complex evals.
// Comparison is made only on the captured eigenvalue components.
m_regex
=
"^EV:
\\
s+
\\
d+
\\
s+("
+
fp
+
")
\\
s+("
+
fp
+
").*"
;
// Find the number of iterations to match against.
TiXmlElement
*
value
=
metric
->
FirstChildElement
(
"value"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment