Name: simput
Owner: Kitware, Inc.
Description: Input generator for simulation which can be used as a standalone application or as a component within another web context.
Created: 2015-12-21 22:53:04.0
Updated: 2018-05-21 17:04:19.0
Pushed: 2018-05-21 17:05:57.0
Homepage: http://kitware.github.io/simput/
Size: 3852
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
To provide a simple way to write input simpulation files.
m install -g simput
After installing the package you will get one executable Simput with the following set of options:
mput
age: Simput [options]
tions:
-h, --help output usage information
-V, --version output the version number
-i, --input [file|directory] Input file or directory
-o, --output [directory] Output directory to output to
-t, --type [type] Type of input
--no-gui Just generate output
-s, --silent Do not open the browser
-c, --compile [directory] Directory to compile files
-m, --minify Minify compiled file
-a, --add [file] Add model to list of available inputs
-l, --list List model types of available as inputs
-r, --remove [type] Remove model to list of available inputs
mput -t pyfr -o ~/pyfr/example
Starts a server and opens your web browser, an empty PyFR model is loaded which you can modify. The Save button will export a pyfr.json file (model) which you can then be loaded later on. The Convert button will export a pyfr.ini
file for PyFR execution.
As no initial model was provided, the boundary names will be autogenerated.
In order to pre-define those boundary names, you can either edit the generated model (pyfr.json
) or start with an empty model you've created like the following one.
my-pyfr-model.json
"type": "pyfr",
"data": {},
"external": {
"boundary-names": {
"User friendly name": "value-expected-by-code",
"Inlet": "inlet",
"Outlet": "outlet",
"External walls": "external-wall"
}
}
Then loading it back for further edits can be performed with the following command line:
mput -i my-pyfr-model.json -o ~/pyfr/example
There are a few supplied demos in the folder types
, each have their own README.
t clone --recursive https://github.com/Kitware/simput.git
simput
m install
m run build
m link
mput
age: Simput [options]
tions:
-h, --help output usage information
-V, --version output the version number
-i, --input [file|directory] Input file or directory
-o, --output [directory] Output directory to output to
-t, --type [type] Type of input
--no-gui Just generate output
-s, --silent Do not open the browser
-c, --compile [directory] Directory to compile files
-m, --minify Minify compiled file
-a, --add [file] Add model to list of available inputs
-l, --list List model types of available as inputs
-r, --remove [type] Remove model to list of available inputs
Then to compile pyfr and publish it:
mput -mc types/pyfr/src/ -t pyfr -o dist/types/
A recent version Firefox is preferred for debugging. Errors in Chrome do not always point to the exact line where the error is happening.
In a separate location create a folder for your type:
place [mytype] with your type name.
r [mytype]
mytype]
init
Create the folder and file structure:
/src
/lang
/[language]
e.g. “en”, “fr”label.json
, attribute and property labels./help
, help dialogs, recommended, not required/[folders for each attribute]
[file for each property, contents are html]
/templates
model.json
, primary data structure.convert.js
, converts the model into the simulation deck format.parse.js
, converts a complete input file to the simput model; recommended, not required./samples
, empty or partially full sample datasets; recommended, not required./versions
, an output folder for your compiled type; recommended, not required.README.md
, a description of your type; recommended, not required.For examples of each take a look at types/demo
It's critical that these are executed in order
art in the [mytype] directory from above. Replace [mytype] with your type name below.
checkout -b type-[mytype] #replace 'mytype' with the name of the new type
commit -m "initial commit"
remote add origin https://github.com/Kitware/simput.git
push origin type-[mytype] # where 'mytype-branch' is the current branch name
your simput repo] # usually cd ../..
submodule add -b type-[mytype] https://github.com/kitware/simput types/[mytype]
add .gitmodules types/
commit -m "added [mytype]"
push
Simput is licensed under BSD Clause 3.
Fork our repository and do great things. At Kitware, we've been contributing to open-source software for 15 years and counting, and want to make Simput useful to as many people as possible.