|
Medusa
1.1
Coordinate Free Mehless Method implementation
|
|
Go to the documentation of this file. 1 #ifndef MEDUSA_BITS_DOMAINS_ROTATEDSHAPE_FWD_HPP_
2 #define MEDUSA_BITS_DOMAINS_ROTATEDSHAPE_FWD_HPP_
26 template <
typename vec_t>
34 Eigen::Matrix<scalar_t, dim, dim>
Q;
52 Eigen::Matrix<scalar_t, dim, dim>
rotation()
const {
return Q; }
54 bool contains(
const vec_t& point)
const override {
55 return sh->contains(
Q.transpose()*point);
60 std::pair<vec_t, vec_t>
bbox()
const override;
64 std::ostream&
print(std::ostream& os)
const override {
65 return os <<
"Shape " << *
sh <<
" rotated by " <<
Q;
72 int boundary_type)
const override;
75 const std::function<
scalar_t(vec_t)>& dr,
int internal_type,
76 int boundary_type)
const override;
79 const std::function<
scalar_t(vec_t)>& dr,
int type)
const override;
85 #endif // MEDUSA_BITS_DOMAINS_ROTATEDSHAPE_FWD_HPP_
Eigen::Matrix< scalar_t, dim, dim > rotation() const
Returns the transformation used in this shape.
Root namespace for the whole library.
Scalar scalar_t
Type of the elements, alias of Scalar.
Class representing domain discretization along with an associated shape.
Class for working with rotated (or mirrored) domain shapes.
bool hasContains() const override
Return true if shape has contains() method implemented.
RotatedShape< vec_t > * clone() const override
Polymorphic clone pattern.
deep_copy_unique_ptr< DomainShape< vec_t > > sh
Shape to be transformed.
virtual DomainDiscretization< vec_t > discretizeWithStep(scalar_t step, int internal_type, int boundary_type) const
Returns a discretization of this shape with approximately uniform distance step between nodes.
Base class for geometric shapes of domains.
virtual DomainDiscretization< vec_t > discretizeBoundaryWithDensity(const std::function< scalar_t(vec_t)> &dr, int type) const =0
Discretizes boundary with given density and fill engine.
virtual DomainDiscretization< vec_t > discretizeWithDensity(const std::function< scalar_t(vec_t)> &dr, int internal_type, int boundary_type) const
Returns a discretization of the domain with spatially variable step.
Eigen::Matrix< scalar_t, dim, dim > Q
Orthogonal transformation matrix.
virtual DomainDiscretization< vec_t > discretizeBoundaryWithStep(scalar_t step, int type) const
Returns a discretization of the boundary of this shape with approximately uniform distance step betwe...
std::ostream & print(std::ostream &os) const override
Output information about this shape to given output stream os.
bool contains(const vec_t &point) const override
Return true if point is not more than margin() outside the domain.
RotatedShape(const DomainShape< vec_t > &sh, const Eigen::Matrix< scalar_t, dim, dim > &Q)
Construct a transformed shape by specifying a shape and an orthogonal transformation matrix.
Unique pointer with polymorphic deep copy semantics.
vec_t::Scalar scalar_t
Scalar data type used in computation.
std::pair< vec_t, vec_t > bbox() const override
Return the bounding box of the domain.
const DomainShape< vec_t > & shape() const
Returns the underlying shape.