Skip to content

Commit 22e8c85

Browse files
committed
sqrt(3.) --> sqrt(Real(3))
1 parent 587e530 commit 22e8c85

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/systems/variational_smoother_system.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ VariationalSmootherSystem::get_target_elem(const ElemType & type)
638638
const auto ref_vol = target_elem->reference_elem()->volume();
639639

640640
// Update the nodes of the target element, depending on type
641-
const Real sqrt_3 = std::sqrt(3.);
641+
const Real sqrt_3 = std::sqrt(Real(3));
642642
std::vector<std::unique_ptr<Node>> owned_nodes;
643643

644644
const auto type_str = Utility::enum_to_string(type);

tests/mesh/mesh_smoother_test.C

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class SquareToParallelogram : public FunctionBase<Real>
137137
{
138138
output.resize(3);
139139
output(0) = p(0) - 0.5 * p(1);
140-
output(1) = 0.5 * std::sqrt(3) * p(1);
140+
output(1) = 0.5 * std::sqrt(Real(3)) * p(1);
141141
output(2) = 0;
142142
}
143143
};
@@ -160,8 +160,8 @@ class ParallelogramToSquare : public FunctionBase<Real>
160160
void operator()(const Point & p, const Real, DenseVector<Real> & output)
161161
{
162162
output.resize(3);
163-
output(0) = p(0) + p(1) / std::sqrt(3.);
164-
output(1) = (2. / std::sqrt(3)) * p(1);
163+
output(0) = p(0) + p(1) / std::sqrt(Real(3).);
164+
output(1) = (2. / std::sqrt(Real(3))) * p(1);
165165
output(2) = 0;
166166
}
167167
};

0 commit comments

Comments
 (0)