4.0.0 • Published 3 years ago

simput v4.0.0

Weekly downloads
66
License
BSD-3-Clause
Repository
github
Last release
3 years ago

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
    • 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.

4.0.0

3 years ago

3.4.2

3 years ago

3.4.1

5 years ago

3.4.0

5 years ago

3.3.2

5 years ago

3.3.1

5 years ago

3.3.0

5 years ago

3.2.23

5 years ago

3.2.22

5 years ago

3.2.21

5 years ago

3.2.20

5 years ago

3.2.19

5 years ago

3.2.18

5 years ago

3.2.17

5 years ago

3.2.16

5 years ago

3.2.15

5 years ago

3.2.14

5 years ago

3.2.13

5 years ago

3.2.12

5 years ago

3.2.11

5 years ago

3.2.10

5 years ago

3.2.9

6 years ago

3.2.8

6 years ago

3.2.7

6 years ago

3.2.6

6 years ago

3.2.5

6 years ago

3.2.4

6 years ago

3.2.3

6 years ago

3.2.2

6 years ago

3.2.1

6 years ago

3.2.0

6 years ago

3.1.10

6 years ago

3.1.9

6 years ago

3.1.8

6 years ago

3.1.7

6 years ago

3.1.6

6 years ago

3.1.5

6 years ago

3.1.4

6 years ago

3.1.3

6 years ago

3.1.2

6 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.2.22

6 years ago

2.2.21

6 years ago

2.2.20

6 years ago

2.2.19

6 years ago

2.2.18

6 years ago

2.2.17

6 years ago

2.2.16

6 years ago

2.2.15

6 years ago

2.2.14

6 years ago

2.2.13

6 years ago

2.2.12

6 years ago

2.2.11

6 years ago

2.2.10

6 years ago

2.2.9

6 years ago

2.2.8

6 years ago

2.2.7

6 years ago

2.2.6

6 years ago

2.2.5

6 years ago

2.2.4

6 years ago

2.2.3

6 years ago

2.2.2

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.6.1

6 years ago

1.6.0

6 years ago

1.5.0

6 years ago

1.4.0

7 years ago

1.3.24

7 years ago

1.3.23

7 years ago

1.3.22

7 years ago

1.3.21

7 years ago

1.3.20

7 years ago

1.3.19

7 years ago

1.3.18

7 years ago

1.3.17

7 years ago

1.3.16

7 years ago

1.3.15

7 years ago

1.3.14

7 years ago

1.3.13

7 years ago

1.3.12

7 years ago

1.3.11

7 years ago

1.3.10

7 years ago

1.3.9

7 years ago

1.3.8

7 years ago

1.3.7

7 years ago

1.3.6

7 years ago

1.3.5

7 years ago

1.3.4

7 years ago

1.3.3

8 years ago

1.3.2

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.8

8 years ago

1.2.7

8 years ago

1.2.6

8 years ago

1.2.5

8 years ago

1.2.4

8 years ago

1.2.3

8 years ago

1.2.1

8 years ago

1.2.2

8 years ago

1.2.0

8 years ago

1.1.14

8 years ago

1.1.13

8 years ago

1.1.12

8 years ago

1.1.11

8 years ago

1.1.10

8 years ago

1.1.9

8 years ago

1.1.8

8 years ago

1.1.7

8 years ago

1.1.6

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.15

8 years ago

1.0.14

8 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago