GithubHelp home page GithubHelp logo

lxu1 / lppm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pbosler/lppm

0.0 2.0 0.0 454 KB

Lagrangian Particle / Panel Methods

Home Page: http://www-personal.umich.edu/~pbosler/

License: MIT License

Fortran 87.69% C++ 12.23% C 0.07%

lppm's Introduction

LPPM : Lagrangian Particle / Panel Method

Code associated with

P. Bosler, L. Wang, R. Krasny, and C. Jablonowski, 2014.
"A Lagrangian particle/panel method for the barotropic vorticity equation on a rotating sphere," Fluid Dynamics Research, 46 : 031406.

Bosler, P. A., "Particle Methods for Geophysical Flow on the Sphere," PhD Thesis, University of Michigan, 2013.

This software provides a Lagrangian Particle-Panel Method for solving the barotropic vorticity equation and the advection equation on the sphere and in the plane.

A shallow water equation solver is in development.

Design / Use

Although it is written in modern Fortran rather than C++, the code is organized in an object-oriented style. This means that for each task the code performs, there is a derived data type that corresponds to that task (like a C++ class).
Each module file contains one derived data type and its associated methods.
For example, PlaneMesh.f90 contains the data type for moving meshes in the plane and interfaces to all the functions that are implemented on PlaneMesh objects.
The PlaneDirectSum.f90 module defines the Runge-Kutta time stepping data type for plane meshes, and contains all of the timestepping functions.

Each object must be created in memory using its New method, many objects must then be initialized using a call to an Init or Initialize subroutine.
For clean code, every time a New subroutine is called on an object, a corresponding call to that object's Delete subroutine should be used when the object is no longer needed or goes out of scope.

Example:

To define a Rossby-Haurwitz wave vorticity distribution for a sphere mesh, a user would first allocate the VorticitySetup object by calling its New subroutine. Then the wave would be initialized with user-defined parameters (most commonly read from a namelist file) by calling the VorticitySetup module's InitRHWave routine. Finally, the wave is defined and users can define the vorticity on a sphere mesh by calling the SetRHWaveOnMesh subroutine.

call New(rhWave, nIntegers, nReals)
call InitRH4Wave(rhWave, backgoundWindSpeed, amplitude)
call SetRH4WaveOnMesh( sphere, rhWave)

Code runs...

call Delete(rhWave)	

Requirements

The code requires a modern Fortran compiler with an OpenMPI distribution for parallel computing.
Without OpenMPI serial computations are still possible, but the code is designed to use distributed memory parallelism.

Currently the software is written for Intel compilers and makes use of the Intel MKL software library (LAPACK, specifically).
It is possible to use other compilers (e.g. gfortran) provided OpenMPI and LAPACK are also available.

LPPM uses interpolation software provided by ACM TOMS algorithm 526 written by Hiroshi Akima and implemented by John Burkhardt, and ACM TOMS algorithms 772 and 773 written by Robert Renka. All other code is authored by Peter Bosler.

Plotting and graphics

LPPM includes subroutines for outputting data into formats readable by the VTK C++ graphics library and ParaView, available from www.kitware.org, as well as routines for the NCAR Command Language (NCL) and Matlab.

lppm's People

Contributors

pbosler avatar

Watchers

 avatar  avatar

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.