Comments (1)
Installation steps:
My OS is Ubuntu 20.04 mounted on a virtual box for Windows 8.
For the lua fronted one,
1)
git clone https://github.com/victorliu/S4.git
2)
sudo apt-get install lua5.2
3)
sudo apt-get install liblua5.2-dev
4)
sudo apt-get install libfftw3-dev
5)
sudo apt-get install libsuitesparse-dev
6)
git clone https://github.com/xianyi/OpenBLAS.git
7)
cd OpenBLAS
8)
make
9)
cd ../S4
10)
make
Notes:
- Either in step no. 8) or 10), you may get an error such
/bin/sh: 1: gfortran: not found
Sol.:
sudo apt-get install gfortran
For any similar error, just download the required package with “sudo apt-get install” or search with encountered error, so after installation of the required package return to the step you encountered the error at either 8) or 10 - After finishing the 10 steps, make sure there are not any kind of error
Hint: read carefully the outputs of each command
Tutorial steps:
Make sure your current directory is S4/
Check by “pwd” command, if not just “cd S4/”
cd build
./S4
Hint: make sure this message shows up 'No input file given, running in interactive mode', if so you installed the package correctly, if not please return to the past 10 steps and check again for any error (mostly missing package -> go, download and install)
S = S4.NewSimulation()
S:SetLattice({1,0}, {0,1})
S:SetNumG(100)
S:AddMaterial('Vacuum', {1,0})
S:AddMaterial('Silicon', {12, 0.01})
S:AddLayer('top', 0, 'Vacuum')
S:AddLayer('slab', 0.5, 'Silicon')
S:AddLayerCopy('bottom', 0, 'top')
S:SetLayerPatternCircle('slab', 'Vacuum', {0,0}, 0.2)
S:SetExcitationPlanewave( {0, 0}, {1, 0}, {0, 0})
for freq = 0.25, 0.6, 0.001 do S:SetFrequency(freq) forward, backward = S:GetPoyntingFlux(‘top’, 0) forward = S:GetPoyntingFlux(‘bottom’, 0) print(freq, forward, backward) end
Now you should see it running and printing outputs in 3 columns (freq, trans, ref)
You can copy the 3 columns and paste them at libreOffice-calc “excel in Ubuntu :D”
Make sure after writting each command of these, there is no output except for step no. 14) at which you will see the 3 columns, otherwise it is an error, go and search with the error you see and you will probably find a sol.
from s4.
Related Issues (20)
- About the S4 installation HOT 4
- Aperiodic Structure With PML HOT 4
- How to use real dielectric constant of the material?
- Is there a way to implement a layer with pixelized refractive index distribution in S4?
- Which function can be used to set the incident plane wave to be circularly polarized? HOT 2
- Could S4 do interference simulation?
- Cannot produce simple Talbot carpet HOT 2
- Cannot execute S4 after installation HOT 2
- Layers with different lattice vectors HOT 2
- A problem of "SetLayerPatternPolygon" HOT 1
- Scattering Matrix
- Installation Problem in M2 Max
- Python API: Error while setting excitation wave
- Creating a model with different refractive index along the wavelength HOT 1
- Multi-threading/Muti-processing HOT 2
- Unclear documentation for GetFieldsOnGrid method HOT 1
- Layer Thicknesses HOT 2
- polygon not in xy plane HOT 1
- Cannot implement "make S4lua " HOT 1
- Pyramidal Structure HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from s4.