Skip to content
Snippets Groups Projects
Commit 7c13bb85 authored by Gareth Tribello's avatar Gareth Tribello
Browse files

Made ignore forces option work in READ

parent f12fd73f
No related branches found
No related tags found
No related merge requests found
......@@ -153,25 +153,25 @@ nlinesPerStep(1)
ifile->scanFieldList( fieldnames );
for(unsigned i=0;i<fieldnames.size();++i){
if( fieldnames[i].substr(0,dot)==label ){
readvals.push_back(new Value(this, fieldnames[i], false) ); addComponent( fieldnames[i].substr(dot+1) );
readvals.push_back(new Value(this, fieldnames[i], false) ); addComponentWithDerivatives( fieldnames[i].substr(dot+1) );
if( ifile->FieldExist("min_" + fieldnames[i]) ) componentIsPeriodic( fieldnames[i].substr(dot+1), "-pi","pi" );
else componentIsNotPeriodic( fieldnames[i].substr(dot+1) );
}
}
} else {
readvals.push_back(new Value(this, valread[0], false) ); addComponent( name );
readvals.push_back(new Value(this, valread[0], false) ); addComponentWithDerivatives( name );
if( ifile->FieldExist("min_" + valread[0]) ) componentIsPeriodic( valread[0].substr(dot+1), "-pi", "pi" );
else componentIsNotPeriodic( valread[0].substr(dot+1) );
for(unsigned i=1;i<valread.size();++i) {
if( valread[i].substr(0,dot)!=label ) error("all values must be from the same Action when using READ");;
readvals.push_back(new Value(this, valread[i], false) ); addComponent( valread[i].substr(dot+1) );
readvals.push_back(new Value(this, valread[i], false) ); addComponentWithDerivatives( valread[i].substr(dot+1) );
if( ifile->FieldExist("min_" + valread[i]) ) componentIsPeriodic( valread[i].substr(dot+1), "-pi", "pi" );
else componentIsNotPeriodic( valread[i].substr(dot+1) );
}
}
} else {
if( valread.size()!=1 ) error("all values must be from the same Action when using READ");
readvals.push_back(new Value(this, valread[0], false) ); addValue();
readvals.push_back(new Value(this, valread[0], false) ); addValueWithDerivatives();
if( ifile->FieldExist("min_" + valread[0]) ) setPeriodic( "-pi", "pi" );
else setNotPeriodic();
log.printf(" reading value %s and storing as %s\n",valread[0].c_str() ,getLabel().c_str() );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment