Skip to content

Commit

Permalink
Added particle species struct.
Browse files Browse the repository at this point in the history
  • Loading branch information
sandroos committed Feb 14, 2015
1 parent 02a8f8b commit b5eb602
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 4 additions & 2 deletions object_wrapper.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This file is part of Vlasiator.
Copyright 2013, 2014 Finnish Meteorological Institute
Copyright 2014, 2015 Finnish Meteorological Institute
*/

#ifndef OBJECT_WRAPPER_H
Expand All @@ -10,10 +10,12 @@
#include "item_storage.h"
#include "object_factory.h"
#include "amr_refinement_criteria.h"
#include "particle_species.h"

struct ObjectWrapper {
ObjectWrapper() { }
ObjectFactory<amr_ref_criteria::Base> amrVelRefCriteria;
ObjectFactory<amr_ref_criteria::Base> amrVelRefCriteria; /**< Factory for all known AMR refinement criteria.*/
std::vector<species::Species> particleSpecies; /**< Parameters for all particle species.*/

private:
ObjectWrapper(const ObjectWrapper& ow);
Expand Down
12 changes: 11 additions & 1 deletion spatial_cell.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,17 @@ namespace spatial_cell {
* Indices start from 0 and the first value is the index in x direction.
* Note: these are the (i,j,k) indices of the block.
* Valid values are ([0,vx_length[,[0,vy_length[,[0,vz_length[).*/


/** Wrapper for variables needed for each particle species.*/
struct Population {
vmesh::LocalID N_blocks; /**< Number of velocity blocks, used when receiving velocity
* mesh from remote neighbors using MPI.*/
vmesh::VelocityMesh<vmesh::GlobalID,vmesh::LocalID> vmesh; /**< Velocity mesh. Contains all velocity blocks that exist
* in this spatial cell. Cells are identified by their unique
* global IDs.*/
vmesh::VelocityBlockContainer<vmesh::LocalID> blockContainer; /**< Velocity block data.*/
};

class SpatialCell {
public:
SpatialCell();
Expand Down

0 comments on commit b5eb602

Please sign in to comment.