20 #ifndef LIBMESH_SPHERE_H 21 #define LIBMESH_SPHERE_H 24 #include "libmesh/surface.h" 25 #include "libmesh/libmesh.h" 208 const Real phi = std::atan2(c(1), c(0));
211 std::atan2(
std::sqrt( c(0)*c(0) + c(1)*c(1) ), c(2) ),
215 libmesh_not_implemented();
224 const Real r = sph(0);
225 const Real theta = sph(1);
226 const Real phi = sph(2);
229 return Point ( r*std::sin(theta)*std::cos(phi) + this->
center()(0),
230 r*std::sin(theta)*std::sin(phi) + this->
center()(1),
231 r*std::cos(theta) + this->
center()(2));
239 #endif // LIBMESH_SPHERE_H Point _cent
The center of the sphere.
virtual bool above_surface(const Point &p) const override
auto norm() const -> decltype(std::norm(T()))
This class defines a sphere.
virtual Point surface_coords(const Point &cart) const override
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
The libMesh namespace provides an interface to certain functionality in the library.
virtual Point closest_point(const Point &p) const override
const Point & center() const
void libmesh_ignore(const Args &...)
virtual bool on_surface(const Point &p) const override
Real distance(const Sphere &other_sphere) const
virtual Point unit_normal(const Point &p) const override
Sphere()
Dummy Constructor.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real _rad
The radius of the sphere.
void create_from_center_radius(const Point &c, const Real r)
Defines a sphere of radius r centered at c.
virtual Point world_coords(const Point &sph) const override
The base class for all "surface" related geometric objects.
A Point defines a location in LIBMESH_DIM dimensional Real space.
virtual bool below_surface(const Point &p) const override
bool intersects(const Sphere &other_sphere) const