Medusa
1.1
Coordinate Free Mehless Method implementation
UnknownShape_fwd.hpp
Go to the documentation of this file.
1
#ifndef MEDUSA_BITS_DOMAINS_UNKNOWNSHAPE_FWD_HPP_
2
#define MEDUSA_BITS_DOMAINS_UNKNOWNSHAPE_FWD_HPP_
3
4
#include <
medusa/Config.hpp
>
5
#include "
DomainShape_fwd.hpp
"
6
14
namespace
mm
{
15
26
template
<
typename
vec_t>
27
class
UnknownShape
:
public
DomainShape
<vec_t> {
28
public
:
29
using
typename
DomainShape<vec_t>::scalar_t
;
30
using
DomainShape<vec_t>::dim
;
31
32
bool
contains
(
const
vec_t&
/* point */
)
const override
{
return
true
; }
33
34
bool
hasContains
()
const override
{
return
false
; }
35
36
std::pair<vec_t, vec_t>
bbox
()
const override
{
37
assert_msg
(
false
,
"This function is not available for this shape."
);
38
return
{};
39
}
40
41
DomainDiscretization<vec_t>
discretizeBoundaryWithDensity
(
42
const
std::function<
scalar_t
(vec_t)>&,
int
)
const override
{
43
assert_msg
(
false
,
"This function is not available for this shape."
);
44
return
DomainDiscretization<vec_t>
(*
this
);
45
}
46
47
std::ostream&
print
(std::ostream& ostream)
const override
{
48
return
ostream <<
"Unknown shape"
;
49
}
50
51
UnknownShape
*
clone
()
const override
{
52
return
new
UnknownShape<vec_t>
(*
this
);
53
}
54
};
55
56
}
// namespace mm
57
58
#endif // MEDUSA_BITS_DOMAINS_UNKNOWNSHAPE_FWD_HPP_
mm
Root namespace for the whole library.
Definition:
Gaussian.hpp:14
mm::DomainDiscretization
Class representing domain discretization along with an associated shape.
Definition:
DomainDiscretization_fwd.hpp:46
assert_msg
#define assert_msg(cond,...)
Assert with better error reporting.
Definition:
assert.hpp:75
mm::UnknownShape::discretizeBoundaryWithDensity
DomainDiscretization< vec_t > discretizeBoundaryWithDensity(const std::function< scalar_t(vec_t)> &, int) const override
Discretizes boundary with given density and fill engine.
Definition:
UnknownShape_fwd.hpp:41
mm::DomainShape
Base class for geometric shapes of domains.
Definition:
DomainShape_fwd.hpp:52
Config.hpp
mm::UnknownShape::hasContains
bool hasContains() const override
Return true if shape has contains() method implemented.
Definition:
UnknownShape_fwd.hpp:34
mm::UnknownShape::bbox
std::pair< vec_t, vec_t > bbox() const override
Return the bounding box of the domain.
Definition:
UnknownShape_fwd.hpp:36
mm::UnknownShape::print
std::ostream & print(std::ostream &ostream) const override
Output information about this shape to given output stream os.
Definition:
UnknownShape_fwd.hpp:47
mm::UnknownShape
This class represents an unknown domain shape.
Definition:
UnknownShape_fwd.hpp:27
mm::UnknownShape::clone
UnknownShape * clone() const override
Polymorphic clone pattern.
Definition:
UnknownShape_fwd.hpp:51
mm::DomainShape::scalar_t
vec_t::Scalar scalar_t
Scalar data type used in computation.
Definition:
DomainShape_fwd.hpp:55
DomainShape_fwd.hpp
mm::UnknownShape::contains
bool contains(const vec_t &) const override
Return true if point is not more than margin() outside the domain.
Definition:
UnknownShape_fwd.hpp:32
include
medusa
bits
domains
UnknownShape_fwd.hpp
Generated on Thu Jun 9 2022 09:42:26 for Medusa by
1.8.17