Commit 72d8d011 authored by GILLES Sebastien's avatar GILLES Sebastien

#1444 Fix some bugs in the new way to write EnsightOutput. Some are still lurking.

parent 82691907
......@@ -60,7 +60,7 @@ namespace MoReFEM::PostProcessingNS::OutputFormat
void CreateUnknownFile(const Data::TimeIteration& time_iteration,
const std::string& output_directory,
const std::string& unknown_name,
const std::vector<std::size_t>& content);
const std::vector<double>& content);
std::vector<const Data::TimeIteration*>
......@@ -92,6 +92,8 @@ namespace MoReFEM::PostProcessingNS::OutputFormat
assert(check == 1 && "Exactly one wildcard occurrence is expected in given filename");
static_cast<void>(check);
std::cout << "FILENAME = " << filename << std::endl;
return LoadVector(filename);
}
......@@ -258,8 +260,6 @@ namespace MoReFEM::PostProcessingNS::OutputFormat
std::vector<std::vector<double>> ensight_file_content_per_time_step(relevant_time_iteration_file_list.size(),
ensight_file_content);
std::cout << "SIZE = " << expected_size << std::endl;
for (auto rank = 0u; rank < Nprocessor; ++rank)
{
const auto dof_list = ComputeDofListOnVertex(post_processing,
......@@ -300,15 +300,6 @@ namespace MoReFEM::PostProcessingNS::OutputFormat
coords_index_per_dof.push_back(coords_index * unknown_dimension + dof.GetUnknownComponent());
}
static bool foo = true;
if (foo)
{
foo = false;
std::cout << "Nelts = " << coords_index_per_dof.size() << std::endl;
Utilities::PrintContainer<>::Do(coords_index_per_dof);
}
auto iterator_ensight_sol = ensight_file_content_per_time_step.begin();
for (const auto& time_iteration_ptr : time_iteration_list)
......@@ -324,7 +315,10 @@ namespace MoReFEM::PostProcessingNS::OutputFormat
assert(expected_size == ensight_solution.size());
const auto Nelt_on_proc = coords_index_per_dof.size();
assert(solution.size() == Nelt_on_proc);
std::cout << "CHECK -> " << solution.size() << "\t" << Nelt_on_proc << std::endl;
assert(solution.size() >= Nelt_on_proc); // solution might include dofs not considered here
// (not on vertex, related to a different unknown, etc...)
for (auto i = 0ul; i < Nelt_on_proc; ++i)
{
......@@ -339,9 +333,9 @@ namespace MoReFEM::PostProcessingNS::OutputFormat
}
CreateUnknownFile(time_iteration,
ensight_directory,
unknown.GetName(),
coords_index_per_dof);
ensight_directory,
unknown.GetName(),
ensight_solution);
++iterator_ensight_sol;
}
......@@ -465,7 +459,7 @@ namespace MoReFEM::PostProcessingNS::OutputFormat
void CreateUnknownFile(const Data::TimeIteration& time_iteration,
const std::string& output_directory,
const std::string& unknown_name,
const std::vector<std::size_t>& content)
const std::vector<double>& content)
{
std::ostringstream oconv;
oconv << output_directory;
......@@ -483,7 +477,6 @@ namespace MoReFEM::PostProcessingNS::OutputFormat
for (const auto& item : content)
write_dof_value_helper.NewValue(item);
}
......
Markdown is supported
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