template <int dim, int spacedim>
static void create_point_source_vector(const hp::MappingCollection<dim,spacedim> &mapping,
const hp::DoFHandler<dim,spacedim> &dof,
- const Point<dim> &p,
+ const Point<spacedim> &p,
Vector<double> &rhs_vector);
/**
*/
template <int dim, int spacedim>
static void create_point_source_vector(const hp::DoFHandler<dim,spacedim> &dof,
- const Point<dim> &p,
+ const Point<spacedim> &p,
Vector<double> &rhs_vector);
/**
static void create_boundary_right_hand_side (const Mapping<dim,spacedim> &mapping,
const DoFHandler<dim,spacedim> &dof,
const Quadrature<dim-1> &q,
- const Function<dim> &rhs,
+ const Function<spacedim> &rhs,
Vector<double> &rhs_vector,
const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
template <int dim, int spacedim>
static void create_boundary_right_hand_side (const DoFHandler<dim,spacedim> &dof,
const Quadrature<dim-1> &q,
- const Function<dim> &rhs,
+ const Function<spacedim> &rhs,
Vector<double> &rhs_vector,
const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
static void create_boundary_right_hand_side (const hp::MappingCollection<dim,spacedim> &mapping,
const hp::DoFHandler<dim,spacedim> &dof,
const hp::QCollection<dim-1> &q,
- const Function<dim> &rhs,
+ const Function<spacedim> &rhs,
Vector<double> &rhs_vector,
const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
template <int dim, int spacedim>
static void create_boundary_right_hand_side (const hp::DoFHandler<dim,spacedim> &dof,
const hp::QCollection<dim-1> &q,
- const Function<dim> &rhs,
+ const Function<spacedim> &rhs,
Vector<double> &rhs_vector,
const std::set<unsigned char> &boundary_indicators = std::set<unsigned char>());
static void integrate_difference (const Mapping<dim,spacedim> &mapping,
const DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<dim> &exact_solution,
+ const Function<spacedim> &exact_solution,
OutVector &difference,
const Quadrature<dim> &q,
const NormType &norm,
- const Function<dim> *weight=0,
+ const Function<spacedim> *weight=0,
const double exponent = 2.);
/**
template <int dim, class InVector, class OutVector, int spacedim>
static void integrate_difference (const DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<dim> &exact_solution,
+ const Function<spacedim> &exact_solution,
OutVector &difference,
const Quadrature<dim> &q,
const NormType &norm,
- const Function<dim> *weight=0,
+ const Function<spacedim> *weight=0,
const double exponent = 2.);
template <int dim, class InVector, class OutVector, int spacedim>
static void integrate_difference (const hp::MappingCollection<dim,spacedim> &mapping,
const hp::DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<dim> &exact_solution,
+ const Function<spacedim> &exact_solution,
OutVector &difference,
const hp::QCollection<dim> &q,
const NormType &norm,
- const Function<dim> *weight=0,
+ const Function<spacedim> *weight=0,
const double exponent = 2.);
/**
template <int dim, class InVector, class OutVector, int spacedim>
static void integrate_difference (const hp::DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<dim> &exact_solution,
+ const Function<spacedim> &exact_solution,
OutVector &difference,
const hp::QCollection<dim> &q,
const NormType &norm,
- const Function<dim> *weight=0,
+ const Function<spacedim> *weight=0,
const double exponent = 2.);
/**
template <int dim, class InVector, int spacedim>
static void point_difference (const DoFHandler<dim,spacedim>& dof,
const InVector& fe_function,
- const Function<dim>& exact_solution,
+ const Function<spacedim>& exact_solution,
Vector<double>& difference,
- const Point<dim>& point);
+ const Point<spacedim>& point);
/**
* Point error evaluation. Find
static void point_difference (const Mapping<dim, spacedim> &mapping,
const DoFHandler<dim,spacedim>& dof,
const InVector& fe_function,
- const Function<dim>& exact_solution,
+ const Function<spacedim>& exact_solution,
Vector<double>& difference,
- const Point<dim>& point);
+ const Point<spacedim>& point);
/**
* Evaluate a possibly
template <int dim, int spacedim>
void VectorTools::create_point_source_vector (const hp::MappingCollection<dim,spacedim> &mapping,
const hp::DoFHandler<dim,spacedim> &dof_handler,
- const Point<dim> &p,
+ const Point<spacedim> &p,
Vector<double> &rhs_vector)
{
Assert (rhs_vector.size() == dof_handler.n_dofs(),
rhs_vector = 0;
- std::pair<typename hp::DoFHandler<dim,spacedim>::active_cell_iterator, Point<dim> >
+ std::pair<typename hp::DoFHandler<dim,spacedim>::active_cell_iterator, Point<spacedim> >
cell_point =
GridTools::find_active_cell_around_point (mapping, dof_handler, p);
template <int dim, int spacedim>
void VectorTools::create_point_source_vector (const hp::DoFHandler<dim,spacedim> &dof_handler,
- const Point<dim> &p,
+ const Point<spacedim> &p,
Vector<double> &rhs_vector)
{
Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping"));
VectorTools::create_boundary_right_hand_side (const Mapping<dim, spacedim> &mapping,
const DoFHandler<dim,spacedim> &dof_handler,
const Quadrature<dim-1> &quadrature,
- const Function<dim> &rhs_function,
+ const Function<spacedim> &rhs_function,
Vector<double> &rhs_vector,
const std::set<unsigned char> &boundary_indicators)
{
VectorTools::create_boundary_right_hand_side (const Mapping<dim, spacedim> &,
const DoFHandler<dim,spacedim> &,
const Quadrature<dim-1> &,
- const Function<dim> &,
+ const Function<spacedim> &,
Vector<double> &,
const std::set<unsigned char> &)
{
void
VectorTools::create_boundary_right_hand_side (const DoFHandler<dim,spacedim> &dof_handler,
const Quadrature<dim-1> &quadrature,
- const Function<dim> &rhs_function,
+ const Function<spacedim> &rhs_function,
Vector<double> &rhs_vector,
const std::set<unsigned char> &boundary_indicators)
{
VectorTools::create_boundary_right_hand_side (const hp::MappingCollection<dim,spacedim> &mapping,
const hp::DoFHandler<dim,spacedim> &dof_handler,
const hp::QCollection<dim-1> &quadrature,
- const Function<dim> &rhs_function,
+ const Function<spacedim> &rhs_function,
Vector<double> &rhs_vector,
const std::set<unsigned char> &boundary_indicators)
{
VectorTools::create_boundary_right_hand_side (const hp::MappingCollection<dim,spacedim> &,
const hp::DoFHandler<dim,spacedim> &,
const hp::QCollection<dim-1> &,
- const Function<dim> &,
+ const Function<spacedim> &,
Vector<double> &,
const std::set<unsigned char> &)
{
void
VectorTools::create_boundary_right_hand_side (const hp::DoFHandler<dim,spacedim> &dof_handler,
const hp::QCollection<dim-1> &quadrature,
- const Function<dim> &rhs_function,
+ const Function<spacedim> &rhs_function,
Vector<double> &rhs_vector,
const std::set<unsigned char> &boundary_indicators)
{
// face
face_dofs.resize (fe.dofs_per_face);
face->get_dof_indices (face_dofs, cell->active_fe_index());
- const std::vector<Point<dim> > &dof_locations
+ const std::vector<Point<DH::space_dimension> > &dof_locations
= fe_values.get_quadrature_points ();
if (fe_is_system)
// of dofs on this face
face_dofs.resize (fe.dofs_per_face);
face->get_dof_indices (face_dofs, cell->active_fe_index());
- const std::vector<Point<dim> > &dof_locations
+ const std::vector<Point<DH::space_dimension> > &dof_locations
= fe_values.get_quadrature_points ();
if (fe_is_system)
const FiniteElement<dim> &fe = dof_handler.get_fe();
std::vector<unsigned int> face_dofs (fe.dofs_per_face);
- std::vector<Point<dim> > dof_locations (fe.dofs_per_face);
+ std::vector<Point<spacedim> > dof_locations (fe.dofs_per_face);
// have a map that stores normal vectors
// for each vector-dof tuple we want to
do_integrate_difference (const dealii::hp::MappingCollection<dim,spacedim> &mapping,
const DH &dof,
const InVector &fe_function,
- const Function<dim> &exact_solution,
+ const Function<spacedim> &exact_solution,
OutVector &difference,
const dealii::hp::QCollection<dim> &q,
const dealii::VectorTools::NormType &norm,
- const Function<dim> *weight,
+ const Function<spacedim> *weight,
const double exponent_1)
{
// we mark the "exponent" parameter
break;
}
- dealii::hp::FECollection<dim> fe_collection (dof.get_fe());
- dealii::hp::FEValues<dim> x_fe_values(mapping, fe_collection, q, update_flags);
+ dealii::hp::FECollection<dim,spacedim> fe_collection (dof.get_fe());
+ dealii::hp::FEValues<dim,spacedim> x_fe_values(mapping, fe_collection, q, update_flags);
const unsigned int max_n_q_points = q.max_n_quadrature_points ();
std::vector< Vector<double> >
function_values (max_n_q_points, Vector<double>(n_components));
- std::vector<std::vector<Tensor<1,dim> > >
- function_grads (max_n_q_points, std::vector<Tensor<1,dim> >(n_components));
+ std::vector<std::vector<Tensor<1,spacedim> > >
+ function_grads (max_n_q_points, std::vector<Tensor<1,spacedim> >(n_components));
std::vector<double>
weight_values (max_n_q_points);
std::vector<Vector<double> >
psi_values (max_n_q_points, Vector<double>(n_components));
- std::vector<std::vector<Tensor<1,dim> > >
- psi_grads (max_n_q_points, std::vector<Tensor<1,dim> >(n_components));
+ std::vector<std::vector<Tensor<1,spacedim> > >
+ psi_grads (max_n_q_points, std::vector<Tensor<1,spacedim> >(n_components));
std::vector<double>
psi_scalar (max_n_q_points);
// tmp vector when we use the
- // Function<dim> functions for
+ // Function<spacedim> functions for
// scalar functions
std::vector<double> tmp_values (max_n_q_points);
- std::vector<Tensor<1,dim> > tmp_gradients (max_n_q_points);
+ std::vector<Tensor<1,spacedim> > tmp_gradients (max_n_q_points);
// loop over all cells
typename DH::active_cell_iterator cell = dof.begin_active(),
// initialize for this cell
x_fe_values.reinit (cell);
- const dealii::FEValues<dim> &fe_values = x_fe_values.get_present_fe_values ();
+ const dealii::FEValues<dim, spacedim> &fe_values = x_fe_values.get_present_fe_values ();
const unsigned int n_q_points = fe_values.n_quadrature_points;
// resize all out scratch
function_values.resize (n_q_points,
Vector<double>(n_components));
function_grads.resize (n_q_points,
- std::vector<Tensor<1,dim> >(n_components));
+ std::vector<Tensor<1,spacedim> >(n_components));
weight_values.resize (n_q_points);
weight_vectors.resize (n_q_points,
psi_values.resize (n_q_points,
Vector<double>(n_components));
psi_grads.resize (n_q_points,
- std::vector<Tensor<1,dim> >(n_components));
+ std::vector<Tensor<1,spacedim> >(n_components));
psi_scalar.resize (n_q_points);
tmp_values.resize (n_q_points);
VectorTools::integrate_difference (const Mapping<dim, spacedim> &mapping,
const DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<dim> &exact_solution,
+ const Function<spacedim> &exact_solution,
OutVector &difference,
const Quadrature<dim> &q,
const NormType &norm,
- const Function<dim> *weight,
+ const Function<spacedim> *weight,
const double exponent)
{
internal::VectorTools
void
VectorTools::integrate_difference (const DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<dim> &exact_solution,
+ const Function<spacedim> &exact_solution,
OutVector &difference,
const Quadrature<dim> &q,
const NormType &norm,
- const Function<dim> *weight,
+ const Function<spacedim> *weight,
const double exponent)
{
Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping"));
internal::VectorTools
- ::do_integrate_difference(hp::StaticMappingQ1<dim>::mapping_collection,
+ ::do_integrate_difference(hp::StaticMappingQ1<dim,spacedim>::mapping_collection,
dof, fe_function, exact_solution,
difference, hp::QCollection<dim>(q),
norm, weight, exponent);
VectorTools::integrate_difference (const dealii::hp::MappingCollection<dim,spacedim> &mapping,
const dealii::hp::DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<dim> &exact_solution,
+ const Function<spacedim> &exact_solution,
OutVector &difference,
const dealii::hp::QCollection<dim> &q,
const NormType &norm,
- const Function<dim> *weight,
+ const Function<spacedim> *weight,
const double exponent)
{
internal::VectorTools
void
VectorTools::integrate_difference (const dealii::hp::DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<dim> &exact_solution,
+ const Function<spacedim> &exact_solution,
OutVector &difference,
const dealii::hp::QCollection<dim> &q,
const NormType &norm,
- const Function<dim> *weight,
+ const Function<spacedim> *weight,
const double exponent)
{
Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping"));
void
VectorTools::point_difference (const DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<dim> &exact_function,
+ const Function<spacedim> &exact_function,
Vector<double> &difference,
- const Point<dim> &point)
+ const Point<spacedim> &point)
{
point_difference(StaticMappingQ1<dim>::mapping,
dof,
VectorTools::point_difference (const Mapping<dim, spacedim> &mapping,
const DoFHandler<dim,spacedim> &dof,
const InVector &fe_function,
- const Function<dim> &exact_function,
+ const Function<spacedim> &exact_function,
Vector<double> &difference,
- const Point<dim> &point)
+ const Point<spacedim> &point)
{
const FiniteElement<dim>& fe = dof.get_fe();
// first find the cell in which this point
// is, initialize a quadrature rule with
// it, and then a FEValues object
- const std::pair<typename DoFHandler<dim,spacedim>::active_cell_iterator, Point<dim> >
+ const std::pair<typename DoFHandler<dim,spacedim>::active_cell_iterator, Point<spacedim> >
cell_point = GridTools::find_active_cell_around_point (mapping, dof, point);
Assert(GeometryInfo<dim>::distance_to_unit_cell(cell_point.second) < 1e-10,
// first find the cell in which this point
// is, initialize a quadrature rule with
// it, and then a FEValues object
- const std::pair<typename DoFHandler<dim,spacedim>::active_cell_iterator, Point<dim> >
+ const std::pair<typename DoFHandler<dim,spacedim>::active_cell_iterator, Point<spacedim> >
cell_point
= GridTools::find_active_cell_around_point (mapping, dof, point);
// first find the cell in which this point
// is, initialize a quadrature rule with
// it, and then a FEValues object
- const std::pair<typename DoFHandler<dim,spacedim>::active_cell_iterator, Point<dim> >
+ const std::pair<typename DoFHandler<dim,spacedim>::active_cell_iterator, Point<spacedim> >
cell_point = GridTools::find_active_cell_around_point (mapping, dof, point);
Assert(GeometryInfo<dim>::distance_to_unit_cell(cell_point.second) < 1e-10,