Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NP_TMcode
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
e57ecd0b
Commit
e57ecd0b
authored
1 year ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Remove debug code from configuration module
parent
26321e08
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Configuration.cpp
+4
-27
4 additions, 27 deletions
src/Configuration.cpp
with
4 additions
and
27 deletions
src/Configuration.cpp
+
4
−
27
View file @
e57ecd0b
...
@@ -128,10 +128,10 @@ GeometryConfiguration* GeometryConfiguration::from_legacy(string file_name) {
...
@@ -128,10 +128,10 @@ GeometryConfiguration* GeometryConfiguration::from_legacy(string file_name) {
GeometryConfiguration
*
conf
=
new
GeometryConfiguration
(
GeometryConfiguration
*
conf
=
new
GeometryConfiguration
(
nsph
,
lm
,
_in_pol
,
_npnt
,
_npntts
,
isam
,
nsph
,
lm
,
_in_pol
,
_npnt
,
_npntts
,
isam
,
x
,
y
,
z
,
x
,
y
,
z
,
in_th_start
,
in_th_
end
,
in_th_
step
,
in_th_start
,
in_th_
step
,
in_th_
end
,
sc_th_start
,
sc_th_
end
,
sc_th_
step
,
sc_th_start
,
sc_th_
step
,
sc_th_
end
,
in_ph_start
,
in_ph_
end
,
in_ph_
step
,
in_ph_start
,
in_ph_
step
,
in_ph_
end
,
sc_ph_start
,
sc_ph_
end
,
sc_ph_
step
,
sc_ph_start
,
sc_ph_
step
,
sc_ph_
end
,
_jwtm
_jwtm
);
);
return
conf
;
return
conf
;
...
@@ -301,8 +301,6 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
...
@@ -301,8 +301,6 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
int
nsph
,
ies
;
int
nsph
,
ies
;
int
max_ici
=
0
;
int
max_ici
=
0
;
sscanf
(
file_lines
[
last_read_line
].
c_str
(),
" %d %d"
,
&
nsph
,
&
ies
);
sscanf
(
file_lines
[
last_read_line
].
c_str
(),
" %d %d"
,
&
nsph
,
&
ies
);
//printf("DEBUG: %s\n", file_lines[last_read_line].c_str());
//printf("DEBUG: nsph = %d, ies = %d\n", nsph, ies);
if
(
ies
!=
0
)
ies
=
1
;
if
(
ies
!=
0
)
ies
=
1
;
double
_exdc
,
_wp
,
_xip
;
double
_exdc
,
_wp
,
_xip
;
int
exdc_exp
,
wp_exp
,
xip_exp
;
int
exdc_exp
,
wp_exp
,
xip_exp
;
...
@@ -315,11 +313,9 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
...
@@ -315,11 +313,9 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
&
_xip
,
&
xip_exp
,
&
_xip
,
&
xip_exp
,
&
_idfc
,
&
nxi
,
&
instpc
,
&
insn
&
_idfc
,
&
nxi
,
&
instpc
,
&
insn
);
);
//printf("DEBUG: %s\n", file_lines[last_read_line].c_str());
_exdc
*=
pow
(
10.0
,
1.0
*
1.0
*
exdc_exp
);
_exdc
*=
pow
(
10.0
,
1.0
*
1.0
*
exdc_exp
);
_wp
*=
pow
(
10.0
,
1.0
*
wp_exp
);
_wp
*=
pow
(
10.0
,
1.0
*
wp_exp
);
_xip
*=
pow
(
10.0
,
1.0
*
xip_exp
);
_xip
*=
pow
(
10.0
,
1.0
*
xip_exp
);
//printf("DEBUG: exdc = %lg, wp = %lg, xip = %lg, idfc = %d, nxi = %d, instpc = %d, insn = %d\n", _exdc, _wp, _xip, _idfc, nxi, instpc, insn);
double
*
variable_vector
;
double
*
variable_vector
;
string
variable_name
;
string
variable_name
;
...
@@ -331,26 +327,20 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
...
@@ -331,26 +327,20 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
int
xi_exp
;
int
xi_exp
;
List
<
double
>
xi_vector
;
List
<
double
>
xi_vector
;
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" %9lE D%d"
,
&
xi
,
&
xi_exp
);
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" %9lE D%d"
,
&
xi
,
&
xi_exp
);
//printf("DEBUG: %s\n", file_lines[last_read_line].c_str());
xi
*=
pow
(
10.0
,
1.0
*
xi_exp
);
xi
*=
pow
(
10.0
,
1.0
*
xi_exp
);
xi_vector
.
set
(
0
,
xi
);
xi_vector
.
set
(
0
,
xi
);
//printf("DEBUG: xi = %lg\n", xi);
for
(
int
jxi310
=
1
;
jxi310
<
nxi
;
jxi310
++
)
{
for
(
int
jxi310
=
1
;
jxi310
<
nxi
;
jxi310
++
)
{
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" %9lE D%d"
,
&
xi
,
&
xi_exp
);
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" %9lE D%d"
,
&
xi
,
&
xi_exp
);
//printf("DEBUG: %s\n", file_lines[last_read_line].c_str());
xi
*=
pow
(
10.0
,
1.0
*
xi_exp
);
xi
*=
pow
(
10.0
,
1.0
*
xi_exp
);
xi_vector
.
append
(
xi
);
xi_vector
.
append
(
xi
);
//printf("DEBUG: xi = %lg\n", xi);
}
}
variable_vector
=
xi_vector
.
to_array
();
variable_vector
=
xi_vector
.
to_array
();
}
else
{
// instpc >= 1: the variable vector is defined in steps
}
else
{
// instpc >= 1: the variable vector is defined in steps
double
xi
,
xi_step
;
double
xi
,
xi_step
;
int
xi_exp
,
xi_step_exp
;
int
xi_exp
,
xi_step_exp
;
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" %9lE D%d %9lE D%d"
,
&
xi
,
&
xi_exp
,
&
xi_step
,
&
xi_step_exp
);
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" %9lE D%d %9lE D%d"
,
&
xi
,
&
xi_exp
,
&
xi_step
,
&
xi_step_exp
);
//printf("DEBUG: %s\n", file_lines[last_read_line].c_str());
xi
*=
pow
(
10.0
,
1.0
*
xi_exp
);
xi
*=
pow
(
10.0
,
1.0
*
xi_exp
);
xi_step
*=
pow
(
10.0
,
1.0
*
xi_step_exp
);
xi_step
*=
pow
(
10.0
,
1.0
*
xi_step_exp
);
//printf("DEBUG: xi = %lg, xi_step = %lg\n", xi, xi_step);
variable_vector
=
new
double
[
nxi
];
variable_vector
=
new
double
[
nxi
];
for
(
int
jxi320
=
0
;
jxi320
<
nxi
;
jxi320
++
)
{
for
(
int
jxi320
=
0
;
jxi320
<
nxi
;
jxi320
++
)
{
variable_vector
[
jxi320
]
=
xi
;
variable_vector
[
jxi320
]
=
xi
;
...
@@ -364,9 +354,7 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
...
@@ -364,9 +354,7 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
int
vs_exp
;
int
vs_exp
;
for
(
int
jxi_r
=
0
;
jxi_r
<
nxi
;
jxi_r
++
)
{
for
(
int
jxi_r
=
0
;
jxi_r
<
nxi
;
jxi_r
++
)
{
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" %lf D%d"
,
&
vs
,
&
vs_exp
);
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" %lf D%d"
,
&
vs
,
&
vs_exp
);
//printf("DEBUG: %s\n", file_lines[last_read_line].c_str());
vs
*=
pow
(
10.0
,
1.0
*
vs_exp
);
vs
*=
pow
(
10.0
,
1.0
*
vs_exp
);
//printf("DEBUG: vs = %lg\n", vs);
variable_vector
[
jxi_r
]
=
vs
;
variable_vector
[
jxi_r
]
=
vs
;
}
}
switch
(
insn
)
{
switch
(
insn
)
{
...
@@ -390,10 +378,8 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
...
@@ -390,10 +378,8 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
double
vs
,
vs_step
;
double
vs
,
vs_step
;
int
vs_exp
,
vs_step_exp
;
int
vs_exp
,
vs_step_exp
;
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" %lf D%d %lf D%d"
,
&
vs
,
&
vs_exp
,
&
vs_step
,
&
vs_step_exp
);
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" %lf D%d %lf D%d"
,
&
vs
,
&
vs_exp
,
&
vs_step
,
&
vs_step_exp
);
//printf("DEBUG: %s\n", file_lines[last_read_line].c_str());
vs
*=
pow
(
10.0
,
1.0
*
vs_exp
);
vs
*=
pow
(
10.0
,
1.0
*
vs_exp
);
vs_step
*=
pow
(
10.0
,
1.0
*
vs_step_exp
);
vs_step
*=
pow
(
10.0
,
1.0
*
vs_step_exp
);
//printf("DEBUG: vs = %lg, vs_step = %lg\n", vs, vs_step);
for
(
int
jxi110w
=
0
;
jxi110w
<
nxi
;
jxi110w
++
)
{
for
(
int
jxi110w
=
0
;
jxi110w
<
nxi
;
jxi110w
++
)
{
variable_vector
[
jxi110w
]
=
vs
;
variable_vector
[
jxi110w
]
=
vs
;
vs
+=
vs_step
;
vs
+=
vs_step
;
...
@@ -427,8 +413,6 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
...
@@ -427,8 +413,6 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
for
(
int
j
=
0
;
j
<
i
;
j
++
)
read_format
+=
" %*d"
;
for
(
int
j
=
0
;
j
<
i
;
j
++
)
read_format
+=
" %*d"
;
read_format
+=
" %d"
;
read_format
+=
" %d"
;
sscanf
(
file_lines
[
last_read_line
].
c_str
(),
read_format
.
c_str
(),
(
iog_vector
+
i
));
sscanf
(
file_lines
[
last_read_line
].
c_str
(),
read_format
.
c_str
(),
(
iog_vector
+
i
));
//printf("DEBUG: %s\n", file_lines[last_read_line].c_str());
//printf("DEBUG: iog [%d] = %d\n", i, iog_vector[i]);
}
}
for
(
int
i113
=
1
;
i113
<=
nsph
;
i113
++
)
{
for
(
int
i113
=
1
;
i113
<=
nsph
;
i113
++
)
{
int
i_val
,
nsh
;
int
i_val
,
nsh
;
...
@@ -436,24 +420,19 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
...
@@ -436,24 +420,19 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
int
ros_val_exp
;
int
ros_val_exp
;
if
(
iog_vector
[
i113
-
1
]
<
i113
)
continue
;
if
(
iog_vector
[
i113
-
1
]
<
i113
)
continue
;
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" %d %lf D%d"
,
&
i_val
,
&
ros_val
,
&
ros_val_exp
);
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" %d %lf D%d"
,
&
i_val
,
&
ros_val
,
&
ros_val_exp
);
//printf("DEBUG: %s\n", file_lines[last_read_line].c_str());
nshl_vector
[
i113
-
1
]
=
i_val
;
nshl_vector
[
i113
-
1
]
=
i_val
;
if
(
max_ici
<
(
i_val
+
1
)
/
2
)
max_ici
=
(
i_val
+
1
)
/
2
;
if
(
max_ici
<
(
i_val
+
1
)
/
2
)
max_ici
=
(
i_val
+
1
)
/
2
;
ros_vector
[
i113
-
1
]
=
ros_val
*
pow
(
10.0
,
1.0
*
ros_val_exp
);
ros_vector
[
i113
-
1
]
=
ros_val
*
pow
(
10.0
,
1.0
*
ros_val_exp
);
nsh
=
nshl_vector
[
i113
-
1
];
nsh
=
nshl_vector
[
i113
-
1
];
//printf("DEBUG: nshl_vector[%d] = %d, ros_vector[%d] = %lg\n", i113 - 1, i_val, i113 - 1, ros_vector[i113-1]);
if
(
i113
==
1
)
nsh
+=
ies
;
if
(
i113
==
1
)
nsh
+=
ies
;
rcf_vector
[
i113
-
1
]
=
new
double
[
nsh
];
rcf_vector
[
i113
-
1
]
=
new
double
[
nsh
];
for
(
int
ns
=
0
;
ns
<
nsh
;
ns
++
)
{
for
(
int
ns
=
0
;
ns
<
nsh
;
ns
++
)
{
double
ns_rcf
;
double
ns_rcf
;
int
ns_rcf_exp
;
int
ns_rcf_exp
;
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" %lf D%d"
,
&
ns_rcf
,
&
ns_rcf_exp
);
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" %lf D%d"
,
&
ns_rcf
,
&
ns_rcf_exp
);
//printf("DEBUG: %s\n", file_lines[last_read_line].c_str());
rcf_vector
[
i113
-
1
][
ns
]
=
ns_rcf
*
pow
(
10.0
,
1.0
*
ns_rcf_exp
);
rcf_vector
[
i113
-
1
][
ns
]
=
ns_rcf
*
pow
(
10.0
,
1.0
*
ns_rcf_exp
);
//printf("DEBUG: rcf_vector[%d][%d] = %lg\n", i113-1, ns, rcf_vector[i113 -1][ns]);
}
}
}
}
//printf("DEBUG: max_ici = %d\n", max_ici);
complex
<
double
>
***
dc0m
=
new
complex
<
double
>**
[
max_ici
];
complex
<
double
>
***
dc0m
=
new
complex
<
double
>**
[
max_ici
];
for
(
int
dim1
=
0
;
dim1
<
max_ici
;
dim1
++
)
{
for
(
int
dim1
=
0
;
dim1
<
max_ici
;
dim1
++
)
{
dc0m
[
dim1
]
=
new
complex
<
double
>*
[
nsph
];
dc0m
[
dim1
]
=
new
complex
<
double
>*
[
nsph
];
...
@@ -472,10 +451,8 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
...
@@ -472,10 +451,8 @@ ScattererConfiguration* ScattererConfiguration::from_dedfb(string dedfb_file_nam
double
dc0_real
,
dc0_img
;
double
dc0_real
,
dc0_img
;
int
dc0_real_exp
,
dc0_img_exp
;
int
dc0_real_exp
,
dc0_img_exp
;
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" (%lf D%d, %lf D%d)"
,
&
dc0_real
,
&
dc0_real_exp
,
&
dc0_img
,
&
dc0_img_exp
);
sscanf
(
file_lines
[
++
last_read_line
].
c_str
(),
" (%lf D%d, %lf D%d)"
,
&
dc0_real
,
&
dc0_real_exp
,
&
dc0_img
,
&
dc0_img_exp
);
//printf("DEBUG: %s\n", file_lines[last_read_line].c_str());
dc0_real
*=
pow
(
10.0
,
1.0
*
dc0_real_exp
);
dc0_real
*=
pow
(
10.0
,
1.0
*
dc0_real_exp
);
dc0_img
*=
pow
(
10.0
,
1.0
*
dc0_img_exp
);
dc0_img
*=
pow
(
10.0
,
1.0
*
dc0_img_exp
);
//printf("DEBUG: dc0m[%d][%d] = %lg + i(%lg)\n", i157, i162-1, dc0_real, dc0_img);
dc0m
[
i157
][
i162
-
1
][
jxi468
-
1
]
=
dc0_real
+
1i
*
dc0_img
;
dc0m
[
i157
][
i162
-
1
][
jxi468
-
1
]
=
dc0_real
+
1i
*
dc0_img
;
}
}
}
}
...
...
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