IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 7fc69a28 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

refined HydrogenSphere

parent 61e749c5
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
* a fSphere homogeneously filled with hydrogen * a fSphere homogeneously filled with hydrogen
*/ */
namespace corsika::environment {
class HydrogenSphere { class HydrogenSphere {
CoordinateSystem const& fCS; CoordinateSystem const& fCS;
corsika::geometry::Sphere const fSphere; corsika::geometry::Sphere const fSphere;
...@@ -25,7 +27,7 @@ public: ...@@ -25,7 +27,7 @@ public:
: corsika::particles::Code::Unknown; : corsika::particles::Code::Unknown;
} }
MassDensityType GetDensity(Point const& p) const { return density; }; MassDensityType GetDensity(Point const& p) const { return fSphere.isInside(p) ? density : 0_kg / (meter*meter*meter); };
GetMagneticField(Point const& p) { GetMagneticField(Point const& p) {
QuantityVector<magnetic_flux_density_d> components{0 * corsika::units::tesla, QuantityVector<magnetic_flux_density_d> components{0 * corsika::units::tesla,
...@@ -35,4 +37,5 @@ public: ...@@ -35,4 +37,5 @@ public:
} }
}; };
}
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment