-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add of optional arguments to addVariablesExportAsCSV
* Added optional argument unitid for one selected unit in unitclass * Added optional argument varname for selected variable(s) * Added optional argument precision for outputs digits number * Updated tests to match new developments
- Loading branch information
1 parent
c158bff
commit 5d3d1be
Showing
7 changed files
with
65 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
library(RUnit) | ||
|
||
library("ROpenFLUID") | ||
|
||
ofsim = OpenFLUID.openDataset("@OpenFLUID_PREFIX@/share/doc/openfluid/examples/projects/Primitives/IN") | ||
|
||
OpenFLUID.setCurrentOutputDir(paste(getwd(),'/PrimitivesSelectedOutputs.OUT', sep = "")) | ||
|
||
OpenFLUID.addExtraSimulatorsPaths("@OpenFLUID_PREFIX@/lib/openfluid/simulators") | ||
|
||
OpenFLUID.addVariablesExportAsCSV(ofsim,"unitsB",7,"var5",precision=14) | ||
OpenFLUID.addVariablesExportAsCSV(ofsim,"unitsA",1,"*") | ||
|
||
OpenFLUID.printSimulationInfo(ofsim) | ||
|
||
OpenFLUID.runSimulation(ofsim) | ||
|
||
out=OpenFLUID.loadResult(ofsim,"unitsB",7,"var5") | ||
plot(out$var5,type='l',col='blue') | ||
|
||
out=OpenFLUID.loadResult(ofsim,"unitsA",1,"var1") | ||
lines(out$var1,type='l',col='green') |