Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Small Bodies Modelling
kalast
kalast
Commits
7c55efd3
Commit
7c55efd3
authored
Oct 28, 2022
by
gregh
Browse files
quick fix
parent
21169a9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main.rs
View file @
7c55efd3
...
...
@@ -73,13 +73,13 @@ fn main() {
spice
::
kclear
();
// /home/greg/data/spice-kernel/hera/mk/hera_study_PO_EMA_2024.tm
// /home/greg/data/spice-kernel/all/mk/hera-dimorphos-long.tm
let
list_str_kernel
=
[
"/home/greg
oireh
/data/spice-kernel/dart/mk/current.tm"
];
let
list_str_kernel
=
[
"/home/greg/data/spice-kernel/dart/mk/current.tm"
];
for
str_kernel
in
list_str_kernel
{
spice
::
furnsh
(
str_kernel
);
info!
(
"Kernel loaded: {}"
,
str_kernel
);
}
let
str_time_start
=
"2022-0
4-06
T00:00:00"
;
let
str_time_start
=
"2022-0
8-19
T00:00:00"
;
let
time
=
Time
{
start
:
spice
::
str2et
(
str_time_start
),
duration
:
275.0
*
DAY
as
f64
,
...
...
@@ -105,16 +105,24 @@ fn main() {
// let primary_path_input_temperatures = None;
// let secondary_path_input_temperatures = None;
let
primary_path_input_temperatures
=
Some
(
Path
::
new
(
"draft"
)
.join
(
primary
.name
.clone
())
.join
(
&
str_time_start
)
.join
(
"temperatures"
),
Path
::
new
(
// "draft"
"result"
,
)
.join
(
primary
.name
.clone
())
.join
(
"annual"
)
.join
(
&
str_time_start
)
.join
(
"temperatures"
),
);
let
secondary_path_input_temperatures
=
Some
(
Path
::
new
(
"draft"
)
.join
(
secondary
.name
.clone
())
.join
(
&
str_time_start
)
.join
(
"temperatures"
),
Path
::
new
(
// "draft"
"result"
,
)
.join
(
secondary
.name
.clone
())
.join
(
"annual"
)
.join
(
&
str_time_start
)
.join
(
"temperatures"
),
);
let
(
secondary_position_raw
,
_
)
=
spice
::
spkpos
(
...
...
@@ -307,6 +315,7 @@ fn main() {
primary_path_input_temperatures
,
secondary_path_input_temperatures
,
)
{
info!
(
"Loading input temperature files:"
);
for
(
path
,
shape
,
temperatures
)
in
[
(
&
primary_path
,
...
...
@@ -315,10 +324,11 @@ fn main() {
),
(
&
secondary_path
,
(
prim
ary_ground
.size
(),
prim
ary_surf
.faces_index
.len
()),
(
second
ary_ground
.size
(),
second
ary_surf
.faces_index
.len
()),
&
mut
secondary_temperatures
,
),
]
{
info!
(
"- {:?}"
,
path
);
let
file
=
File
::
open
(
path
)
.unwrap
();
let
mut
reader
=
BufReader
::
new
(
file
);
...
...
@@ -332,8 +342,6 @@ fn main() {
.map
(|
&
e
|
(
e
as
f64
/
100.0
))
.collect_vec
();
println!
(
"{}"
,
temperatures_vec
.len
());
*
temperatures
=
DMatrix
::
from_vec
(
shape
.0
,
shape
.1
,
temperatures_vec
);
}
}
else
{
...
...
@@ -354,6 +362,7 @@ fn main() {
initial_temperature
,
);
}
info!
(
"OK initialization"
);
// View factors.
let
primary_self_viewf
=
therm
::
view_factor
(
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment