mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Add a LocalCoord::rotate method as suggested by @pshriwise
This commit is contained in:
parent
1bdb92ff10
commit
11eb891e21
3 changed files with 18 additions and 10 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#include <memory> // for unique_ptr
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "openmc/constants.h"
|
||||
#include "openmc/position.h"
|
||||
|
|
@ -38,7 +39,13 @@ constexpr double CACHE_INVALID {-1.0};
|
|||
// Class declarations
|
||||
//==============================================================================
|
||||
|
||||
struct LocalCoord {
|
||||
class LocalCoord {
|
||||
public:
|
||||
void rotate(const std::vector<double>& rotation);
|
||||
|
||||
//! clear data from a single coordinate level
|
||||
void reset();
|
||||
|
||||
Position r; //!< particle position
|
||||
Direction u; //!< particle direction
|
||||
int cell {-1};
|
||||
|
|
@ -48,9 +55,6 @@ struct LocalCoord {
|
|||
int lattice_y {-1};
|
||||
int lattice_z {-1};
|
||||
bool rotated {false}; //!< Is the level rotated?
|
||||
|
||||
//! clear data from a single coordinate level
|
||||
void reset();
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue