NuTo
Numerics Tool
Specimen.h
Go to the documentation of this file.
1 /*
2  * Specimen.h
3  *
4  * Created on: 9 Apr 2014
5  * Author: ttitsche
6  */
7 
8 #pragma once
9 
10 #include <Eigen/Core>
11 
12 namespace NuTo
13 {
14 
16 class Specimen
17 {
18 public:
20  {
21  Box = 0,
22  Dogbone = 1,
24  };
25 
29  Specimen(Eigen::MatrixXd rBoundingBox, const eSpecimenType rTypeOfSpecimen);
30 
32  Specimen(const NuTo::Specimen& rOther);
33 
34  bool IsBox() const;
35 
37  const Eigen::MatrixXd& GetBoundingBox() const;
38 
40  const Eigen::VectorXd& GetLength() const;
41 
43  double GetLength(const int rIndex) const;
44 
47 
49  double GetVolume() const;
50 
51 private:
52  Eigen::MatrixXd mBoundingBox;
53  Eigen::VectorXd mLength;
54  const eSpecimenType mTypeOfSpecimen;
55 
57  void CalculateLength();
58 
60  void CheckBoundingBox();
61 };
62 
63 } /* namespace NuTo */
bool IsBox() const
Definition: Specimen.cpp:103
class for Specimen
Definition: Specimen.h:16
Definition: Specimen.h:23
Definition: Specimen.h:22
Specimen(Eigen::MatrixXd rBoundingBox, const eSpecimenType rTypeOfSpecimen)
constructor
Definition: Specimen.cpp:11
const Eigen::VectorXd & GetLength() const
getter for mLength
Definition: Specimen.cpp:93
eSpecimenType GetTypeOfSpecimen() const
getter of mTypeOfSpecimen
Definition: Specimen.cpp:98
Definition: Exception.h:6
const Eigen::MatrixXd & GetBoundingBox() const
getter for mBoundingBox
Definition: Specimen.cpp:88
double GetVolume() const
calculates and returns specimen volume
Definition: Specimen.cpp:26
eSpecimenType
Definition: Specimen.h:19
Definition: Specimen.h:21