ascl_id
stringclasses
752 values
repo_url
stringclasses
737 values
file_path
stringlengths
4
194
content
large_stringlengths
1
1M
language
stringclasses
29 values
license_type
stringclasses
24 values
size
int64
1
1M
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/qtGui/qtHelloWorld/window.h
/** * \file window.h * \brief QT helloworld application, main window. * */ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples o...
C/C++ Header
null
2,437
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/qtGui/qtHelloWorld/glwidget.cpp
/** * \file glwidget.cpp * \brief Defines a very simple example of use of QT class QGLWidget. */ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is p...
C++
null
6,796
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/CMakeLists.txt
add_subdirectory(cnpy) add_subdirectory(config) add_subdirectory(monitoring) if (USE_MPI) add_subdirectory(mpiUtils) #add_subdirectory(IO) endif(USE_MPI)
Text
null
158
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/config/readme.txt
This directory provides an alternative configuration file parser to GetPot. There are several possibilities. We chose to use one of the simplest one : inih. See http://code.google.com/p/inih/ for more information about INI file parser inih.
Text
null
243
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/config/CMakeLists.txt
add_library(config "") target_sources(config PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ConfigMap.cpp ${CMAKE_CURRENT_SOURCE_DIR}/inih/ini.cpp ${CMAKE_CURRENT_SOURCE_DIR}/inih/INIReader.cpp ) target_include_directories(config PUBLIC ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/utils ${CMAKE_CURRENT_SOUR...
Text
null
526
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/config/ConfigMap.h
/** * \file ConfigMap.h * \brief Define an object will allow to easily retrieve parameter from a dictionary. * * \date 12 November 2010 * \author Pierre Kestener. * * $Id: ConfigMap.h 1783 2012-02-21 10:20:07Z pkestene $ */ #ifndef CONFIG_MAP_H_ #define CONFIG_MAP_H_ #include "inih/INIReader.h" /** * \class ...
C/C++ Header
null
1,385
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/config/ConfigMapTest.cpp
/** * \file ConfigMapTest.cpp * \brief This is an example use of class ConfigMap. * * \date 15 Nov 2010 * \author Pierre Kestener * * $Id: ConfigMapTest.cpp 1783 2012-02-21 10:20:07Z pkestene $ */ #include <iostream> #include <fstream> #include "ConfigMap.h" int main(int argc, char* argv[]) { // make test.i...
C++
null
2,542
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/config/ConfigMap.cpp
/** * \file ConfigMap.cpp * \brief Implement ConfigMap, essentially a INIReader with additional get methods. * * \date 12 November 2010 * \author Pierre Kestener. * * $Id: ConfigMap.cpp 1783 2012-02-21 10:20:07Z pkestene $ */ #include "ConfigMap.h" #include <cstdlib> // for strtof #include <sstream> #include <f...
C++
null
4,220
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/config/inih/README.txt
inih is a simple .INI file parser written in C, released under the New BSD license (see LICENSE.txt). Go to the project home page for more info: http://code.google.com/p/inih/
Text
null
178
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/config/inih/ini.h
/* inih -- simple .INI file parser inih is released under the New BSD license (see LICENSE.txt). Go to the project home page for more info: http://code.google.com/p/inih/ */ #ifndef __INI_H__ #define __INI_H__ /* Make this header file easier to include in C++ code */ #ifdef __cplusplus extern "C" { #endif /* ...
C/C++ Header
null
1,685
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/config/inih/INIReaderTest.cpp
// Example that shows simple usage of the INIReader class #include <iostream> #include <fstream> #include "INIReader.h" int main(int argc, char* argv[]) { // make test.ini file std::fstream iniFile; iniFile.open ("./test.ini", std::ios_base::out); iniFile << "; Test config file for ini_test.c" << std::endl; ...
C++
null
1,430
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/config/inih/INIReader.h
/** * \file INIReader.h * \brief Original INI file parser from inih slightly modified. * * This has been modified to add a virtual destructor, make Get and * GetInteger virtual, and format comments to Doxygen syntax. */ // Read an INI file into easy-to-access name/value pairs. // inih and INIReader are releas...
C/C++ Header
null
2,282
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/config/inih/LICENSE.txt
The "inih" library is distributed under the New BSD license: Copyright (c) 2009, Brush Technology All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the ab...
Text
null
1,542
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/config/inih/INIReader.cpp
/** * \file INIReader.cpp * \brief Implementation of class INIReader. * * Read an INI file into easy-to-access name/value pairs. */ #include <cctype> #include <cstdlib> #include <iostream> #include <sstream> #include "ini.h" #include "INIReader.h" // ======================================================= // ===...
C++
null
3,573
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/config/inih/ini.cpp
/* inih -- simple .INI file parser inih is released under the New BSD license (see LICENSE.txt). Go to the project home page for more info: http://code.google.com/p/inih/ */ #include <stdio.h> #include <ctype.h> #include <string.h> #include <sstream> #include <iostream> #include <string> #include <cctype> // for s...
C++
null
6,602
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/monitoring/PapiInfo.h
/** * \file PapiInfo.h * \brief A simple PAPI interface class. * * Parts of this class is adapted from file sc_flops.c found in library * libsc (https://github.com/cburstedde/libsc) * * \author Pierre Kestener * \date March 3rd, 2014 * * $Id$ */ #ifndef PAPI_INFO_H_ #define PAPI_INFO_H_ #include "Timer.h" ...
C/C++ Header
null
1,274
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/monitoring/CMakeLists.txt
add_library(monitoringCpu "") target_sources (monitoringCpu PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Timer.cpp ) if (RAMSESGPU_PAPI_FOUND) target_sources (monitoringCpu PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/PapiInfo.h ${CMAKE_CURRENT_SOURCE_DIR}/PapiInfo.cpp ) target_link_libraries(monitoringCpu ...
Text
null
620
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/monitoring/Timer.cpp
/** * \file Timer.cpp * \brief a simpe Timer class implementation. * * \author Pierre Kestener * \date 29 Oct 2010 * * $Id: Timer.cpp 1783 2012-02-21 10:20:07Z pkestene $ */ #include "Timer.h" #include <stdexcept> namespace hydroSimu { /////////////////////////////////////////////////////////////////////...
C++
null
2,554
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/monitoring/PapiInfo.cpp
/** * \file PapiInfo.cpp * \brief A simple PAPI interface class. * * Parts of this class is inspired by file sc_flops.c found in library * libsc (https://github.com/cburstedde/libsc). * * \author Pierre Kestener * \date March 3rd, 2014 * * $Id$ */ #include "PapiInfo.h" #include <sys/time.h> // for gettimeof...
C++
null
2,947
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/monitoring/measure_time.h
/** * \file measure_time.h * \brief Simple timing macros. * * \author Pierre Kestener * \date 31 Oct 2010 * * $Id: measure_time.h 1783 2012-02-21 10:20:07Z pkestene $ */ #ifndef MEASURE_TIME_H_ #define MEASURE_TIME_H_ #ifdef DO_TIMING #define MEASURE_TIME(timer, functionToCall) \ timer##.start(); \ f...
C/C++ Header
null
612
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/monitoring/PapiInfoTest.cpp
/** * \file PapiTest.cpp * \brief This is an example use of class PapiInfo. * * \date March 4, 2014 * \author Pierre Kestener * * $Id$ */ #include "PapiInfo.h" #include <fstream> #include <iostream> namespace hydroSimu { class PapiInfoTest { public: PapiInfoTest(){}; ~PapiInfoTest(){}; Timer aTimer; ...
C++
null
861
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/monitoring/Timer.h
/** * \file Timer.h * \brief A simple timer class. * * \author Pierre Kestener * \date 29 Oct 2010 * * $Id: Timer.h 1783 2012-02-21 10:20:07Z pkestene $ */ #ifndef MONITORING_TIMER_H_ #define MONITORING_TIMER_H_ #include <time.h> #include <sys/time.h> // for gettimeofday and struct timeval typedef struct time...
C/C++ Header
null
1,066
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/monitoring/CudaTimer.h
/** * \file CudaTimer.h * \brief A simple timer class for CUDA based on events. * * \author Pierre Kestener * \date 30 Oct 2010 * * $Id: CudaTimer.h 1783 2012-02-21 10:20:07Z pkestene $ */ #ifndef CUDA_TIMER_H_ #define CUDA_TIMER_H_ namespace hydroSimu { /** * \brief a simple timer for CUDA kernel. */...
C/C++ Header
null
1,209
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/monitoring/date.h
/** * \file date.h * \brief A simple macro to return a formatted string with date. * * \author Pierre Kestener * \date 31 Oct 2010 * * $Id: date.h 1783 2012-02-21 10:20:07Z pkestene $ */ #ifndef MONITORING_DATE_H_ #define MONITORING_DATE_H_ #include <string> // for std::string #include <time.h> // for time_t, ...
C/C++ Header
null
711
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/mpiUtils/MpiCommCart.h
/** * \file MpiCommCart.h * \brief A simple derive class of MpiComm to handle cartesian * topology. * * \date 5 Oct 2010 * \author Pierre Kestener * * $Id: MpiCommCart.h 1783 2012-02-21 10:20:07Z pkestene $ */ #ifndef MPI_COMM_CART_H_ #define MPI_COMM_CART_H_ #include "MpiComm.h" #include "mpiEnums.h" names...
C/C++ Header
null
4,397
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/mpiUtils/CMakeLists.txt
add_library(mpiUtils "") target_sources (mpiUtils PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/GlobalMpiSession.cpp ${CMAKE_CURRENT_SOURCE_DIR}/TestForException.h ${CMAKE_CURRENT_SOURCE_DIR}/ErrorPolling.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ErrorPolling.h ${CMAKE_CURRENT_SOURCE_DIR}/common_config.h ${CMAKE_CURRENT_SOU...
Text
null
945
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/mpiUtils/GlobalMpiSession.cpp
/** * \file GlobalMpiSession.cpp * \brief Implements class GlobalMpiSession. * Slightly adapted from the Trilinos package named Teuchos : * http://trilinos.sandia.gov/packages/teuchos/ * * - change namespace into hydroSimu * - remove macro HAVE_MPI since this file will only be compiled if * MPI wanted * * \...
C++
null
7,283
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/mpiUtils/ErrorPolling.h
/** * \file ErrorPolling.h * \brief Utility code for synchronizing std::exception detection across processors. * * Adapted from Teuchos package (Trilinos). * \date 5 Oct 2010 * * $Id: ErrorPolling.h 1783 2012-02-21 10:20:07Z pkestene $ */ // ********************************************************************...
C/C++ Header
null
4,627
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/mpiUtils/GlobalMpiSession.h
/** * \file GlobalMpiSession.h * \brief A MPI utilities class, providing methods for initializing, * finalizing, and querying the global MPI session * * This is slightly adapted from the Trilinos package named Teuchos : * http://trilinos.sandia.gov/packages/teuchos/ * * List of changes: * - clean TEUCH...
C/C++ Header
null
4,414
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/mpiUtils/TestForException.h
/** * \file TestForException.h * \brief Macro for throwing an exception with breakpointing to ease debugging. * * This file is from the Trilinos package named Teuchos : * http://trilinos.sandia.gov/packages/teuchos/ * * \date 1 Oct 2010 * * $Id: TestForException.h 1783 2012-02-21 10:20:07Z pkestene $ */ // **...
C/C++ Header
null
8,861
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/mpiUtils/MpiComm.cpp
/** * \file MpiComm.cpp * \brief Implements class MpiComm * * Adapted from Teuchos package (Trilinos) * See : http://trilinos.sandia.gov/packages/teuchos/ * * Major modification : add virtual topology (cartesian) * * \date 5 Oct 2010 * \author Pierre Kestener * * $Id: MpiComm.cpp 1859 2012-03-20 17:12:12Z ...
C++
null
15,375
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/mpiUtils/ErrorPolling.cpp
/** * \file ErrorPolling.cpp * \brief Implements class ErrorPolling * * $Id: ErrorPolling.cpp 1783 2012-02-21 10:20:07Z pkestene $ */ // *********************************************************************** // // Teuchos: Common Tools Package // Copyright (2004) Sandia Corpora...
C++
null
2,120
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/mpiUtils/MpiComm.h
/** * \file MpiComm.h * \brief Object representation of a MPI communicator * * Adapted from file Teuchos_MPIComm.hpp in package Teuchos inside * Trilinos. * See : http://trilinos.sandia.gov/packages/teuchos/ * * Major modification : add some missing point-to-point communication routines * and MPI_Sendrecv wrap...
C/C++ Header
null
6,948
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/mpiUtils/mpiEnums.h
#ifndef MPI_ENUMS_H_ #define MPI_ENUMS_H_ namespace hydroSimu { //! defgroup mpi_cartesian //!@{ //! number of dimensions of the cartesian virtual topology enum { NDIM_2D = 2, NDIM_3D = 3 }; //! do we allow processor reordering by the MPI cartesian communicator ? enum { MPI_REORDER_FALSE = ...
C/C++ Header
null
1,112
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/mpiUtils/common_config.h
/** * \file common_config.h * \brief Gather here all relevant C++ header includes. * * $Id: common_config.h 1783 2012-02-21 10:20:07Z pkestene $ */ #ifndef COMMON_CONFIG_H_ #define COMMON_CONFIG_H_ #include <cstdio> #include <cstdarg> #include <cerrno> #include <climits> #include <cstdlib> #include <string> #incl...
C/C++ Header
null
692
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/mpiUtils/MpiCommCart.cpp
/** * \file MpiCommCart.cpp * \brief Implements class MpiCommCart * * \date 5 Oct 2010 * \author Pierre Kestener * * $Id: MpiCommCart.cpp 1783 2012-02-21 10:20:07Z pkestene $ */ #include "MpiCommCart.h" namespace hydroSimu { // ======================================================= // ==================...
C++
null
1,889
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/cnpy/CMakeLists.txt
add_library(cnpy "") target_sources(cnpy PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/cnpy.cpp ${CMAKE_CURRENT_SOURCE_DIR}/zlib/crc32.c) target_include_directories(cnpy PUBLIC ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src/utils ) set_target_properties(cnpy PROPERTIES LINKER_LANGUAGE CXX) add_library(RamsesGPU::cnp...
Text
null
460
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/cnpy/cnpy.h
//Copyright (C) 2011 Carl Rogers //Released under MIT License //license available in LICENSE file, or at http://www.opensource.org/licenses/mit-license.php #ifndef LIBCNPY_H_ #define LIBCNPY_H_ #include<string> #include<stdexcept> #include<sstream> #include<vector> #include<cstdio> #include<typeinfo> #include<iostrea...
C/C++ Header
null
9,188
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/cnpy/cnpy.cpp
//Copyright (C) 2011 Carl Rogers //Released under MIT License //license available in LICENSE file, or at http://www.opensource.org/licenses/mit-license.php #include"cnpy.h" #include<complex> #include<cstdlib> #include<algorithm> #include<cstring> #include<iomanip> char cnpy::BigEndianTest() { unsigned char x[] = {1...
C++
null
7,662
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/cnpy/cnpy_example.cpp
/* g++ -o example example.cpp cnpy.cpp -lz */ #include"cnpy.h" #include<complex> #include<cstdlib> #include<iostream> #include<map> #include<string> const unsigned int Nx = 128; const unsigned int Ny = 64; const unsigned int Nz = 32; int main() { //create random data std::complex<double>* data = new std::com...
C++
null
2,300
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/cnpy/zlib/crc32.c
/* crc32.c -- compute the CRC-32 of a data stream * Copyright (C) 1995-2006, 2010, 2011, 2012 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h * * Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster * CRC methods: exclusive-oring 32 bits of data at a time,...
C
null
13,179
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/cnpy/zlib/zutil_cnpy.h
/* zutil.h -- internal interface and configuration of the compression library * Copyright (C) 1995-2013 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ /* WARNING: this file should *not* be used by applications. It is part of the implementation of the compression lib...
C/C++ Header
null
6,771
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/cnpy/zlib/zconf_cnpy.h
/* zconf.h -- configuration of the zlib compression library * Copyright (C) 1995-2013 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ #ifndef ZCONF_H #define ZCONF_H /* * If you *really* need a unique prefix for all types and library functions, * com...
C/C++ Header
null
15,907
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/cnpy/zlib/crc32.h
/* crc32.h -- tables for rapid CRC calculation * Generated automatically by crc32.c */ local const z_crc_t FAR crc_table[TBLS][256] = { { 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL, 0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL, 0xe0d5e91eUL, 0x97d2d988U...
C/C++ Header
null
30,562
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/cnpy/zlib/zlib_cnpy.h
/* zlib.h -- interface of the 'zlib' general purpose compression library version 1.2.8, April 28th, 2013 Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising fr...
C/C++ Header
null
87,888
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/utils/IO/ioConvert.cpp
/** * \file ioConvert.cpp * \brief * MPI app to convert large 3D netcdf file into HDF5 file using MPI collective IO. * * example of use: * mpirun -np 4 ioConvert -i test.nc -o test.h5 * * \date 28 Feb 2013 * \author P. Kestener * * $Id: ioConvert.cpp 3529 2014-08-29 16:34:41Z pkestene $ */ #include <cstd...
C++
null
35,912
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/python/fft/fft_bench.py
""" Mini benchmark for scipy FFT and anfft FFT anfft (FFTW wrapper) - http://code.google.com/p/anfft/ Example install steps: 1. set env variable PYTHONUSERBASE 2. unpack anfft-0.2.tar.gz 3. run 'python setup.py install --user' to install package in PYTHONUSERBASE """ from scipy.fftpack import...
Python
null
1,411
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/python/utils/read_vti.py
''' A simple example showing how to read a .vti file (vtkImageData) a convert it to a numpy array. ''' import numpy as np import matplotlib.pyplot as plt import vtk from vtk.util import numpy_support # # filename is a VTI file # def vti_to_numpy(filename, fieldName='density'): reader = vtk.vtkXMLImageDataR...
Python
null
1,595
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/python/utils/convert_netcdf2vtr.py
#!/usr/bin/env python """ Convert Netcdf file to python. """ # Standard library imports from __future__ import division import sys # numerical packages import numpy as np # HDF5 package import h5py as h5 # NetCDF package import Scientific.IO.NetCDF as nc # write numpy array into VTK file from evtk.hl import grid...
Python
null
4,712
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/python/utils/h5extract.py
""" Extract dataset from a HDF55, and write results in another HDF5 file """ from __future__ import print_function import sys import numpy import h5py def extract(inputFilename, datasetName, outputFilename): print("Trying to extract dataset %s from file %s" % (datasetName,inputFilename) ) iFile=h5py.File(...
Python
null
1,184
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/python/visu/visu_plane.py
#!/usr/bin/env python """Visualize hdf5 data from a RAMSES-GPU run. """ # Standard library imports import numpy as np import h5py import sys # Enthought library imports from mayavi.scripts import mayavi2 from mayavi.sources.array_source import ArraySource from mayavi.modules.outline import Outline from mayavi.mod...
Python
null
1,834
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/python/visu/VtkRayCast.py
#!/usr/bin/env python ## # \file VtkRayCast.py # \brief This is a simple volume rendering example that uses a # vtkVolumeRayCast mapper # # Modified by P. Kestener : # - handle vtkImageData type # - custom colorTransfertFunction # import sys import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGe...
Python
null
4,266
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/python/visu/offscreen_render.py
#!/usr/bin/env python """A simple to do offscreen rendering or the Mayavi Envisage application and do off screen rendering. It can be run as:: $ python offscreen_render.py """ # Author: Prabhu Ramachandran <prabhu@aero.iitb.ac.in> # Copyright (c) 2007, Enthought, Inc. # License: BSD Style. ## # \file offscreen...
Python
null
2,389
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/python/visu/Mayavi2RayCast.py
#!/usr/bin/env python """This is a simple Mayavi2 script to do volume rendering using Mayavi2. """ ## # \file Mayavi2RayCast.py # \brief This is a simple Mayavi2 script to do volume rendering using Mayavi2. # \author P. Kestener # Standard library imports from os.path import join, abspath, dirname import sys # Mayav...
Python
null
1,064
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/python/powerSpectrum/setup.py
from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext setup( cmdclass = {'build_ext': build_ext}, ext_modules = [Extension("powerSpectrum2", ["powerSpectrum2.pyx"], libraries=["m"])] ) # build: # python setup.py build_ext --inplace
Python
null
304
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/python/powerSpectrum/powerSpectrum_bench.py
""" Mini benchmark for powerSpectrum (pure python versus cython) """ import sys from powerSpectrum import powSpectrum as powSpectrum_py from powerSpectrum2 import powSpectrum as powSpectrum_cy def bench_powerSpectrum_py(data,Nbins): freq, pow_data = powSpectrum_py(data,Nbins) print pow_data def bench_po...
Python
null
1,661
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/python/powerSpectrum/powerSpectrum.py
#!/usr/bin/env python """ Compute power spectrum """ # Standard library imports import sys import numpy as np # HDF5 package import h5py # # ################################################### # def read_ramses_gpu_data(fileName,fieldName='density'): """Read hdf5 data from RAMSES-GPU simulation run using h5py m...
Python
null
4,386
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/python/powerSpectrum/plot_powerSpectrum.py
""" Plot power spectrum. """ import sys import numpy as np import h5py from powerSpectrum2 import powSpectrum from powerSpectrum2 import read_ramses_gpu_data from powerSpectrum2 import squareModulusFourier # # MAIN # if __name__ == '__main__': from timeit import Timer Nbins=64 # default dat...
Python
null
965
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/glutGui/GlutWindow.cpp
/** * \file GlutWindow.cpp * \brief Implements a base class for handling Glut interface callbacks. * * \see http://www.stetten.com/george/glutmaster/glutmaster.html * * $Id: GlutWindow.cpp 1784 2012-02-21 10:34:58Z pkestene $ */ //////////////////////////////////////////////////////////////// // ...
C++
null
2,233
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/glutGui/GlutMaster.cpp
/** * \file GlutMaster.cpp * \brief Implements a class for handling multiple GlutWindows. * * \see http://www.stetten.com/george/glutmaster/glutmaster.html * * $Id: GlutMaster.cpp 1784 2012-02-21 10:34:58Z pkestene $ */ //////////////////////////////////////////////////////////////// // ...
C++
null
4,487
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/glutGui/palettes.h
/** * \file palettes.h * \brief Defines lookup tables (palettes) used in the rendering GLut/Qt Gui. * * Lookup tables borrowed from Athena. https://trac.princeton.edu/Athena/ * The 7 tables included are : * - rainbow - red-blue-black. * - jh_colors - John Hawley's "famous" color table. Red-gray-blue. * ...
C/C++ Header
null
73,370
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/glutGui/README.txt
see the GlutMaster page http://www.stetten.com/george/glutmaster/glutmaster.html it is a C++ GLUT Wrapper.
Text
null
108
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/glutGui/HydroWindow.h
/** * \file HydroWindow.h * \brief * Top level class for displaying a Hydro simulation. * Inspired by DemoWindow.h * * \author P. Kestener * \date 23/02/2010 * * $Id: HydroWindow.h 1784 2012-02-21 10:34:58Z pkestene $ */ #ifndef HYDRO_WINDOW_H_ #define HYDRO_WINDOW_H_ #include "GlutMaster.h" // applicatio...
C/C++ Header
null
4,222
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/glutGui/DemoWindow.cpp
/** * \file DemoWindow.cpp * \brief Original example use of class GlutWindow. * * $Id: DemoWindow.cpp 1784 2012-02-21 10:34:58Z pkestene $ */ //////////////////////////////////////////////////////////////// // // // demoWindow.c++ ...
C++
null
2,436
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/glutGui/GlutWindow.h
/** * \file GlutWindow.h * \brief Defines a base class for handling Glut interface callbacks. * * \see http://www.stetten.com/george/glutmaster/glutmaster.html * * $Id: GlutWindow.h 1784 2012-02-21 10:34:58Z pkestene $ */ //////////////////////////////////////////////////////////////// // ...
C/C++ Header
null
1,792
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/glutGui/HydroWindow.cpp
/** * \file HydroWindow.cpp * \brief Implementation of class HydroWindow. * * \author P. Kestener * \date 23/02/2010 * * $Id: HydroWindow.cpp 1784 2012-02-21 10:34:58Z pkestene $ */ #include <HydroWindow.h> #include "palettes.h" #include "../utils/monitoring/date.h" // =======================================...
C++
null
22,137
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/glutGui/README.orig.txt
************************************************* GlutMaster: An Object Oriented Adaptation of GLUT ************************************************* by George Stetten and Korin Crawford (email@stetten.com) (beta version 0.3 - 9/9/97) GLUT is a library-based GUI for OpenGL that runs on many platforms (see Open...
Text
null
2,629
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/glutGui/GlutMaster.h
/** * \file GlutMaster.h * \brief Defines a class for handling multiple GlutWindows. * * \see http://www.stetten.com/george/glutmaster/glutmaster.html * * $Id: GlutMaster.h 1784 2012-02-21 10:34:58Z pkestene $ */ //////////////////////////////////////////////////////////////// // ...
C/C++ Header
null
2,160
[ascl:1710.013]
https://github.com/pkestene/ramsesGPU
src/glutGui/DemoWindow.h
/** * \file DemoWindow.h * \brief Original example use of class GlutWindow. * * $Id: DemoWindow.h 1784 2012-02-21 10:34:58Z pkestene $ */ //////////////////////////////////////////////////////////////// // // // demoWindow.h ...
C/C++ Header
null
1,441
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
bitbucket-pipelines.yml
# This is a sample build configuration for Python. # Check our guides at https://confluence.atlassian.com/x/x4UWN for more examples. # Only use spaces to indent your .yml configuration. # ----- # You can specify a custom docker image from Docker Hub as your build environment. image: cphyc/openmpi-iap pipelines: defa...
YAML
null
542
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
README.md
# This is the old ramses bitbucket repository. --- > :warning: **Ramses main repository moved to [Github](https://github.com/ramses-organisation/ramses) ! The new address is <https://github.com/ramses-organisation/ramses>.** :warning: *Learn more about the change and how to migrate [here](https://ramses.cnrs.fr/rams...
Markdown
null
757
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
poisson/phi_fine_cg.f90
!########################################################### !########################################################### !########################################################### !########################################################### subroutine phi_fine_cg(ilevel,icount) use amr_commons use pm_commons u...
Fortran
null
18,778
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
poisson/output_poisson.f90
subroutine backup_poisson(filename) use amr_commons use poisson_commons use mpi_mod implicit none character(LEN=80)::filename integer::i,ivar,ncache,ind,ilevel,igrid,iskip,ilun,istart,ibound integer,allocatable,dimension(:)::ind_grid real(dp),allocatable,dimension(:)::xdp character(LEN=5)::nchar ch...
Fortran
null
2,685
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
poisson/init_poisson.f90
subroutine init_poisson use pm_commons use amr_commons use poisson_commons use mpi_mod implicit none #ifndef WITHOUTMPI integer :: info,info2,dummy_io integer,parameter::tag=1114 #endif integer::ncell,ncache,iskip,igrid,i,ilevel,ind,ivar integer::ilevel2,numbl2,ilun,ibound,istart integer::ncpu2,ndim...
Fortran
null
5,579
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
poisson/multigrid_coarse.f90
!########################################################### !########################################################### !########################################################### !########################################################### subroutine full_multigrid(icount) use amr_commons use pm_commons use p...
Fortran
null
25,379
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
poisson/interpol_phi.f90
subroutine interpol_phi(ind_cell,phi_int,ncell,ilevel,icount) use amr_commons use poisson_commons, only:phi,phi_old implicit none integer::ncell,ilevel,icount integer ,dimension(1:nvector)::ind_cell real(dp),dimension(1:nvector,1:twotondim)::phi_int !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!...
Fortran
null
4,144
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
poisson/rho_ana.f90
!######################################################### !######################################################### !######################################################### !######################################################### subroutine rho_ana(x,d,dx,ncell) use amr_parameters use hydro_parameters use p...
Fortran
null
2,680
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
poisson/poisson_commons.f90
module poisson_commons use amr_commons use poisson_parameters real(dp),allocatable,dimension(:) ::phi,phi_old ! Potential real(dp),allocatable,dimension(:) ::rho ! Density real(dp),allocatable,dimension(:,:)::f ! 3-force real(dp),allocatable,dimension(:) ::rho_top ...
Fortran
null
1,274
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
poisson/multigrid_fine_coarse.f90
! ------------------------------------------------------------------------ ! Multigrid Poisson solver for refined AMR levels ! ------------------------------------------------------------------------ ! This file contains all MG-coarse-level related routines ! ! Used variables: ! finest(AMR)level ...
Fortran
null
35,397
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
poisson/gravana.f90
!######################################################### !######################################################### !######################################################### !######################################################### subroutine gravana(x,f,dx,ncell) use amr_parameters use poisson_parameters use...
Fortran
null
3,903
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
poisson/boundary_potential.f90
!################################################################ !################################################################ !################################################################ !################################################################ subroutine make_boundary_force(ilevel) use amr_commons...
Fortran
null
11,149
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
poisson/poisson_parameters.f90
module poisson_parameters use amr_parameters ! Convergence criterion for Poisson solvers real(dp)::epsilon=1.0D-4 ! Type of force computation integer ::gravity_type=0 ! Gravity parameters real(dp),dimension(1:10)::gravity_params=0 ! Maximum level for CIC dark matter interpolation integer :: cic_le...
Fortran
null
848
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
poisson/multigrid_fine_fine.f90
! ------------------------------------------------------------------------ ! Multigrid Poisson solver for refined AMR levels ! ------------------------------------------------------------------------ ! This file contains all MG-fine-level related routines ! ! Used variables: ! finest(AMR)level ...
Fortran
null
26,176
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
poisson/multigrid_fine_commons.f90
! ------------------------------------------------------------------------ ! Multigrid Poisson solver for refined AMR levels ! ------------------------------------------------------------------------ ! This file contains all generic fine multigrid routines, such as ! * multigrid iterations @ fine and coarse MG levels...
Fortran
null
55,672
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
poisson/force_fine.f90
!######################################################### !######################################################### !######################################################### !######################################################### subroutine force_fine(ilevel,icount) use amr_commons use pm_commons use poisso...
Fortran
null
10,064
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/observe.f90
module observe_commons use amr_parameters integer,parameter::observe_num_quantity=8 real(dp),dimension(1:observe_num_quantity)::observe_quantity=0d0 integer::observe_ilun_quantity=8000 ! Star radiation statistics real(kind=8)::observe_total_star_source=0d0 integer::observe_num_stars=0 end module obser...
Fortran
null
4,699
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/rad_boundary.f90
! Call once per process. subroutine init_rad_boundary() use radiation_commons use mpi_mod implicit none integer::lattice_size if (rad_boundary_condition.eq.0) then if (myid.eq.1) then write(*,*)"Using zero-gradient boundary conditions for radiation." end if else if (rad_boundary_condition...
Fortran
null
5,726
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/timing.f90
! Module for timing passages of code. ! ! Example: ! ! use timing ! implicit none ! timer_state::my_timer ! ! call timer_init(my_timer) ! call timer_start(my_timer) ! ... do stuff ... ! call timer_stop(my_timer) ! call timer_output(<file>, my_timer, "my_timer") module timing implicit none type timer_stat...
Fortran
null
1,247
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/rad_init.f90
subroutine rad_init use cooling_module use data_common use radiation_commons implicit none integer::aton_init_gpu call aton_get_grid_size( & & grid_size_x, & & grid_size_y, & & grid_size_z, & & boundary_size) num_cpu_x = 2**levelmin / grid_size_x num_cpu_y = 2**levelmin / gr...
Fortran
null
2,815
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/rad_stars.f90
! Adapted from pm/feedback.f90. subroutine compute_Srad() use pm_commons use amr_commons use hydro_commons use radiation_commons use observe_commons implicit none integer::ilevel observe_total_star_source=0d0 observe_num_stars=0 if (.not.pic) then if (myid.eq.1) then write(*,*)"Not c...
Fortran
null
8,509
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/init_radiation.f90
subroutine init_radiation use amr_commons use hydro_commons use cooling_module, ONLY: force_j0_one use radiation_commons, ONLY: Erad,Srad use mpi_mod implicit none integer::ncell,ncache,iskip,igrid,i,ilevel,ind,ivar integer::nvar2,ilevel2,numbl2,ilun,ibound,istart,info integer::ncpu2,ndim2,nlevelmax2,...
Fortran
null
3,958
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/rad_step.f90
! Radiation module for RAMSES. ! It uses the ATON library. ! 2010 ! Timothy Stranex <timothy@stranex.com> ! FIXME: Rename data_common to rad_arrays and move to its own file. module data_common ! Scalar quantities. ! cpu_t: Temperature [Kelvin] ! cpu_d: Gas number density [atoms / m^3] ! cpu_x: Ionization fract...
Fortran
null
24,825
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/rad_backup.f90
subroutine backup_radiation(filename) use amr_commons use hydro_commons use radiation_commons, ONLY: Erad use mpi_mod implicit none character(LEN=80)::filename integer::i,ivar,ncache,ind,ilevel,igrid,iskip,ilun,istart,ibound,nvar_rad integer,allocatable,dimension(:)::ind_grid real(dp),allocatable,dim...
Fortran
null
4,997
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/radiation_commons.f90
module radiation_commons use amr_commons use timing implicit none ! Photon number density on the AMR grid real(dp),allocatable,dimension(:) ::Erad ! Photon emission source field on the AMR grid real(dp),allocatable,dimension(:) ::Srad ! Number of cells in each dimension. integer::grid_size_x,grid...
Fortran
null
2,829
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/atonlib/aton_cpp.h
// Public C++ interface for ATON. // WARNING: // This interface is not finalized. // Clearly it needs to be improved a lot. // Incompatible changes are likely to be made. // The GPU functions operate on global GPU arrays. // Therefore, there can only be a single GPU ATON instance per process. // However, there is als...
C/C++ Header
null
2,493
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/atonlib/aton_fortran.h
// Public Fortran interface to ATON. // The library operates with global arrays on the GPU. // Therefore, there can only be a single ATON instance per process. // Also, the GPU grid size is fixed at compile time. // You need to edit internal/gpu.h to change the size. // // ATON always uses 'physical' quantities, never...
C/C++ Header
null
4,328
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/atonlib/internal/constants.h
#ifdef S_100000 #define AVG_EGY 29.6099 #define AVG_CSN 1.63029e-22 #define AVG_CSE 1.09691e-22 #endif #ifdef S_50000 #define AVG_EGY 20.2762 #define AVG_CSN 2.93055e-22 #define AVG_CSE 2.49363e-22 #endif
C/C++ Header
null
211
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/atonlib/internal/gpu.h
// GPU definitions. // Unfortunately the grid size is fixed at compile time. // It is defined by the NCELLX, NCELLY and NCELLZ macros. // These are always passed on the compiler command line // so that they can be configured in the Makefile. // Number of boundary cells. // This must be at least 1. // Larger values (e...
C/C++ Header
null
1,335
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/utils/test7linecut.py
#!/usr/bin/python import glob import math import os import sys def load_info(output_dir): info = {} info_path = glob.glob(os.path.join(output_dir, 'info_*'))[0] for line in file(info_path): parts = line.strip().split() if len(parts) == 3 and parts[1] == '=': info[parts[0]] = pa...
Python
null
1,730
[ascl:1011.007]
https://bitbucket.org/rteyssie/ramses
aton/utils/test5spherical.py
#!/usr/bin/python """ Reads the output from amr2cell and outputs the averaged quantities in spherical shells about the centre of the cube. """ import math import sys N = 256 bins = [[0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] for i in range(N)] middle = 0.5 # Units # These need to be kept in sync with amr/units.f90! mH = 1....
Python
null
1,556