*/
template <class DH>
DoFInfo (const DH& dof_handler);
-
+
/**
* Set the current cell and
* fill #indices.
* DoFInfoBox.
*/
DoFInfo ();
-
+
/// Fill index vector with active indices
void get_indices(const typename DoFHandler<dim, spacedim>::cell_iterator& c);
* degrees of freedom per cell.
*/
BlockIndices aux_local_indices;
-
+
friend class DoFInfoBox<dim, DoFInfo<dim, spacedim, number> >;
};
* in the other constructor.
*/
DoFInfoBox(const DoFInfoBox<dim, DOFINFO>&);
-
+
/**
* Reset all the availability flags.
*/
*/
template <class ASSEMBLER>
void assemble(ASSEMBLER& ass) const;
-
-
+
+
/**
* The data for the cell.
*/
};
-
+
/**
* Class for objects handed to local integration functions.
public:
static const unsigned int dimension = dim;
static const unsigned int space_dimension = spacedim;
-
+
/**
* Constructor.
*/
IntegrationInfo();
-
+
/**
* Copy constructor, creating a
* clone to be used by
* WorksTream::run().
*/
IntegrationInfo(const IntegrationInfo<dim, spacedim>& other);
-
+
/**
* Build all internal
* structures, in particular
* vector and cache the
* selector.
*/
- void initialize_data(const boost::shared_ptr<VectorDataBase<dim,spacedim> > data);
+ void initialize_data(const boost::shared_ptr<VectorDataBase<dim,spacedim> > &data);
/**
* Delete the data created by initialize().
* structures for use on a cell.
*/
void reinit(const DoFInfo<dim, spacedim>& i);
-
+
/**
* Use the finite element
* functions in #global_data
*
* <ol>
* <li> It provides the interface needed by MeshWorker::loop(), namely
- * the two functions post_cell() and post_faces(), as well as
+ * the two functions post_cell() and post_faces(), as well as
* the data members #cell, #boundary, #face,
* #subface, and #neighbor.
*
*/
Quadrature<dim-1> face_quadrature;
/* @} */
-
+
/**
* @name Data vectors
*/
* interior faces.
*/
MeshWorker::VectorSelector face_selector;
-
+
boost::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > cell_data;
boost::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > boundary_data;
boost::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > face_data;
*/
template <class DOFINFO>
void post_cell(const DoFInfoBox<dim, DOFINFO>&);
-
+
/**
* A callback function which is
* called in the loop over all
*/
template <class DOFINFO>
void post_faces(const DoFInfoBox<dim, DOFINFO>&);
-
+
/// The info object for a cell
CellInfo cell;
/// The info object for a boundary face
}
//----------------------------------------------------------------------//
-
+
template <int dim, class DOFINFO>
inline
DoFInfoBox<dim, DOFINFO>::DoFInfoBox(const DOFINFO& seed)
}
}
-
+
template <int dim, class DOFINFO>
template <class ASSEMBLER>
inline void
}
}
}
-
+
//----------------------------------------------------------------------//
{
if (block_info == 0 || block_info->local().size() == 0)
{
- fevalv.resize(1);
+ fevalv.resize(1);
fevalv[0] = boost::shared_ptr<FEValuesBase<dim,sdim> > (
new FEVALUES (mapping, el, quadrature, flags));
}
}
n_components = el.n_components();
}
-
+
template <int dim, int spacedim>
inline const FEValuesBase<dim, spacedim>&
{
// This is a face
FEFaceValues<dim>& fe = dynamic_cast<FEFaceValues<dim>&> (febase);
- fe.reinit(info.cell, info.face_number);
+ fe.reinit(info.cell, info.face_number);
}
else
{
p->initialize(data);
cell_data = p;
cell.initialize_data(p);
-
+
p = boost::shared_ptr<VectorData<VECTOR, dim, sdim> >(new VectorData<VECTOR, dim, sdim> (boundary_selector));
p->initialize(data);
boundary_data = p;
subface.initialize_data(p);
neighbor.initialize_data(p);
}
-
-
+
+
template <int dim, int sdim>
template <class DOFINFO>
void
IntegrationInfoBox<dim,sdim>::post_cell(const DoFInfoBox<dim, DOFINFO>&)
{}
-
-
+
+
template <int dim, int sdim>
template <class DOFINFO>
void
if (!c->has_children())
{
indices.resize(c->get_fe().dofs_per_cell);
-
+
if (block_info == 0 || block_info->local().size() == 0)
c->get_dof_indices(indices);
else
DoFInfo<dim,spacedim,number>::get_indices(const typename MGDoFHandler<dim, spacedim>::cell_iterator& c)
{
indices.resize(c->get_fe().dofs_per_cell);
-
+
if (block_info == 0 || block_info->local().size() == 0)
c->get_mg_dof_indices(indices);
else
global_data(boost::shared_ptr<VectorDataBase<dim, sdim> >(new VectorDataBase<dim, sdim>))
{}
-
+
template<int dim, int sdim>
IntegrationInfo<dim,sdim>::IntegrationInfo(const IntegrationInfo<dim,sdim>& other)
:
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] = boost::shared_ptr<FEValuesBase<dim,sdim> > (
reinterpret_cast<FEFaceValuesBase<dim,sdim>*>(
Assert(false, ExcInternalError());
}
}
-
+
template<int dim, int sdim>
void
IntegrationInfo<dim,sdim>::initialize_data(
- const boost::shared_ptr<VectorDataBase<dim,sdim> > data)
+ const boost::shared_ptr<VectorDataBase<dim,sdim> > &data)
{
global_data = data;
const unsigned int nqp = fevalv[0]->n_quadrature_points;
-
+
values.resize(global_data->n_values());
// deallog << "values: " << values.size() << " [";
// For all selected finite
// deallog << " }";
}
// deallog << " ]" << std::endl;
-
+
gradients.resize(global_data->n_gradients());
// For all selected finite
// element functions
gradients[i][j].resize(nqp);
}
}
-
+
hessians.resize(global_data->n_hessians());
// For all selected finite
// element functions
const unsigned int n_comp = fe.get_fe().n_components();
const unsigned int block_start = info.block_info->local().block_start(b);
const unsigned int block_size = info.block_info->local().block_size(b);
-
+
if(info.level_cell)
this->global_data->mg_fill(values, gradients, hessians, fe, info.cell->level(), info.indices,
comp, n_comp, block_start, block_size);
0, n_comp, 0, info.indices.size());
}
}
-
-
+
+
//----------------------------------------------------------------------//
-
-
+
+
template<int dim, int sdim>
void
IntegrationInfoBox<dim,sdim>::initialize_update_flags ()
boundary_flags = UpdateFlags(update_JxW_values | update_normal_vectors);
face_flags = boundary_flags;
neighbor_flags = update_default;
-
+
if (cell_selector.has_values() != 0) cell_flags |= update_values;
if (cell_selector.has_gradients() != 0) cell_flags |= update_gradients;
if (cell_selector.has_hessians() != 0) cell_flags |= update_hessians;
-
+
if (boundary_selector.has_values() != 0) boundary_flags |= update_values;
if (boundary_selector.has_gradients() != 0) boundary_flags |= update_gradients;
if (boundary_selector.has_hessians() != 0) boundary_flags |= update_hessians;
-
+
if (face_selector.has_values() != 0) face_flags |= update_values;
if (face_selector.has_gradients() != 0) face_flags |= update_gradients;
if (face_selector.has_hessians() != 0) face_flags |= update_hessians;
-
+
if (face_selector.has_values() != 0) neighbor_flags |= update_values;
if (face_selector.has_gradients() != 0) neighbor_flags |= update_gradients;
- if (face_selector.has_hessians() != 0) neighbor_flags |= update_hessians;
+ if (face_selector.has_hessians() != 0) neighbor_flags |= update_hessians;
}
-
-
+
+
template <int dim, int sdim>
void
IntegrationInfoBox<dim,sdim>::add_update_flags(
if (cell) cell_flags |= flags;
if (boundary) boundary_flags |= flags;
if (face) face_flags |= flags;
- if (neighbor) neighbor_flags |= flags;
+ if (neighbor) neighbor_flags |= flags;
}
-
-
+
+
template <int dim, int sdim>
void
IntegrationInfoBox<dim,sdim>::initialize_gauss_quadrature(
face_quadrature = QGauss<dim-1>(fp);
}
-
-
+
+
template <int dim, int sdim>
void
IntegrationInfoBox<dim,sdim>::