Skip to content

Commit 18a4b74

Browse files
committed
fresh add
0 parents  commit 18a4b74

File tree

1,235 files changed

+3032969
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,235 files changed

+3032969
-0
lines changed

.Rbuildignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
^.*\.Rproj$
2+
^\.Rproj\.user$
3+
src/
4+
logo.png
5+
docs/
6+
pkgdown/

.Rinstignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ScatCentTMat filter=lfs diff=lfs merge=lfs -text
2+
invScatCentTMat filter=lfs diff=lfs merge=lfs -text
3+
scaCoeffsJ filter=lfs diff=lfs merge=lfs -text
4+
incCoeffsJ filter=lfs diff=lfs merge=lfs -text
5+
invA.mat filter=lfs diff=lfs merge=lfs -text
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior, including input file.
15+
16+
**Expected behavior**
17+
A clear and concise description of what you expected to happen.
18+
19+
**Screenshots**
20+
If applicable, add screenshots to help explain your problem.
21+
22+
**Computer (please complete the following information):**
23+
- OS:
24+
- Compiler:
25+
- Libraries (HDF5, Lapack, etc.)
26+
27+
**Additional context**
28+
Add any other context about the problem here.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Documentation
3+
about: Suggest improvements to the documentation / examples
4+
title: ''
5+
labels: documentation
6+
assignees: ''
7+
8+
---
9+
10+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request readily implemented in software? Please describe.**
11+
A clear and concise description of what the new feature would provide.
12+
13+
For general features that do not have yet a published algorithm, please [start a general Discussion](https://github.com/nano-optics/terms/discussions) instead.
14+
15+
**Describe the solution you propose**
16+
A clear and concise description of what could be implemented, including theory and algorithm.
17+
18+
**Describe existing implementations / alternatives**
19+
A clear and concise description of any existing solutions or alternatives.
20+
21+
**Additional context**
22+
Add any other context or screenshots about the feature request here.

.gitignore

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.lib
28+
29+
# Executables
30+
*.exe
31+
*.out
32+
*.app
33+
34+
# Latex auxiliary files
35+
*.aux
36+
*.bbl
37+
*.blg
38+
*.log
39+
*.synctex.gz
40+
*.m~
41+
42+
43+
44+
# R stuff
45+
.Rhistory
46+
.Rproj.user
47+
.DS_Store
48+
49+
# heavy files
50+
*.tmat
51+
*.h5
52+
terms_code.tar
53+
terms_code.zip
54+
vignettes/Keywords.html
55+
terms_code_0.9.9.tar
56+
terms_code_0.9.9.zip
57+
build/terms

.here

Whitespace-only changes.

CITATION.cff

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
title: "TERMS"
4+
abstract: TERMS stands for T-matrix for Electromagnetic Radiation with Multiple Scatterers — it is a Fortran program to simulate the near-field and far-field optical properties of collections of particles. TERMS solves rigorously the Maxwell equations via the superposition T-matrix method, where incident and scattered fields are decomposed into a basis of multipolar electric and magnetic spherical waves.
5+
authors:
6+
- family-names: "Schebarchov"
7+
given-names: "Dmitri"
8+
orcid: "https://orcid.org/0000-0002-8385-7186"
9+
- family-names: "Fazel-Najafabadi"
10+
given-names: "Atefeh"
11+
orcid: "https://orcid.org/0000-0001-9040-2596"
12+
- family-names: "Le Ru"
13+
given-names: "Eric"
14+
orcid: "https://orcid.org/0000-0002-3052-9947"
15+
- family-names: "Auguié"
16+
given-names: "Baptiste"
17+
orcid: "https://orcid.org/0000-0002-2749-5715"
18+
version: 1.0.0
19+
doi: 10.5281/zenodo.1234
20+
date-released: 2021-11-15
21+
url: "http://nano-optics.ac.nz/terms"
22+
license: MPL-2.0
23+
repository-code: "https://github.com/nano-optics/terms/"

CMakeLists.txt

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Specify the minimum version for CMake
2+
cmake_minimum_required(VERSION 3.0.2)
3+
4+
5+
SET (PROJECTNAME "terms")
6+
7+
PROJECT (${PROJECTNAME} Fortran)
8+
9+
ENABLE_LANGUAGE(C)
10+
11+
FIND_PACKAGE(LAPACK REQUIRED)
12+
FIND_PACKAGE(BLAS REQUIRED)
13+
FIND_PACKAGE(HDF5 COMPONENTS Fortran REQUIRED)
14+
# note: can specify a path with HDF5_ROOT to resolve conflicts,
15+
# e.g. on MacOS after brew install hdf5
16+
# export HDF5_ROOT=/usr/local/Cellar/hdf5/1.12.0_3/
17+
18+
INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIR})
19+
20+
21+
set(sysLAPACK TRUE) # links with your system's lapack
22+
set(debug FALSE) # enables debug flags
23+
set(quad FALSE) # promotes all real(8) to real(16)
24+
25+
if (quad AND sysLAPACK)
26+
message("ERROR: Quad precision incompatible with system's LAPACK linking")
27+
return()
28+
endif()
29+
30+
if (debug)
31+
SET (CMAKE_Fortran_FLAGS "-Og -g -fbacktrace -Wall -Wsurprising -fbounds-check -fcheck=all \
32+
-ffpe-trap=overflow,denormal,underflow,invalid")
33+
else()
34+
SET (CMAKE_Fortran_FLAGS "-O3")
35+
endif()
36+
37+
38+
39+
if (sysLAPACK)
40+
# extra="../src/extLibs/toms644.f"
41+
# SET (CMAKE_Fortran_FLAGS "-fexternal-blas")
42+
#libs="" # -L/usr/lib/x86_64-linux-gnu -llapack -lblas -lhdf5
43+
#libs="$libs -llapack -lblas "
44+
string(APPEND CMAKE_Fortran_FLAGS " -fexternal-blas ")
45+
46+
47+
#else()
48+
# extra=$( ls ../src/extLibs/*.{f,F})
49+
50+
endif()
51+
52+
53+
if (quad)
54+
SET (CMAKE_Fortran_FLAGS "-freal-8-real-16")
55+
endif()
56+
57+
#MKLROOT="/usr/lib/x86_64-linux-gnu"
58+
59+
ADD_EXECUTABLE(terms src/eps.f90
60+
src/swav.f90
61+
src/sphmsv.f90
62+
src/miet.f90
63+
src/linalg.f90
64+
src/multiscat.f90
65+
src/termsProgram.f90
66+
src/HDFfive.f90
67+
src/extLibs/toms644.f
68+
)
69+
70+
target_link_libraries(${PROJECTNAME} ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} ${HDF5_Fortran_LIBRARIES} ${ext_Fortran_LIBRARIES})
71+
72+
73+
74+
75+

0 commit comments

Comments
 (0)