Commit 7c55efd3 authored by gregh's avatar gregh
Browse files

quick fix

parent 21169a9c
......@@ -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/gregoireh/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-04-06T00:00:00";
let str_time_start = "2022-08-19T00: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,
(primary_ground.size(), primary_surf.faces_index.len()),
(secondary_ground.size(), secondary_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(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment