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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
26d49241
Commit
26d49241
authored
1 year ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Update CLUSTER to use the new C1 constructor
parent
6ccaa5da
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cluster/cluster.cpp
+1
-9
1 addition, 9 deletions
src/cluster/cluster.cpp
src/include/Commons.h
+8
-8
8 additions, 8 deletions
src/include/Commons.h
src/libnptm/Commons.cpp
+14
-2
14 additions, 2 deletions
src/libnptm/Commons.cpp
with
23 additions
and
19 deletions
src/cluster/cluster.cpp
+
1
−
9
View file @
26d49241
...
@@ -113,16 +113,8 @@ void cluster(string config_file, string data_file, string output_path) {
...
@@ -113,16 +113,8 @@ void cluster(string config_file, string data_file, string output_path) {
int
lm
=
gconf
->
l_max
;
int
lm
=
gconf
->
l_max
;
if
(
gconf
->
li
>
lm
)
lm
=
gconf
->
li
;
if
(
gconf
->
li
>
lm
)
lm
=
gconf
->
li
;
if
(
gconf
->
le
>
lm
)
lm
=
gconf
->
le
;
if
(
gconf
->
le
>
lm
)
lm
=
gconf
->
le
;
C1
*
c1
=
new
C1
(
nsph
,
lm
,
sconf
->
nshl_vec
,
sconf
->
iog_vec
);
C1
*
c1
=
new
C1
(
gconf
,
sconf
);
C3
*
c3
=
new
C3
();
C3
*
c3
=
new
C3
();
for
(
int
c1i
=
0
;
c1i
<
nsph
;
c1i
++
)
{
c1
->
rxx
[
c1i
]
=
gconf
->
sph_x
[
c1i
];
c1
->
ryy
[
c1i
]
=
gconf
->
sph_y
[
c1i
];
c1
->
rzz
[
c1i
]
=
gconf
->
sph_z
[
c1i
];
}
for
(
int
c1i
=
0
;
c1i
<
c1
->
configurations
;
c1i
++
)
{
c1
->
ros
[
c1i
]
=
sconf
->
radii_of_spheres
[
c1i
];
}
C4
*
c4
=
new
C4
(
gconf
->
li
,
gconf
->
le
,
nsph
);
C4
*
c4
=
new
C4
(
gconf
->
li
,
gconf
->
le
,
nsph
);
C1_AddOns
*
c1ao
=
new
C1_AddOns
(
c4
);
C1_AddOns
*
c1ao
=
new
C1_AddOns
(
c4
);
// End of add-ons initialization
// End of add-ons initialization
...
...
This diff is collapsed.
Click to expand it.
src/include/Commons.h
+
8
−
8
View file @
26d49241
...
@@ -191,25 +191,25 @@ public:
...
@@ -191,25 +191,25 @@ public:
*/
*/
class
C4
{
class
C4
{
public:
public:
//! \brief
QUESTION: definition?
//! \brief
LITPO = 2 * LI + 1.
int
litpo
;
int
litpo
;
//! \brief
QUESTION: definition?
//! \brief
LITPOS = LITPO * LITPO
int
litpos
;
int
litpos
;
//! \brief
Maximum field expansion order plus one. QUESTION: correct?
//! \brief
LMPO = LM + 1.
int
lmpo
;
int
lmpo
;
//! \brief
Twice maximum field expansion order plus one. QUESTION: correct?
//! \brief
LMTPO = 2 * LM + 1.
int
lmtpo
;
int
lmtpo
;
//! \brief
Square of `lmtpo`
.
//! \brief
LMTPOS = LMTPO * LMTPO
.
int
lmtpos
;
int
lmtpos
;
//! \brief
QUESTION: definition?
//! \brief
Internal field expansion order.
int
li
;
int
li
;
//! \brief QUESTION: definition?
//! \brief QUESTION: definition?
int
nlim
;
int
nlim
;
//! \brief
QUESTION: definition?
//! \brief
External field expansion order.
int
le
;
int
le
;
//! \brief QUESTION: definition?
//! \brief QUESTION: definition?
int
nlem
;
int
nlem
;
//! \brief Maximum field expansion order.
QUESTION: correct?
//! \brief Maximum field expansion order.
int
lm
;
int
lm
;
//! \brief Number of spheres.
//! \brief Number of spheres.
int
nsph
;
int
nsph
;
...
...
This diff is collapsed.
Click to expand it.
src/libnptm/Commons.cpp
+
14
−
2
View file @
26d49241
...
@@ -26,6 +26,11 @@
...
@@ -26,6 +26,11 @@
C1
::
C1
(
GeometryConfiguration
*
gconf
,
ScattererConfiguration
*
sconf
)
{
C1
::
C1
(
GeometryConfiguration
*
gconf
,
ScattererConfiguration
*
sconf
)
{
lm
=
(
int
)
gconf
->
get_param
(
"l_max"
);
lm
=
(
int
)
gconf
->
get_param
(
"l_max"
);
int
li
=
(
int
)
gconf
->
get_param
(
"li"
);
int
le
=
(
int
)
gconf
->
get_param
(
"le"
);
if
(
lm
==
0
)
{
lm
=
(
li
>
le
)
?
li
:
le
;
}
nsph
=
(
int
)
gconf
->
get_param
(
"nsph"
);
nsph
=
(
int
)
gconf
->
get_param
(
"nsph"
);
nlmmt
=
2
*
(
lm
*
(
lm
+
2
));
nlmmt
=
2
*
(
lm
*
(
lm
+
2
));
...
@@ -68,8 +73,15 @@ C1::C1(GeometryConfiguration *gconf, ScattererConfiguration *sconf) {
...
@@ -68,8 +73,15 @@ C1::C1(GeometryConfiguration *gconf, ScattererConfiguration *sconf) {
rxx
=
new
double
[
nsph
]();
rxx
=
new
double
[
nsph
]();
ryy
=
new
double
[
nsph
]();
ryy
=
new
double
[
nsph
]();
rzz
=
new
double
[
nsph
]();
rzz
=
new
double
[
nsph
]();
ros
=
new
double
[
nsph
]();
if
(
nsph
>
1
)
{
for
(
int
ri
=
0
;
ri
<
nsph
;
ri
++
)
{
for
(
int
c1i
=
0
;
c1i
<
nsph
;
c1i
++
)
{
rxx
[
c1i
]
=
gconf
->
get_sph_x
(
c1i
);
ryy
[
c1i
]
=
gconf
->
get_sph_y
(
c1i
);
rzz
[
c1i
]
=
gconf
->
get_sph_z
(
c1i
);
}
}
ros
=
new
double
[
configurations
]();
for
(
int
ri
=
0
;
ri
<
configurations
;
ri
++
)
{
ros
[
ri
]
=
sconf
->
get_radius
(
ri
);
ros
[
ri
]
=
sconf
->
get_radius
(
ri
);
}
}
...
...
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