*/
void *cell_accessor;
- friend class MappingQGenericWrapper;
+ friend class MappingQWrapper;
};
#include <deal.II/base/config.h>
-#include <deal.II/fe/mapping_q_generic.h>
+#include <deal.II/fe/mapping_q.h>
#include <boost/python.hpp>
namespace python
{
- class MappingQGenericWrapper
+ class MappingQWrapper
{
public:
/**
* Copy constructor.
*/
- MappingQGenericWrapper(const MappingQGenericWrapper &other);
+ MappingQWrapper(const MappingQWrapper &other);
/**
* Default constructor.
*/
- MappingQGenericWrapper();
+ MappingQWrapper();
/**
* Constructor.
*/
- MappingQGenericWrapper(const int dim, const int spacedim, const int degree);
+ MappingQWrapper(const int dim, const int spacedim, const int degree);
/**
* Destructor.
*/
- ~MappingQGenericWrapper();
+ ~MappingQWrapper();
/*! @copydoc Mapping::transform_unit_to_real_cell
*/
*/
void *point;
- friend class MappingQGenericWrapper;
+ friend class MappingQWrapper;
};
/*! @copydoc GridTools::find_active_cell_around_point
*/
CellAccessorWrapper
- find_active_cell_around_point(
- PointWrapper & p,
- MappingQGenericWrapper mapping = MappingQGenericWrapper());
+ find_active_cell_around_point(PointWrapper & p,
+ MappingQWrapper mapping = MappingQWrapper());
/*! @copydoc GridTools::find_cells_adjacent_to_vertex
*/
/*! @copydoc GridTools::compute_aspect_ratio_of_cells
*/
boost::python::list
- compute_aspect_ratio_of_cells(const MappingQGenericWrapper &mapping,
- const QuadratureWrapper & quadrature);
+ compute_aspect_ratio_of_cells(const MappingQWrapper & mapping,
+ const QuadratureWrapper &quadrature);
/**
* Write mesh to the output file @filename according to the given data
void
export_mapping()
{
- boost::python::class_<MappingQGenericWrapper>(
- "MappingQGeneric",
+ boost::python::class_<MappingQWrapper>(
+ "MappingQ",
boost::python::init<const int, const int, const int>(
boost::python::args("dim", "spacedim", "degree")))
.def("transform_real_to_unit_cell",
- &MappingQGenericWrapper::transform_real_to_unit_cell,
+ &MappingQWrapper::transform_real_to_unit_cell,
transform_real_to_unit_cell_docstring,
boost::python::args("self", "cell", "point"))
.def("transform_unit_to_real_cell",
- &MappingQGenericWrapper::transform_unit_to_real_cell,
+ &MappingQWrapper::transform_unit_to_real_cell,
transform_unit_to_real_cell_docstring,
boost::python::args("self", "cell", "point"))
.def("project_real_point_to_unit_point_on_face",
- &MappingQGenericWrapper::project_real_point_to_unit_point_on_face,
+ &MappingQWrapper::project_real_point_to_unit_point_on_face,
project_real_point_to_unit_point_on_face_docstring,
boost::python::args("self", "cell", "face_no", "point"));
}
- MappingQGenericWrapper::MappingQGenericWrapper()
+ MappingQWrapper::MappingQWrapper()
: dim(-1)
, spacedim(-1)
, degree(-1)
- MappingQGenericWrapper::MappingQGenericWrapper(const int dim,
- const int spacedim,
- const int degree)
+ MappingQWrapper::MappingQWrapper(const int dim,
+ const int spacedim,
+ const int degree)
: dim(dim)
, spacedim(spacedim)
, degree(degree)
- MappingQGenericWrapper::MappingQGenericWrapper(
- const MappingQGenericWrapper &other)
+ MappingQWrapper::MappingQWrapper(const MappingQWrapper &other)
{
dim = other.dim;
spacedim = other.spacedim;
- MappingQGenericWrapper::~MappingQGenericWrapper()
+ MappingQWrapper::~MappingQWrapper()
{
if (dim != -1)
{
PointWrapper
- MappingQGenericWrapper::transform_unit_to_real_cell(CellAccessorWrapper &cell,
- PointWrapper & p)
+ MappingQWrapper::transform_unit_to_real_cell(CellAccessorWrapper &cell,
+ PointWrapper & p)
{
AssertThrow(
dim == p.get_dim(),
PointWrapper
- MappingQGenericWrapper::transform_real_to_unit_cell(CellAccessorWrapper &cell,
- PointWrapper & p)
+ MappingQWrapper::transform_real_to_unit_cell(CellAccessorWrapper &cell,
+ PointWrapper & p)
{
AssertThrow(
spacedim == p.get_dim(),
PointWrapper
- MappingQGenericWrapper::project_real_point_to_unit_point_on_face(
+ MappingQWrapper::project_real_point_to_unit_point_on_face(
CellAccessorWrapper &cell,
const unsigned int face_no,
PointWrapper & p)
void *
- MappingQGenericWrapper::get_mapping() const
+ MappingQWrapper::get_mapping() const
{
return mapping_ptr;
}
template <int dim, int spacedim>
std::pair<int, int>
- find_active_cell_around_point(PointWrapper & p,
- MappingQGenericWrapper &mapping_wrapper,
- void * triangulation)
+ find_active_cell_around_point(PointWrapper & p,
+ MappingQWrapper &mapping_wrapper,
+ void * triangulation)
{
Triangulation<dim, spacedim> *tria =
static_cast<Triangulation<dim, spacedim> *>(triangulation);
template <int dim, int spacedim>
boost::python::list
compute_aspect_ratio_of_cells(
- const MappingQGenericWrapper &mapping_wrapper,
- const QuadratureWrapper & quadrature_wrapper,
- const TriangulationWrapper & triangulation_wrapper)
+ const MappingQWrapper & mapping_wrapper,
+ const QuadratureWrapper & quadrature_wrapper,
+ const TriangulationWrapper &triangulation_wrapper)
{
const Triangulation<dim, spacedim> *tria =
static_cast<const Triangulation<dim, spacedim> *>(
CellAccessorWrapper
- TriangulationWrapper::find_active_cell_around_point(
- PointWrapper & p,
- MappingQGenericWrapper mapping)
+ TriangulationWrapper::find_active_cell_around_point(PointWrapper & p,
+ MappingQWrapper mapping)
{
std::pair<int, int> level_index_pair;
if ((dim == 2) && (spacedim == 2))
boost::python::list
TriangulationWrapper::compute_aspect_ratio_of_cells(
- const MappingQGenericWrapper &mapping,
- const QuadratureWrapper & quadrature)
+ const MappingQWrapper & mapping,
+ const QuadratureWrapper &quadrature)
{
if ((dim == 2) && (spacedim == 2))
return internal::compute_aspect_ratio_of_cells<2, 2>(mapping,
self.triangulation.refine_global(1)
def test_mapping(self):
- mapping = MappingQGeneric(dim = 2, spacedim = 2, degree = 1)
+ mapping = MappingQ(dim = 2, spacedim = 2, degree = 1)
p_unit = Point([0.5, 0.5])
for cell in self.triangulation.active_cells():
self.triangulation.generate_hyper_sphere(p_center)
def test_mapping(self):
- mapping = MappingQGeneric(dim = 2, spacedim = 3, degree = 4)
+ mapping = MappingQ(dim = 2, spacedim = 3, degree = 4)
p_unit = Point([0.5, 0.5])
for cell in self.triangulation.active_cells():