zer011b / fdtd3d

fdtd3d is an open source 1D, 2D, 3D FDTD electromagnetics solver with MPI, OpenMP and CUDA support for x64, ARM, ARM64, RISC-V, PowerPC architectures
GNU General Public License v2.0
119 stars 33 forks source link

Hello. I have a few questions. #138

Closed wookhyun6165 closed 4 years ago

wookhyun6165 commented 4 years ago

Hi. I'm wookhyun. First of all, thank you for your kind reply. I've solved all the previous problems. Thank so much.

Unfortunately, there are four more questions.

1. Can i change only the material variables mu & eps? I want to change sigma to simulate the PEC or PMC sphere case.

2. I want to use parallel computing mode using by MPI.
I typed the command like this :

mpiexec -n 2 ./Release/Source/fdtd3d --cmd-from-file ./Examples/sphere.txt

As a result, the simulation time has doubled. How can i solve this problem? Will this problem be solved if i add "--buffer-size (default: 1), --manual-topology" to cmd.txt?

3. I want to show fdtd3d main E & H field updating equation code. Where can i find it?

4. What does the fdtd3d of "./Release/Source/fdtd3d" mean? is it a program? is there no extension?

Thanks for your interest. Have a good night.

zer011b commented 4 years ago
  1. Manual setup of sigmas and PEC is not supported yet.

  2. To use parallel mode you need to build with it (see https://github.com/zer011b/fdtd3d/blob/master/Docs/Build.md#build-flags). To build with parallel support for 3D mode pass this to cmake:

-DPARALLEL_GRID=ON -DPARALLEL_GRID_DIMENSION=3 -DPARALLEL_BUFFER_DIMENSION=x

Without this parameters, binary has no support for MPI computations and mpiexec will just launch two sequential and unrelated processes. --buffer-size sets up size of parallel buffers, you can try to tune it for yourself, --manual-topology allows to setup custom topology instead of automatic one. Automatic one should be the best in most cases.

However, it is strange that simulation time has doubled, it should have been the same in my opinion.

  1. All this stuff is in InternalScheme class. See https://github.com/zer011b/fdtd3d/blob/master/Docs/Design.md#high-level-design for overall design. InternalScheme code is shared between CPU and GPU.

  2. This is the relative path from the directory with source of repository. Release is manually created dir, I assumed you have named it the same way as in the instruction. fdtd3d is executable, on Linux you don't need extension for executables.

zer011b commented 4 years ago

Feel free to reopen this if you have more questions