Skip to content

Commit

Permalink
Merge branch 'flatironinstitute:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ahbarnett authored Apr 12, 2024
2 parents f0430e7 + d1b84ec commit 3ce46b8
Show file tree
Hide file tree
Showing 60 changed files with 1,544 additions and 42,878 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
- uses: actions/checkout@v3

- name: Install GCC and make
run: C:\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm make mingw-w64-x86_64-toolchain"
run: C:\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm make mingw-w64-x86_64-toolchain mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-gcc-libgfortran mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-gcc-lto-dump mingw-w64-x86_64-gcc-objc"

- name: Build and Test Python 3.6
uses: actions/setup-python@v3
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ lib/*
*.log
*.sh
sbatch*
*.obj
make.inc
24 changes: 24 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# .readthedocs.yml
# "Read the Docs" doc-hosting website configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required (for this file format)
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build all formats
formats: all

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
17 changes: 11 additions & 6 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
Authors of FMM3D:
FMM3D development team

Zydrunas Gimbutas
Travis Askham
Alex Barnett
Zydrunas Gimbutas
Leslie Greengard <[email protected]>
Libin Lu
Jeremy Magland
Dhairya Malhotra
Manas Rachh <[email protected]>
Vladimir Rokhlin
Michael O'Neil
Felipe Vico

Jeremy Magland contributed support for python interface
The contributions of Alex Barnett, Leslie Greengard,
Libin Lu, Jeremy Magland, Dhairya Malhotra, and Manas Rachh are
works made for hire for The Simons Foundation, Inc.

Michael O'Neil contributed multiple scattering codes

Dhairya Malhotra contributed [Scientific computing template library SCTL] (https://github.com/dmalhotra/SCTL)
37 changes: 37 additions & 0 deletions CONTRIBUTING
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Contributions of source code, documentations, and fixes are happily
accepted via GitHub merge requests.
If you are planning a large contribution, we encourage you to discuss
the concept on a GitHub issue, or a merge request.

FMM3D is distributed under the Apache License, Version 2.0 (see LICENSE).
The act of submitting a pull request or patch (with or without an explicit
Signed-off-by tag) will be understood as an affirmation of the
following:

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.


33 changes: 24 additions & 9 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
Copyright (C) 2019-2020 The Simons Foundation, Inc., Zydrunas Gimbutas,
and Vladimir Rokhlin - All Rights Reserved.

FMM3D is licensed under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
Copyright (C) 2019-2023 The Simons Foundation, Inc., FMM3D Development Team
(see AUTHORS) - All Rights Reserved.

FMM3D as a whole is licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

This product bundles the file "src/Common/dlaran.f",
which is available under a modified "3-Clause BSD" license.
For details, see src/Common/dlaran.f.
This product bundles the files "src/Common/dfft.f", "src/Helmholtz/hwts3e.f",
"src/Helmholtz/hwts_3d_iprec0.txt",
"src/Helmholtz/hwts_3d_iprec1.txt",
"src/Helmholtz/hwts_3d_iprec2.txt",
"src/Helmholtz/hwts_3d_iprec3.txt",
"src/Helmholtz/hwts_3d_iprec4.txt",
"src/Helmholtz/hnumfour.f",
"src/Helmholtz/hnumphys.f",
"src/Laplace/lwtsexp_sep1.f", and
"src/Laplace/lwtsexp_sep2.f",
which are available under the public domain. See each file for details.

------

References
===========
Also, if you find this library useful, or it helps you in creating
software or publications, please acknowledge that fact by citing this
repository along with the author names, and any corresponding journal
Expand Down
14 changes: 4 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,11 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import sphinx.ext.autodoc
#import sphinx.ext.autodoc

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))
sys.path.append(os.path.abspath('sphinxext'))
sys.path.insert(0,os.path.abspath('../../texext'))

# -- General configuration ------------------------------------------------

Expand All @@ -33,12 +28,11 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
# 'sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.napoleon',
'sphinx.ext.mathjax',
# 'sphinx.ext.autosectionlabel', # needs v 1.4; can :ref: other files w/o this; removed 7/29/18
'texext',
'sphinx_math_dollar',
'sphinxcontrib.bibtex',
]

Expand Down Expand Up @@ -77,7 +71,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down
2 changes: 1 addition & 1 deletion docs/fortran-c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ and the associated pressure
Here $x_{j}$ are the source locations,
$\sigma_{j}$ are the Stokeslet densities,
$\nu_{j}$ are the stresslet orientation vectors, $\mu_{j}$
are the stresslet densities, and rhw xollwxrion of $x$
are the stresslet densities, and the locations $x$
at which the velocity and its gradient are evaluated are referred to
as the evaluation points.

Expand Down
20 changes: 14 additions & 6 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ In order to disable multi-threading, append ``OMP=OFF`` to the make task.

In order to use the optimized direct evaluation kernels (this
automatically turns on multithreading as well), append ``FAST_KER=ON`` to
the make task. This option is currently *not* supported on Windows.
the make task. The optimized direct kernel evaluation rotuines require
gcc version 9 or higher. This option is currently *not* supported on Windows.


All of these different libraries are
Expand Down Expand Up @@ -175,7 +176,7 @@ usage examples for the Python wrappers.
.. note::
On windows, you will need to update ``distutils.cfg`` located in
``(PYTHON_INSTALL_DIR)\Lib\distutils`` and set it to::

[build]
compiler=mingw32

Expand Down Expand Up @@ -212,14 +213,21 @@ First make sure you have MATLAB installed.

Then run ``make matlab`` (after copying over the operating
system specific make.inc.* file to make.inc) which links the .m files to
the .c file in the matlab folder.
the .c file in the matlab folder.

To run tests, you can run ``matlab test_hfmm3d.m`` and
``matlab test_lfmm3d.m`` and it should return with $0$ crashes.

Example codes for demonstrating the Helmholtz and Laplace
interfaces are ``hfmm3d_example.m`` and ``lfmm3d_example.m``.

In order to build the MATLAB routines with the optimized direct kernel
evaluation routines on a Mac, we recommend building mex with gcc
instead of clang. The relevant xml files for configuring mex to use
gcc can be found at https://github.com/danfortunato/matlab-gcc.
Follow the instructions there to configure mex with gcc, and set
CC = ``gcc-<version number>`` in your make.inc file.


Tips for installing dependencies
**********************************
Expand Down Expand Up @@ -262,16 +270,16 @@ Then do::
On Windows
~~~~~~~~~~~~~~~

Download 64 bit mingw (available `here <https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/>`_).
Download 64 bit mingw (Available at https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/).
Recommended version is ``gcc-8.1.0``, ``x86_64-posix-seh``.
Follow the install instructions and append to the environment variable ``PATH`` the
location of the bin directory of your mingw installation.

Download and install ``make`` for windows
(Available `here <http://gnuwin32.sourceforge.net/packages/make.htm>`_).
(Available at http://gnuwin32.sourceforge.net/packages/make.htm).

Download and install ``git`` for windows
(Available `here <https://git-scm.com/download/win>`_).
(Available at https://git-scm.com/download/win).

Tips for installing optional dependencies
******************************************
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
texext
sphinxcontrib.bibtex
sphinx_rtd_theme
17 changes: 17 additions & 0 deletions julia/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FMM3D development team

Travis Askham
Alex Barnett
Zydrunas Gimbutas
Leslie Greengard <[email protected]>
Libin Lu
Jeremy Magland
Dhairya Malhotra
Manas Rachh <[email protected]>
Vladimir Rokhlin
Michael O'Neil

The contributions of Alex Barnett, Leslie Greengard,
Libin Lu, Jeremy Magland, Dhairya Malhotra, and Manas Rachh are
works made for hire for The Simons Foundation, Inc.

36 changes: 36 additions & 0 deletions julia/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Copyright (C) 2019-2023 The Simons Foundation, Inc., FMM3D Development Team
(see AUTHORS) - All Rights Reserved.

FMM3D as a whole is licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

This product bundles the file "src/Common/dlaran.f",
which is available under a modified "3-Clause BSD" license.
For details, see src/Common/dlaran.f.
This product bundles the files "src/Common/dfft.f", "src/Helmholtz/hwts3e.f",
"src/Helmholtz/hwts_3d_iprec0.txt",
"src/Helmholtz/hwts_3d_iprec1.txt",
"src/Helmholtz/hwts_3d_iprec2.txt",
"src/Helmholtz/hwts_3d_iprec3.txt",
"src/Helmholtz/hwts_3d_iprec4.txt",
"src/Helmholtz/hnumfour.f",
"src/Helmholtz/hnumphys.f",
"src/Laplace/lwtsexp_sep1.f", and
"src/Laplace/lwtsexp_sep2.f",
which are available under the public domain. See each file for details.

References
===========
Also, if you find this library useful, or it helps you in creating
software or publications, please acknowledge that fact by citing this
repository along with the author names, and any corresponding journal
article.
2 changes: 1 addition & 1 deletion make.inc.icc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CC=icc
CXX=icpc
FC=ifort
FFLAGS= -fPIC -O3 -march=native -funroll-loops -mkl
FFLAGS= -fPIC -O3 -march=native -funroll-loops -mkl -w
LIBS=-lm
CLIBS = -lm -ldl -lifcore

Expand Down
6 changes: 2 additions & 4 deletions make.inc.macos.gnu
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# makefile overrides
# OS: macOS
# Compiler: gfortran X.X
# Compiler: gfortran X.X/Clang
# OpenMP: enabled
#

Expand All @@ -22,8 +22,6 @@ OMPLIBS = -lgomp
# MATLAB interface:
FDIR=$$(dirname `gfortran --print-file-name libgfortran.dylib`)
MFLAGS +=-L${FDIR}
MEX = $(shell ls -d /Applications/MATLAB_R20**.app)/bin/mex
#LIBS = -lm -lstdc++.6
#MEXLIBS= -lm -lstdc++.6 -lgfortran -ldl
MEX = $(shell ls -d /Applications/MATLAB_R* | sort | tail -1)/bin/mex


10 changes: 8 additions & 2 deletions make.inc.macos.intel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
CC=icc
CXX=icpc
FC=ifort
FFLAGS= -fPIC -O3 -march=native -funroll-loops -mkl -std=legacy

FFLAGS= -fPIC -O3 -march=native -funroll-loops -mkl -std=legacy -w
LIBS=
#CLIBS = -lm -ldl -lifcore
CLIBS = -lm -ldl
Expand All @@ -26,6 +27,11 @@ endif
# -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

OMPFLAGS = -qopenmp
OMPLIBS =
OMPLIBS = -qopenmp

# MATLAB interface:
FDIR=$$(dirname `gfortran --print-file-name libgfortran.dylib`)
MFLAGS +=-L${FDIR}
MEX = $(shell ls -d /Applications/MATLAB_R* | sort | tail -1)/bin/mex


Loading

0 comments on commit 3ce46b8

Please sign in to comment.