Skip to content

Commit

Permalink
Initialize member data with NaN
Browse files Browse the repository at this point in the history
  • Loading branch information
Rombur committed Jun 5, 2024
1 parent 91aab93 commit 0ca1182
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
6 changes: 4 additions & 2 deletions source/ElectronBeamHeatSource.hh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020 - 2022, the adamantine authors.
/* Copyright (c) 2020 - 2024, the adamantine authors.
*
* This file is subject to the Modified BSD License and may not be distributed
* without copyright and license information. Please refer to the file LICENSE
Expand All @@ -10,6 +10,8 @@

#include <HeatSource.hh>

#include <limits>

namespace adamantine
{
/**
Expand Down Expand Up @@ -47,7 +49,7 @@ public:

private:
dealii::Point<3> _beam_center;
double _alpha;
double _alpha = std::numeric_limits<double>::signaling_NaN();
double const _log_01 = std::log(0.1);
};
} // namespace adamantine
Expand Down
6 changes: 4 additions & 2 deletions source/GoldakHeatSource.hh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2020 - 2022, the adamantine authors.
/* Copyright (c) 2020 - 2024, the adamantine authors.
*
* This file is subject to the Modified BSD License and may not be distributed
* without copyright and license information. Please refer to the file LICENSE
Expand All @@ -10,6 +10,8 @@

#include <HeatSource.hh>

#include <limits>

namespace adamantine
{
/**
Expand Down Expand Up @@ -47,7 +49,7 @@ public:

private:
dealii::Point<3> _beam_center;
double _alpha;
double _alpha = std::numeric_limits<double>::signaling_NaN();
double const _pi_over_3_to_1p5 = std::pow(dealii::numbers::PI / 3.0, 1.5);
};
} // namespace adamantine
Expand Down
11 changes: 7 additions & 4 deletions source/ScanPath.hh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2016 - 2021, the adamantine authors.
/* Copyright (c) 2016 - 2024, the adamantine authors.
*
* This file is subject to the Modified BSD License and may not be distributed
* without copyright and license information. Please refer to the file LICENSE
Expand All @@ -17,6 +17,7 @@

#include <iostream>
#include <istream>
#include <limits>
#include <vector>

namespace adamantine
Expand All @@ -41,9 +42,11 @@ enum class ScanPathSegmentType
*/
struct ScanPathSegment
{
double end_time; // Unit: seconds
double power_modifier; // Dimensionless
dealii::Point<3> end_point; // Unit: m
double end_time =
std::numeric_limits<double>::signaling_NaN(); // Unit: seconds
double power_modifier =
std::numeric_limits<double>::signaling_NaN(); // Dimensionless
dealii::Point<3> end_point; // Unit: m
};

/**
Expand Down

0 comments on commit 0ca1182

Please sign in to comment.