//Puts a single input value from a Version 0.1 input file into SimSinter. public virtual void putInputIntoSinter_1(JObject inputDict, String name) { JToken value = inputDict[name]; int row = -1; int column = -1; string varName = sinter_SetupFile.parseVariable(name, ref row, ref column); sinter_IVariable inputVal = this.getIOByName(varName); if (inputVal == null) { runStatus = sinter_AppError.si_INPUT_ERROR; throw new System.IO.IOException(string.Format("Input Variable {0} is unknown. Please check that you have the correct inputs and sinter config for this simulation.", varName)); } inputVal.setInput(varName, row, column, value, ""); }
//Puts a single input value from a Version 0.2 input file into SimSinter. public virtual void putInputIntoSinter_2(JObject inputDict, String name) { int row = -1; int column = -1; string varName = sinter_SetupFile.parseVariable(name, ref row, ref column); JObject varData = (JObject)inputDict[name]; string units = (string)varData["units"]; if (units == null) { units = ""; //We prefer the empty string to a null value } sinter_IVariable inputVal = this.getIOByName(varName); if (inputVal == null) { runStatus = sinter_AppError.si_INPUT_ERROR; throw new System.IO.IOException(string.Format("Input Variable {0} is unknown. Please check that you have the correct inputs and sinter config for this simulation.", varName)); } inputVal.setInput(varName, row, column, varData["value"], units); }