Skip to main content

FARGO3D Wrapping

Project description

FARGOpy

Wrapping FRAGO3D

version downloads

FARGOpy is a python wrapping for FARGO3D., the well-knwon hydrodynamics and magnetohydrodynamics parallel code. This wrapping is intended to ensue the interaction with FARGO3D especially for those starting using the code, for instance for teaching and training purposes, but also provide functionalities for most advanced users in tasks related to the postprocessing of output files and plotting.

Download and install

For using FARGOpy you first need to download and install FARGO3D and all its prerequisites. For a detailed guide please see the FARGO documentation or the project repo at bitbucket. Still, FARGOpy provides some useful commands and tools to test the platform on which you are working and check if it is prepared to use the whole functionalities of the packages or part of them.

NOTE: It is important to understand that FARGO3D works especially well on Linux plaforms (including MacOS). The same condition applies for FARGOpy. Because of that, most internal as well as public features of the packages are designed to work in a Linux environment. For working in another operating systems, for instance for teaching or training purposes, please consider to use virtual machines.

For installing FARGOpy run:

# Uncomment if you are in Google Colab
# !pip install -q fargopy

Once installed import it:

import fargopy as fp

# For developing purpose. Remove during production
%load_ext autoreload
%autoreload 2
Running FARGOpy version 0.0.1

Quickstart

The first thing you need to run FARGOpy is to create a simulation:

sim = fp.Simulation()

Install FARGO3D

For obvious reasons FARGO3D is not provided with FARGOpy. Get and set the package using:

sim.set_fargo3d(basedir='.')
Running FARGOpy version 0.0.1
> Checking for FARGO3D directroy:
FARGO3D source code is not available at './public/'
	Getting FARGO3D public repo...
	✓Package downloaded to './public/'
> Checking for FARGO3D normal binary:
FARGO3D binary with options '' not compiled at './public/'
	Compiling FARGO3D (it may take a while)...
	✓Binary in normal mode compiling correctly
> Checking for FARGO3D parallel binary:
FARGO3D binary with options 'PARALLEL=1' not compiled at './public/'
	Compiling FARGO3D in parallel (it may take a while)...
	✓Binary in parallel mode compiling correctly
> Checking for FARGO3D GPU binary:
FARGO3D binary with options 'GPU=1' not compiled at './public/'
	Compiling FARGO3D with GPU (it may take a while)...
	No GPU available

If you already have a copy of FARGO3D you just need to set the configuration variables telling FARGOpy where the source code is located:

  fp.Conf.update_fargo3d_dir('/tmp','public')

once the variables has been set, you should run:

  sim.set_fargo3d()

What's new

Version 0.0.*:

  • First classes created.
  • The project is started!

This package has been designed and written by Jorge I. Zuluaga and Matías Montesinos (C) 2023

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fargopy-0.0.3.tar.gz (6.5 kB view hashes)

Uploaded Source

Built Distribution

fargopy-0.0.3-py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page