3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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
27namespace Dumux {
28
33template<class Scalar, int dim>
34class Sphere
35{
36public:
37 using Point = Dune::FieldVector<Scalar, dim>;
38
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
55private:
56 Point center_;
57 Scalar radius_;
58};
59
60} // end namespace Dumux
61
62#endif
Definition: adapt.hh:29
A simple sphere type.
Definition: sphere.hh:35
Scalar radius() const
Definition: sphere.hh:49
Sphere(const Point &center, Scalar radius)
Definition: sphere.hh:44
Dune::FieldVector< Scalar, dim > Point
Definition: sphere.hh:37
const Point & center() const
Definition: sphere.hh:52
Sphere()
Definition: sphere.hh:39