GithubHelp home page GithubHelp logo

sinoftheta / cs46x-group40 Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 10.54 MB

Ground water simulation library, ported from Fortran

Python 32.34% Fortran 16.39% Makefile 0.27% C 39.07% C++ 0.07% Batchfile 0.26% Shell 0.33% TeX 11.27%

cs46x-group40's Introduction

Virtual Env

Setting up a virtual environment is something that each developer needs to do. This is done by moving into the python directory and running:

$ python3 -m venv env

This creates a directory called env. Note that this directory is in the .gitignore.

After creating this directory the following workflow should be used:

# enable vitual env
# on mac/linux
$ source env/bin/activate

# on windows
$ .\env\Scripts\activate.bat

# make sure the virtual env has all the required libraries
$ pip install -r requirements.txt

# program as one normally would

# when finisihed programming, make sure any new libraries are added to the requirements.txt
$ pip freeze > requirements.txt

# deactivate env
$ deactivate

# deactivate env on windows
$ .\env\Scripts\deactivate.bat

# do git stuff
$ git add/commit/push

Extra Notes On Windows

working on windows is a pain, I recommend using either linux or mac. Client has a mac, so windows comes 2nd or 3rd.

Installing GSL

Main website here. On the downloads page look for version 2.6.

Linux/Mac

Download gsl-2.6.tar.gz.

$ tar -xf gsl-2.6.tar.gz
$ cd gsl-2.6
$ ./configure
$ make
$ sudo make install

Windows

Windows is a touch more involved. Using msys2 as a build tool has worked the best.

Follow these instructions for installing msys2 and c build tools. You do not need to install the boost library. You will, however, need to install GSL.

In msys2 shell:

pacman -Ss gsl

Gives a list avalible gsl distros to install, find gsl-2.6 and install that one.

Compiling Standalone C Code

Our C Code relies on the GSL library, so make sure that was installed. Note that the standalone C code exists as a means to debug the C library in C.

Linux / Mac

CD into the c-source directory and run the Makefile. To execute the code, run make run.

Windows

Presumably the steps in the Installing GSL section were followed, so all tools should be avalible.

CD into the c-source directory and run the Makefile using mingw32-make.exe. You might encouter an issue with the mkdir command. Its a dirty fix, but comment it out and create the following directory structure under c-source

c-source/
    build/objs/src/
        capstone/
        gs2/

Building Standalone Application

Overview

Running one of the build scripts creats a top-level directory, dist. In dist there is an executable main. Running main should launch the application.

  • Compile C library with make library
  • Bundle python code with pyinstaller --hidden-import pkg_resources.py2_warn main.py --onefile
  • Copy C dependecies and sim library into the dist folder created by pyinstaller.

Linux / Mac

Running $ bash build.sh should be enough to produce an application.

Windows

Running the build.bat file should be enough to produce an application.

Running Python by itself

running main.py works just fine. It uses a development config file. Requires that the code in c-source was built into a library.

cs46x-group40's People

Contributors

dakota-osu avatar ivanhalim avatar sinoftheta avatar bhambleton avatar franksinatra2 avatar

Watchers

James Cloos avatar  avatar  avatar

cs46x-group40's Issues

C Port Task0

Create a struct for GS2 containing all "global" variables

C Port Task1

Port the Datain section of the program graph:
Datain
BC
ICS1CU

Create Program Data flow Diagram

As a developer I would like a high-level overview of the project as to be able to see how each piece fits together.

At the end of this task a wiki page should be made that links to the flow diagram.

C Port Task2

Port the COGEN section of the program graph.

cogen
qz
shape
matgen

C Port Task4

Port the Main and TS sections of the graph

main
ts
upd

this task should be done last

Create screen to show mesh

As represented by figure 15 in the design document.

As a user I would like the ability to run the simulation and see its output.

C Port Task3

Port the following subroutines called by TS

gleb
sband
dband
array

Bug in Common One

In Common One, I dont see bwd or cntr, however I also cant find documentation for them or where they are used.

I also don't see: coefi, ei, iter1, itmax, itchng, igo.

Originally posted by @IanBand in #47

Develop Script for running pyinstaller

As a developer I would like the ability to run a script to build an executable, instead of manually running pyinstaller.

This script should run on windows, mac, and linux.

Create Main Screen of GUI

This is represented by Figure 11 in the design document.

As a user I want a graphical user interface that allows me to set the primary variables in the simulation.

Create interactive mockup of GUI

As a developer I would like an interactive mockup for the GUI as to know how each screen connects to each other screen

The deliverable item for this task should be placed into our shared drive. In addition a wiki page here on github should be made that briefly talks about the mock up and links to the drive.

C Port Brian's Task

port the following subroutines called by TS

zero (this should be done already)
lrhs
asembl
green

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.