Skip to content
Snippets Groups Projects
Commit 19e0d69e authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[ex3] introduce eps for isinlens query

parent b4fdaa29
No related branches found
No related tags found
1 merge request!4Feature/improve fluidsystem ex
...@@ -147,11 +147,12 @@ public: ...@@ -147,11 +147,12 @@ public:
{ {
const auto x = globalPos[0]; const auto x = globalPos[0];
const auto y = globalPos[1]; const auto y = globalPos[1];
return (x < 40 && x > 20 && y > 35 && y < 45) || return (x < 40 + eps_ && x > 20 - eps_ && y > 35 - eps_ && y < 45 + eps_) ||
(x < 50 && x > 30 && y < 30 && y > 15); (x < 50 + eps_ && x > 30 - eps_ && y < 30 + eps_ && y > 15 - eps_);
} }
private: private:
static constexpr Scalar eps_ = 1e-6;
Dune::FieldMatrix<Scalar, dim, dim> K_; Dune::FieldMatrix<Scalar, dim, dim> K_;
Dune::FieldMatrix<Scalar, dim, dim> KLens_; Dune::FieldMatrix<Scalar, dim, dim> KLens_;
......
...@@ -147,14 +147,16 @@ public: ...@@ -147,14 +147,16 @@ public:
{ {
const auto x = globalPos[0]; const auto x = globalPos[0];
const auto y = globalPos[1]; const auto y = globalPos[1];
return (x < 40 && x > 20 && y > 35 && y < 45) || return (x < 40 + eps_ && x > 20 - eps_ && y > 35 - eps_ && y < 45 + eps_) ||
(x < 50 && x > 30 && y < 30 && y > 15); (x < 50 + eps_ && x > 30 - eps_ && y < 30 + eps_ && y > 15 - eps_);
} }
private: private:
static constexpr Scalar eps_ = 1e-6;
Dune::FieldMatrix<Scalar, dim, dim> K_; Dune::FieldMatrix<Scalar, dim, dim> K_;
Dune::FieldMatrix<Scalar, dim, dim> KLens_; Dune::FieldMatrix<Scalar, dim, dim> KLens_;
// Object that holds the values/parameters of the selected material law. // Object that holds the values/parameters of the selected material law.
MaterialLawParams materialParams_; MaterialLawParams materialParams_;
MaterialLawParams materialParamsLens_; MaterialLawParams materialParamsLens_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment