Skip to content
Snippets Groups Projects
Commit bca8313f authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

updates NSE initiialization

parent 9f97a990
No related branches found
No related tags found
1 merge request!138Bugfix/nse initial condition
Pipeline #253919 passed
...@@ -56,8 +56,12 @@ int NSE<rnumber>::initialize(void) ...@@ -56,8 +56,12 @@ int NSE<rnumber>::initialize(void)
/* initialize field */ /* initialize field */
this->velocity->real_space_representation = false; this->velocity->real_space_representation = false;
if ((this->iteration == 0) if (this->iteration == 0) {
&& (this->field_random_seed != 0)) { if (!hdf5_tools::field_exists(
this->get_current_fname(),
"velocity",
"complex",
0)) {
TIMEZONE("NSE::initialize::generate_initial_condition"); TIMEZONE("NSE::initialize::generate_initial_condition");
// generate initial condition // generate initial condition
make_gaussian_random_field( make_gaussian_random_field(
...@@ -89,6 +93,14 @@ int NSE<rnumber>::initialize(void) ...@@ -89,6 +93,14 @@ int NSE<rnumber>::initialize(void)
this->iteration, this->iteration,
true); true);
} }
} else {
TIMEZONE("NSE::initialize::read_initial_condition");
this->velocity->io(
this->get_current_fname(),
"velocity",
this->iteration,
true);
}
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment