Search is not available for this dataset
repo
stringlengths
2
152
⌀
file
stringlengths
15
239
code
stringlengths
0
58.4M
file_length
int64
0
58.4M
avg_line_length
float64
0
1.81M
max_line_length
int64
0
12.7M
extension_type
stringclasses
364 values
FMM3D
FMM3D-master/julia/examples/lfmm3dexample.jl
using FMM3D using Random using LinearAlgebra # This is a sample code to demonstrate how to use # the fmm libraries # # sample with one density, sources to sources, # charge interactions, and potential only # n = 2000 nd = 1 sources = rand(3,n) eps = 10.0^(-5) charges = rand(n) vals = lfmm3d(eps,sources,charges=ch...
601
18.419355
50
jl
FMM3D
FMM3D-master/julia/src/FMM3D.jl
""" module FMM3D Wrappers for the Flatiron Institute's FMM3D library. # wrappers All N-body codes return output in an `FMMVals` structure. See documentation of N-body codes for details. N-body interactions with the Helmholtz kernel - [`hfmm3d`](@ref): ``O(N)`` fast mutlipole code - [`h3ddir`](@ref): ``O(N^2)`...
66,017
30.258523
152
jl
FMM3D
FMM3D-master/julia/test/runtests.jl
using FMM3D using Test using Random using LinearAlgebra @testset "testing Helmholtz utilities" begin n = 1000 nt = 1100 sources = randn(3,n) targets = randn(3,nt) charges = randn(n) + im*randn(n) dipvecs = randn(3,n) + im*randn(3,n) zk = 2.1 vals1c = h3ddir(zk,sources,targets,charges=...
11,336
38.63986
112
jl
FMM3D
FMM3D-master/matlab/em3ddir.m
function [U] = em3ddir(zk,srcinfo,targ,ifE,ifcurlE,ifdivE) % % % This subroutine computes % E = curl S_{k}[h_current] + S_{k}[e_current] + grad S_{k}[e_charge] -- (1) % using the vector Helmholtz fmm. % The subroutine also computes divE, curlE % with appropriate flags % Remark: the subroutine uses a stabiliz...
5,494
37.159722
322
m
FMM3D
FMM3D-master/matlab/emfmm3d.m
function [U] = emfmm3d(eps,zk,srcinfo,targ,ifE,ifcurlE,ifdivE) % % % This subroutine computes % E = curl S_{k}[h_current] + S_{k}[e_current] + grad S_{k}[e_charge] -- (1) % using the vector Helmholtz fmm. % The subroutine also computes divE, curlE % with appropriate flags % Remark: the subroutine uses a stab...
5,546
37.79021
332
m
FMM3D
FMM3D-master/matlab/emfmm3d_example.m
% % disp("This is an example matlab driver for the maxwell fmm"); disp("On output the code prints the field in example1 and, field+curl in example2"); disp(" "); disp(" "); %% source to target, magnetic current only, field example % clear srcinfo targ ns U eps ifE ifcurlE ifdivE zk; disp("Example 1: source to sourc...
1,367
20.375
93
m
FMM3D
FMM3D-master/matlab/fmm3d.c
/* --------------------------------------------------- */ /* Automatically generated by mwrap */ /* --------------------------------------------------- */ /* Code generated by mwrap 1.0 */ /* Copyright statement for mwrap: mwrap -- MEX file generation for MATLAB and Octave Copyright (c) 2007-...
256,830
35.352583
534
c
FMM3D
FMM3D-master/matlab/fmm3d_legacy.c
/* --------------------------------------------------- */ /* Automatically generated by mwrap */ /* --------------------------------------------------- */ /* Code generated by mwrap 1.0 */ /* Copyright statement for mwrap: mwrap -- MEX file generation for MATLAB and Octave Copyright (c) 2007-...
95,714
33.729681
397
c
FMM3D
FMM3D-master/matlab/h3ddir.m
function [U] = h3ddir(zk,srcinfo,targ,pgt) % % % This subroutine computes the N-body Helmholtz % interactions and its gradients in three dimensions where % the interaction kernel is given by $e^{ikr}/r$ % % u(x) = \sum_{j=1}^{N} c_{j} \frac{e^{ik\|x-x_{j}\|}}{\|x-x_{j}\|} - % v_{j} \cdot \nabla \left( \fr...
5,616
42.207692
183
m
FMM3D
FMM3D-master/matlab/h3dpartdirect.m
function [U]=h3dpartdirect(zk,nsource,source,ifcharge,charge,ifdipole,dipstr,dipvec,ifpot,iffld,ntarg,targ,ifpottarg,iffldtarg) %HFMM3DPARTDIRECT Helmholtz interactions in R^3, direct evaluation. % % Helmholtz FMM in R^3: evaluate all pairwise particle % interactions (ignoring self-interactions) and interactions with t...
3,753
30.546218
249
m
FMM3D
FMM3D-master/matlab/hfmm3d.m
function [U,varargout] = hfmm3d(eps,zk,srcinfo,pg,varargin) % % % This subroutine computes the N-body Helmholtz % interactions and its gradients in three dimensions where % the interaction kernel is given by $e^{ikr}/r$ % % u(x) = \sum_{j=1}^{N} c_{j} \frac{e^{ik\|x-x_{j}\|}}{\|x-x_{j}\|} - % v_{j} \cdot ...
7,588
36.019512
393
m
FMM3D
FMM3D-master/matlab/hfmm3d_big_example.m
% % disp("This is an example matlab driver"); disp("On output the code prints the pot+grad in example1, and computes the error at 10 source locations"); disp(" "); disp(" "); %% source to source, charges only, pot+grad example % clear srcinfo ns U1 U2 eps pg zk; disp("Example 1: source to source, charge, pot+grad");...
769
21.647059
106
m
FMM3D
FMM3D-master/matlab/hfmm3d_example.m
% % disp("This is an example matlab driver"); disp("On output the code prints the pot+grad in example1 and, pot+pottarg in example2"); disp(" "); disp(" "); %% source to source, charges only, pot+grad example % clear srcinfo ns U eps pg zk; disp("Example 1: source to source, charge, pot+grad"); disp(" "); disp(" ");...
1,185
17.825397
88
m
FMM3D
FMM3D-master/matlab/hfmm3dpart.m
function [U]=hfmm3dpart(iprec,zk,nsource,source,ifcharge,charge,ifdipole,dipstr,dipvec,ifpot,iffld,ntarg,targ,ifpottarg,iffldtarg) %HFMM3DPART Helmholtz particle targ FMM in R^3. % % Helmholtz FMM in R^3: evaluate all pairwise particle % interactions (ignoring self-interactions) and interactions with targs. % % [U]=HFM...
4,842
34.350365
271
m
FMM3D
FMM3D-master/matlab/l3ddir.m
function [U] = l3ddir(srcinfo,targ,pgt) % % % This subroutine computes the N-body Laplace % interactions and its gradients in three dimensions where % the interaction kernel is given by $1/r$ % % u(x) = \sum_{j=1}^{N} c_{j} \frac{1}{\|x-x_{j}\|} - % v_{j} \cdot \nabla \left( \frac{1}{\|x-x_{j}\|}\right) ...
6,913
46.034014
198
m
FMM3D
FMM3D-master/matlab/l3dpartdirect.m
function [U]=l3dpartdirect(nsource,source,ifcharge,charge,ifdipole,dipstr,dipvec,ifpot,iffld,ntarg,targ,ifpottarg,iffldtarg) %LFMM3DPARTDIRECT Laplace interactions in R^3, direct evaluation. % % Laplace FMM in R^3: evaluate all pairwise particle % interactions (ignoring self-interactions) and interactions with targs. %...
3,665
30.333333
239
m
FMM3D
FMM3D-master/matlab/lfmm3d.m
function [U,varargout] = lfmm3d(eps,srcinfo,pg,varargin) % % % This subroutine computes the N-body Laplace % interactions and its gradients in three dimensions where % the interaction kernel is given by $1/r$ % % u(x) = \sum_{j=1}^{N} c_{j} \frac{1}{\|x-x_{j}\|} - % v_{j} \cdot \nabla \left( \frac{1}{\|x-...
7,733
36.004785
386
m
FMM3D
FMM3D-master/matlab/lfmm3d_big_example.m
% % disp("This is an example matlab driver"); disp("On output the code prints the pot+grad in example1, and computes the error at 10 source locations"); disp(" "); disp(" "); %% source to source, charges only, pot+grad example % clear srcinfo ns U1 U2 eps pg; disp("Example 1: source to source, charge, pot+grad"); di...
727
21.060606
106
m
FMM3D
FMM3D-master/matlab/lfmm3d_example.m
% disp("This is an example matlab driver"); disp("On output the code prints the pot+grad in example1 and, pot+pottarg in example2"); disp(" "); disp(" "); %% source to source, charges only, pot+grad example % clear srcinfo ns U eps pg; disp("Example 1: source to source, charge, pot+grad"); disp(" "); disp(" "); ns...
1,081
17.338983
88
m
FMM3D
FMM3D-master/matlab/lfmm3dpart.m
function [U]=lfmm3dpart(iprec,nsource,source,ifcharge,charge,ifdipole,dipstr,dipvec,ifpot,iffld,ntarg,targ,ifpottarg,iffldtarg) %LFMM3DPART Laplace particle targ FMM in R^3. % % Laplace FMM in R^3: evaluate all pairwise particle % interactions (ignoring self-interactions) and interactions with targs. % % [U]=LFMM3DPART...
4,737
33.333333
262
m
FMM3D
FMM3D-master/matlab/readme.md
This folder contains the MATLAB wrappers, legacy wrappers for FMMLIB3D, and precompiled mex interfaces for MacOSX and Linux. We strongly recommend recompiling the mex interfaces (see https://fmm3d.readthedocs.io/en/latest/install.html for detailed installation instructions). Example codes for demonstrating the Hel...
543
40.846154
78
md
FMM3D
FMM3D-master/matlab/st3ddir.m
function [U] = st3ddir(srcinfo,targ,ifppregtarg) % % % Stokes FMM in R^{3}: evaluate all pairwise particle % interactions (ignoring self-interactions) and % interactions with targs. % % This routine computes sums of the form % % u(x) = sum_m G_{ij}(x,y^{(m)}) sigma^{(m)}_j % + sum_m T_{ijk}(x,y^{(m)}) mu^{(m...
5,615
39.992701
242
m
FMM3D
FMM3D-master/matlab/stfmm3d.m
function [U] = stfmm3d(eps,srcinfo,ifppreg,targ,ifppregtarg) % % % Stokes FMM in R^{3}: evaluate all pairwise particle % interactions (ignoring self-interactions) and % interactions with targs. % % This routine computes sums of the form % % u(x) = sum_m G_{ij}(x,y^{(m)}) sigma^{(m)}_j % + sum_m T_{ijk}(x,y^{...
6,768
41.043478
380
m
FMM3D
FMM3D-master/matlab/stfmm3d_example.m
disp("This is an example matlab driver for the stokes fmm"); disp("On output the code prints the pot+pre+grad in example1 and, pot+pottarg+pre+pretarg in example2"); disp(" "); disp(" "); %% source to source, stokeslet only, pot+pre+grad example % clear srcinfo ns U eps pg; disp("Example 1: source to source, stokesl...
1,395
20.151515
104
m
FMM3D
FMM3D-master/matlab/test_emfmm3d.m
clear srcinfo ns = 4000; srcinfo.sources = rand(3,ns); srcinfo.e_charge = rand(1,ns)+1i*rand(1,ns); srcinfo.e_current = rand(3,ns)+1i*rand(3,ns); srcinfo.h_current = rand(3,ns)+1i*rand(3,ns); nt = 3999; targ = rand(3,nt); eps = 1e-6; ntests = 6; ipass = zeros(ntests,1); errs = zeros(ntests,1); zk = complex(1.1); nte...
3,194
30.019417
109
m
FMM3D
FMM3D-master/matlab/test_hfmm3d.m
clear srcinfo ns = 4000; srcinfo.sources = rand(3,ns); srcinfo.charges = rand(1,ns)+1i*rand(1,ns); nt = 3999; targ = rand(3,nt); eps = 1e-5; ntests = 36; ipass = zeros(ntests,1); errs = zeros(ntests,1); zk = complex(1.1); ntest = 10; stmp = srcinfo.sources(:,1:ntest); ttmp = targ(:,1:ntest); % Test sources to s...
16,727
26.695364
92
m
FMM3D
FMM3D-master/matlab/test_hfmm3dpart_direct.m
% % Test Helmholtz particle FMMs in R^3 % zk = complex(1.1); N = maxNumCompThreads nsource = 2000; source = zeros(3,nsource); idist=1; if( idist == 1 ), theta=rand(1,nsource)*pi; phi=rand(1,nsource)*2*pi; source(1,:)=.5*cos(phi).*sin(theta); source(2,:)=.5*sin(phi).*sin(theta); source(3,:)=.5*cos(theta); end if...
2,442
18.388889
126
m
FMM3D
FMM3D-master/matlab/test_lfmm3d.m
clear srcinfo ns = 4000; srcinfo.sources = rand(3,ns); srcinfo.charges = rand(1,ns); nt = 3999; targ = rand(3,nt); eps = 1e-5; ntests = 54; ipass = zeros(ntests,1); errs = zeros(ntests,1); ntest = 10; stmp = srcinfo.sources(:,1:ntest); ttmp = targ(:,1:ntest); itest = 1; % Test sources to sources, charge, pot pg ...
29,523
26.011894
92
m
FMM3D
FMM3D-master/matlab/test_lfmm3dpart_direct.m
% % Test Laplace particle FMMs in R^3 % nsource = 2000 source = zeros(3,nsource); idist=1; if( idist == 1 ), theta=rand(1,nsource)*pi; phi=rand(1,nsource)*2*pi; source(1,:)=.5*cos(phi).*sin(theta); source(2,:)=.5*sin(phi).*sin(theta); source(3,:)=.5*cos(theta); end if( idist == 2 ), source(1,:)=rand(1,nsource); s...
2,348
18.90678
123
m
FMM3D
FMM3D-master/matlab/test_stfmm3d.m
clear srcinfo ns = 4000; srcinfo.sources = rand(3,ns); srcinfo.stoklet = rand(3,ns); srcinfo.strslet = rand(3,ns); srcinfo.strsvec = rand(3,ns); nt = 3999; targ = rand(3,nt); eps = 1e-5; ntests = 2; ipass = zeros(ntests,1); errs = zeros(ntests,1); ntest = 10; stmp = srcinfo.sources(:,1:ntest); ttmp = targ(:,1:ntest...
2,452
28.554217
100
m
FMM3D
FMM3D-master/python/emfmm3d_example.py
#!/usr/bin/env python import fmm3dpy as fmm import numpy as np # # This is a sample code to demonstrate how to use # the fmm libraries # # # Source to target, magnetic current only, output field example # n = 20000 nd = 1 sources = np.random.uniform(0,1,(3,n)) nt = 4000 targ = np.random.uniform(0,1,(3,nt)) eps = ...
925
24.027027
90
py
FMM3D
FMM3D-master/python/hfmm3d_example.py
#!/usr/bin/env python import fmm3dpy as fmm import numpy as np # # This is a sample code to demonstrate how to use # the fmm libraries # # sample with one density, sources to sources, # charge interactions, and potential only # n = 2000 nd = 1 sources = np.random.uniform(0,1,(3,n)) eps = 10**(-5) zk = 1.1 + 1j*0...
828
22.027778
78
py
FMM3D
FMM3D-master/python/lfmm3d_example.py
#!/usr/bin/env python import fmm3dpy as fmm import numpy as np # # This is a sample code to demonstrate how to use # the fmm libraries # # sample with one density, sources to sources, # charge interactions, and potential only # n = 200000 nd = 1 sources = np.random.uniform(0,1,(3,n)) eps = 10**(-5) charges = np....
719
20.176471
62
py
FMM3D
FMM3D-master/python/readme.md
To install in the system: pip install -e . On compilation you can import the package fmm3dpy which has 2 main subroutines - hfmm3d: for computing N-body Helmholtz interactions - lfmm3d: for computing N-body Laplace interactions Examples for both of these are demonstrated in ``hfmmexample.py`` and ``lfmmexample.py`...
324
20.666667
53
md
FMM3D
FMM3D-master/python/setup.py
import setuptools import string import os from numpy.distutils.core import setup from numpy.distutils.core import Extension from sys import platform pkg_name = "fmm3dpy" ## TODO: this should be automatically populated using "read directory, or whatever" ## TODO: fix problem with relative location for executable list...
3,500
32.342857
166
py
FMM3D
FMM3D-master/python/stfmm3d_example.py
#!/usr/bin/env python import fmm3dpy as fmm import numpy as np # # This is a sample code to demonstrate how to use # the fmm libraries # # sample with one density, sources to sources, # stokeslet interactions, and potential+pressure+gradient # n = 20000 nd = 1 sources = np.random.uniform(0,1,(3,n)) eps = 10**(-5)...
895
23.216216
68
py
FMM3D
FMM3D-master/python/fmm3dpy/__init__.py
from .fmm3d import hfmm3d,lfmm3d,emfmm3d,stfmm3d,h3ddir,l3ddir,em3ddir,st3ddir,comperr,Output
94
46.5
93
py
FMM3D
FMM3D-master/python/fmm3dpy/fmm3d.py
from . import hfmm3d_fortran as hfmm from . import lfmm3d_fortran as lfmm from . import emfmm3d_fortran as emfmm from . import stfmm3d_fortran as stfmm import numpy as np import numpy.linalg as la class Output(): pot = None grad = None hess = None pottarg = None gradtarg = None hesstarg = None...
55,886
43.214399
209
py
FMM3D
FMM3D-master/python/test/test_hfmm.py
#!/usr/bin/env python import fmm3dpy as fmm import numpy as np import numpy.linalg as la def main(): test_hfmm() def test_hfmm(): ntests = 36 testres = np.zeros(ntests) # # This is a testing code for making sure all the # fmm routines are accessible through fmm3d.py # n = 2000 ...
18,895
31.977312
101
py
FMM3D
FMM3D-master/python/test/test_lfmm.py
#!/usr/bin/env python import fmm3dpy as fmm import numpy as np import numpy.linalg as la def main(): test_lfmm() def test_lfmm(): ntests = 54 testres = np.zeros(ntests) # # This is a testing code for making sure all the # fmm routines are accessible through fmm3d.py # n = 2000 ...
27,769
31.178447
101
py
FMM3D
FMM3D-master/src/Common/besseljs3d.f
c c Computation of spherical Bessel functions via recurrence c c********************************************************************** subroutine besseljs3d(nterms,z,scale,fjs,ifder,fjder) c********************************************************************** c c PURPOSE: c c This subroutine evaluates the fi...
4,508
25.523529
71
f
FMM3D
FMM3D-master/src/Common/cdjseval3d.f
c c Computation of spherical Bessel functions via recurrence c c********************************************************************** subroutine jfuns3d(ier,nterms,z,scale,fjs,ifder,fjder, 1 lwfjs,iscale,ntop) implicit none integer ier,nterms,ifder,lwfjs,ntop,i,ncntr real *8 scal...
5,375
27.444444
75
f
FMM3D
FMM3D-master/src/Common/cumsum.f
c Copyright (C) 2020-2021: The Simons Fonudation, Inc., Travis Askham, c Michael O'Neil, and Felipe Vico. c c This file contains the following user callable c routines: c c * cumsum: c computes the cumulative sum (aka prefix c sum or scan) of an array of integers. This code c does some memory managem...
5,858
23.4125
70
f
FMM3D
FMM3D-master/src/Common/dfft.f
C Extracted from public domain code FFTPACK C http://www.netlib.org/fftpack/ C C C FFTPACK C C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * C C VERSION 4 APRIL 1985 C C A PACKAGE OF FORTRAN SUBPROGRAMS FOR THE FAST FOURIER C TRANSFORM OF...
95,239
30.505127
70
f
FMM3D
FMM3D-master/src/Common/dlaran.f
C Copyright (c) 1992-2013 The University of Tennessee and The University C of Tennessee Research Foundation. All rights C reserved. C Copyright (c) 2000-2013 The University of California Berkeley. All C rights reserved. C Copyright (c) 2006-...
5,064
35.438849
73
f
FMM3D
FMM3D-master/src/Common/fmmcommon.f
c c c a collection of common subroutines used in the fmm c c mpalloc - allocate workspace for multipole and local c expansions c c dreorderf - permute a real array with given permutation c c dreroderi - pertmute a real array with inverse of c ...
20,369
26.67663
72
f
FMM3D
FMM3D-master/src/Common/hkrand.f
c random number generator c double precision function hkrand(iseed_hk) implicit double precision (a-h,o-z) dimension iseed(4) data iseed/0,0,0,1/ save c if( iseed_hk .ne. 0 ) then iseed(1)=0 iseed(2)=0 iseed(3)=0 iseed(4)=mod(2*isee...
407
19.4
50
f
FMM3D
FMM3D-master/src/Common/legeexps.f
c c This file contains a set of subroutines for the handling c of Legendre expansions. It contains 19 subroutines that are c user-callable. Following is a brief description of these c subroutines. c c legeexps - constructs Legendre nodes, and corresponding Gaussian c weights. Al...
56,249
25.321947
78
f
FMM3D
FMM3D-master/src/Common/prini.f
c c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c this is the end of the debugging code and the beginning of the c printing subroutines proper c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c c This file contains 18 user-callable su...
7,081
19.707602
78
f
FMM3D
FMM3D-master/src/Common/pts_tree3d.f
c c c c c generate level restricted tree based on resolving points c (Currently only supports, sorting on sources, sorting on c targets, or sorting on sources and targets) c c There is additional functionality to further subdivide c an existing tree based on resolving a function, c this functionali...
41,067
28.334286
78
f
FMM3D
FMM3D-master/src/Common/rotgen.f
c This file contains all the relevant rotation subroutines c for the 3D code. c c subroutine rotztoy(nd,nterms,mpole,mrotate,rdminus) c Compute multipole expansions in the new frame of c reference given by c z_new <- y_old c y_new <- x_old c x_new <- z_old c c This is achieved b...
7,658
30.64876
72
f
FMM3D
FMM3D-master/src/Common/rotproj.f
c c ROTATION VIA PROJECTION c c Multipole expansions for complex-valued functions. c c Requires FFT and Associated Legendre Function Libraries. c c User-callable routine is rotviaproj. c The other routines are used internally. c c********************************************************************...
16,053
33.976035
72
f
FMM3D
FMM3D-master/src/Common/rotviarecur.f
c c ROTATION VIA RECURSION c good up to order 100 or so. c c Multipole expansions for complex-valued functions. c c rotviarecur is the user callable routine c c rotviarecur3p_init - precompute the coefficients of rotation matrix. c rotviarecur3p_apply - apply the rotation matrix. c c c...
21,008
29.670073
77
f
FMM3D
FMM3D-master/src/Common/tree_lr_3d.f
c c generate level restricted oct tree refined c to finest level. Features include c c radsrc parameter (preventing sources with large radius c from being pushed to the finest level) c radexp parameter (preventing exp centers with large radius c from bei...
183,572
34.350087
75
f
FMM3D
FMM3D-master/src/Common/tree_routs3d.f
c c c common routines for generating and processing c a level restricted quad tree in 2D c c c c subroutine tree_refine_boxes(irefinebox,nboxes, 1 ifirstbox,nbloc,centers,bs,nbctr,nlctr, 2 ilevel,iparent,nchild,ichild) implicit none integer nboxes,nbloc,nbctr,nlctr real *8 ...
41,303
31.018605
75
f
FMM3D
FMM3D-master/src/Common/yrecursion.f
c c This file contains a suite of evaluation codes for associated c Legendre functions with various scalings, arguent types, etc. c Following is a brief description of the user-callable subroutines. c (FORTRAN 77 VERSION). c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c Simple...
97,469
27.450088
76
f
FMM3D
FMM3D-master/src/Helmholtz/h3dcommon.f
c c c this file contains some common routines for helmrouts3d c and helmrouts3d_vec c c h3d01: computes h0, h1 (first two spherical Hankel fns.) c h3dall: computes Hankel functions of all orders and scales them c c h3dadd: adds one expansion to another c c h3dadd_trunc: adds one expansion ...
5,517
25.657005
78
f
FMM3D
FMM3D-master/src/Helmholtz/h3dterms.f
c routines for determining length of multipole and c local expansions based on size of box in wavelengths c c----------------------------------------------------------------------------- c c h3dterms - determine number of terms in mpole expansions for box c of size "size" with Helmholtz p...
3,928
25.910959
78
f
FMM3D
FMM3D-master/src/Helmholtz/h3dtrans.f
c c This file contains the translation operators for the helmholtz c 3D FMM c c h3dmpmp - shift center of multipole expansion c h3dmploc - convert multipole expansion to a local expansion c h3dlocloc - shift center of local expansion c C************************************************************...
26,221
31.056235
72
f
FMM3D
FMM3D-master/src/Helmholtz/helmkernels.f
c This file contains the direct evaluation kernels for Helmholtz FMM c c h3ddirectcp: direct calculation of potential for a collection c of charge sources at a collection of targets c c h3ddirectcg: direct calculation of potential and gradient c for a c...
20,403
29.728916
79
f
FMM3D
FMM3D-master/src/Helmholtz/helmkernels_dr.f
implicit real *8 (a-h,o-z) parameter (nd = 1) parameter (nt = 3) real *8 ztarg(3,nt),sources(3,10) complex *16 charge(nd,10),pot(nd,nt),grad(nd,3,nt) complex *16 hess(nd,6,nt) complex *16 dipvec(nd,3,10) complex *16 zk,v1,v2,zfd complex *16 zfd1,zfd2,zfd3 c c ...
10,409
32.580645
67
f
FMM3D
FMM3D-master/src/Helmholtz/helmkernels_fast.f
c This file contains the direct evaluation kernels for Helmholtz FMM c using the sctl library c c h3ddirectcp: direct calculation of potential for a collection c of charge sources at a collection of targets c c h3ddirectcg: direct calculation of potential and gradient c ...
23,142
32.54058
79
f
FMM3D
FMM3D-master/src/Helmholtz/helmkernels_hess.f
c This file contains the direct evaluation kernels for Helmholtz FMM c c h3ddirectcp: direct calculation of potentials for a collection c of charge sources at a collection of targets c c h3ddirectcg: direct calculation of potentials and gradients c for ...
37,532
32.185676
75
f
FMM3D
FMM3D-master/src/Helmholtz/helmrouts3d.f
c c This file contains the basic subroutines for c forming and evaluating multipole (partial wave) expansions. c c c Remarks on scaling conventions. c c 1) Hankel and Bessel functions are consistently scaled as c hvec(n)= h_n(z)*scale^(n) c jvec(n)= j_n(z)/scale^(n) c c scal...
55,345
29.326575
76
f
FMM3D
FMM3D-master/src/Helmholtz/hfmm3d.f
c c c Generalized helmholtz FMM in R^3: evaluate all pairwise particle c interactions (ignoring self-interaction) c and interactions with targets c c We use exp(ikr)/r for the Green's function., without c the 1/(4\pi ) scaling. c c c--------------------------------------...
80,883
31.680404
79
f
FMM3D
FMM3D-master/src/Helmholtz/hfmm3d_memest.f
c c Estimate the memory used by Helmholtz FMM. Note that this is a c rough estimate which may be off by up to 10% in either direction c c c----------------------------------------------------------- subroutine hfmm3d_memest(nd,eps,zk,nsource,source,ifcharge, $ ifdipole,iper,ifpgh,ntarg,targ,ifpghta...
11,462
24.138158
72
f
FMM3D
FMM3D-master/src/Helmholtz/hfmm3d_mps.f90
! !-------------------------------------------------------------------- ! ! A fast multi-particle scattering code, based on the code in ! hfmm3d.f of the Flatiron Institute FMM3D library. ! ! Original skeleton code by Manas Rachh, Leslie Greengard, etc. ! FMPS re-write by Mike O'Neil, 2019 ! oneil@cims.nyu.edu ! ! The ...
40,022
26.929518
77
f90
FMM3D
FMM3D-master/src/Helmholtz/hfmm3d_ndiv.f
c c c Generalized helmholtz FMM in R^3: evaluate all pairwise particle c interactions (ignoring self-interaction) c and interactions with targets c c We use exp(ikr)/r for the Green's function., without c the 1/(4\pi ) scaling. c c c--------------------------------------...
14,635
27.641879
72
f
FMM3D
FMM3D-master/src/Helmholtz/hfmm3dwrap.f
c This file contains the Helmholtz FMM wrappers c c The Helmholtz FMM evaluates the following potential c and its gradient c c u(x) = \sum_{j=1}^{N} c_{j}e^{ik|x-x_{j}|}/|x-x_{j}| c - v_{j}.\nabla (e^{ik|x-x_{j}|}/|x-x_{j}|) c c Here x_{j} are the source locations, c_{j} are the charge streng...
44,907
25.339003
76
f
FMM3D
FMM3D-master/src/Helmholtz/hfmm3dwrap_legacy.f
c These file contains the legacy FMM wrappers from the previous version c of fmmlib3d c c c c This file contains the main FMM routines and some related c subroutines for evaluating Helmholtz potentials and fields due to c point charges and dipoles. (FORTRAN 90 VERSION) c c hfmm3dpart - Helmhol...
20,390
28.25538
80
f
FMM3D
FMM3D-master/src/Helmholtz/hfmm3dwrap_vec.f
c c This file contains the Helmholtz FMM wrappers c c The Helmholtz FMM evaluates the following potential c and its gradient c c u_{l}(x) = \sum_{j=1}^{N} c_{l,j}e^{ik|x-x_{j}|}/|x-x_{j}| - c v_{l,j}.\nabla (e^{ik|x-x_{j}|/|x-x_{j}|) c c Here x_{j} are the source locations, c_{l,j} are the charge s...
47,714
25.851435
73
f
FMM3D
FMM3D-master/src/Helmholtz/hndiv.f
subroutine hndiv(eps,ns,nt,ifcharge,ifdipole,ifpgh, 1 ifpghtarg,ndiv,idivflag) c c c this subroutine estimates ndiv and idivflag c based on geometry parameters c c TODO: better way to choose ndiv based on boxsize c c implicit none real *8 eps integer ns,nt,ifcharge...
899
21.5
58
f
FMM3D
FMM3D-master/src/Helmholtz/hndiv_fast.f
subroutine hndiv(eps,ns,nt,ifcharge,ifdipole,ifpgh, 1 ifpghtarg,ndiv,idivflag) c c c this subroutine estimates ndiv and idivflag c based on geometry parameters c c implicit none real *8 eps integer ns,nt,ifcharge,ifdipole,ifpgh,ifpghtarg,ndiv integer idivflag ...
850
21.394737
58
f
FMM3D
FMM3D-master/src/Helmholtz/hnumfour.f
subroutine hnumfour(eps,zk,nl,nfour) implicit none real *8 eps integer iprec,idomain,nl,nfour(nl),ier complex *16 zk call hwts3dgetd(ier,zk,idomain) cccc print *, "idomain=",idomain iprec = 0 if(eps.lt.0.5d-2) iprec = 1 if(eps.lt.0.5d-3) iprec = 2 if...
1,672,304
24.020273
59
f
FMM3D
FMM3D-master/src/Helmholtz/hnumphys.f
subroutine hnumphys(eps,zk,nl,nphys) implicit none real *8 eps integer iprec,idomain,nl,nphys(nl),ier complex *16 zk call hwts3dgetd(ier,zk,idomain) iprec = 0 if(eps.lt.0.5d-2) iprec = 1 if(eps.lt.0.5d-3) iprec = 2 if(eps.lt.0.5d-6) iprec = 3 if(eps.l...
1,672,283
24.015093
59
f
FMM3D
FMM3D-master/src/Helmholtz/hpwrouts.f
c cc plane wave routines for Helmholtz 3D FMM c c*********************************************************************** subroutine hrlscini(rlsc,nlambs,rlams,rsc,zk,nterms) c*********************************************************************** c c this subroutine computes p_{n,m}(i\sqrt(\lambda^2 -...
149,216
30.447208
75
f
FMM3D
FMM3D-master/src/Helmholtz/hwts3.f
c c Plane wave quadrature weights cc subroutine hwts3(ier,iprec,rk,cxs,cws,n) implicit real *8 (a-h,o-z) real *8 cx(1000),cy(1000) complex *16 cxs(*),cws(*) complex *16 rk,ima dimension xs(10 000), ws(10 000) data ima/(0.0d0,1.0d0)/ c c c This...
1,493,150
36.747775
75
f
FMM3D
FMM3D-master/src/Helmholtz/hwts3e.f
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c this is the end of the debugging code and the beginning c of the exponential representation routines c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c c c subroutine hwts3e(ier,eps,rk,cxs,cws,n) ...
9,099
19.449438
75
f
FMM3D
FMM3D-master/src/Helmholtz/numphysfour.f
c c number of discretization nodes in tranverse c direction of plane wave quadratures c subroutine numphysfour(iprec,iquad,nl,np,nf) implicit none integer iprec,iquad,nl,nf(nl),np(nl) if(iprec.eq.1) then if(iquad.eq.12) then np( 1) = 4 ...
31,874
22.912228
53
f
FMM3D
FMM3D-master/src/Helmholtz/projections.f
c c c Subroutine library for shifting via projection c C*********************************************************************** subroutine h3drescalemp(nd,nterms,lmp,mpole, 1 radius,zk0,scale,fhs,fhder) C*********************************************************************** C C This su...
16,777
30.656604
76
f
FMM3D
FMM3D-master/src/Helmholtz/quadread.f
c c read plane wave quadratures from file c subroutine lreadall(eps,zk,nquad,cxs,cws,nfour,nphys,lw,ier) c cc this subroutine computes lambda quadrature nodes and weights c for given helmholtz parameter and the number of terms c per lambda required in fourier and physical domains c c ...
2,995
21.526316
70
f
FMM3D
FMM3D-master/src/Laplace/l3dterms.f
c c l3dterms - determine number of terms in mpole expansions c c l3dterms_list2 - build tables for the number of terms needed c for all boxes in list 2 c c l3dterms_list2w - build table for the number of terms needed c for all boxes in list 2, using worst case error analysis c c ...
14,231
21.483412
78
f
FMM3D
FMM3D-master/src/Laplace/l3dtrans.f
c c This file contains the translation operator for the Laplacd c 3D FMM c c l3mpmp - shift center of multipole expansion c l3dmploc - convert multipole expansion to a local expansion c l3locloc - shift center of local expansion c c C c C**************************************************************...
20,480
29.432392
72
f
FMM3D
FMM3D-master/src/Laplace/lapkernels.f
c This file contains the direct evaluation kernels for Laplace FMM c c l3ddirectcp: direct calculation of potential for a collection c of charge sources to a collection of targets c c l3ddirectcg: direct calculation of potential and gradients c for a collection of ...
33,661
31.523671
72
f
FMM3D
FMM3D-master/src/Laplace/lapkernels_dr.f
implicit real *8 (a-h,o-z) parameter (nd = 1) parameter (nt = 3) real *8 ztarg(3,nt),sources(3,10) real *8 charge(nd,10),pot(nd,nt),grad(nd,3,nt) real *8 hess(nd,6,nt) real *8 dipvec(nd,3,10) c c c sources(1,1) = 0.1d0 sources(2,1) = -0.2d0 sources(...
5,128
30.660494
67
f
FMM3D
FMM3D-master/src/Laplace/lapkernels_fast.f
c This file contains the direct evaluation kernels for Laplace FMM c using the SCTL library c c l3ddirectcp: direct calculation of potential for a collection c of charge sources to a collection of targets c c l3ddirectcg: direct calculation of potential and gradients c ...
21,668
32.595349
72
f
FMM3D
FMM3D-master/src/Laplace/laprouts3d.f
c c this file contains the basic subroutines for c forming and evaluating multipole expansions. c c remarks on scaling conventions. c c 1) far field and local expansions are consistently rscaled as c c c m_n^m (scaled) = m_n^m / rscale^(n) so that upon evaluation c c ...
75,959
30.233553
76
f
FMM3D
FMM3D-master/src/Laplace/lfmm3d.f
c subroutine lfmm3d(nd,eps,nsource,source,ifcharge, $ charge,ifdipole,dipvec,iper,ifpgh,pot,grad,hess,ntarg, $ targ,ifpghtarg,pottarg,gradtarg,hesstarg,ier) c c Laplace FMM in R^{3}: evaluate all pairwise particle c interactions (ignoring self-interactions) and interactions c ...
90,889
33.002993
72
f
FMM3D
FMM3D-master/src/Laplace/lfmm3d_ndiv.f
c subroutine lfmm3d_ndiv(nd,eps,nsource,source,ifcharge, $ charge,ifdipole,dipvec,iper,ifpgh,pot,grad,hess,ntarg, $ targ,ifpghtarg,pottarg,gradtarg,hesstarg,ndiv,idivflag, $ ifnear,timeinfo,ier) c c Laplace FMM in R^{3}: evaluate all pairwise particle c interactions (ignorin...
14,345
27.019531
71
f
FMM3D
FMM3D-master/src/Laplace/lfmm3dwrap.f
c This file contains the Laplace FMM wrappers c c The laplace FMM evaluates the following potential c and its gradient c c u(x) = \sum_{j=1}^{N} c_{j}/|x-x_{j}| - v_{j}.\nabla (1/|x-x_{j}|) c c Here x_{j} are the source locations, c_{j} are the charge strengths, c v_{j} are the dipole strengths. We refer t...
67,875
25.977742
72
f
FMM3D
FMM3D-master/src/Laplace/lfmm3dwrap_legacy.f
c This file contains the legacy FMM wrappers from the previous version c of fmmlib3d c c c c This file contains the main FMM routines and some related c subroutines for evaluating Laplace potentials and fields due to c point charges and dipoles. (FORTRAN 90 VERSION) c c lfmm3dpart - Laplace FM...
21,353
28.576177
80
f
FMM3D
FMM3D-master/src/Laplace/lfmm3dwrap_vec.f
c c This file contains the Laplace FMM wrappers c c The laplace FMM evaluates the following potential c and its gradient c c u_{l}(x) = \sum_{j=1}^{N} c_{l,j}/|x-x_{j}| - c v_{l,j}.\nabla (1/|x-x_{j}|) c c Here x_{j} are the source locations, c_{l,j} are the charge strengths, c v_{l,j} are the dip...
71,527
26.973406
73
f
FMM3D
FMM3D-master/src/Laplace/lndiv.f
subroutine lndiv(eps,ns,nt,ifcharge,ifdipole,ifpgh, 1 ifpghtarg,ndiv,idivflag) c c c this subroutine estimates ndiv and idivflag c based on geometry parameters c c implicit none real *8 eps integer ns,nt,ifcharge,ifdipole,ifpgh,ifpghtarg,ndiv integer idivflag ...
845
20.15
58
f
FMM3D
FMM3D-master/src/Laplace/lndiv_fast.f
subroutine lndiv(eps,ns,nt,ifcharge,ifdipole,ifpgh, 1 ifpghtarg,ndiv,idivflag) c c c this subroutine estimates ndiv and idivflag c based on geometry parameters c c implicit none real *8 eps integer ns,nt,ifcharge,ifdipole,ifpgh,ifpghtarg,ndiv integer idivflag ...
852
20.325
58
f
FMM3D
FMM3D-master/src/Laplace/lpwrouts.f
c cc Plane wave routines for Laplace 3D FMM c------------------------------------------------------------- subroutine rlscini(rlsc,nlambs,rlams,nterms) implicit double precision (a-h,o-z) double precision rlsc(0:nterms,0:nterms,nlambs) double precision rlams(nlambs),rlampow(0:100) ...
145,110
30.409307
75
f
FMM3D
FMM3D-master/src/Laplace/lwtsexp_sep1.f
c this file contains plane wave quadrature info c for sepration by 1 c subroutine vwts(x,w,n) implicit real*8 (a-h,o-z) dimension w(n),x(n) c c c This routine returns a set of Gaussian nodes and weights for c integrating the functions J0(r*x)*exp(z*x)dx over the range x=0 to c x=infinity. ...
140,154
35.980211
68
f
FMM3D
FMM3D-master/src/Laplace/lwtsexp_sep2.f
c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c This file contains the exponential representation routines for c Laplace kernels, tables for full double precision accuracy c c Tables for separation by 2 case. c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc...
246,062
51.209421
80
f
FMM3D
FMM3D-master/src/Maxwell/emfmm3d.f90
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! This file contains interfaces for the maxwell fmm3d and ! direct calculation. It contains the two subroutines: ! ! emfmm3d - Maxwell fmm3d with nd densities ! ! em3ddirect - Maxwell direct calculation with nd ! densities ! ! (input sources an...
16,724
23.595588
80
f90
FMM3D
FMM3D-master/src/Stokes/stfmm3d.f
c c This file contains the Stokes FMM wrappers c c********************************************************************** c c We take the following conventions for the Stokes kernels c c For a source y and target x, let r_i = x_i-y_i c and let r = sqrt(r_1^2 + r_2^2 + r_3^2) c c The Stokeslet, ...
16,360
34.567391
77
f
FMM3D
FMM3D-master/src/Stokes/stokkernels.f
c c This file contains the Stokes direct kernel evaluators c c********************************************************************** c c We take the following conventions for the Stokes kernels c c For a source y and target x, let r_i = x_i-y_i c and let r = sqrt(r_1^2 + r_2^2 + r_3^2) c c The...
13,002
32.599483
72
f