Canoe
Comprehensive Atmosphere N' Ocean Engine
particle_outputs.cpp
Go to the documentation of this file.
1
4
// athena
5
#include <athena/outputs/outputs.hpp>
6
7
// n-body
8
#include "
particles.hpp
"
9
10
bool
ParticleBase::ShouldMeshOutput
(std::string variable_name)
const
{
11
return
variable_name.compare(
"particle"
) == 0;
12
}
13
14
void
ParticleBase::LoadMeshOutputData
(OutputType *out,
int
*num_vars)
const
{
15
OutputData *pod =
new
OutputData;
16
pod->type =
"SCALARS"
;
17
pod->name =
"p-weight"
;
18
pod->data.InitWithShallowSlice(
const_cast<
AthenaArray<Real>
&
>
(
weight
), 4, 0,
19
1);
20
out->AppendOutputDataNode(pod);
21
*num_vars += 1;
22
23
pod =
new
OutputData;
24
pod->type =
"SCALARS"
;
25
pod->name =
"p-charge"
;
26
pod->data.InitWithShallowSlice(
const_cast<
AthenaArray<Real>
&
>
(
charge
), 4, 0,
27
1);
28
out->AppendOutputDataNode(pod);
29
*num_vars += 1;
30
}
AthenaArray< Real >
ParticleBase::charge
AthenaArray< Real > charge
Definition:
particles.hpp:42
ParticleBase::weight
AthenaArray< Real > weight
mesh data container
Definition:
particles.hpp:42
ParticleBase::ShouldMeshOutput
bool ShouldMeshOutput(std::string variable_name) const override
Definition:
particle_outputs.cpp:10
ParticleBase::LoadMeshOutputData
void LoadMeshOutputData(OutputType *pod, int *num_vars) const override
Definition:
particle_outputs.cpp:14
particles.hpp
src
nbody
particle_outputs.cpp
Generated by
1.9.1