-
Notifications
You must be signed in to change notification settings - Fork 154
Open
Description
When I am creating mesh, I am using material names containing spaces "Coil 1". Everything works correctly in ngsolve.
When I save mesh to .vol and read it back, only "Coil" is read.
I am not sure if material name containing space is correct.
Problem is with code
void ReadNumberAndName( istream & infile, int & i, string & s )
{
string line;
std::istringstream iline;
bool empty_line = true;
while(empty_line && infile)
{
std::getline(infile, line);
iline = std::istringstream{line};
iline >> i;
if(iline)
empty_line = false;
iline >> s;
}
if(!infile)
throw Exception("Reached end of file while parsing");
}
which reads string only to the first space.
If instead iline >> s; will be used std::getline(iline >> std::ws, s); then string containing spaces will be read.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels