Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read particles from file #9

Open
2 tasks
streeve opened this issue Dec 8, 2022 · 5 comments · May be fixed by #33
Open
2 tasks

Read particles from file #9

streeve opened this issue Dec 8, 2022 · 5 comments · May be fixed by #33
Assignees
Labels
enhancement New feature or request

Comments

@streeve
Copy link
Collaborator

streeve commented Dec 8, 2022

  • Use parallel HDF5 read option in Cabana
  • Plain text serial read with internal redistribution

Noting that we'll want to support per particle position, volume, and dx (to calculate local horizon)

@streeve streeve added the enhancement New feature or request label Dec 8, 2022
@diehlpk
Copy link
Contributor

diehlpk commented May 10, 2023

I am working to read the discrete PD nodes from a CSV file and extended the code here

https://github.com/diehlpk/CabanaPD/blob/4701a671d01732df25e200419c0c5ab3add8818b/src/CabanaPD_Particles.hpp#L285

However, I get some compilation errors


[ 50%] Building CXX object examples/CMakeFiles/ElasticWave.dir/elastic_wave.cpp.o
In file included from /home/diehlpk/Compile/CabanaPD/src/CabanaPD_Force.hpp:67,
                 from /home/diehlpk/Compile/CabanaPD/src/CabanaPD.hpp:17,
                 from /home/diehlpk/Compile/CabanaPD/examples/elastic_wave.cpp:19:
/home/diehlpk/Compile/CabanaPD/src/CabanaPD_Particles.hpp: In member function ‘void CabanaPD::Particles<DeviceType, CabanaPD::PMB, Dimension>::create_particles_from_csv(const ExecSpace&, std::__cxx11::string)’:
/home/diehlpk/Compile/CabanaPD/src/CabanaPD_Particles.hpp:323:9: error: ‘_aosoa_m’ was not declared in this scope
         _aosoa_m.resize( num_particles );
         ^~~~~~~~
/home/diehlpk/Compile/CabanaPD/src/CabanaPD_Particles.hpp:323:9: note: suggested alternative: ‘_aosoa_x’
         _aosoa_m.resize( num_particles );
         ^~~~~~~~
         _aosoa_x
/home/diehlpk/Compile/CabanaPD/src/CabanaPD_Particles.hpp:324:9: error: ‘_aosoa_theta’ was not declared in this scope
         _aosoa_theta.resize( num_particles );
         ^~~~~~~~~~~~
/home/diehlpk/Compile/CabanaPD/src/CabanaPD_Particles.hpp:324:9: note: suggested alternative: ‘_aosoa_other’
         _aosoa_theta.resize( num_particles );
         ^~~~~~~~~~~~
         _aosoa_other
/home/diehlpk/Compile/CabanaPD/src/CabanaPD_Particles.hpp:335:22: error: there are no arguments to ‘slice_theta’ that depend on a template parameter, so a declaration of ‘slice_theta’ must be available [-fpermissive]
         auto theta = slice_theta();
                      ^~~~~~~~~~~
/home/diehlpk/Compile/CabanaPD/src/CabanaPD_Particles.hpp:335:22: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/diehlpk/Compile/CabanaPD/src/CabanaPD_Particles.hpp:337:18: error: there are no arguments to ‘slice_m’ that depend on a template parameter, so a declaration of ‘slice_m’ must be available [-fpermissive]
         auto m = slice_m();
                  ^~~~~~~
make[2]: *** [examples/CMakeFiles/ElasticWave.dir/build.make:76: examples/CMakeFiles/ElasticWave.dir/elastic_wave.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:171: examples/CMakeFiles/ElasticWave.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

I am not sure where _aosoa_m are defined in https://github.com/diehlpk/CabanaPD/blob/4701a671d01732df25e200419c0c5ab3add8818b/src/CabanaPD_Particles.hpp#L202 which I adapted.

@streeve
Copy link
Collaborator Author

streeve commented May 10, 2023

That's bad timing on our part having just merged a split of the PMB and LPS models in #18.

If you remove all usage of _aosoa_m and _aosoa_theta (only defined in the inherited LPS class below) you should be okay

@diehlpk
Copy link
Contributor

diehlpk commented May 10, 2023

Thanks. Will give it a try tomorrow.

@diehlpk
Copy link
Contributor

diehlpk commented May 11, 2023

OK, that worked and I can compile the ElasticWave example.

@diehlpk
Copy link
Contributor

diehlpk commented Jul 27, 2023

refs #33

@streeve streeve linked a pull request Aug 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants