Commit 2bb3755c authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1455 Make Vector::InitSequentialFromFile work properly with Petsc Matlab format.

parent c0201986
...@@ -198,8 +198,14 @@ namespace MoReFEM ...@@ -198,8 +198,14 @@ namespace MoReFEM
while (getline(stream, line)) while (getline(stream, line))
{ {
// 4 lines to ignore in PETSc Matlab format.
if (Utilities::String::StartsWith(line, "%")
|| Utilities::String::StartsWith(line, "Vec_")
|| Utilities::String::StartsWith(line, "];"))
continue;
// All lines are expected to be one value. // All lines are expected to be one value.
value_list.push_back(stod(line)); value_list.push_back(std::stod(line));
} }
// Now Init the vector with the appropriate size. // Now Init the vector with the appropriate size.
......
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