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
320110cd
Commit
320110cd
authored
14 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
restored oi and oixy (untested)
parent
87835ad5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pub/src/opr.cpp
+56
-73
56 additions, 73 deletions
pub/src/opr.cpp
pub/src/special2.cpp
+1
-1
1 addition, 1 deletion
pub/src/special2.cpp
with
57 additions
and
74 deletions
pub/src/opr.cpp
+
56
−
73
View file @
320110cd
...
@@ -168,7 +168,9 @@ void NOperate::Pointwise( string llabel )
...
@@ -168,7 +168,9 @@ void NOperate::Pointwise( string llabel )
POlc
fc
=
P2C
(
fin
);
POlc
fc
=
P2C
(
fin
);
POlo
fout
(
fin
->
new_olo
()
);
POlo
fout
(
fin
->
new_olo
()
);
fout
->
lDoc
.
push_back
(
"o"
+
lref
.
ref_info
()
+
" "
+
expr
);
if
(
lref
.
var
!=
CRef
::
_FP
)
fout
->
lDoc
.
push_back
(
"o"
+
lref
.
ref_info
()
+
" "
+
expr
);
if
(
lref
.
pointwise
()
&&
!
fd
)
if
(
lref
.
pointwise
()
&&
!
fd
)
throw
string
(
"no pointwise operation on curve"
);
throw
string
(
"no pointwise operation on curve"
);
...
@@ -233,67 +235,57 @@ void NOperate::Integral(void)
...
@@ -233,67 +235,57 @@ void NOperate::Integral(void)
{
{
NOlm
::
SelAssert
();
NOlm
::
SelAssert
();
throw
string
(
"TODO broken after V rewrite"
);
/*
string
expr
=
sask
(
"Functional ?"
);
string
expr
=
sask
(
"Functional ?"
);
if
(
expr
==
""
)
return
;
if
(
expr
==
""
)
return
;
PTree
T
;
PTree
T
;
user_xaxparse
(
expr
.
c_str
(),
&
T
);
user_xaxparse
(
expr
.
c_str
(),
&
T
);
NOlm::IterateD fiter;
NOlm
::
IterateO
fiter
;
COld *fin, fout;
POlo
fin
;
COlo *f;
CSpec S;
CCoord zco;
double xval, zval, result;
bool savable;
uint k, nz;
while
(
(
fin
=
fiter
())
)
{
while
(
(
fin
=
fiter
())
)
{
k = fiter.k();
uint
k
=
fiter
.
k
();
nz = fin->ZCo.size();
uint
nz
=
fin
->
ZCo
.
size
();
savable = nz > 0;
bool
savable
=
nz
>
0
;
fout = *fin;
POld
fd
=
P2D
(
fin
);
f = (COlo*) fin;
POlc
fc
=
P2C
(
fin
);
fout->VS.clear();
if (savable) {
fout->lDoc.push_back( "oi " +expr );
zco = fin->ZCo.back();
POlo
fout
(
fin
->
new_olo
()
);
fout->ZCo.pop_back();
fout->xco = zco;
T->coord(&(fout->yco), k);
fout
->
lDoc
.
push_back
(
"oi "
+
expr
);
}
fout
->
ZCo
.
pop_back
();
fout
->
xco
=
fin
->
ZCo
.
back
();
T
->
coord
(
&
(
fout
->
yco
),
k
);
PSpec
sout
(
new
CSpec
);
sout
->
z
=
fin
->
V
[
0
]
->
z
;
sout
->
z
.
pop_back
();
S.clear();
for
(
uint
j
=
0
;
j
<
fin
->
nJ
();
j
++
)
{
S.z = fin->VS[0].z;
double
xval
,
zval
,
result
;
S.z.pop_back();
for ( uint j=0; j<fin->nSpec(); j++ ) {
T
->
tree_point_val
(
&
result
,
k
,
j
);
T
->
tree_point_val
(
&
result
,
k
,
j
);
if
(
!
savable
)
{
if
(
!
savable
)
{
cout << "result
s
: " << result << "\n";
cout
<<
"result: "
<<
result
<<
"
\n
"
;
break
;
continue
;
}
}
xval = fin->V
S
[j]
.
z[nz-1];
xval
=
fin
->
V
[
j
]
->
z
[
nz
-
1
];
S.
push_xy( xval, result );
sout
->
push_xy
(
xval
,
result
);
if
(
nz
>=
2
)
{
// new spectrum if jump in other z values
if
(
nz
>=
2
)
{
// new spectrum if jump in other z values
zval = fin->VS[j].z[nz-2];
zval
=
fin
->
V
[
j
]
->
z
[
nz
-
2
];
if ((j+1)<fin->VS.size() &&
if
(
j
+
1
<
fin
->
nJ
()
&&
fin
->
V
[
j
+
1
]
->
z
[
nz
-
2
]
!=
zval
)
{
fin->VS[j+1].z[nz-2]!=zval) {
fout
->
V
.
push_back
(
sout
);
fout->VS.push_back( S );
sout
=
PSpec
(
new
CSpec
);
S.clear();
sout
->
z
=
fin
->
V
[
j
+
1
]
->
z
;
S.z = fin->VS[j+1].z;
sout
->
z
.
pop_back
();
S.z.pop_back();
}
}
}
}
}
}
if
(
savable
)
{
if
(
savable
)
{
fout->V
S
.push_back(
S
);
fout
->
V
.
push_back
(
sout
);
NOlm::OloAdd( fout );
NOlm
::
OloAdd
(
fout
,
fiter
.
k
()
);
}
}
}
}
*/
};
};
...
@@ -303,8 +295,6 @@ void NOperate::IntXY(void)
...
@@ -303,8 +295,6 @@ void NOperate::IntXY(void)
{
{
NOlm
::
SelAssert
();
NOlm
::
SelAssert
();
throw
string
(
"TODO broken after V rewrite"
);
/*
static
int
icolx
=
0
,
icoly
=
1
;
static
int
icolx
=
0
,
icoly
=
1
;
static
CCoord
xco
,
yco
;
static
CCoord
xco
,
yco
;
icolx
=
iask
(
"x from column"
,
icolx
);
icolx
=
iask
(
"x from column"
,
icolx
);
...
@@ -315,49 +305,42 @@ void NOperate::IntXY(void)
...
@@ -315,49 +305,42 @@ void NOperate::IntXY(void)
yco
=
CCoord
(
"y"
,
""
);
// .Ask( "y coordinate", ASK_DEF_GIVEN, yco );
yco
=
CCoord
(
"y"
,
""
);
// .Ask( "y coordinate", ASK_DEF_GIVEN, yco );
NOlm
::
IterateD
fiter
;
NOlm
::
IterateD
fiter
;
COld *fin, fout;
POld
fin
;
COlo *f;
CSpec S;
CCoord zco;
double zval;
uint k, nz, n;
while
(
(
fin
=
fiter
())
)
{
while
(
(
fin
=
fiter
())
)
{
k = fiter.k();
uint
nz
=
fin
->
ZCo
.
size
();
nz = fin->ZCo.size();
if
(
nz
<
1
)
if
(
nz
<
1
)
throw
"no z in file "
+
strg
(
fiter
.
k
());
throw
"no z in file "
+
strg
(
fiter
.
k
());
fout = *fin;
f = (COlo*) fin
;
POld
fout
(
new
COld
(
*
fin
)
)
;
fout->V
S
.clear();
fout
->
V
.
clear
();
fout
->
lDoc
.
push_back
(
"oixy "
+
strg
(
icolx
)
+
" "
+
strg
(
icoly
)
);
fout
->
lDoc
.
push_back
(
"oixy "
+
strg
(
icolx
)
+
" "
+
strg
(
icoly
)
);
fout
->
ZCo
.
pop_back
();
fout
->
ZCo
.
pop_back
();
fout
->
xco
=
xco
;
fout
->
xco
=
xco
;
fout
->
yco
=
yco
;
fout
->
yco
=
yco
;
S.clear();
if( !(fin->n
Spec
())
)
PSpec
sout
(
new
C
Spec
)
;
throw string( "input file has no spectra" )
;
sout
->
z
=
fin
->
V
[
0
]
->
z
;
S.z = fin->VS[0].z
;
sout
->
z
.
pop_back
()
;
S.z.pop_back();
for (uint j=0; j<fin->n
Spec
(); j++) {
for
(
uint
j
=
0
;
j
<
fin
->
n
J
();
j
++
)
{
n = fin->
VS[j].size(
);
uint
n
=
fin
->
nPts
(
j
);
if
(
icolx
>=
n
||
icoly
>=
n
)
if
(
icolx
>=
n
||
icoly
>=
n
)
throw
"not enough columns in spectrum "
+
strg
(
j
);
throw
"not enough columns in spectrum "
+
strg
(
j
);
S.
push_xy( fin->VS
[j].
y[icolx], fin->VS
[j].
y[icoly] );
sout
->
push_xy
(
fin
->
VS
(
j
)
->
y
[
icolx
],
fin
->
VS
(
j
)
->
y
[
icoly
]
);
if
(
nz
>=
2
)
{
// new spectrum if jump in other z values
if
(
nz
>=
2
)
{
// new spectrum if jump in other z values
zval = fin->VS[j].z[nz-2];
double
zval
=
fin
->
V
[
j
]
->
z
[
nz
-
2
];
if ((j+1)<fin->VS.size() &&
if
(
j
+
1
<
fin
->
nJ
()
&&
fin
->
V
[
j
+
1
]
->
z
[
nz
-
2
]
!=
zval
)
{
fin->VS[j+1].z[nz-2]!=zval) {
fout
->
V
.
push_back
(
sout
);
fout->VS.push_back(S);
sout
=
PSpec
(
new
CSpec
);
S.clear();
sout
->
z
=
fin
->
V
[
j
+
1
]
->
z
;
S.z = fin->VS[j+1].z;
sout
->
z
.
pop_back
();
S.z.pop_back();
}
}
}
}
}
}
fout->V
S
.push_back(
S
);
fout
->
V
.
push_back
(
sout
);
NOlm::OloAdd( fout );
NOlm
::
OloAdd
(
fout
,
fiter
.
k
()
);
}
}
*/
};
};
...
...
This diff is collapsed.
Click to expand it.
pub/src/special2.cpp
+
1
−
1
View file @
320110cd
...
@@ -46,7 +46,7 @@ void NSpecial::FourierCosine(void)
...
@@ -46,7 +46,7 @@ void NSpecial::FourierCosine(void)
n
=
sin
->
size
();
n
=
sin
->
size
();
plan
=
fftw_plan_r2r_1d
(
plan
=
fftw_plan_r2r_1d
(
n
,
&
(
S
in
->
y
[
0
]),
&
(
S
out
->
y
[
0
]),
n
,
&
(
s
in
->
y
[
0
]),
&
(
s
out
->
y
[
0
]),
FFTW_REDFT00
,
FFTW_ESTIMATE
);
FFTW_REDFT00
,
FFTW_ESTIMATE
);
nold
=
n
;
// currently not used
nold
=
n
;
// currently not used
fftw_execute
(
plan
);
fftw_execute
(
plan
);
...
...
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