Input generator for simulation which can be used as a standalone application or as a component within another web context.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build fix(oscillator): validate type output Aug 16, 2018
dist fix(version): push version 3+ Aug 16, 2018
documentation docs(website): fix requirements and build docs, add to sidebar Oct 17, 2018
src docs(website): fix requirements and build docs, add to sidebar Oct 17, 2018
static fix(vera): Disable 2d/3d toggle on rod viewer Nov 20, 2018
types fix(vera): Disable 2d/3d toggle on rod viewer Nov 20, 2018
.babelrc feat(Application): Update look and feel of the application Aug 2, 2018
.editorconfig feat(Application): Update look and feel of the application Aug 2, 2018
.eslintignore feat(Application): Update look and feel of the application Aug 2, 2018
.eslintrc.js feat(Application): Update look and feel of the application Aug 2, 2018
.gitignore feat(Application): Update look and feel of the application Aug 2, 2018
.gitmodules feat(types): Links all the previous types Aug 16, 2018
.npmignore feat(Application): Update look and feel of the application Aug 2, 2018
.travis.yml fix(version): push version 3+ Aug 16, 2018
CONTRIBUTING.md feat(Application): Update look and feel of the application Aug 2, 2018
COPYRIGHT feat(Application): Update look and feel of the application Aug 2, 2018
LICENSE feat(Application): Update look and feel of the application Aug 2, 2018
README.md fix(simput-cli): adapt cli to new landing-page UI. Sep 6, 2018
package-lock.json fix(dependency): Loaders need to be in dependencies Dec 10, 2018
package.json fix(dependency): Loaders need to be in dependencies Dec 10, 2018
prettier.config.js feat(Application): Update look and feel of the application Aug 2, 2018

README.md

Simput

Goal

To provide a simple way to write input simpulation files.

Installation

$ npm install -g simput

Usage

After installing the package you will get one executable Simput with the following set of options:

$ Simput

  Usage: Simput [options]

  Options:

    -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

    -s, --silent                  Do not open the browser

    -c, --compile [directory]     Directory to compile files
    -m, --minify                  Minify compiled file

Examples

$ Simput -p

Starts a server and opens your web browser, showing a landing page with a choice of inputs which you can create.

Demos

There are a few supplied demos in the folder types, each have their own README.

  • vCard is the simplest example, with a single type of output.
  • oscillator is a bit more complex, because it derives from a real benchmarking application meant to exercise in-situ analyses on hpc systems.
  • pyfr and vera produce input files for real applications, and are realistically complex.

Development

$ git clone --recursive https://github.com/Kitware/simput.git
$ cd simput
$ npm install
$ npm run build
$ npm link
$ Simput

  Usage: Simput [options]

  Options:

    -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

    -s, --silent                  Do not open the browser

    -c, --compile [directory]     Directory to compile files
    -m, --minify                  Minify compiled file

Then to compile pyfr and open a development server which watches for another compile:

$ npm run type:pyfr
$ npm run dev

Creating a new simulation type

In a separate location create a folder for your type:

# Replace [mytype] with your type name.
mkdir [mytype]
cd [mytype]
git 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
      • [template file and helpers]
    • model.js, 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

Optional: Add the type as a submodule to this repository

It's critical that these are executed in order

# start in the [mytype] directory from above. Replace [mytype] with your type name below.
git checkout -b type-[mytype] #replace 'mytype' with the name of the new type
git commit -m "initial commit"
git remote add origin https://github.com/Kitware/simput.git
git push origin type-[mytype] # where 'mytype-branch' is the current branch name
cd [your simput repo] # usually cd ../..
git submodule add -b type-[mytype] https://github.com/kitware/simput types/[mytype]
git add .gitmodules types/
git commit -m "added [mytype]"
git push

Add to compilation and landing page

Simput changed to a Vue.js framework, and no longer has the ability to dynamically add and load types - they must be present when Simput is built by webpack.

Add another script to package.json which compiles your type.

Add a call to Simput.registerType() for your type in static/index.html

This will likely change soon.

Licensing

Simput is licensed under BSD Clause 3.

Getting Involved

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.