Coder Social home page Coder Social logo

ecp-copa / cabanapic Goto Github PK

View Code? Open in Web Editor NEW
13.0 8.0 4.0 8.35 MB

Structured PIC proxy app based on Cabana

License: BSD 3-Clause "New" or "Revised" License

CMake 0.66% C++ 79.78% C 1.28% Gnuplot 0.16% Python 0.60% Shell 0.43% Makefile 0.06% Roff 17.03%
cabana kokkos particle-in-cell proxy-application vpic

cabanapic's People

Contributors

guangyechen avatar rfbird avatar streeve avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cabanapic's Issues

Add Example Decks

Add sample decks to show:

  • How to custom init particles
  • How to use an ES solver

CMAKE error

From the LRF branch:

-- Configuring done
CMake Error at src/CMakeLists.txt:6 (add_library):
Target "CabanaPIC" links to target "Cabana::cabanacore" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?

CMake Error at example/CMakeLists.txt:1 (add_executable):
Target "cbnpic" links to target "Cabana::cabanacore" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?

-- Generating done

Enhanced User Configuration

We need to extend the functionality so a user can:

  • Select ES or EM field solver
  • Select float/double precision
  • Select 1d/2d/3d
  • Support multiple species natively
  • Support higher order shape functions

Conservation of Energy

Am I correct with the assumption that the printed steps should ideally all show the same energy values?
I'm currently looking for different proxy-applications to compare tapered floating points with, and this project seemed well-structured to work for my case.

I'm just unsure of the printed results, as I don't know much behind the special physics involved. But from my limited understanding, the energies printed each step should ideally be identical at each step. This obviously is not possible with floating point arithmetic, but with higher precision, eg doubles instead of floats, the results should generally vary less between each step.

Cannot compile with -DSOLVER_TYPE="ES"

The README.md states that one can choose the solver type by specifying the optional -DSOLVER_TYPE parameter.
When selecting "ES" as solver type cmake runs fine, but the make call throws errors:

~/Bachelor/proxies/CabanaPIC/example/example.cpp: In function ‘int main(int, char**)’:
~/Bachelor/proxies/CabanaPIC/example/example.cpp:269:26: error: ‘class Field_Solver<ES_Field_Solver>’ has no member named ‘dump_fields’
  269 |             field_solver.dump_fields(fpfd,fields, 0, 0, 0, dx,dy,dz,nx,ny,nz,num_ghosts );
      |                          ^~~~~~~~~~~
In file included from ~/Bachelor/proxies/CabanaPIC/example/example.cpp:11:
~/Bachelor/proxies/CabanaPIC/src/fields.h: In instantiation of ‘void dump_energies(field_solver_t&, field_array_t&, int, float, float, float, float, size_t, size_t, size_t, size_t) [with field_solver_t = Field_Solver<ES_Field_Solver>; field_array_t = Cabana::AoSoA<Cabana::MemberTypes<float, float, float, float, float, float, float, float, float>, Kokkos::HostSpace, 32>; size_t = long unsigned int]’:
~/Bachelor/proxies/CabanaPIC/example/example.cpp:264:102:   required from here
~/Bachelor/proxies/CabanaPIC/src/fields.h:722:40: error: no matching function for call to ‘Field_Solver<ES_Field_Solver>::e_energy(field_array_t&, float&, float&, float&, size_t&, size_t&, size_t&, size_t&)’
  722 |     real_t e_en = field_solver.e_energy(fields, px, py, pz, nx, ny, nz, ng);

Steps to reproduce (Release version 0.1.0):

cd CabanaPIC/
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH="~/Dependencies/Cabana/build/install" -DREQUIRE_HOST=ON -DSOLVER_TYPE="ES" -DCMAKE_CXX_STANDARD=20 ..
make

The inital uncenter step

Normally it is okay (or even preferred) without it. But sometimes it is needed. Could this be something that the user can control?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.