3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
dumux
geometry
sphere.hh
Go to the documentation of this file.
1
/*****************************************************************************
2
* See the file COPYING for full copying permissions. *
3
* *
4
* This program is free software: you can redistribute it and/or modify *
5
* it under the terms of the GNU General Public License as published by *
6
* the Free Software Foundation, either version 3 of the License, or *
7
* (at your option) any later version. *
8
* *
9
* This program is distributed in the hope that it will be useful, *
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12
* GNU General Public License for more details. *
13
* *
14
* You should have received a copy of the GNU General Public License *
15
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
16
*****************************************************************************/
22
#ifndef DUMUX_GEOMETRY_SPHERE_HH
23
#define DUMUX_GEOMETRY_SPHERE_HH
24
25
#include <dune/common/fvector.hh>
26
27
namespace
Dumux
{
28
33
template
<
class
Scalar,
int
dim>
34
class
Sphere
35
{
36
public
:
37
using
Point
= Dune::FieldVector<Scalar, dim>;
38
39
Sphere
()
40
: center_(0.0)
41
, radius_(0.0)
42
{}
43
44
Sphere
(
const
Point
&
center
, Scalar
radius
)
45
: center_(
center
)
46
, radius_(
radius
)
47
{}
48
49
Scalar
radius
()
const
50
{
return
radius_; }
51
52
const
Point
&
center
()
const
53
{
return
center_; }
54
55
private
:
56
Point
center_;
57
Scalar radius_;
58
};
59
60
}
// end namespace Dumux
61
62
#endif
Dumux
Definition:
adapt.hh:29
Dumux::Sphere
A simple sphere type.
Definition:
sphere.hh:35
Dumux::Sphere::radius
Scalar radius() const
Definition:
sphere.hh:49
Dumux::Sphere::Sphere
Sphere(const Point ¢er, Scalar radius)
Definition:
sphere.hh:44
Dumux::Sphere::Point
Dune::FieldVector< Scalar, dim > Point
Definition:
sphere.hh:37
Dumux::Sphere::center
const Point & center() const
Definition:
sphere.hh:52
Dumux::Sphere::Sphere
Sphere()
Definition:
sphere.hh:39
Generated by
1.9.3