* The info type expected by a
* cell integrator.
*/
- typedef IntegrationInfo<dim, FEValuesBase<dim, dim>, dim> CellInfo;
+ typedef IntegrationInfo<dim, dim> CellInfo;
/**
* The info type expected by a
* face integrator.
*/
- typedef IntegrationInfo<dim, FEFaceValuesBase<dim, dim>, dim> FaceInfo;
+ typedef IntegrationInfo<dim, dim> FaceInfo;
/**
* Initialize default values.
* @ingroup MeshWorker
* @author Guido Kanschat, 2009
*/
- template<int dim, class FEVALUESBASE, int spacedim = dim>
+ template<int dim, int spacedim = dim>
class IntegrationInfo
{
private:
/// vector of FEValues objects
- std::vector<boost::shared_ptr<FEVALUESBASE> > fevalv;
+ std::vector<boost::shared_ptr<FEValuesBase<dim, spacedim> > > fevalv;
public:
- static const unsigned int dimension = FEVALUESBASE::dimension;
- static const unsigned int space_dimension = FEVALUESBASE::space_dimension;
+ static const unsigned int dimension = dim;
+ static const unsigned int space_dimension = spacedim;
/**
* Constructor.
* clone to be used by
* WorksTream::run().
*/
- IntegrationInfo(const IntegrationInfo<dim, FEVALUESBASE, spacedim>& other);
+ IntegrationInfo(const IntegrationInfo<dim, spacedim>& other);
/**
* Build all internal
* exception, if applied to a
* vector of elements.
*/
- const FEVALUESBASE& fe_values () const;
+ const FEValuesBase<dim, spacedim>& fe_values () const;
/// Access to finite elements
/**
*
* @see DGBlockSplitApplication
*/
- const FEVALUESBASE& fe_values (const unsigned int i) const;
+ const FEValuesBase<dim, spacedim>& fe_values (const unsigned int i) const;
/**
* The vector containing the
public:
/// The type of the info object for cells
- typedef IntegrationInfo<dim, FEValuesBase<dim, spacedim>, spacedim> CellInfo;
+ typedef IntegrationInfo<dim, spacedim> CellInfo;
/// The type of the info objects for faces.
- typedef IntegrationInfo<dim, FEFaceValuesBase<dim, spacedim>, spacedim> FaceInfo;
+ typedef IntegrationInfo<dim, spacedim> FaceInfo;
template <class WORKER>
void initialize(const WORKER&,
//----------------------------------------------------------------------//
- template <int dim, class FVB, int spacedim>
- inline const FVB&
- IntegrationInfo<dim,FVB,spacedim>::fe_values() const
+ template <int dim, int spacedim>
+ inline const FEValuesBase<dim, spacedim>&
+ IntegrationInfo<dim,spacedim>::fe_values() const
{
AssertDimension(fevalv.size(), 1);
return *fevalv[0];
}
- template <int dim, class FVB, int spacedim>
- inline const FVB&
- IntegrationInfo<dim,FVB,spacedim>::fe_values(unsigned int i) const
+ template <int dim, int spacedim>
+ inline const FEValuesBase<dim, spacedim>&
+ IntegrationInfo<dim,spacedim>::fe_values(unsigned int i) const
{
Assert (i<fevalv.size(), ExcIndexRange(i,0,fevalv.size()));
return *fevalv[i];
}
- template <int dim, class FVB, int spacedim>
+ template <int dim, int spacedim>
inline void
- IntegrationInfo<dim,FVB,spacedim>::reinit(const DoFInfo<dim, spacedim>& info)
+ IntegrationInfo<dim,spacedim>::reinit(const DoFInfo<dim, spacedim>& info)
{
for (unsigned int i=0;i<fevalv.size();++i)
{
- FVB& febase = *fevalv[i];
+ FEValuesBase<dim, spacedim>& febase = *fevalv[i];
if (info.sub_number != deal_II_numbers::invalid_unsigned_int)
{
// This is a subface
//----------------------------------------------------------------------//
- template<int dim, class FVB, int sdim>
- IntegrationInfo<dim,FVB,sdim>::IntegrationInfo()
+ template<int dim, int sdim>
+ IntegrationInfo<dim,sdim>::IntegrationInfo()
:
fevalv(0),
multigrid(false),
{}
- template<int dim, class FVB, int sdim>
- IntegrationInfo<dim,FVB,sdim>::IntegrationInfo(const IntegrationInfo<dim,FVB,sdim>& other)
+ template<int dim, int sdim>
+ IntegrationInfo<dim,sdim>::IntegrationInfo(const IntegrationInfo<dim,sdim>& other)
:
multigrid(other.multigrid),
values(other.values),
fevalv.resize(other.fevalv.size());
for (unsigned int i=0;i<other.fevalv.size();++i)
{
- const FVB& p = *other.fevalv[i];
+ const FEValuesBase<dim,sdim>& p = *other.fevalv[i];
const FEValues<dim,sdim>* pc = dynamic_cast<const FEValues<dim,sdim>*>(&p);
const FEFaceValues<dim,sdim>* pf = dynamic_cast<const FEFaceValues<dim,sdim>*>(&p);
const FESubfaceValues<dim,sdim>* ps = dynamic_cast<const FESubfaceValues<dim,sdim>*>(&p);
if (pc != 0)
- fevalv[i] = typename boost::shared_ptr<FVB> (
- reinterpret_cast<FVB*>(new FEValues<dim,sdim> (pc->get_mapping(), pc->get_fe(),
- pc->get_quadrature(), pc->get_update_flags())));
+ fevalv[i] = typename boost::shared_ptr<FEValuesBase<dim,sdim> > (
+ reinterpret_cast<FEFaceValuesBase<dim,sdim>*>(
+ new FEValues<dim,sdim> (pc->get_mapping(), pc->get_fe(),
+ pc->get_quadrature(), pc->get_update_flags())));
else if (pf != 0)
- fevalv[i] = typename boost::shared_ptr<FVB> (
+ fevalv[i] = typename boost::shared_ptr<FEValuesBase<dim,sdim> > (
new FEFaceValues<dim,sdim> (pf->get_mapping(), pf->get_fe(), pf->get_quadrature(), pf->get_update_flags()));
else if (ps != 0)
- fevalv[i] = typename boost::shared_ptr<FVB> (
+ fevalv[i] = typename boost::shared_ptr<FEValuesBase<dim,sdim> > (
new FESubfaceValues<dim,sdim> (ps->get_mapping(), ps->get_fe(), ps->get_quadrature(), ps->get_update_flags()));
else
Assert(false, ExcInternalError());
}
- template<int dim, class FVB, int sdim>
+ template<int dim, int sdim>
template <class FEVALUES>
void
- IntegrationInfo<dim,FVB,sdim>::initialize(
+ IntegrationInfo<dim,sdim>::initialize(
const FiniteElement<dim,sdim>& el,
const Mapping<dim,sdim>& mapping,
const Quadrature<FEVALUES::integral_dimension>& quadrature,
if (block_info == 0 || block_info->local().size() == 0)
{
fevalv.resize(1);
- fevalv[0] = boost::shared_ptr<FVB> (
+ fevalv[0] = boost::shared_ptr<FEValuesBase<dim,sdim> > (
new FEVALUES (mapping, el, quadrature, flags));
}
else
fevalv.resize(el.n_base_elements());
for (unsigned int i=0;i<fevalv.size();++i)
{
- fevalv[i] = boost::shared_ptr<FVB> (
+ fevalv[i] = boost::shared_ptr<FEValuesBase<dim,sdim> > (
new FEVALUES (mapping, el.base_element(i), quadrature, flags));
}
}
}
- template<int dim, class FVB, int sdim>
+ template<int dim, int sdim>
void
- IntegrationInfo<dim,FVB,sdim>::initialize_data(
+ IntegrationInfo<dim,sdim>::initialize_data(
const boost::shared_ptr<VectorDataBase<dim,sdim> > data)
{
global_data = data;
}
- template<int dim, class FVB, int sdim>
+ template<int dim, int sdim>
void
- IntegrationInfo<dim,FVB,sdim>::clear()
+ IntegrationInfo<dim,sdim>::clear()
{
fevalv.resize(0);
}
- template<int dim, class FVB, int sdim>
+ template<int dim, int sdim>
void
- IntegrationInfo<dim,FVB,sdim>::fill_local_data(const DoFInfo<dim, sdim>& info, bool split_fevalues)
+ IntegrationInfo<dim,sdim>::fill_local_data(const DoFInfo<dim, sdim>& info, bool split_fevalues)
{
if (split_fevalues)
{
}
// Loop over all cells
- WorkStream::run(begin, end,
- std_cxx1x::bind(cell_action<INFOBOX, dim, spacedim, ITERATOR>, _1, _3, _2,
- cell_worker, boundary_worker, face_worker, cells_first, true),
- std_cxx1x::bind(internal::assemble<dim,spacedim,ASSEMBLER>, _1, assembler),
- info, dof_info);
+// WorkStream::run(begin, end,
+// std_cxx1x::bind(cell_action<INFOBOX, dim, spacedim, ITERATOR>, _1, _3, _2,
+// cell_worker, boundary_worker, face_worker, cells_first, true),
+// std_cxx1x::bind(internal::assemble<dim,spacedim,ASSEMBLER>, _1, assembler),
+// info, dof_info);
-// for (ITERATOR cell = begin; cell != end; ++cell)
-// {
-// cell_action(cell, dof_info, info, cell_worker, boundary_worker, face_worker, cells_first);
-// dof_info.assemble(assembler);
-// }
+ for (ITERATOR cell = begin; cell != end; ++cell)
+ {
+ cell_action(cell, dof_info, info, cell_worker, boundary_worker, face_worker, cells_first, true);
+ dof_info.assemble(assembler);
+ }
}
/**
{
template class LocalResults<double>;
template class DoFInfo<deal_II_dimension,deal_II_dimension>;
+ template class IntegrationInfo<deal_II_dimension>;
-#include "mesh_worker_info.inst"
-
- template void IntegrationInfo<deal_II_dimension, FEValuesBase<deal_II_dimension> >
+ template void IntegrationInfo<deal_II_dimension>
::initialize<FEValues<deal_II_dimension> >(
const FiniteElement<deal_II_dimension>&, const Mapping<deal_II_dimension>&,
const Quadrature<FEValues<deal_II_dimension>::integral_dimension>&, const UpdateFlags, const BlockInfo*);
- template void IntegrationInfo<deal_II_dimension, FEFaceValuesBase<deal_II_dimension> >
+ template void IntegrationInfo<deal_II_dimension>
::initialize<FEFaceValues<deal_II_dimension> >(
const FiniteElement<deal_II_dimension>&, const Mapping<deal_II_dimension>&,
const Quadrature<FEFaceValues<deal_II_dimension>::integral_dimension>&, const UpdateFlags, const BlockInfo*);
- template void IntegrationInfo<deal_II_dimension, FEFaceValuesBase<deal_II_dimension> >
+ template void IntegrationInfo<deal_II_dimension>
::initialize<FESubfaceValues<deal_II_dimension> >(
const FiniteElement<deal_II_dimension>&, const Mapping<deal_II_dimension>&,
const Quadrature<FESubfaceValues<deal_II_dimension>::integral_dimension>&, const UpdateFlags, const BlockInfo*);
//---------------------------------------------------------------------------
// $Id: fe_field_function.inst.in 19046 2009-07-08 19:30:23Z bangerth $
//
-// Copyright (C) 2009 by the deal.II authors
+// Copyright (C) 2009, 2010 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
for (FEV : FEVALUES_BASES)
{
- template class IntegrationInfo<deal_II_dimension, FEV>;
}
for (FEV : FEVALUES_BASES)
template <int dim>
void Step12<dim>::integrate_boundary_term (DoFInfo& dinfo, FaceInfo& info)
{
- const FEFaceValuesBase<dim>& fe_v = info.fe_values();
+ const FEValuesBase<dim>& fe_v = info.fe_values();
FullMatrix<double>& local_matrix = dinfo.matrix(0).matrix;
Vector<double>& local_vector = dinfo.vector(0).block(0);
// etc., we use the
// FEFaceValuesBase object of the
// first argument.
- const FEFaceValuesBase<dim>& fe_v = info1.fe_values();
+ const FEValuesBase<dim>& fe_v = info1.fe_values();
// For additional shape functions,
// we have to ask the neighbors
// FEFaceValuesBase.
- const FEFaceValuesBase<dim>& fe_v_neighbor = info2.fe_values();
+ const FEValuesBase<dim>& fe_v_neighbor = info2.fe_values();
// Then we get references to the
// four local matrices. The letters
MeshWorker::DoFInfo<dim>& dinfo,
typename MeshWorker::IntegrationWorker<dim>::FaceInfo& info)
{
- const FEFaceValuesBase<dim>& fe = info.fe_values();
+ const FEValuesBase<dim>& fe = info.fe_values();
FullMatrix<double>& local_matrix = dinfo.matrix(0,false).matrix;
const unsigned int deg = fe.get_fe().tensor_degree();
typename MeshWorker::IntegrationWorker<dim>::FaceInfo& info1,
typename MeshWorker::IntegrationWorker<dim>::FaceInfo& info2)
{
- const FEFaceValuesBase<dim>& fe1 = info1.fe_values();
- const FEFaceValuesBase<dim>& fe2 = info2.fe_values();
+ const FEValuesBase<dim>& fe1 = info1.fe_values();
+ const FEValuesBase<dim>& fe2 = info2.fe_values();
FullMatrix<double>& matrix_v1u1 = dinfo1.matrix(0,false).matrix;
FullMatrix<double>& matrix_v1u2 = dinfo1.matrix(0,true).matrix;
FullMatrix<double>& matrix_v2u1 = dinfo2.matrix(0,true).matrix;
template <int dim>
void RHSIntegrator<dim>::bdry(MeshWorker::DoFInfo<dim>& dinfo, typename MeshWorker::IntegrationWorker<dim>::FaceInfo& info)
{
- const FEFaceValuesBase<dim>& fe = info.fe_values();
+ const FEValuesBase<dim>& fe = info.fe_values();
Vector<double>& local_vector = dinfo.vector(0).block(0);
std::vector<double> boundary_values(fe.n_quadrature_points);
template <int dim>
void Estimator<dim>::bdry(MeshWorker::DoFInfo<dim>& dinfo, typename MeshWorker::IntegrationWorker<dim>::FaceInfo& info)
{
- const FEFaceValuesBase<dim>& fe = info.fe_values();
+ const FEValuesBase<dim>& fe = info.fe_values();
std::vector<double> boundary_values(fe.n_quadrature_points);
exact_solution.value_list(fe.get_quadrature_points(), boundary_values);
typename MeshWorker::IntegrationWorker<dim>::FaceInfo& info1,
typename MeshWorker::IntegrationWorker<dim>::FaceInfo& info2)
{
- const FEFaceValuesBase<dim>& fe = info1.fe_values();
+ const FEValuesBase<dim>& fe = info1.fe_values();
const std::vector<double>& uh1 = info1.values[0][0];
const std::vector<double>& uh2 = info2.values[0][0];
const std::vector<Tensor<1,dim> >& Duh1 = info1.gradients[0][0];
int main()
{
+ deallog.log_execution_time(true);
FE_DGQ<2> fe1(3);
Step39<2> test1(fe1);
- test1.run(13);
+ test1.run(20);
}