VasiliBaranov / packing-generation

Hard-sphere packing generation in C++ with the Lubachevsky–Stillinger, Jodrey–Tory, and force-biased algorithms and packing post-processing.
MIT License
106 stars 44 forks source link

Tests.vcxproj fail to compile #12

Open tuyen-le opened 5 years ago

tuyen-le commented 5 years ago

Dear Mr. Baranov,

I am a beginner with C++ and Visual studio.

I am trying to do a random closest packing for the metal particles in FDTD simulation with PML condition.

I used Visual Studio Software to run the file PackingGeneration.sln file from your package.

I compiled "Execution" and "PackingGeneration" successfully, but I got a problem with compiling "Tests.vcxproj" in Test folder.

It showed up error LNK2019, LNK2001, LNK1120, failed to compile Tests.vcxproj (attached file)

Could use please help me to overcome these errors?

Thank you very much! Le

Tests

tuyen-le commented 5 years ago

I tried to debug it for 2 weeks but failed every time at the end. I searched for some solutions on Google to deal with these errors but not helped.

Hope you can help!

tuyen-le commented 5 years ago

I used Win32 or X64 to debug but not successful. I tried to run with DEC C++ but it also not succeed.

tuyen-le commented 5 years ago

I am running the program on Window10 X64.

Thanks!

VasiliBaranov commented 5 years ago

Hi Le,

"Tests" is not essential for running the program, this project contains only some test functions that check if the code works as expected. You can just do right mouse click on the Tests project in Visual Studio and click "Unload project" and then compile.

You might also need to do right click on the PackingGeneration project and select "Set as startup project".

Though it's a little strange that it doesn't compile, but unloading the Tests project is definitely the quickest solution.

Best, Vasili

tuyen-le commented 5 years ago

Dear Mr. Baranov,

Thank you for your quick reply!

Follow your instruction, I had compiled the PackingGeneration.sln successfully without Tests .

I change some necessary variables in "generation.conf" before compiling .sln count:9000 sued: 331

The execution file PackingGeneration.exe is located in folder Debug/

I got a new problem that running PackingGeneration.exe showed nothing as the attached file.

  1. Did I compile the .sln file unsuccessfully?

  2. If it runs correctly, how can I find the output file of the program? How to see the particle coordinate after all?

I just see the fixed particle coordinates after the Matlab code in the folder C:\Users\user\Desktop\Le _ AI project NTHU\packing-generation-master\Docs\MATLAB scripts for interpreting results

Thank you! Le

a2 a1

VasiliBaranov commented 5 years ago

Hi Le.

i think you compiled the program correctly. Please note that you can change the parameters of the config after compiling the program (the program reads it when it runs), that's the point of the config file.

For program execution, please refer to the readme, here: https://github.com/VasiliBaranov/packing-generation#1-program-execution Specifically, please copy the generation.conf and possibly packing.xyzd files to the folder where you .exe lies. You don't need to copy packing.xyzd if you specify in the config that you need random starting particle coordinates and particles of the same size. If you want to generate a polydisperse packing, you anyway need to copy either a packing.xyzd or diameters.txt.

If the program outputs a packing.nfo in the same folder where it runs, it has completed successfully. Hope this helps! Please also refer to the main project page for more details!

Best Regards, Vasili

tuyen-le commented 5 years ago

Dear Mr.Baranow,

Amazing! I can execution file now.

I will change the parameters of the config after compiling the program after first running.

I also will design the diameter of all particles via diameters.txt.

Thank you very much for your kind help!

Really appreciate that!

Le