commit stringlengths 40 40 | subject stringlengths 4 1.73k | repos stringlengths 5 127k | old_file stringlengths 2 751 | new_file stringlengths 2 751 | new_contents stringlengths 1 8.98k | old_contents stringlengths 0 6.59k | license stringclasses 13
values | lang stringclasses 23
values |
|---|---|---|---|---|---|---|---|---|
4fe1f1c51005834e438a1e6d5282b4ac652fca01 | fix small bug | szaghi/FURY,szaghi/FURY | src/lib/fury_units_reference_system/fury_units_system_abstract.f90 | src/lib/fury_units_reference_system/fury_units_system_abstract.f90 | !< FURY definition of abstract units system class.
module fury_units_system_abstract
!-----------------------------------------------------------------------------------------------------------------------------------
!< FURY definition of abstract units system class.
!--------------------------------------------------... | !< FURY definition of abstract units system class.
module fury_units_system_abstract
!-----------------------------------------------------------------------------------------------------------------------------------
!< FURY definition of abstract units system class.
!--------------------------------------------------... | bsd-2-clause | FORTRAN |
48cb625d4dfd56e9f88174a4fcdcc1d687ca7f24 | replace is recursive | mapmeld/fortran-machine,mapmeld/fortran-machine,mapmeld/fortran-machine,mapmeld/fortran-machine,mapmeld/fortran-machine | string_helpers.f90 | string_helpers.f90 | module string_helpers
implicit none
contains
subroutine compact(str)
! Converts multiple spaces and tabs to single spaces; deletes control characters;
! removes initial spaces.
character(len=*):: str
character(len=1):: ch
character(len=len_trim(str)):: outstr
integer::isp,k,ich,lenstr,i... | module string_helpers
implicit none
contains
subroutine compact(str)
! Converts multiple spaces and tabs to single spaces; deletes control characters;
! removes initial spaces.
character(len=*):: str
character(len=1):: ch
character(len=len_trim(str)):: outstr
integer::isp,k,ich,lenstr,i... | bsd-3-clause | FORTRAN |
10b0a88a856755bdc94944c7123d6c0aed21525b | Add the working main controller of dataArranger. | jungerstein/plasmaPhyLib,jungerstein/plasmaPhyLib | utils/dataSetter/dataArranger.f03 | utils/dataSetter/dataArranger.f03 | ! dataArranger.f03
! Main program for arrange data.
program dataArranger
use dataarrange, only: arrangeData
implicit none
character (len = 1024) :: charGrid, charBlock, nameFile, nameAus, nameCoor
integer :: nGrid, nBlock
integer :: lenIOData, lenIOCoor
double precision, allocatable, dimension (:, :, :... | apache-2.0 | FORTRAN | |
b02d606847fc589fc2d90bada31f5664dc5cb2e0 | Create object.f95 | MrCubanfrog/Gravity-simulation | object.f95 | object.f95 | module object_space_mod
implicit none
integer, parameter :: MAXBUF=20
!Defining the object
type :: object_space
character(MAXBUF) :: obj_name
real :: pos(3), vel(3), acc(3), mass
end type object_space
contains
!Function for creating a new Object
type(object_space) function newObject(n, p, v, m)
... | mit | FORTRAN | |
371b7ff9547d04cfcd4c6d633a3b8a7ce38b5ce6 | Update reference for array10 test case | clementval/claw-compiler,clementval/claw-compiler | test/openacc/array10/reference.f90 | test/openacc/array10/reference.f90 | PROGRAM vector_loop
CALL claw ( )
END PROGRAM vector_loop
SUBROUTINE claw ( )
INTEGER :: i = 10
INTEGER :: vec1 ( 0 : 10 , 0 : 10 )
INTEGER :: vec2 ( 0 : 10 , 0 : 10 )
INTEGER :: claw_induction_0
INTEGER :: claw_induction_1
vec1 ( 0 : i , 0 : i ) = 0
vec2 ( 0 : i , 0 : i ) = 100
!$claw array-transform tar... | PROGRAM vector_loop
CALL claw ( )
END PROGRAM vector_loop
SUBROUTINE claw ( )
INTEGER :: i = 10
INTEGER :: vec1 ( 0 : 10 , 0 : 10 )
INTEGER :: vec2 ( 0 : 10 , 0 : 10 )
INTEGER :: claw_induction_0
INTEGER :: claw_induction_1
vec1 ( 0 : i , 0 : i ) = 0
vec2 ( 0 : i , 0 : i ) = 100
!$claw array-transform target... | bsd-2-clause | FORTRAN |
8644e865d5a7ccb3dc82fde245b6b1afbe7bdf5c | fix line too long | laurensdeprez/RMPCDMD,laurensdeprez/RMPCDMD,pdebuyl/RMPCDMD,pdebuyl-lab/RMPCDMD,pdebuyl-lab/RMPCDMD,pdebuyl/RMPCDMD | src/md.f90 | src/md.f90 | module md
use particle_system
implicit none
private
public :: md_pos
public :: md_vel
contains
subroutine md_pos(particles, edges, dt)
type(particle_system_t), intent(inout) :: particles
double precision, intent(in) :: edges(3)
double precision, intent(in) :: dt
integer :: k, jump(3)
... | module md
use particle_system
implicit none
private
public :: md_pos
public :: md_vel
contains
subroutine md_pos(particles, edges, dt)
type(particle_system_t), intent(inout) :: particles
double precision, intent(in) :: edges(3)
double precision, intent(in) :: dt
integer :: k, jump(3)
... | bsd-3-clause | FORTRAN |
fde58da8f7ef01ef347f4c7ba0bac5a4a1d6fae4 | fix file list | bwitherspoon/core,bwitherspoon/core | sim/core/core.f | sim/core/core.f | ../../rtl/axis.sv
../../rtl/block_ram.sv
../../rtl/core.sv
../../rtl/fifo.sv
../../rtl/regfile.sv
../../rtl/rs232.sv
../../rtl/rv32i.sv
../../rtl/uart.sv
| ../rtl/axis.sv
../rtl/block_ram.sv
../rtl/core.sv
../rtl/fifo.sv
../rtl/regfile.sv
../rtl/rs232.sv
../rtl/rv32i.sv
../rtl/uart.sv
| isc | FORTRAN |
62c61e684a8f72168b86aec3651725b812083a6b | Remove the optional data/over clause | clementval/claw-compiler,clementval/claw-compiler | test/claw/abstraction1/mo_column.f90 | test/claw/abstraction1/mo_column.f90 | MODULE mo_column
IMPLICIT NONE
CONTAINS
! Compute only one column
SUBROUTINE compute_column(nz, q, t)
IMPLICIT NONE
INTEGER, INTENT(IN) :: nz ! Size of the array field
REAL, INTENT(INOUT) :: t(:) ! Field declared as one column only
REAL, INTENT(INOUT) :: q(:) ! Field declared as one colum... | MODULE mo_column
IMPLICIT NONE
CONTAINS
! Compute only one column
SUBROUTINE compute_column(nz, q, t)
IMPLICIT NONE
INTEGER, INTENT(IN) :: nz ! Size of the array field
REAL, INTENT(INOUT) :: t(:) ! Field declared as one column only
REAL, INTENT(INOUT) :: q(:) ! Field declared as one colum... | bsd-2-clause | FORTRAN |
6fc0b2b161bd0bd0724729ffcdb8fe1b9e3c56d6 | Update reference_acc.f90 | clementval/claw-compiler,clementval/claw-compiler | test/claw/sca/sca1/reference_acc.f90 | test/claw/sca/sca1/reference_acc.f90 | MODULE mo_column
CONTAINS
SUBROUTINE compute_column ( nz , q , t , nproma )
INTEGER , INTENT(IN) :: nproma
INTEGER , INTENT(IN) :: nz
REAL , INTENT(INOUT) :: t ( : , : )
REAL , INTENT(INOUT) :: q ( : , : )
INTEGER :: k
REAL :: c
INTEGER :: proma
!$acc data present(t,q)
!$acc parallel
!$acc loop gang v... | MODULE mo_column
CONTAINS
SUBROUTINE compute_column ( nz , q , t , nproma )
INTEGER , INTENT(IN) :: nproma
INTEGER , INTENT(IN) :: nz
REAL , INTENT(INOUT) :: t ( : , : )
REAL , INTENT(INOUT) :: q ( : , : )
INTEGER :: k
REAL :: c
INTEGER :: proma
!$acc data present(t,q)
!$acc parallel
!$acc loop gang v... | bsd-2-clause | FORTRAN |
fe5a9a4343f381a02184a79d4d5673f532ec1fe2 | switch to modern comment style for VIM readability | rangsimanketkaew/NWChem | src/ccsd/geaxpy.f | src/ccsd/geaxpy.f | !:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
! NAME
! GEAXPY -- Matrix Y <-- a*X + Y
!
! REVISION
! $Id$
!
! SYNOPSIS
Subroutine GEAXPY(M, N, Alpha, X, LDX, Y, LDY)
Implicit NONE
Integer M, N, LDX, LDY
Double precision Alpha
Double precision X(LDX, N), Y... | C:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
C NAME
C GEAXPY -- Matrix Y <-- a*X + Y
C
C REVISION
C $Id$
C
C SYNOPSIS
Subroutine GEAXPY(M, N, Alpha, X, LDX, Y, LDY)
Implicit NONE
Integer M, N, LDX, LDY
Double precision Alpha
Double precision X(LDX, N), Y... | mit | FORTRAN |
96237b22e26d781ff7fc11b6f018d9353e0989f1 | change the intent | ahelm/fortran-snippets | dummyPoiterArray/dummyArrayPointer.f03 | dummyPoiterArray/dummyArrayPointer.f03 | !===============================================================================
module helper_module
implicit none
interface check_value
module procedure check_values_int
module procedure check_values_real
end interface check_value
contains
subroutine construct_fakeCopy( ptr, arr, lb, ub )
! in... | !===============================================================================
module helper_module
implicit none
interface check_value
module procedure check_values_int
module procedure check_values_real
end interface check_value
contains
subroutine construct_fakeCopy( ptr, arr, lb, ub )
! in... | mit | FORTRAN |
dc88d2c3929e950c98bf98f5d401acf02e1ef04d | Add missing reference | clementval/claw-compiler,clementval/claw-compiler | test/driver/dependencies/reference.f90 | test/driver/dependencies/reference.f90 | MODULE mod1
USE mod2
USE mod3
END MODULE mod1
| bsd-2-clause | FORTRAN | |
7c99a829fa9750f80e6c3257704075511c95d9f4 | Add implicit none to test_CIJ_brow_chev | anowacki/seismo-fortran,anowacki/seismo-fortran,anowacki/seismo-fortran,anowacki/seismo-fortran | anisotropy_ajn/test_CIJ_brow_chev.f90 | anisotropy_ajn/test_CIJ_brow_chev.f90 | program test
! Test the CIJ_brow_chev subroutine
use anisotropy_ajn
implicit none
real(8),dimension(6,6) :: C,CI,CX,CT,CO,CM,CR
real(8) :: pI,pX,pT,pO,pM,pR
real(8) :: rho
real(8) :: R(3,3)
character(len=250) :: fname,fmt1,fmt2,symmetry
if (command_argument_count() /= 1) then
write(0,'(a)') 'Usage: test_CIJ_bro... | program test
! Test the CIJ_brow_chev subroutine
use anisotropy_ajn
real(8),dimension(6,6) :: C,CI,CX,CT,CO,CM,CR
real(8) :: pI,pX,pT,pO,pM,pR
real(8) :: rho
real(8) :: R(3,3)
character(len=250) :: fname,fmt1,fmt2,symmetry
if (command_argument_count() /= 1) then
write(0,'(a)') 'Usage: test_CIJ_brow_chev [.ecs fi... | mit | FORTRAN |
f537dc4803e8c31070fabf189a96e7d688630a8f | fix typo in error message in check_deallocate. | hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,ruthfranklin/hande,hande-qmc/hande | lib/local/checking.f90 | lib/local/checking.f90 | module checking
! Helper routines for testing whether an event was a success.
implicit none
contains
subroutine check_allocate(array_name, array_size, ierr)
use utils, only: int_fmt
use parallel, only: iproc, nprocs
use errors, only: stop_all
character(*), intent(in) :: ... | module checking
! Helper routines for testing whether an event was a success.
implicit none
contains
subroutine check_allocate(array_name, array_size, ierr)
use utils, only: int_fmt
use parallel, only: iproc, nprocs
use errors, only: stop_all
character(*), intent(in) :: ... | lgpl-2.1 | FORTRAN |
b51712624dc078e33f5f034033f8f658be0a8a2f | Add stats module | kramer314/fortran-lib | src/stats.f90 | src/stats.f90 | ! Copyright (c) 2015 Alex Kramer <kramer.alex.kramer@gmail.com>
! See the LICENSE.txt file at the top-level directory of this distribution.
! Basic statistics functionality
module stats
use globvars
use array, only: array_quicksort
implicit none
private
public :: stats_residuals
public :: stats_mean
p... | mit | FORTRAN | |
86f44c15cd7a0272d7b11a53c2abe8ece27e2f83 | Update reference | clementval/claw-compiler,clementval/claw-compiler | test/openacc/primitive1/reference.f90 | test/openacc/primitive1/reference.f90 | PROGRAM test_primitive
USE openacc
INTEGER :: i
!$acc parallel
DO i = 1 , 10 , 1
PRINT * , i
END DO
!$acc end parallel
!$claw omp do
DO i = 1 , 10 , 1
PRINT * , i
END DO
!$claw omp end do
END PROGRAM test_primitive
| PROGRAM test_primitive
INTEGER :: i
!$acc parallel
DO i = 1 , 10 , 1
PRINT * , i
END DO
!$acc end parallel
!$claw omp do
DO i = 1 , 10 , 1
PRINT * , i
END DO
!$claw omp end do
END PROGRAM test_primitive
| bsd-2-clause | FORTRAN |
5548b512f1d6fd38efea135469ad94ac9edb17dd | add get_glider_w.f90 | jinbow/Octopus,jinbow/Octopus | src/get_glider_w.f90 | src/get_glider_w.f90 | subroutine get_glider_w(uvw_g,ip,IPP)
#include "cpp_options.h"
#ifdef isGlider
use global, only : xyz,glider_clock,glider_position,parking_time,surfacing_time,SNPP
!add noise to the vertical velocity
!call random_number(tmp0)
!tmp0=(tmp0-0.5)*0.05
implicit none
integer*8,intent(in) :... | mit | FORTRAN | |
167d42beff8411485a5795e870d2e1f1325f4f9e | Add classical problem of route of gas stations. | dennisdjensen/sketchbook,dennisdjensen/sketchbook,dennisdjensen/sketchbook,dennisdjensen/sketchbook,dennisdjensen/sketchbook | praxis/gas.f08 | praxis/gas.f08 | ! Copyright 2015 Dennis Decker Jensen
! The gas station problem. A classic computer sicence problem.
! http://programmingpraxis.com/2015/07/17/the-gas-station-problem/
! There is a circular route for a truck.
! The truck has a gas tank with infinite capacity.
! Along the route are gas stations with varying amount of g... | isc | FORTRAN | |
e6cbdf02cba60c897653386694cf5d3abce60781 | add use mod_s_curve | M2-AAIS/BAD | mod_distance.f90 | mod_distance.f90 | module mod_distance
use mod_constants
use mod_read_parameters
use mod_s_curve
implicit none
private
contains
end module mod_distance
| module mod_distance
use mod_constants
use mod_read_parameters
implicit none
private
contains
end module mod_distance
| mit | FORTRAN |
8d58bb5798d48dcef8b23930171627893cc5b56d | increase tolerance again, vector sum actually implies more operations | pdebuyl/RMPCDMD,pdebuyl/RMPCDMD,pdebuyl-lab/RMPCDMD,laurensdeprez/RMPCDMD,pdebuyl-lab/RMPCDMD,laurensdeprez/RMPCDMD | test/test_particle_system_0.f90 | test/test_particle_system_0.f90 | program test_particle_system_0
use particle_system
use mt19937ar_module
use iso_c_binding
use tester
implicit none
type(particle_system_t) :: p
integer, parameter :: N = 3000
type(mt19937ar_t), target :: mt
type(tester_t) :: test
integer :: clock, i
double precision :: L(3), x(3)
call system_... | program test_particle_system_0
use particle_system
use mt19937ar_module
use iso_c_binding
use tester
implicit none
type(particle_system_t) :: p
integer, parameter :: N = 3000
type(mt19937ar_t), target :: mt
type(tester_t) :: test
integer :: clock, i
double precision :: L(3), x(3)
call system_... | bsd-3-clause | FORTRAN |
ff529317480d7e9487b7c33c8604fd7969c1f4b5 | Remove decl | clementval/claw-compiler,clementval/claw-compiler | test/openacc/primitive2/original_code.f90 | test/openacc/primitive2/original_code.f90 | PROGRAM test_primitive
USE openacc
INTEGER :: i
INTEGER :: nd
nd = acc_get_num_devices( acc_device_nvidia )
!$claw acc parallel
DO i = 1, 10
PRINT*,i
END DO
!$claw acc end parallel
!$claw omp do
DO i = 1, 10
PRINT*,i
END DO
!$claw omp end do
END PROGRAM test_primitive
| PROGRAM test_primitive
USE openacc
INTEGER :: i
INTEGER :: nd
INTEGER :: acc_device_nvidia
nd = acc_get_num_devices( acc_device_nvidia )
!$claw acc parallel
DO i = 1, 10
PRINT*,i
END DO
!$claw acc end parallel
!$claw omp do
DO i = 1, 10
PRINT*,i
END DO
!$claw omp end do
END PROGR... | bsd-2-clause | FORTRAN |
da6fae404ecbdbbef5c2b340373518c3f8bffa84 | Update reference_acc.f90 | clementval/claw-compiler,clementval/claw-compiler | test/claw/sca/sca1/reference_acc.f90 | test/claw/sca/sca1/reference_acc.f90 | MODULE mo_column
CONTAINS
SUBROUTINE compute_column ( nz , q , t , nproma )
INTEGER , INTENT(IN) :: nproma
INTEGER , INTENT(IN) :: nz
REAL , INTENT(INOUT) :: t ( : , : )
REAL , INTENT(INOUT) :: q ( : , : )
INTEGER :: k
REAL :: c
INTEGER :: proma
!$acc data present(t,q)
!$acc parallel
!$acc loop gang v... | MODULE mo_column
CONTAINS
SUBROUTINE compute_column ( nz , q , t , nproma )
INTEGER , INTENT(IN) :: nproma
INTEGER , INTENT(IN) :: nz
REAL , INTENT(INOUT) :: t ( : , : )
REAL , INTENT(INOUT) :: q ( : , : )
INTEGER :: k
REAL :: c
INTEGER :: proma
!$acc data present(t,q)
!$acc parallel
!$acc loop gang v... | bsd-2-clause | FORTRAN |
aca63a0f7ebb28b85ca765bc3b7e83934c89fa6f | add entropy | zingale/hydro1d | eos.f90 | eos.f90 | ! a simple gamma-law equation of state:
! p = rho e (gamma - 1)
!
! to define the temperature and entropy, we will use the ideal gas law:
! p = rho k T / (mu m_amu)
!
! where mu is the mean molecular weight and m_amu is the atomic mass
! unit
module eos_module
use datatypes_module
use params_module, on... | ! a simple gamma-law equation of state
! p = rho e (gamma - 1)
module eos_module
use datatypes_module
use params_module, only: gamma
implicit none
integer, parameter :: eos_input_p = 1
integer, parameter :: eos_input_e = 2
integer, parameter :: eos_input_pe = 3
private
public :: eos_input_p, eos_inp... | bsd-3-clause | FORTRAN |
c402896291443e87442ae45c1297da415792e897 | fix offset in flin | laurensdeprez/RMPCDMD,laurensdeprez/RMPCDMD,pdebuyl-lab/RMPCDMD,pdebuyl/RMPCDMD,pdebuyl/RMPCDMD,pdebuyl-lab/RMPCDMD | test/test_common_0.f90 | test/test_common_0.f90 | program test_common_0
use common
use tester
implicit none
type(tester_t) :: test
type(profile_t) :: p
double precision :: x0, x1
double precision, allocatable :: x(:)
integer :: i
integer :: n
integer, parameter :: nloop = 100
integer :: seed_size, clock
integer, allocatable :: seed(:)
ca... | program test_common_0
use common
use tester
implicit none
type(tester_t) :: test
type(profile_t) :: p
double precision :: x0, x1
double precision, allocatable :: x(:)
integer :: i
integer :: n
integer, parameter :: nloop = 100
integer :: seed_size, clock
integer, allocatable :: seed(:)
ca... | bsd-3-clause | FORTRAN |
3aba101be38fe2059a78dd5052ae9ce4686a7ddf | Fix test reference | clementval/claw-compiler,clementval/claw-compiler | test/claw/kcache4/reference.f90 | test/claw/kcache4/reference.f90 | PROGRAM claw_test
INTEGER :: istart = 0
INTEGER :: iend = 10
INTEGER :: jstart = 0
INTEGER :: jend = 20
CALL kcache ( istart , iend , jstart , jend )
END PROGRAM claw_test
SUBROUTINE kcache ( istart , iend , jstart , jend )
INTEGER , INTENT(IN) :: istart
INTEGER , INTENT(IN) :: iend
INTEGER , INTENT(IN) :: js... | PROGRAM claw_test
INTEGER :: istart = 0
INTEGER :: iend = 10
INTEGER :: jstart = 0
INTEGER :: jend = 20
CALL kcache ( istart , iend , jstart , jend )
END PROGRAM claw_test
SUBROUTINE kcache ( istart , iend , jstart , jend )
INTEGER , INTENT(IN) :: istart
INTEGER , INTENT(IN) :: iend
INTEGER , INTENT(IN) :: js... | bsd-2-clause | FORTRAN |
d179780ad8f687ca4ae69729cc6cfc6972ba3f90 | Add a new subroutine to unscramble the arrays in the cc-file and produces new variables anew and bnew for further processing | geodynamics/mag | src/unscramble.f | src/unscramble.f | c formulas in unscramble.f were taken from the prep.f and other mag files
c it is used to unscramble the cc-files, converting the cc-file
c output to arrays in harmonic degree l and order m.
c It defines arrays al(lm) and am(lm) for lm=1,nlma,
c which contain the l and m values we need to convert the cc-file content... | lgpl-2.1 | FORTRAN | |
8e0d773936e8d22f92f8fdd06cb8dfcd462d4ccb | Add a small example for get command line argument | annefou/Fortran | src/IO/command_line.f90 | src/IO/command_line.f90 | program command_line
implicit none
character(len=:), allocatable :: arg
integer long, i
do i=0, COMMAND_ARGUMENT_COUNT()
call GET_COMMAND_ARGUMENT( NUMBER=i, LENGTH=long )
allocate( character(len=long) :: arg )
call GET_COMMAND_ARGUMENT( NUMBER=i, VALUE=arg )
! argument 0 is the name of the progra... | apache-2.0 | FORTRAN | |
6ac119d2d875316be09f43da38a1149448b46f1d | Fix integration | cphyc/n-body,cphyc/n-body | main.f90 | main.f90 | program n_body
use io_tools
use constants
use physics
implicit none
real(kind = xp), dimension(:), allocatable :: m
real(kind = xp), dimension(:, :), allocatable :: r, v, a
real(kind = xp) :: dt
integer :: iter = 0
integer :: dump_freq = 1
integer :: maxiter = 10000
!----------------------... | program n_body
use io_tools
use constants
use physics
implicit none
real(kind = xp), dimension(:), allocatable :: m
real(kind = xp), dimension(:, :), allocatable :: r, v, a
integer :: iter = 0
integer :: dump_freq = 1
integer :: maxiter = 10000
!---------------------------------------------
... | mit | FORTRAN |
5a66a23030b32c9cc06b1f170f334226e55aba09 | comment out debug write statement | clawpack/clawpack-4.x,clawpack/clawpack-4.x,clawpack/clawpack-4.x,clawpack/clawpack-4.x | geoclaw/2d/lib/b4step2_geo.f | geoclaw/2d/lib/b4step2_geo.f | c ============================================
subroutine b4step2(maxmx,maxmy,mbc,mx,my,meqn,q,
& xlower,ylower,dx,dy,t,dt,maux,aux)
c ============================================
c
c # called before each call to step
c # use to set time-dependent aux arrays or perform other tasks.... | c ============================================
subroutine b4step2(maxmx,maxmy,mbc,mx,my,meqn,q,
& xlower,ylower,dx,dy,t,dt,maux,aux)
c ============================================
c
c # called before each call to step
c # use to set time-dependent aux arrays or perform other tasks.... | bsd-3-clause | FORTRAN |
c7ba1c481af06ae0725e606a2ac90d503a3df570 | Create type 'Container' and its module | fsobral/pack-u,fsobral/pack-u,fsobral/pack-u | containers.f90 | containers.f90 | module containers
! This module creates the type 'Container' which contains
! information about a container and the items that are packed inside
! it. It also provides some utility subroutines for printing, saving
! and working with containers.
use items
implicit none
type Container
! Type o... | mit | FORTRAN | |
118344d3cb0a45d5440d70134119946ba4a3d5e1 | Create Fortran.f | inpothet/Great-wall-of-Hello-Worlds,inpothet/Great-wall-of-Hello-Worlds,inpothet/Great-wall-of-Hello-Worlds,inpothet/Great-wall-of-Hello-Worlds,inpothet/Great-wall-of-Hello-Worlds,inpothet/Great-wall-of-Hello-Worlds,inpothet/Great-wall-of-Hello-Worlds,inpothet/Great-wall-of-Hello-Worlds,inpothet/Great-wall-of-Hello-Wor... | Fortran.f | Fortran.f | PRINT *,"Hello World"
END
| unlicense | FORTRAN | |
eaa76b0b6cd407d246a7831207438843f614f437 | Fix #4 issue: delete unnecessary use statement | rouson/UCY-parallel-fortran | src/homework1/test-my-message.f90 | src/homework1/test-my-message.f90 | program main
!! Unit test for my_message
implicit none
character(len=128) :: input
associate(me=>this_image())
!! Define a local alias for the image number
broadcast_preface: block
use iso_fortran_env, only : input_unit,output_unit
integer, parameter :: preconnected=1
if (preconnec... | program main
!! Unit test for my_message
implicit none
character(len=128) :: input
associate(me=>this_image())
!! Define a local alias for the image number
broadcast_preface: block
use iso_fortran_env, only : input_unit,output_unit
integer, parameter :: preconnected=1
if (preconnec... | bsd-3-clause | FORTRAN |
e96a969e092b1c71e8faa18db50fcd88337b1b38 | Set visibility of functions in fortran interface | lscalfi/chemfiles,lscalfi/chemfiles,chemfiles/chemfiles,lscalfi/chemfiles,Luthaf/Chemharp,Luthaf/Chemharp,lscalfi/chemfiles,Luthaf/Chemharp,chemfiles/chemfiles,chemfiles/chemfiles,chemfiles/chemfiles | bindings/fortran/chemharp.f90 | bindings/fortran/chemharp.f90 | ! Chemharp, an efficient IO library for chemistry file formats
! Copyright (C) 2015 Guillaume Fraux
!
! This Source Code Form is subject to the terms of the Mozilla Public
! License, v. 2.0. If a copy of the MPL was not distributed with this
! file, You can obtain one at http://mozilla.org/MPL/2.0/
!
!
! This is the ma... | ! Chemharp, an efficient IO library for chemistry file formats
! Copyright (C) 2015 Guillaume Fraux
!
! This Source Code Form is subject to the terms of the Mozilla Public
! License, v. 2.0. If a copy of the MPL was not distributed with this
! file, You can obtain one at http://mozilla.org/MPL/2.0/
!
!
! This is the ma... | bsd-3-clause | FORTRAN |
d4c2396059c49368749ed6888f291924d4bf8f88 | Rename argument | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | lib/node_modules/@stdlib/math/base/blas/dasum/lib/dasum_wrapper.f | lib/node_modules/@stdlib/math/base/blas/dasum/lib/dasum_wrapper.f | !> Wraps dasum as a subroutine.
!
! @param {integer} N - number of values to sum
! @param {Array<double>} dx - input array
! @param {integer} stride - stride length
! @param {double} sum - output variable reference
!<
subroutine dasumsub( N, dx, stride, sum )
implicit none
! ..
! External functions:
external da... | !> Wraps dasum as a subroutine.
!
! @param {integer} N - number of values to sum
! @param {Array<double>} dx - input array
! @param {integer} stride - stride length
! @param {double} asum - output variable reference
!<
subroutine dasumsub( N, dx, stride, asum )
implicit none
! ..
! External functions:
external ... | apache-2.0 | FORTRAN |
7b2f4769cc07729c3ca9b52491ba2f0c0eee2aea | Convert 1d Fortran indices to 2d | mdpiper/wunderkammer,mdpiper/wunderkammer,mdpiper/wunderkammer,mdpiper/wunderkammer | convert_array_indices.f90 | convert_array_indices.f90 | ! An example of converting the indices of a 9-element rank 1 array
! into the indices of a 3-by-3 rank 2 array. Column major ordering!
program convert_array_indices
implicit none
integer, dimension(9) :: a, j, i
integer :: n, k, ny = 3
n = size(a)
do k = 1, n
a(k) = k
end do
write(*, "(a, 9(i3)... | mit | FORTRAN | |
ff1460cea2146e4994c6a2a40fcc4e213ab1693b | Change shape of out_vector. | ihuston/pyflation,ihuston/pyflation | rk4fortran/rk4fortran.f90 | rk4fortran/rk4fortran.f90 | subroutine rk4stepks(x, y, h, out_vector, n,m)
! Do one step of the classical 4th order Runge Kutta method,
! starting from y at x with time step h and derivatives given by derivs
implicit none
integer :: n,m
real(8) :: x, h
real(8) :: y(0:n-1,0:m-1)
real(8) :: out_vector(0:n-1,0:m-1)
!f2py real(8), inte... | subroutine rk4stepks(x, y, h, out_vector, n,m)
! Do one step of the classical 4th order Runge Kutta method,
! starting from y at x with time step h and derivatives given by derivs
implicit none
integer :: n,m
real(8) :: x, h
real(8) :: y(0:n-1,0:m-1)
real(8) :: out_vector(n+m-1)
!f2py real(8), intent(in)... | bsd-3-clause | FORTRAN |
c5581bb046d1ad653472f6f69063b4e962019a1b | Update main_curve.f90 | M2-AAIS/BAD | main_curve.f90 | main_curve.f90 | program black_hole_s_curve
use mod_constants
use mod_variables
use mod_read_parameters
use mod_s_curve
implicit none
call get_parameters()
call init_variable_0()
integer :: i
real(kind = x_precision),dimension(n_cell) :: temperature
... | program black_hole_s_curve
use mod_constants
use mod_variables
use mod_read_parameters
use mod_s_curve
implicit none
call get_parameters()
call init_variable_0()
call curve()
end program black_hole_s_curve
| mit | FORTRAN |
6f1cf5bbb1e442d95f20b095288cdf87f245fc21 | test of tables. looks good. | nworbde/dStar,adeibel/dStar,nworbde/dStar,nworbde/dStar | MRcurve/test/src/test_skyrme.f | MRcurve/test/src/test_skyrme.f | program test_skyrme
use constants_def
use constants_lib
use dStar_core_def
use dStar_core_lib
integer :: i, ierr
real(dp) :: lgP,lgRho,lgEps,Xprot,dlgRho,dlgEps,dXprot
call constants_init('',ierr)
call check_okay('constants_init',ierr)
call dstar_core_startup('../../data',ierr)
call check_okay('dstar_core_... | program test_skyrme
use constants_def, only: dp
use constants_lib
use dStar_core_def
use dStar_core_lib
use load_skyrme_parameters
use brown_skyrme
integer, parameter :: Ntab = 20
integer :: i, ierr
real(dp), dimension(Ntab) :: rho, x, eps, P, muhat, mue, cs2
call constants_init('',ierr)
call check_okay('... | mit | FORTRAN |
546ef6e40473f40176f94f27ff9741d073780eb5 | Create nonlinear1.f90 | openmichigan/PSNM,openmichigan/PSNM,openmichigan/PSNM,openmichigan/PSNM,openmichigan/PSNM | Brusselator/nonlinear1.f90 | Brusselator/nonlinear1.f90 | SUBROUTINE nonlinear1(dt,coef,u,v,decomp)
!--------------------------------------------------------------------
!
!
! PURPOSE
!
! This subroutine solves the first nonlinear equation in a splitting
! method for the Brusselator equation in 3 dimensions
! u_t = a + u^2v - (b+1)u + Du u_xx
! v_t = bu - u^2v + ... | bsd-2-clause | FORTRAN | |
5a5c1d6445332ad88482a9933d9f16fd17a6f279 | Add third program to read with perturbation | clementval/serialbox,C2SM-RCM/serialbox,clementval/serialbox,clementval/serialbox,clementval/serialbox,MeteoSwiss-APN/serialbox,C2SM-RCM/serialbox,C2SM-RCM/serialbox,C2SM-RCM/serialbox,MeteoSwiss-APN/serialbox,MeteoSwiss-APN/serialbox,MeteoSwiss-APN/serialbox | examples/perturbation/main_consumer_perturb.f90 | examples/perturbation/main_consumer_perturb.f90 | PROGRAM main_consumer_perturb
USE m_ser
IMPLICIT NONE
REAL(KIND=8), DIMENSION(5,5,5) :: a
a = 0.0
PRINT*,'Before read from serializer: sum(a)=', sum(a)
CALL deserialize_with_perturb(a)
PRINT*,'After read from serializer: sum(a)=', sum(a)
END PROGRAM main_consumer_perturb
| bsd-2-clause | FORTRAN | |
02bb04dcfbb45efdc53cdf32ad7b54f9f5b76112 | Move external statement to another line. | ihuston/pyflation,ihuston/pyflation | rk4fortran/rk4fortran.f90 | rk4fortran/rk4fortran.f90 | subroutine rk4stepks(x, y, h, yout, n, m, derivs)
! Do one step of the classical 4th order Runge Kutta method,
! starting from y at x with time step h and derivatives given by derivs
implicit none
integer :: n,m
real(8) :: x, h
real(8) :: y(0:n-1,0:m-1)
real(8) :: yout(0:n-1,0:m-1)
real(8) :: derivs
e... | subroutine rk4stepks(x, y, h, yout, n, m, derivs)
! Do one step of the classical 4th order Runge Kutta method,
! starting from y at x with time step h and derivatives given by derivs
implicit none
integer :: n,m
real(8) :: x, h
real(8) :: y(0:n-1,0:m-1)
real(8) :: yout(0:n-1,0:m-1)
real(8), external :: ... | bsd-3-clause | FORTRAN |
b8dc3f70f7fab58bfbddd2210db0d4213f705fdf | Add derivs back in slowly. | ihuston/pyflation,ihuston/pyflation | rk4fortran/rk4fortran.f90 | rk4fortran/rk4fortran.f90 | subroutine rk4stepks(x, y, h, yout, n, m, derivs)
! Do one step of the classical 4th order Runge Kutta method,
! starting from y at x with time step h and derivatives given by derivs
implicit none
integer :: n,m
real(8) :: x, h
real(8) :: y(0:n-1,0:m-1)
real(8) :: yout(0:n-1,0:m-1)
real(8) :: derivs
e... | subroutine rk4stepks(x, y, h, yout, n, m)
! Do one step of the classical 4th order Runge Kutta method,
! starting from y at x with time step h and derivatives given by derivs
implicit none
integer :: n,m
real(8) :: x, h
real(8) :: y(0:n-1,0:m-1)
real(8) :: yout(0:n-1,0:m-1)
! real(8) :: derivs
! externa... | bsd-3-clause | FORTRAN |
41be4092e1d07b5d0f5e1dfb5b19530220af6253 | Remove dimensions from derivs. | ihuston/pyflation,ihuston/pyflation | rk4fortran/rk4fortran.f90 | rk4fortran/rk4fortran.f90 | subroutine rk4stepks(x, y, h, yout, n, m, derivs)
! Do one step of the classical 4th order Runge Kutta method,
! starting from y at x with time step h and derivatives given by derivs
implicit none
integer :: n,m
real(8) :: x, h
real(8) :: y(0:n-1,0:m-1)
real(8) :: yout(0:n-1,0:m-1)
real(8), external :: ... | subroutine rk4stepks(x, y, h, yout, n, m, derivs)
! Do one step of the classical 4th order Runge Kutta method,
! starting from y at x with time step h and derivatives given by derivs
implicit none
integer :: n,m
real(8) :: x, h
real(8) :: y(0:n-1,0:m-1)
real(8) :: yout(0:n-1,0:m-1)
real(8), external :: ... | bsd-3-clause | FORTRAN |
052b6c4208cff4fcdeeecc2f196d2d69ae653eee | update read_pos | cphyc/n-body,cphyc/n-body | io_tools.f90 | io_tools.f90 | module io_tools
use constants
implicit none
private
public :: read_mpos, write_dump, write_dump_headers
contains
subroutine read_mpos(u, start, end, m, r)
implicit none
integer, intent(in) :: u, start, end
real(kind = xp), intent(out) :: m(:)
real(kind = xp), intent(out) :: ... | module io_tools
use constants
implicit none
private
public :: read_mpos, write_dump, write_dump_headers
contains
subroutine read_mpos(u, m, r)
implicit none
integer, intent(in) :: u
real(kind = xp), intent(out) :: m(:)
real(kind = xp), intent(out) :: r(:,:)
integer ::... | mit | FORTRAN |
cf09db10b8fdcbcad04cad033b6e661d728ee7df | Update reference for interchange3 test case | clementval/claw-compiler,clementval/claw-compiler | test/loops/interchange3/reference.f90 | test/loops/interchange3/reference.f90 | PROGRAM loop_interchange
CALL clawloop ( )
END PROGRAM loop_interchange
SUBROUTINE clawloop ( )
INTEGER :: i
INTEGER :: j
DO j = 1 , 2 , 1
DO i = 1 , 10 , 1
PRINT * ,"Iteration " , i ,"," , j
END DO
END DO
!$claw loop-interchange target(cpu)
DO i = 1 , 10 , 1
DO j = 1 , 2 , 1
PRINT * ,"Iteration... | PROGRAM loop_interchange
CALL clawloop ( )
END PROGRAM loop_interchange
SUBROUTINE clawloop ( )
INTEGER :: i
INTEGER :: j
DO j = 1 , 2 , 1
DO i = 1 , 10 , 1
PRINT * ,"Iteration " , i ,"," , j
END DO
END DO
!$claw loop-interchange target(cpu)
DO i = 1 , 10 , 1
DO j = 1 , 2 , 1
PRINT * ,"Iteration " ... | bsd-2-clause | FORTRAN |
1dfda9a1bf6d4278823dcea2b499dde5fc90b7ef | Add double dependency to check module file presence detection | clementval/claw-compiler,clementval/claw-compiler | test/driver/dependencies/mod2.f90 | test/driver/dependencies/mod2.f90 | module mod2
use mod4
end module mod2
| module mod2
end module mod2
| bsd-2-clause | FORTRAN |
c07e2b8a85a2be7b6f8b71cbab520618939d4cc5 | Add assignment of scalar var to check var ref to array ref | clementval/claw-compiler,clementval/claw-compiler | test/claw/abstraction15/mo_column.f90 | test/claw/abstraction15/mo_column.f90 | MODULE mo_column
IMPLICIT NONE
CONTAINS
! Compute only one column
FUNCTION compute_column(nz, b, q, t, z) RESULT(r)
IMPLICIT NONE
INTEGER, INTENT(IN) :: nz ! Size of the array field
INTEGER, INTENT(IN) :: b ! Size of the array field
REAL, INTENT(INOUT) :: t(1:b) ! Field declared as one... | MODULE mo_column
IMPLICIT NONE
CONTAINS
! Compute only one column
FUNCTION compute_column(nz, b, q, t, z) RESULT(r)
IMPLICIT NONE
INTEGER, INTENT(IN) :: nz ! Size of the array field
INTEGER, INTENT(IN) :: b ! Size of the array field
REAL, INTENT(INOUT) :: t(1:b) ! Field declared as one... | bsd-2-clause | FORTRAN |
7c5f9d3dc5b3ddf997b0b98f52d7610dd7c943e2 | format string | cbcoutinho/learn_dg,cbcoutinho/learn_dg | src/main.f90 | src/main.f90 | program main
use base_types, only: dp
use misc, only: myfun, f1, f2, fancy, basis_1D, ptr1, ptr2
use integration, only: integrate
use lib_array, only: linspace, invert_matrix
implicit none
! real(dp):: a, b, result
!
! ptr1 => f2
!
! a = -1.0d0
! b = 1.0d0
!
! call integrate(ptr, a, b, result... | program main
use base_types, only: dp
use misc, only: myfun, f1, f2, fancy, basis_1D, ptr1, ptr2
use integration, only: integrate
use lib_array, only: linspace, invert_matrix
implicit none
! real(dp):: a, b, result
!
! ptr1 => f2
!
! a = -1.0d0
! b = 1.0d0
!
! call integrate(ptr, a, b, result... | bsd-2-clause | FORTRAN |
8b314f8012986a020f7b9203ade785794237dfb9 | Use same maxtime than before | cphyc/n-body,cphyc/n-body | constants.f90 | constants.f90 | module constants
use mpi
implicit none
private
integer, parameter :: xp = selected_real_kind(8)
integer, parameter :: MPI_REAL_XP = MPI_DOUBLE_PRECISION
real(xp), parameter :: pi = 4.0_xp*atan(1.0_xp)
real(xp), parameter :: G = 1._xp
integer, parameter :: npoints = 2**10
real(xp), pa... | module constants
use mpi
implicit none
private
integer, parameter :: xp = selected_real_kind(8)
integer, parameter :: MPI_REAL_XP = MPI_DOUBLE_PRECISION
real(xp), parameter :: pi = 4.0_xp*atan(1.0_xp)
real(xp), parameter :: G = 1._xp
integer, parameter :: npoints = 2**10
real(xp), pa... | mit | FORTRAN |
ef4f5b8a2a973956673b3024770357208e026aa0 | update test | sourceryinstitute/opencoarrays,sourceryinstitute/opencoarrays,sourceryinstitute/opencoarrays | src/tests/regression/reported/issue-552-send_by_ref-singleton.f90 | src/tests/regression/reported/issue-552-send_by_ref-singleton.f90 | program main
implicit none
type co_obj ! the test does not fail with pure coarrays, only when using derived types
real, allocatable :: a(:, :, :)[:], b(:, :, :)
end type
integer :: me, remote, nimg
type(co_obj) :: co
me = this_image()
nimg = num_images()
remote = merge(2, 1, me == 1)
... | program main
implicit none
type co_obj ! the test does not fail with pure coarrays, only when using derived types
real, allocatable :: a(:, :, :)[:], b(:, :, :)
end type
integer :: me, nimg
type(co_obj) :: co
me = this_image()
nimg = num_images()
if (nimg /= 2) error stop 1
allocat... | bsd-3-clause | FORTRAN |
285d0d72f09d8e4892ad65bcf5ceb5804df40b70 | update comment | cphyc/n-body,cphyc/n-body | constants.f90 | constants.f90 | module constants
use mpi
implicit none
private
integer, parameter :: xp = selected_real_kind(8)
integer, parameter :: MPI_REAL_XP = MPI_DOUBLE_PRECISION
real(kind = xp), parameter :: pi = 4.0_xp*atan(1.0_xp)
real(kind = xp), parameter :: G = 1._xp
integer, parameter... | module constants
use mpi
implicit none
private
integer, parameter :: xp = selected_real_kind(8)
integer, parameter :: MPI_REAL_XP = MPI_DOUBLE_PRECISION
real(kind = xp), parameter :: pi = 4.0_xp*atan(1.0_xp)
real(kind = xp), parameter :: G = 1._xp
integer, parameter... | mit | FORTRAN |
f0ea7c122ad57bdf6ae3b446a5cf687845b2448a | Update reference for target2 test case | clementval/claw-compiler,clementval/claw-compiler | test/driver/target2/reference.f90 | test/driver/target2/reference.f90 | PROGRAM loop_fusion
CALL clawloop ( )
END PROGRAM loop_fusion
SUBROUTINE clawloop ( )
INTEGER :: i
DO i = 1 , 10 , 1
PRINT * ,"First loop body:" , i
PRINT * ,"Second loop body:" , i
PRINT * ,"Third loop body:" , i
END DO
END SUBROUTINE clawloop
| PROGRAM loop_fusion
CALL clawloop ( )
END PROGRAM loop_fusion
SUBROUTINE clawloop ( )
INTEGER :: i
DO i = 1 , 10 , 1
PRINT * ,"First loop body:" , i
PRINT * ,"Second loop body:" , i
PRINT * ,"Third loop body:" , i
END DO
END SUBROUTINE clawloop
| bsd-2-clause | FORTRAN |
97b75e5cec2139b66428ca213fda24b6041692a4 | Add constructs to test | satamas/fortran-plugin,satamas/fortran-plugin,satamas/fortran-plugin | src/test/resources/folding/ExecutableConstructs.f95 | src/test/resources/folding/ExecutableConstructs.f95 | program a<fold text='...'>
b1: block<fold text='...'>
integer a
cr: critical<fold text='...'>
a = 4
</fold>endcritical cr
</fold>endblock
b2: block<fold text='...'>
as: associate e=>1+4, b=>2*3<fold text='...'>
c = 3
</fold>end associate
... | program a<fold text='...'>
b1: block<fold text='...'>
integer a
cr: critical<fold text='...'>
a = 4
</fold>endcritical cr
</fold>endblock
b2: block<fold text='...'>
as: associate e=>1+4, b=>2*3<fold text='...'>
c = 3
</fold>end associate
... | apache-2.0 | FORTRAN |
fdb8509e24e994817afa1b0c5c162991b5c7d59d | Update reference for array6 test case | clementval/claw-compiler,clementval/claw-compiler | test/openacc/array6/reference.f90 | test/openacc/array6/reference.f90 | PROGRAM vector_loop
CALL claw ( )
END PROGRAM vector_loop
SUBROUTINE claw ( )
INTEGER :: upper = 10
INTEGER :: lower = 0
INTEGER :: vec1 ( 0 : 10 )
INTEGER :: vec2 ( 0 : 10 )
INTEGER :: claw_induction_0
INTEGER :: claw_induction_1
vec1 = 0
vec2 = 100
DO claw_induction_0 = lower , upper
vec1 ( claw_ind... | PROGRAM vector_loop
CALL claw ( )
END PROGRAM vector_loop
SUBROUTINE claw ( )
INTEGER :: upper = 10
INTEGER :: lower = 0
INTEGER :: vec1 ( 0 : 10 )
INTEGER :: vec2 ( 0 : 10 )
INTEGER :: claw_induction_0
INTEGER :: claw_induction_1
vec1 = 0
vec2 = 100
DO claw_induction_0 = lower , upper
vec1 ( claw_induct... | bsd-2-clause | FORTRAN |
ddd663dff05d28fac5f84574c759ee5981b9aece | remove unnecessary probparams module | zingale/hydro1d | user_bc.f90 | user_bc.f90 | module user_bc_module
use grid_module
use variables_module
use datatypes_module
implicit none
contains
subroutine user_bc_xp(U)
type(gridvar_t), intent(inout) :: U
end subroutine user_bc_xp
end module user_bc_module
| module user_bc_module
use grid_module
use variables_module
use probparams_module
use datatypes_module
implicit none
contains
subroutine user_bc_xp(U)
type(gridvar_t), intent(inout) :: U
end subroutine user_bc_xp
end module user_bc_module
| bsd-3-clause | FORTRAN |
ab92b6ad4b16a50323d9d100a98c66ca00b87554 | Add HT frame speed analysis, Step 1: Inv a 3x3 symm matrix. | jungerstein/plasmaPhyLib,jungerstein/plasmaPhyLib | analysis/discont/velocityHT.f90 | analysis/discont/velocityHT.f90 | ! vim : tw=72 ts=2 sw=2
! velocityHT.f90
! Finds the velocity of deHoffman-Teller frame.
! Coded by jungerstein.
! Except for the licence, it is kind and proper to contact me
! if the codes are involved in your original research.
!
! EXTERNAL LIBRARY
! * mkl
! OTHERWISE
! 1. Can be slightly modified to use general l... | apache-2.0 | FORTRAN | |
64b32f695d32b5e5944d6d2cbfa7db57360f1d8c | add main | cphyc/n-body,cphyc/n-body | main.f90 | main.f90 | program n_body
implicit none
end program n_body
| mit | FORTRAN | |
b62dffc54e03948ea6421e3078c3e5a19280dca3 | Fix transformed call | clementval/claw-compiler,clementval/claw-compiler | test/claw/abstraction2/main.f90 | test/claw/abstraction2/main.f90 | ! Test the CLAW abstraction model with two additional dimensions.
PROGRAM test_abstraction2
USE mo_column, ONLY: compute_column
REAL, DIMENSION(10,10,60) :: q, t ! fields as declared in the whole model
INTEGER :: nx, ny, nz ! Size of array fields
INTEGER :: i,j ! Loop indices
... | ! Test the CLAW abstraction model with two additional dimensions.
PROGRAM test_abstraction2
USE mo_column, ONLY: compute_column
REAL, DIMENSION(10,10,60) :: q, t ! fields as declared in the whole model
INTEGER :: nx, ny, nz ! Size of array fields
INTEGER :: i,j ! Loop indices
... | bsd-2-clause | FORTRAN |
4f929bac8143f505bcdc49bdead431de87cf2107 | update u vector for each time step | kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-p... | Fortran/ModernFortran/tsunami_2.f95 | Fortran/ModernFortran/tsunami_2.f95 | ! vim: set ft=fortran sw=4 ts=4:
program tsunami
! Tsunami simulator
!
! This version solves the linearized 1-d advection equation:
!
! du/dt + c du/dx = 0
!
! Discretized as:
! u^{n+1}_i = u^n_i - c * dt * (u^n{i} - u^n_{n-1}) / dx
use iso_fortran_env, only: int32, real32, ou... | ! vim: set ft=fortran sw=4 ts=4:
program tsunami
! Tsunami simulator
!
! This version solves the linearized 1-d advection equation:
!
! du/dt + c du/dx = 0
!
! Discretized as:
! u^{n+1}_i = u^n_i - c * dt * (u^n{i} - u^n_{n-1}) / dx
use iso_fortran_env, only: int32, real32, ou... | mit | FORTRAN |
5961e17f86509b53b3997eb2915f15b61713f946 | Write string test results to stdin/stderr | NCAR/icar,NCAR/icar,gutmann/icar,NCAR/icar,gutmann/icar,gutmann/icar | tests/test_string.f90 | tests/test_string.f90 | program main
use string, only : get_double, get_real, get_integer, str
use iso_fortran_env, only : real32, real64, int32, output_unit, error_unit
implicit none
! Enumerate the test-result array indices:
enum, bind(C)
enumerator :: get_double_, get_real_, get_integer_, str_d_, str_r_, str_i_
end enum
... | program main
use string, only : get_double, get_real, get_integer, str
use iso_fortran_env, only : real32, real64, int32
implicit none
! Enumerate the test-result array indices:
enum, bind(C)
enumerator :: get_double_, get_real_, get_integer_, str_d_, str_r_, str_i_
end enum
logical :: test_passed(g... | mit | FORTRAN |
6ab8ea60d0da9c95ccf12a1872b4cfe4d5226c23 | Update test | clementval/claw-compiler,clementval/claw-compiler | test/claw/abstraction/abstraction29/reference_gpu.f90 | test/claw/abstraction/abstraction29/reference_gpu.f90 | MODULE mo_column
CONTAINS
SUBROUTINE compute_column ( nz , q , t , nproma )
INTEGER , INTENT(IN) :: nz
REAL , INTENT(INOUT) :: t ( : , : )
REAL , INTENT(INOUT) :: q ( : , : )
INTEGER , INTENT(IN) :: nproma
INTEGER :: k
REAL :: c
INTEGER :: proma
!$acc data present(t,q)
!$acc parallel
!$acc loop gang v... | MODULE mo_column
CONTAINS
SUBROUTINE compute_column ( nz , q , t , nproma )
INTEGER , INTENT(IN) :: nz
REAL , INTENT(INOUT) :: t ( : , : )
REAL , INTENT(INOUT) :: q ( : , : )
INTEGER , INTENT(IN) :: nproma
INTEGER :: k
REAL :: c
INTEGER :: proma
!$acc data present(t,q)
!$acc parallel
!$acc loop gang v... | bsd-2-clause | FORTRAN |
897b3199199f5389db6c03464558d1c4b6fbc397 | Fix Ec | cphyc/n-body,cphyc/n-body | physics.f90 | physics.f90 | module physics
use constants
private
public :: initial_speeds, compute_force, compute_energy, integrate
contains
subroutine initial_speeds (r, v)
real(kind = xp), intent(in), dimension(:, :) :: r
real(kind = xp), intent(out), dimension(:, :) :: v
integer :: i
real(kind = xp) :: d ! distance to... | module physics
use constants
private
public :: initial_speeds, compute_force, compute_energy, integrate
contains
subroutine initial_speeds (r, v)
real(kind = xp), intent(in), dimension(:, :) :: r
real(kind = xp), intent(out), dimension(:, :) :: v
integer :: i
real(kind = xp) :: d ! distance to... | mit | FORTRAN |
f63c0404cafe7073e2853051c561399d14c9f11d | Initialise to a double. | owainkenwayucl/utils,owainkenwayucl/utils,owainkenwayucl/utils | src/fpsum.f | src/fpsum.f | c Sum up numbers from stdin and put answer in stdout
program fpsum
implicit none
integer s
real*8 n, total
s = 0
total = 0d0
do while (s .eq. 0)
read(*,*,IOSTAT=s) n
if (s .eq. 0) then
total = total + n
else if (s .gt. 0) th... | c Sum up numbers from stdin and put answer in stdout
program fpsum
implicit none
integer s
real*8 n, total
s = 0
total = 0
do while (s .eq. 0)
read(*,*,IOSTAT=s) n
if (s .eq. 0) then
total = total + n
else if (s .gt. 0) then... | mit | FORTRAN |
231548df90d46faa3b381082090db67d427cdbad | Test case for CO_BROADCAST | sourceryinstitute/opencoarrays,jerryd/opencoarrays,zbeekman/opencoarrays,sourceryinstitute/opencoarrays,zbeekman/opencoarrays,zbeekman/opencoarrays,jerryd/opencoarrays,jerryd/opencoarrays,sourceryinstitute/opencoarrays | tests/src/simple/cobcast.f90 | tests/src/simple/cobcast.f90 | program cobroadcast
implicit none
integer :: np, me
integer,codimension[*] :: a
integer, dimension(10), codimension[*] :: aa
integer, dimension(10) :: bb
np = num_images()
me = this_image()
a = 0
sync all
if (me == 1) a = me
call co_broadcast(a,1)
if(a /= 1) call abort()
write(*,*) 'OK... | bsd-3-clause | FORTRAN | |
f2ad55e4f711361de3b7e116ceacab7b3e399f7c | Remove y to see if problem resolves itself. | ihuston/pyflation,ihuston/pyflation | rk4fortran/rk4fortran.f90 | rk4fortran/rk4fortran.f90 | subroutine rk4stepks(x, h, n, m, yout, derivs)
! Do one step of the classical 4th order Runge Kutta method,
! starting from y at x with time step h and derivatives given by derivs
implicit none
real, intent(in) :: x
real, intent(in) :: h
integer :: n, m
! real, intent(in) :: y(0:n-1,0:m-1)
... | subroutine rk4stepks(x, y, h, n, m, yout, derivs)
! Do one step of the classical 4th order Runge Kutta method,
! starting from y at x with time step h and derivatives given by derivs
implicit none
real, intent(in) :: x
real, intent(in) :: h
integer :: n, m
real, intent(in) :: y(0:n-1,0:m-1)
... | bsd-3-clause | FORTRAN |
6fadc0e716d6f753b3d43ce51ca794f7ec9f0617 | Remove reference to TRIM | syntheticpp/dirfile,syntheticpp/dirfile,syntheticpp/dirfile,syntheticpp/dirfile | bindings/f77/test/gdfget.f | bindings/f77/test/gdfget.f | C Attempt to read INT8 via the F77 bindings
PROGRAM GETTST
INCLUDE "getdata.f"
CHARACTER*12 fildir
PARAMETER (fildir = 'test_dirfile')
CHARACTER*19 frmat
PARAMETER (frmat = 'test_dirfile/format')
CHARACTER*17 dat
PARAMETER (dat = 'test_dirfile/data')
CHARACTER*1... | C Attempt to read INT8 via the F77 bindings
PROGRAM GETTST
INCLUDE "getdata.f"
CHARACTER*256 fildir
PARAMETER (fildir = 'test_dirfile')
CHARACTER*256 frmat
PARAMETER (frmat = 'test_dirfile/format')
CHARACTER*256 dat
PARAMETER (dat = 'test_dirfile/data')
CHARACTE... | lgpl-2.1 | FORTRAN |
be2004133c2a261d6deb2483dc5d655016018821 | Change a typo. | jungerstein/plasmaPhyLib,jungerstein/plasmaPhyLib | calculus/sphericalcalculus.f90 | calculus/sphericalcalculus.f90 | ! vim : tw=72 ts=2 sw=2
! sphericalcalculus.f90
! Implements for 3D vector calculus in spherical coordinates.
! Coded by jungerstein.
! Except for the licence, it is kind to contact me
! if the codes are involved in your original research.
module sphericalcalculus
use sphericalvec3d
implicit none
type neighbo... | ! vim : tw=72 ts=2 sw=2
! sphericalcalculus.f90
! Implements for 3D vector calculus in spherical coordinates.
! Coded by jungerstein.
! Except for the licence, it is kind to contact me
! if the codes are involved in your original research.
module sphericalcalculus
use sphericalvec3d
implicit none
type neighbo... | apache-2.0 | FORTRAN |
bdd708c94ced4ad2a829366015b9af9134f5430c | add implicit none | pdebuyl-lab/RMPCDMD,pdebuyl/RMPCDMD,laurensdeprez/RMPCDMD,pdebuyl/RMPCDMD,laurensdeprez/RMPCDMD,pdebuyl-lab/RMPCDMD | src/particle_system.f90 | src/particle_system.f90 | module particle_system
implicit none
private
public :: particle_system_t
type particle_system_t
integer :: Nmax
double precision, pointer :: pos1(:,:)
double precision, pointer :: pos2(:,:)
double precision, pointer :: pos(:,:)
double precision, pointer :: pos_old(:,:)
double pre... | module particle_system
private
public :: particle_system_t
type particle_system_t
integer :: Nmax
double precision, pointer :: pos1(:,:)
double precision, pointer :: pos2(:,:)
double precision, pointer :: pos(:,:)
double precision, pointer :: pos_old(:,:)
double precision, pointer... | bsd-3-clause | FORTRAN |
e8d73195441ffe7c4754fb28a917120d93586755 | add expression of dt_T whitch not depend of dt_nu | M2-AAIS/BAD | mod_timestep.f90 | mod_timestep.f90 | ! Module that gives the timestep
module mod_timestep
use mod_constants
use mod_read_parameters
implicit none
private
public :: timestep
contains
subroutine timestep (state_in, dt_T, dt_nu)
implicit none
type (state), intent(in) :: state_in
real(kind = x_precision), dim... | ! Module that gives the timestep
module mod_timestep
use mod_constants
use mod_read_parameters
implicit none
private
public :: timestep
contains
subroutine timestep (state_in, dt_T, dt_nu)
implicit none
type (state), intent(in) :: state_in
real(kind = x_precision), dim... | mit | FORTRAN |
7598d1993c3064cd22bf3437e65b74212862ee0b | Change sigma to S | M2-AAIS/BAD | mod_constants.f90 | mod_constants.f90 | ! Module that exposes the integrator that transforms the state_in to thet state_out
module mod_constants
integer, parameter, public :: x_precision = selected_real_kind(15)
integer, parameter, public :: n_cell = 100
integer, parameter, public :: n_iterations = 1000
type parameters
real(kind = x_precision)... | ! Module that exposes the integrator that transforms the state_in to thet state_out
module mod_constants
integer, parameter, public :: x_precision = selected_real_kind(15)
integer, parameter, public :: n_cell = 100
integer, parameter, public :: n_iterations = 1000
type parameters
real(kind = x_precision)... | mit | FORTRAN |
14ef22cfe7b93f6ded1be076c758c37ff9834a14 | add mp and thomsmon constant | M2-AAIS/BAD | mod_constants.f90 | mod_constants.f90 | ! Module that exposes the integrator that transforms the state_in to thet state_out
module mod_constants
implicit none
integer, parameter, public :: x_precision = selected_real_kind(15)
integer, parameter, public :: n_cell = 256
integer, parameter, public :: n_iterations = 1000
real(kind = x_precision), pa... | ! Module that exposes the integrator that transforms the state_in to thet state_out
module mod_constants
implicit none
integer, parameter, public :: x_precision = selected_real_kind(15)
integer, parameter, public :: n_cell = 256
integer, parameter, public :: n_iterations = 1000
real(kind = x_precision), pa... | mit | FORTRAN |
4c7195721ff992a7922a866cb5ab84950fefbe16 | Update reference according to new generation order | clementval/claw-compiler,clementval/claw-compiler | test/openacc/array6/reference.f90 | test/openacc/array6/reference.f90 | PROGRAM vector_loop
CALL claw ( )
END PROGRAM vector_loop
SUBROUTINE claw ( )
INTEGER :: upper = 10
INTEGER :: lower = 0
INTEGER :: vec1 ( 0 : 10 )
INTEGER :: vec2 ( 0 : 10 )
INTEGER :: claw_induction_0
INTEGER :: claw_induction_1
vec1 = 0
vec2 = 100
DO claw_induction_1 = lower , upper
vec1 ( claw_induc... | PROGRAM vector_loop
CALL claw ( )
END PROGRAM vector_loop
SUBROUTINE claw ( )
INTEGER :: upper = 10
INTEGER :: lower = 0
INTEGER :: vec1 ( 0 : 10 )
INTEGER :: vec2 ( 0 : 10 )
INTEGER :: claw_induction_0
INTEGER :: claw_induction_1
vec1 = 0
vec2 = 100
DO claw_induction_0 = lower , upper
vec1 ( claw_induc... | bsd-2-clause | FORTRAN |
2ad18aa6a8d74f62cfd639d28091f0743de82cba | add pre_factor function | M2-AAIS/BAD | mod_distance.f90 | mod_distance.f90 | module mod_distance
use mod_constants
use mod_read_parameters
use mod_variables
implicit none
private
public :: pre_factor
contains
function pre_factor(state_in, S_c, dist_crit)
implicit none
type(state), intent(in) :: state_in
real(kind = x_... | module mod_distance
use mod_constants
use mod_read_parameters
use mod_variables
implicit none
private
public :: distance
contains
subroutine distance(state_in, dist, temp_c, sigma_c)
implicit none
type(state) :: state_in
real(kind = x_precisi... | mit | FORTRAN |
b16b32768dc0587a65712648a9ea6d490e98ec12 | Create FC_STD.f | aaroncnb/comic_dust,aaroncnb/comic_dust,aaroncnb/comic_dust,aaroncnb/comic_dust | FC_STD.f | FC_STD.f | PROGRAM FLUX_CALIBRATION
IMPLICIT REAL*8(A-G,O-Z)
IMPLICIT INTEGER*4(H-N)
REAL*8 SADU(320),WL(320),WLT(692),FL(692)
REAL*8 FLCAL(320),FNCAL(320),FLC(320)
OPEN(1,FILE="STD_NL.ADU",STATUS="OLD")
OPEN(2,FILE="HD197989.tem",STATUS="OLD")
OPEN(11,FILE="ST... | apache-2.0 | FORTRAN | |
2783feb32be21ddf7e12fb2f4263c7391654dfc1 | Fix compute of dt_nu and dt_T | M2-AAIS/BAD | mod_timestep.f90 | mod_timestep.f90 | ! Module that gives the timestep
module mod_timestep
use mod_constants
use mod_read_parameters
implicit none
private
public :: timestep
contains
subroutine timestep (state_in, dt_T, dt_nu)
implicit none
type (state), intent(in) :: state_in
real(kind = x_precision), dim... | ! Module that gives the timestep
module mod_timestep
use mod_constants
use mod_read_parameters
implicit none
private
public :: timestep
contains
subroutine timestep (state_in, dt_T, dt_nu)
implicit none
type (state), intent(in) :: state_in
real(kind = x_precision), dim... | mit | FORTRAN |
9ae78e8c1045f68cf04da7712bdc0eb841b5f97d | Initialise basis in momentum space. | hande-qmc/hande,hande-qmc/hande,ruthfranklin/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande | hubbard.f90 | hubbard.f90 | module hubbard
use system
use kpoints
implicit none
type(kpoint), allocatable :: basis_fns(:)
contains
subroutine init_basis_fns()
! Produce the basis functions. The number of basis functions is
! equal to the number of sites in the crystal cell (ie the number
! of k-points used to sa... | module hubbard
use kpoints
use system
implicit none
type(kpoint), allocatable :: basis_fns(:)
contains
subroutine init_basis_fns()
! Produce the basis functions. The number of basis functions is
! equal to the number of sites in the crystal cell (ie the number
! of k-points used to sample the FBZ ... | lgpl-2.1 | FORTRAN |
adfda9e096b401a9fbf8f0ea39201b19afbddf42 | Fix epsilon2 | cphyc/n-body,cphyc/n-body | constants.f90 | constants.f90 | module constants
implicit none
private
integer, parameter :: xp = selected_real_kind(8)
real(kind = xp), parameter :: pi = 4.0_xp*atan(1.0_xp)
real(kind = xp), parameter :: G = 1._xp
integer, parameter :: npoints = 2**13
real(kind = xp), parameter :: epsilon2 = npoints**(-2._xp/3... | module constants
implicit none
private
integer, parameter :: xp = selected_real_kind(8)
real(kind = xp), parameter :: pi = 4.0_xp*atan(1.0_xp)
real(kind = xp), parameter :: G = 1._xp
integer, parameter :: npoints = 2**13
real(kind = xp), parameter :: epsilon2 = npoints**(2._xp/3.... | mit | FORTRAN |
f84da215deff34d693af0f7f5f548999adf6fac9 | Fix integrate | cphyc/n-body,cphyc/n-body | physics.f90 | physics.f90 | module physics
use constants
private
public :: initial_speeds, compute_force, compute_energy, integrate
contains
subroutine initial_speeds (r, v)
real(kind = xp), intent(in), dimension(:, :) :: r
real(kind = xp), intent(out), dimension(:, :) :: v
integer :: i
real(kind = xp) :: d ! distance to... | module physics
use constants
private
public :: initial_speeds, compute_force, compute_energy, integrate
contains
subroutine initial_speeds (r, v)
real(kind = xp), intent(in), dimension(:, :) :: r
real(kind = xp), intent(out), dimension(:, :) :: v
integer :: i
real(kind = xp) :: d ! distance to... | mit | FORTRAN |
2e71c4c5836a10faa8756fcbacaa17e9a3e795f2 | Add quicksort subroutine to src/ | mherman09/Hdef,mherman09/Hdef,mherman09/Hdef | src/quicksort.f90 | src/quicksort.f90 | ! quicksort.f -*-f90-*-
! Author: t-nissie
! License: GPLv3
! Gist: https://gist.github.com/t-nissie/479f0f16966925fa29ea
!!
recursive subroutine quicksort(a, first, last)
implicit none
real*8 a(*), x, t
integer first, last
integer i, j
x = a( (first+last) / 2 )
i = first
j = last
do
do while (a(... | mit | FORTRAN | |
9ec272cb5653db947186017b6b79c66685a8989e | fix is_prime function | kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-playground,kkirstein/proglang-p... | Fortran/Benchmark/src/primes.f90 | Fortran/Benchmark/src/primes.f90 | ! primes.f95
! Calculate prime numbers
!
! vim: set ft=fortran sw=2 ts=2 :
module primes
implicit none
contains
pure logical function is_prime (n)
implicit none
integer, intent( in ) :: n
integer :: i, limit
is_prime = .true.
if (n < 2) then
is_prime = .... | ! primes.f95
! Calculate prime numbers
!
! vim: set ft=fortran sw=2 ts=2 :
module primes
implicit none
contains
pure logical function is_prime (n)
implicit none
integer, intent( in ) :: n
integer :: i, limit
if (n < 2) then
is_prime = .false.
else
... | mit | FORTRAN |
e02d1d7bb0a78107d615d678109d5d3db11670bb | Add MPI calls to empty function | staticfloat/MPI.jl,jkozdon/MPI.jl,pressel/MPI.jl,JuliaParallel/MPI.jl,JuliaPackageMirrors/MPI.jl | mpi.f | mpi.f | subroutine juliampi_empty()
INTEGER IERROR
CALL MPI_INIT(IERROR)
CALL MPI_FINALIZE(IERROR)
end
| subroutine juliampi_empty()
end
| unlicense | FORTRAN |
a6266d709cc9989c0b0b79d49a1704d5fd81f573 | Comment out derivs to test where error is coming from. | ihuston/pyflation,ihuston/pyflation | rk4fortran/rk4fortran.f90 | rk4fortran/rk4fortran.f90 | subroutine rk4stepks(x, y, h, yout, n, m)
! Do one step of the classical 4th order Runge Kutta method,
! starting from y at x with time step h and derivatives given by derivs
implicit none
integer :: n,m
real(8) :: x, h
real(8) :: y(0:n-1,0:m-1)
real(8) :: yout(0:n-1,0:m-1)
! real(8) :: derivs
! externa... | subroutine rk4stepks(x, y, h, yout, n, m, derivs)
! Do one step of the classical 4th order Runge Kutta method,
! starting from y at x with time step h and derivatives given by derivs
implicit none
integer :: n,m
real(8) :: x, h
real(8) :: y(0:n-1,0:m-1)
real(8) :: yout(0:n-1,0:m-1)
real(8) :: derivs
e... | bsd-3-clause | FORTRAN |
6bf01ef1e4eeadcc4d471905b0bfe00903a743b5 | Remove trailing spaces | cphyc/n-body,cphyc/n-body | main.f90 | main.f90 | program n_body
use io_tools
use constants
use physics
implicit none
real(kind = xp), dimension(:), allocatable :: m ! Masses of the particles
real(kind = xp), dimension(:, :), allocatable :: r ! Positions of the particles (3-dim vectors)
real(kind = xp), dimension(:, :), allocatable :: v ! Spe... | program n_body
use io_tools
use constants
use physics
implicit none
real(kind = xp), dimension(:), allocatable :: m ! Masses of the particles
real(kind = xp), dimension(:, :), allocatable :: r ! Positions of the particles (3-dim vectors)
real(kind = xp), dimension(:, :), allocatable :: v ! Spe... | mit | FORTRAN |
c09090b12e5212fb5f950ea7ea957989f82a28ab | remove omp from basline dot product | bcumming/openmp-examples,bcumming/openmp-examples | fortran/dot.f90 | fortran/dot.f90 | program dot
use omp_lib
implicit none
integer :: N = 100000000
integer :: i, num_threads
real(kind=8), dimension(:), allocatable :: a, b
real(kind=8) :: time, sum, expected
allocate(a(N), b(N))
num_threads = omp_get_max_threads()
print *, 'dot of vectors with length ', N, ' with ', num_threads, ' thread... | program dot
use omp_lib
implicit none
integer :: N = 100000000
integer :: i, num_threads
real(kind=8), dimension(:), allocatable :: a, b
real(kind=8) :: time, sum, expected
allocate(a(N), b(N))
num_threads = omp_get_max_threads()
print *, 'dot of vectors with length ', N, ' with ', num_threads, ' thread... | bsd-2-clause | FORTRAN |
c7fd864a6b2d2b16c11982ee443f762f106f0f6f | delete useKh | jinbow/Octopus,jinbow/Octopus | src/r_namelist.f90 | src/r_namelist.f90 | subroutine read_namelist()
!=========================================
! read configuration file
use global, only : casename,path2uvw,fn_UVEL,fn_VVEL,&
fn_WVEL,dt,dt_reinit,tend,dt_case,fn_THETA,fn_SALT,&
fn_GAMMA,dt_mld,pickupFreq,pickup,dumpFreq,diagFreq,tstart,fn_parti_init,&
... | subroutine read_namelist()
!=========================================
! read configuration file
use global, only : casename,path2uvw,fn_UVEL,fn_VVEL,&
fn_WVEL,dt,dt_reinit,tend,dt_case,fn_THETA,fn_SALT,&
fn_GAMMA,dt_mld,pickupFreq,pickup,dumpFreq,diagFreq,tstart,fn_parti_init,&
... | mit | FORTRAN |
d516f49714339bcd2840c8147a8960fe523266a0 | add mixing_mld.f90 | jinbow/Octopus,jinbow/Octopus | src/mixing_mld.f90 | src/mixing_mld.f90 | subroutine apply_mixing_mld(IPP)
#include "cpp_options.h"
use global, only: Npts,hFacC,xyz,z2k,k2z,Nx,Ny,dt_mld,tt,mld,&
parti_mld,kvdt2,khdt2,dxg_r,dyg_r,drf_r,pi2f
use random, only: random_normal
implicit none
integer*8 :: i,icount
integer*8 :: ip,jp,kp
real*8 :: num, z, pz
logica... | mit | FORTRAN | |
62f435f8b1c2e858cd301be708f500947dba3e26 | Update reference for ignore2 test case | clementval/claw-compiler,clementval/claw-compiler | test/driver/ignore2/reference.f90 | test/driver/ignore2/reference.f90 | PROGRAM testignore
!$claw remove
PRINT*,'These lines'
PRINT*,'are ignored'
PRINT*,'by the CLAW compiler'
PRINT*,'but kept in the final transformed code'
PRINT*,'with the remove directives.'
!$claw end remove
PRINT*,'These lines'
PRINT*,'are ignored'
END PROGRAM testignore
| PROGRAM testignore
!$claw remove
PRINT*,'These lines'
PRINT*,'are ignored'
PRINT*,'by the CLAW compiler'
PRINT*,'but kept in the final transformed code'
PRINT*,'with the remove directives.'
!$claw end remove
PRINT*,'These lines'
PRINT*,'are ignored'
END PROGRAM testignore
| bsd-2-clause | FORTRAN |
0c8b2275263234e13a45e1b83af3517d1d318929 | extend testing of profile_t | pdebuyl-lab/RMPCDMD,pdebuyl/RMPCDMD,pdebuyl/RMPCDMD,laurensdeprez/RMPCDMD,pdebuyl-lab/RMPCDMD,laurensdeprez/RMPCDMD | test/test_common_0.f90 | test/test_common_0.f90 | program test_common_0
use common
use tester
implicit none
type(tester_t) :: test
type(profile_t) :: p
double precision :: x0, x1
double precision, allocatable :: x(:)
integer :: i
integer :: n
integer, parameter :: nloop = 100
integer :: seed_size, clock
integer, allocatable :: seed(:)
ca... | program test_common_0
use common
use tester
implicit none
type(tester_t) :: test
type(profile_t) :: p
double precision :: x0, x1
integer :: i
integer :: n
integer, parameter :: nloop = 100
integer :: seed_size, clock
integer, allocatable :: seed(:)
call random_seed(size = seed_size)
alloc... | bsd-3-clause | FORTRAN |
87dfb65af8218c410235ac4d0cf6f3e7404e1ae0 | add tmp_prs.f90 | eladtan/white_dwarf_nova,bolverk/white_dwarf_nova,eladtan/white_dwarf_nova,eladtan/white_dwarf_nova,bolverk/white_dwarf_nova,bolverk/white_dwarf_nova | tmp_prs.f90 | tmp_prs.f90 | subroutine tmp_prs
use tables
include 'real8.com'
! -------------------------------------------------------
do it=1,itmax
!
call rho_tmp
!
drho = (prs-prs0)/dpdrho
rho = min(max(rho - drho,rho/2),2*rho)
if(abs(prs-prs0).lt.diuk*prs0) then
keyerr=0
return
endif
enddo
wr... | mit | FORTRAN | |
e0cf3f6c57e602b1e53a9dfc63663389b40d6f25 | Add fortran | koverholt/hello-world,koverholt/hello-world,koverholt/hello-world,koverholt/hello-world,koverholt/hello-world,koverholt/hello-world | fortran/hello.f | fortran/hello.f | program hello
print *, "Hello, World!"
end program hello
| bsd-3-clause | FORTRAN | |
25de39128a11df3e18ef0143d0972dd8b67f14c3 | Update test case name | clementval/claw-compiler,clementval/claw-compiler | test/claw/abstraction20/main.f90 | test/claw/abstraction20/main.f90 | ! Test the CLAW abstraction model with one additional dimension.
PROGRAM test_abstraction20
USE mo_column, ONLY: compute
REAL, DIMENSION(20,60) :: q ! Fields as declared in the whole model
REAL, DIMENSION(60,20) :: t ! Fields as declared in the whole model
INTEGER :: nproma, nz ! Size of array... | ! Test the CLAW abstraction model with one additional dimension.
PROGRAM test_abstraction19
USE mo_column, ONLY: compute
REAL, DIMENSION(20,60) :: q ! Fields as declared in the whole model
REAL, DIMENSION(60,20) :: t ! Fields as declared in the whole model
INTEGER :: nproma, nz ! Size of array... | bsd-2-clause | FORTRAN |
fe4f98a9756ef6efd41b4a9e3e29741cc216d646 | Create x.f | jorovipe97/jorovipe97.github.io | pdf/x.f | pdf/x.f | mit | FORTRAN | ||
2dee94008c8d713109150b7aedff200cb21bfc16 | update the test program. | nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura,nushio3/formura | example/test.f90 | example/test.f90 | parameter dimension = 2
parameter extent0 = 400
parameter extent1 = 300
parameter precision = double
array A
array Sxx, Syy, Szz, Sxy(1/2,1/2,0), Sxz(1/2,0,1/2), Syz(0,1/2,1/2)
subroutine init
A = exp(0-(((index0 - extent0)/2)**2 + ((index1 - extent1)/2)**2)/100)
end subroutine init
subroutine proceed
B = 1/3*(... | mit | FORTRAN | |
adc0158512bde6e2fd7d81a280e2358bf6c54336 | Fix timestep | cphyc/n-body,cphyc/n-body | main.f90 | main.f90 | program n_body
use io_tools
use constants
use physics
implicit none
real(kind = xp), dimension(:), allocatable :: m
real(kind = xp), dimension(:, :), allocatable :: r, v, a
real(kind = xp) :: t = 0._xp, dt, Ec, Ep, E
integer :: iter = 0
integer :: dump_freq = 1
integer :: maxiter = 10000
!... | program n_body
use io_tools
use constants
use physics
implicit none
real(kind = xp), dimension(:), allocatable :: m
real(kind = xp), dimension(:, :), allocatable :: r, v, a
real(kind = xp) :: t = 0._xp, dt, Ec, Ep, E
integer :: iter = 0
integer :: dump_freq = 1
integer :: maxiter = 10000
!... | mit | FORTRAN |
068eed0f22cc59468fc6bd06338a64af38cdfff8 | Update reference for extract1 test case | clementval/claw-compiler,clementval/claw-compiler | test/loops/extract1/reference.f90 | test/loops/extract1/reference.f90 | PROGRAM loop_extract
INTEGER :: value1 ( 1 : 10 )
INTEGER :: value2 ( 1 : 10 )
INTEGER :: j
INTEGER :: i
INTEGER :: istart = 1
INTEGER :: iend = 10
DO j = 1 , 10 , 1
value1 ( j ) = j
value2 ( j ) = j
END DO
DO i = istart , iend , 1
CALL clawloop_extracted0 ( value1 ( i ) , value2 ( i ) )
END DO
END PR... | PROGRAM loop_extract
INTEGER :: value1 ( 1 : 10 )
INTEGER :: value2 ( 1 : 10 )
INTEGER :: j
INTEGER :: i
INTEGER :: istart = 1
INTEGER :: iend = 10
DO j = 1 , 10 , 1
value1 ( j ) = j
value2 ( j ) = j
END DO
DO i = istart , iend , 1
CALL clawloop_extracted0 ( value1 ( i ) , value2 ( i ) )
END DO
END PRO... | bsd-2-clause | FORTRAN |
052f0994e43dd8708b71d9a005e18e80761be8ad | Fix indentation | cphyc/n-body,cphyc/n-body | main.f90 | main.f90 | program n_body
use io_tools
use constants
use physics
implicit none
real(kind = xp), dimension(:), allocatable :: m
real(kind = xp), dimension(:, :), allocatable :: r, v, a
real(kind = xp) :: t = 0._xp, dt, Ec, Ep, E!, minEc, maxEc
integer :: iter = 0
integer :: dump_freq = 10
integer... | program n_body
use io_tools
use constants
use physics
implicit none
real(kind = xp), dimension(:), allocatable :: m
real(kind = xp), dimension(:, :), allocatable :: r, v, a
real(kind = xp) :: t = 0._xp, dt, Ec, Ep, E!, minEc, maxEc
integer :: iter = 0
integer :: dump_freq = 10
integer :: maxiter... | mit | FORTRAN |
e06f24617696d085b5f099bf4d0d1ce0e9d5dcea | Modify fltinv_variable_module.f90 | mherman09/Hdef,mherman09/Hdef,mherman09/Hdef | src/fltinv_variable_module.f90 | src/fltinv_variable_module.f90 | module variable_module
use io_module, only: program_data
! Command line variables
character(len=256) :: output_file ! stdout, <file_name>
character(len=16) :: inversion_mode ! lsqr, anneal, neighbor
character(len=16) :: gf_type ! okada_rect, okada_pt
character(... | module variable_module
use io_module, only: program_data
! Command line variables
character(len=256) :: output_file ! stdout, <file_name>
character(len=16) :: inversion_mode ! lsqr, anneal, neighbor
character(len=16) :: gf_type ! okada_rect, okada_pt
character(... | mit | FORTRAN |
53003f6785540e70fc805bac25ee06760522836c | Update reference for fusion1 test case | clementval/claw-compiler,clementval/claw-compiler | test/loops/fusion1/reference.f90 | test/loops/fusion1/reference.f90 | PROGRAM loop_fusion
CALL clawloop ( )
END PROGRAM loop_fusion
SUBROUTINE clawloop ( )
INTEGER :: i
DO i = 1 , 10 , 1
PRINT * ,"First loop body:" , i
PRINT * ,"Second loop body:" , i
PRINT * ,"Third loop body:" , i
END DO
END SUBROUTINE clawloop
| PROGRAM loop_fusion
CALL clawloop ( )
END PROGRAM loop_fusion
SUBROUTINE clawloop ( )
INTEGER :: i
DO i = 1 , 10 , 1
PRINT * ,"First loop body:" , i
PRINT * ,"Second loop body:" , i
PRINT * ,"Third loop body:" , i
END DO
END SUBROUTINE clawloop
| bsd-2-clause | FORTRAN |
38eae360edb02df0038f5ce941bca6d4d9d8d968 | update initial.f | aschampion/gt-cse6730-pmds | initial.f | initial.f | Subroutine Initial
Implicit None
Include 'globals.inc'
C paramters that will be used
Integer I, seed(3)
Double Precision Accx, Accy, Ukin, Adjust
Accx = 0.0d0
Accy = 0.0d0
Ukin = 0.0d0
Call itime(seed)
Call srand(seed(3))
C Generate Velocities From A Gaussian; Set Impulse To Zero
Do I = 1, ... | Subroutine Initial
Implicit None
Include 'paramter.inc'
C paramters that will be used
Integer I, seed(3)
Double Precision Accx, Accy, Ukin, Adjust
Accx = 0.0d0
Accy = 0.0d0
Ukin = 0.0d0
Call itime(seed)
Call srand(seed(3))
C Generate Velocities From A Gaussian; Set Impulse To Zero
Do I = 1,... | mit | FORTRAN |
161526cfc32a72af8d15b5e8fde815f2c5ed16a6 | Add subroutine wrapper | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | lib/node_modules/@stdlib/math/base/blas/dasum/lib/dasum_wrapper.f | lib/node_modules/@stdlib/math/base/blas/dasum/lib/dasum_wrapper.f | !> Wraps dasum as a subroutine.
!
! @param {integer} N - number of values to sum
! @param {Array<double>} dx - input array
! @param {integer} stride - stride length
! @param {double} asum - output variable reference
!<
subroutine dasumsub( N, dx, stride, asum )
implicit none
! ..
! External functions:
external ... | apache-2.0 | FORTRAN |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.