Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Frida
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coenen, Joachim
Frida
Commits
30c0415b
Commit
30c0415b
authored
9 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
layout
parent
caf4b647
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pub/lib/plot.cpp
+6
-26
6 additions, 26 deletions
pub/lib/plot.cpp
with
6 additions
and
26 deletions
pub/lib/plot.cpp
+
6
−
26
View file @
30c0415b
...
@@ -147,9 +147,8 @@ int plot_data( CPlot* plot, ROld fd, int k, int j, int pstyle )
...
@@ -147,9 +147,8 @@ int plot_data( CPlot* plot, ROld fd, int k, int j, int pstyle )
if
(
!
plot
->
Y
.
force
)
if
(
!
plot
->
Y
.
force
)
continue
;
continue
;
}
}
if
(
np
==
plot
->
maxpoints
&&
np
<
n
)
{
if
(
np
==
plot
->
maxpoints
&&
np
<
n
)
cout
<<
"reached maxpoints at "
<<
s
->
x
[
i
]
<<
"
\n
"
;
cout
<<
"reached maxpoints at "
<<
s
->
x
[
i
]
<<
"
\n
"
;
}
xp
.
push_back
(
x
);
xp
.
push_back
(
x
);
yp
.
push_back
(
y
);
yp
.
push_back
(
y
);
if
(
s
->
has_dy
()
)
if
(
s
->
has_dy
()
)
...
@@ -203,8 +202,7 @@ int plot_curve_convolved( CPlot* plot, ROlc fc, int k, int j, int cstyle )
...
@@ -203,8 +202,7 @@ int plot_curve_convolved( CPlot* plot, ROlc fc, int k, int j, int cstyle )
yo
.
push_back
(
yp
);
yo
.
push_back
(
yp
);
}
}
if
(
xo
.
size
()
==
0
){
if
(
xo
.
size
()
==
0
){
cout
<<
"curve k="
<<
S
(
k
)
<<
", j="
<<
S
(
j
)
<<
cout
<<
"curve k="
<<
S
(
k
)
<<
", j="
<<
S
(
j
)
<<
" has no points in plot window
\n
"
;
" has no points in plot window
\n
"
;
}
}
plot
->
add_spec
(
true
,
true
,
cstyle
,
xo
,
yo
,
novec
,
fc
->
V
[
j
]
->
z_str
(),
plot
->
add_spec
(
true
,
true
,
cstyle
,
xo
,
yo
,
novec
,
fc
->
V
[
j
]
->
z_str
(),
fc
->
xco
.
str_std
(),
fc
->
yco
.
str_std
(),
fc
->
xco
.
str_std
(),
fc
->
yco
.
str_std
(),
...
@@ -285,8 +283,7 @@ int plot_curve_refine( CPlot* plot, ROlc fc, int k, int j, int cstyle )
...
@@ -285,8 +283,7 @@ int plot_curve_refine( CPlot* plot, ROlc fc, int k, int j, int cstyle )
if
(
!
xc
.
size
()
){
if
(
!
xc
.
size
()
){
if
(
!
iref
)
if
(
!
iref
)
throw
S
(
"BUG: plot_curve_refine called with xc.size()=0"
);
throw
S
(
"BUG: plot_curve_refine called with xc.size()=0"
);
else
break
;
// regular exit
break
;
// regular exit
}
}
// evaluate curve for grid xc:
// evaluate curve for grid xc:
RObjVecDbl
cu
=
PCAST
<
const
CObjVecDbl
>
(
fc
->
eval_curve
(
xc
,
k
,
j
,
false
)
);
RObjVecDbl
cu
=
PCAST
<
const
CObjVecDbl
>
(
fc
->
eval_curve
(
xc
,
k
,
j
,
false
)
);
...
@@ -322,11 +319,6 @@ int plot_curve_refine( CPlot* plot, ROlc fc, int k, int j, int cstyle )
...
@@ -322,11 +319,6 @@ int plot_curve_refine( CPlot* plot, ROlc fc, int k, int j, int cstyle )
}
}
xn
=
xa
;
yn
=
ya
;
xn
=
xa
;
yn
=
ya
;
}
}
// cout << "DEB merger -> " << xn.size() << "\n";
// for ( int i=0; i<xn.size(); ++i )
// printf ("DEB xn yn %12.6g %12.6g\n", xn[i], yn[i] );
// end of loop
if
(
iref
>=
10
||
xn
.
size
()
>=
plot
->
maxpoints
)
if
(
iref
>=
10
||
xn
.
size
()
>=
plot
->
maxpoints
)
break
;
// alternate exit: too many refinements or too many points
break
;
// alternate exit: too many refinements or too many points
...
@@ -354,9 +346,6 @@ int plot_curve_refine( CPlot* plot, ROlc fc, int k, int j, int cstyle )
...
@@ -354,9 +346,6 @@ int plot_curve_refine( CPlot* plot, ROlc fc, int k, int j, int cstyle )
xa
.
push_back
(
xn
.
back
()
);
xa
.
push_back
(
xn
.
back
()
);
ya
.
push_back
(
yn
.
back
()
);
ya
.
push_back
(
yn
.
back
()
);
xn
=
xa
;
yn
=
ya
;
xn
=
xa
;
yn
=
ya
;
// cout << "DEB within frame -> " << xn.size() << "\n";
// for ( int i=0; i<xn.size(); ++i )
// printf ("DEB xy %12.6g %12.6g\n", xn[i], yn[i] );
// set additional base points:
// set additional base points:
bool
insert_next
=
false
;
bool
insert_next
=
false
;
...
@@ -368,22 +357,17 @@ int plot_curve_refine( CPlot* plot, ROlc fc, int k, int j, int cstyle )
...
@@ -368,22 +357,17 @@ int plot_curve_refine( CPlot* plot, ROlc fc, int k, int j, int cstyle )
(
xn
[
i
+
1
]
-
xn
[
i
-
1
]);
(
xn
[
i
+
1
]
-
xn
[
i
-
1
]);
if
(
!
plot
->
Y
.
close_enough
(
yn
[
i
],
yi
,
0.005
)
)
{
if
(
!
plot
->
Y
.
close_enough
(
yn
[
i
],
yi
,
0.005
)
)
{
xc
.
push_back
(
(
xn
[
i
-
1
]
+
xn
[
i
])
/
2
);
xc
.
push_back
(
(
xn
[
i
-
1
]
+
xn
[
i
])
/
2
);
// cout << "DEB disc " << xc.back() << "\n";
insert_next
=
true
;
insert_next
=
true
;
continue
;
continue
;
}
}
}
}
if
(
insert_next
)
{
if
(
insert_next
)
{
xc
.
push_back
(
(
xn
[
i
-
1
]
+
xn
[
i
])
/
2
);
xc
.
push_back
(
(
xn
[
i
-
1
]
+
xn
[
i
])
/
2
);
// cout << "DEB next " << xc.back() << "\n";
insert_next
=
false
;
insert_next
=
false
;
continue
;
continue
;
}
}
if
(
(
plot
->
Y
.
contains
(
yn
[
i
])
&&
if
(
(
plot
->
Y
.
contains
(
yn
[
i
])
&&
!
plot
->
Y
.
contains
(
yn
[
i
-
1
])
)
||
!
plot
->
Y
.
contains
(
yn
[
i
-
1
])
)
||
(
!
plot
->
Y
.
contains
(
yn
[
i
])
&&
plot
->
Y
.
contains
(
yn
[
i
-
1
])
)
)
{
(
!
plot
->
Y
.
contains
(
yn
[
i
])
&&
plot
->
Y
.
contains
(
yn
[
i
-
1
])
)
)
{
// cout << "DEB edge " << xc.back() << "\n";
xc
.
push_back
(
(
xn
[
i
-
1
]
+
xn
[
i
])
/
2
);
xc
.
push_back
(
(
xn
[
i
-
1
]
+
xn
[
i
])
/
2
);
continue
;
continue
;
}
}
...
@@ -407,7 +391,6 @@ int plot_curve_refine( CPlot* plot, ROlc fc, int k, int j, int cstyle )
...
@@ -407,7 +391,6 @@ int plot_curve_refine( CPlot* plot, ROlc fc, int k, int j, int cstyle )
if
(
!
plot
->
Y
.
contains
(
yn
[
i
])
||
i
==
xn
.
size
()
-
1
)
{
if
(
!
plot
->
Y
.
contains
(
yn
[
i
])
||
i
==
xn
.
size
()
-
1
)
{
npts
+=
xa
.
size
();
npts
+=
xa
.
size
();
if
(
xa
.
size
()
){
if
(
xa
.
size
()
){
// cout << "DEB segment -> " << xa.size() << "\n";
plot
->
add_spec
(
plot
->
add_spec
(
true
,
first_seg
,
cstyle
,
xa
,
ya
,
novec
,
fc
->
V
[
j
]
->
z_str
(),
true
,
first_seg
,
cstyle
,
xa
,
ya
,
novec
,
fc
->
V
[
j
]
->
z_str
(),
fc
->
xco
.
str_std
(),
fc
->
yco
.
str_std
(),
fc
->
xco
.
str_std
(),
fc
->
yco
.
str_std
(),
...
@@ -490,7 +473,6 @@ void NPlot::plot( class CPlot *plot, bool add, const string& mode )
...
@@ -490,7 +473,6 @@ void NPlot::plot( class CPlot *plot, bool add, const string& mode )
if
(
fd
)
{
if
(
fd
)
{
if
(
!
plot_data
(
plot
,
fd
,
k
,
j
,
pstyle
)
)
if
(
!
plot_data
(
plot
,
fd
,
k
,
j
,
pstyle
)
)
continue
;
continue
;
}
else
if
(
fc
)
{
}
else
if
(
fc
)
{
if
(
fc
->
kconv
!=-
1
)
{
if
(
fc
->
kconv
!=-
1
)
{
if
(
!
plot_curve_convolved
(
plot
,
fc
,
k
,
j
,
cstyle
)
)
if
(
!
plot_curve_convolved
(
plot
,
fc
,
k
,
j
,
cstyle
)
)
...
@@ -505,10 +487,8 @@ void NPlot::plot( class CPlot *plot, bool add, const string& mode )
...
@@ -505,10 +487,8 @@ void NPlot::plot( class CPlot *plot, bool add, const string& mode )
if
(
!
plot_curve_refine
(
plot
,
fc
,
k
,
j
,
cstyle
)
)
if
(
!
plot_curve_refine
(
plot
,
fc
,
k
,
j
,
cstyle
)
)
continue
;
continue
;
}
}
}
else
}
else
{
throw
S
(
"PROGRAM ERROR plot: unexpected file type"
);
throw
S
(
"PROGRAM ERROR plot: unexpected file type"
);
}
if
(
fd
)
{
if
(
fd
)
{
plot
->
doc_PtTxLine
(
" "
+
f
->
info_line
(
j
),
pstyle
);
plot
->
doc_PtTxLine
(
" "
+
f
->
info_line
(
j
),
pstyle
);
...
...
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