NuTo
Numerics Tool
Line.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Shape.h"
4 
5 namespace NuTo
6 {
7 
8 class Line : public Shape
9 {
10 public:
11  eShape Enum() const override
12  {
13  return eShape::Line;
14  }
15 
16  bool IsWithinShape(Eigen::VectorXd xi, double e = 1e-8) const override
17  {
18  double x = xi[0];
19  return (-1.-e < x) && (x < 1.+e);
20  }
21 
22 protected:
23  void Info(std::ostream& out) const override
24  {
25  out << "Line";
26  }
27 };
28 
29 } // namespace NuTo
Definition: Line.h:8
eShape Enum() const override
Definition: Line.h:11
eShape
Definition: Shape.h:9
bool IsWithinShape(Eigen::VectorXd xi, double e=1e-8) const override
Definition: Line.h:16
Definition: Shape.h:20
Definition: Exception.h:6
void Info(std::ostream &out) const override
Definition: Line.h:23