Git Product home page Git Product logo

bmi-java's Introduction

DOI Build CI

bmi-java

Java bindings for the CSDMS Basic Model Interface.

Build/Install

The Java BMI bindings can be built on Linux, macOS, and Windows. Instructions are given below.

Prerequisites:

To compile and package the BMI Java bindings, run

$ mvn clean package

This will generate files in the directory target. The result will look like

target
|-- bmi.jar
|-- classes
|   `-- edu
|       `-- colorado
|           `-- csdms
|               `-- bmi
|                   |-- BMI.class
|                   |-- BmiControl.class
|                   |-- BmiGetter.class
|                   |-- BmiGrid.class
|                   |-- BmiGridRectilinear.class
|                   |-- BmiGridStructuredQuad.class
|                   |-- BmiGridUniformRectilinear.class
|                   |-- BmiGridUnstructured.class
|                   |-- BmiInfo.class
|                   |-- BmiSetter.class
|                   |-- BmiTime.class
|                   `-- BmiVars.class
|-- generated-sources
|   `-- annotations
|-- maven-archiver
|   `-- pom.properties
`-- maven-status
    `-- maven-compiler-plugin
        `-- compile
            `-- default-compile
                |-- createdFiles.lst
                `-- inputFiles.lst

To install the jar file to your local Maven repository (typically ~/.m2/repository) for use with other packages, run

$ mvn install

The result in the local repository will look like

edu
`-- colorado
    `-- csdms
        `-- bmi
            |-- 2.0
            |   |-- _remote.repositories
            |   |-- bmi-2.0.jar
            |   |-- bmi-2.0.jar.md5
            |   |-- bmi-2.0.jar.sha1
            |   |-- bmi-2.0.pom
            |   |-- bmi-2.0.pom.md5
            |   `-- bmi-2.0.pom.sha1
            |-- maven-metadata-local.xml
            |-- maven-metadata-local.xml.md5
            `-- maven-metadata-local.xml.sha1

4 directories, 10 files

Developer note: Deploy

The bmi package is hosted on the CSDMS Apache Maven Repository. To deploy the bmi package to this site, run

$ mvn deploy

on a machine where you have provided server settings and encrypted login credentials for the site in your local settings.xml file.

Use

To write a BMI for a model, install the bmi.jar file and implement all the BMI functions that are listed in the BMI Java source package and described in the documentation. BMI functions that aren't used (e.g., getGridX for a uniform rectilinear grid) can simply return a null value. A sample implementation is given in the https://github.com/csdms/bmi-example-java repository.

bmi-java's People

Contributors

alee avatar dependabot[bot] avatar mdpiper avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bmi-java's Issues

The getValuePtr function should support primitive types

Currently getValuePtr is written as a generic class. This contradicts the recommendation that only primitive types should be supported for values in the Java BMI--see, e.g., here. The getValuePtr function should be specified through multiple constructors to primitive types, like getValue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.