Skip to content
Snippets Groups Projects
Commit cd2ccaf8 authored by lh1887's avatar lh1887
Browse files

[bugfix] add explicit cast

If the gcc implementation of std::variant is used instead of the fallback,
the compiler chokes on this without an explicit cast.
parent a10d6aed
Branches
No related tags found
No related merge requests found
Pipeline #
...@@ -233,12 +233,12 @@ class SubGridLocalGeometry ...@@ -233,12 +233,12 @@ class SubGridLocalGeometry
//! The Jacobian matrix of the mapping from the reference element to this element //! The Jacobian matrix of the mapping from the reference element to this element
const JacobianTransposed jacobianTransposed (const FieldVector<ctype, mydim>& local) const { const JacobianTransposed jacobianTransposed (const FieldVector<ctype, mydim>& local) const {
return Std::visit([&](auto&& geom) {return geom.jacobianTransposed(local);}, localGeometry_); return Std::visit([&](auto&& geom) {return static_cast<JacobianTransposed>(geom.jacobianTransposed(local));}, localGeometry_);
} }
//! The inverse of the Jacobian matrix of the mapping from the reference element to this element //! The inverse of the Jacobian matrix of the mapping from the reference element to this element
const JacobianInverseTransposed jacobianInverseTransposed (const FieldVector<ctype, mydim>& local) const { const JacobianInverseTransposed jacobianInverseTransposed (const FieldVector<ctype, mydim>& local) const {
return Std::visit([&](auto&& geom) {return geom.jacobianInverseTransposed(local);}, localGeometry_); return Std::visit([&](auto&& geom) {return static_cast<JacobianInverseTransposed>(geom.jacobianInverseTransposed(local));}, localGeometry_);
} }
private: private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment