22 #include <LbmLib/include/nodes/LagrangianPoint.hpp>
23 #include <LbmLib/include/nodes/EulerianPoint.hpp>
24 #include <LbmLib/include/Constants.hpp>
25 #include <UtilLib/include/Log.hpp>
26 #include <UtilLib/include/Exception.hpp>
37 double y) : position_(x, y)
39 assert(std::isfinite(this->position_.
x));
40 assert(std::isfinite(this->position_.
y));
44 return this->velocity_.
x;
48 return this->velocity_.
y;
52 assert(std::isfinite(this->velocity_.
x));
53 assert(std::isfinite(this->velocity_.
y));
54 return this->velocity_;
58 return this->position_.
x;
62 return this->position_.
y;
66 return this->position_;
78 this->position_.
x = x;
79 assert(std::isfinite(this->position_.
x));
84 this->position_.
y = y;
85 assert(std::isfinite(this->position_.
y));
89 return "LagrangianPoint";
93 this->velocity_ = velocity;
94 assert(std::isfinite(this->velocity_.
x));
95 assert(std::isfinite(this->velocity_.
y));
96 if (((this->velocity_.
x * this->velocity_.x) + (this->velocity_.y * this->velocity_.y)) > CS) {
97 std::stringstream message;
98 message <<std::setprecision(12);
99 message <<
"The magnitude of velocity is too high: vx=" << this->velocity_.
x <<
", vy=" << this->velocity_.
y;
100 LOG(UtilLib::logINFO) << message;
101 lbm_fail(message.str().c_str());
105 std::ostream& operator<<(
virtual void setVelocity(Field< double > velocity)
setVelocity Set the velocity
void setYPos(double y)
setYPos Set a new y position.
double getYPos() const
getYPos Getter for the Y position
void setXPos(double x)
setXPos Set a new x position.
T x
x the value in x direction
LagrangianPoint(double x, double y)
LagrangianPoint Constructs a new point.
virtual std::string getType() const
getType The type of a node class
double getXPos() const
getXPos Getter for the X position
Field< double > getVelocity() const
getVelocity Getter for the velocity
double getXVelocity() const
getXVelocity Getter for x-velocity component
Field< double > getPos() const
getPos Getter for the pos
double getYVelocity() const
getYVelocity Getter for the y-velocity component
T y
y the value in y direction
The LagrangianPoint class A class for storing a point's coordinates and its velocity This class is th...
virtual void setPos(double x, double y)
setPos Set the position new override this method to change default behaviour