template <typename VectorType>
ImplicitRungeKutta<VectorType>::ImplicitRungeKutta(runge_kutta_method method,
- unsigned int max_it,
- double tolerance)
+ unsigned int max_it,
+ double tolerance)
:
RungeKutta<VectorType> (),
skip_linear_combi(false),
template<typename MatrixType, typename VectorType>
inline void
PointerMatrixAux<MatrixType, VectorType>::vmult (VectorType &dst,
- const VectorType &src) const
+ const VectorType &src) const
{
if (mem == 0)
mem = &my_memory;
template<typename MatrixType, typename VectorType>
inline void
PointerMatrixAux<MatrixType, VectorType>::Tvmult (VectorType &dst,
- const VectorType &src) const
+ const VectorType &src) const
{
if (mem == 0)
mem = &my_memory;
template<typename MatrixType, typename VectorType>
inline void
PointerMatrixAux<MatrixType, VectorType>::vmult_add (VectorType &dst,
- const VectorType &src) const
+ const VectorType &src) const
{
if (mem == 0)
mem = &my_memory;
template<typename MatrixType, typename VectorType>
inline void
PointerMatrixAux<MatrixType, VectorType>::Tvmult_add (VectorType &dst,
- const VectorType &src) const
+ const VectorType &src) const
{
if (mem == 0)
mem = &my_memory;
template <typename MatrixType>
inline void
PreconditionSSOR<MatrixType>::initialize (const MatrixType &rA,
- const typename BaseClass::AdditionalData ¶meters)
+ const typename BaseClass::AdditionalData ¶meters)
{
this->PreconditionRelaxation<MatrixType>::initialize (rA, parameters);
template<typename MatrixType, class VectorType>
PreconditionUseMatrix<MatrixType,VectorType>::PreconditionUseMatrix(const MatrixType &M,
- const function_ptr method)
+ const function_ptr method)
:
matrix(M), precondition(method)
{}
template <typename MatrixType, typename inverse_type>
template <typename number2>
void PreconditionBlockSSOR<MatrixType,inverse_type>::vmult (Vector<number2> &dst,
- const Vector<number2> &src) const
+ const Vector<number2> &src) const
{
Vector<number2> help;
help.reinit(dst);
template <typename MatrixType, typename inverse_type>
template <typename number2>
void PreconditionBlockSSOR<MatrixType,inverse_type>::Tvmult (Vector<number2> &dst,
- const Vector<number2> &src) const
+ const Vector<number2> &src) const
{
Vector<number2> help;
help.reinit(dst);
inline
SolverControl::State
Solver<VectorType>::StateCombiner::operator ()(const SolverControl::State state1,
- const SolverControl::State state2) const
+ const SolverControl::State state2) const
{
if ((state1 == SolverControl::failure)
||
inline
SolverControl::State
Solver<VectorType>::StateCombiner::operator ()(const Iterator begin,
- const Iterator end) const
+ const Iterator end) const
{
Assert (begin != end, ExcMessage ("You can't combine iterator states if no state is given."));
template<class VectorType>
inline
Solver<VectorType>::Solver (SolverControl &solver_control,
- VectorMemory<VectorType> &vector_memory)
+ VectorMemory<VectorType> &vector_memory)
:
memory(vector_memory)
{
template <typename VectorType>
SolverCG<VectorType>::SolverCG (SolverControl &cn,
- VectorMemory<VectorType> &mem,
- const AdditionalData &data)
+ VectorMemory<VectorType> &mem,
+ const AdditionalData &data)
:
Solver<VectorType>(cn,mem),
additional_data(data)
template <class VectorType>
inline VectorType &
TmpVectors<VectorType>::operator() (const unsigned int i,
- const VectorType &temp)
+ const VectorType &temp)
{
Assert (i+offset<data.size(),
ExcIndexRange(i,-offset, data.size()-offset));
template<class VectorType>
SolverMinRes<VectorType>::SolverMinRes (SolverControl &cn,
VectorMemory<VectorType> &mem,
- const AdditionalData &)
+ const AdditionalData &)
:
Solver<VectorType>(cn,mem)
{}
(const FiniteElement<dim,sdim> &el,
const Mapping<dim,sdim> &mapping,
const AnyData &data,
- const VectorType &,
+ const VectorType &,
const BlockInfo *block_info)
{
initialize(el, mapping, block_info);
template <typename MatrixType>
inline void
MatrixSimple<MatrixType>::assemble(const FullMatrix<double> &M,
- const unsigned int index,
- const std::vector<types::global_dof_index> &i1,
- const std::vector<types::global_dof_index> &i2)
+ const unsigned int index,
+ const std::vector<types::global_dof_index> &i1,
+ const std::vector<types::global_dof_index> &i2)
{
AssertDimension(M.m(), i1.size());
AssertDimension(M.n(), i2.size());
template <class DOFINFO>
inline void
MGMatrixSimple<MatrixType>::assemble(const DOFINFO &info1,
- const DOFINFO &info2)
+ const DOFINFO &info2)
{
Assert(info1.level_cell, ExcMessage("Cell must access level dofs"));
Assert(info2.level_cell, ExcMessage("Cell must access level dofs"));
template <class DOFINFO>
inline void
SystemSimple<MatrixType,VectorType>::initialize_info(DOFINFO &info,
- bool face) const
+ bool face) const
{
MatrixSimple<MatrixType>::initialize_info(info, face);
ResidualSimple<VectorType>::initialize_info(info, face);
template <class DOFINFO>
inline void
SystemSimple<MatrixType,VectorType>::assemble(const DOFINFO &info1,
- const DOFINFO &info2)
+ const DOFINFO &info2)
{
MatrixSimple<MatrixType>::assemble(info1, info2);
ResidualSimple<VectorType>::assemble(info1, info2);
* Constructor. Sets memory and smoothing parameters.
*/
MGSmootherBlock (VectorMemory<BlockVector<number> > &mem,
- const unsigned int steps = 1,
- const bool variable = false,
- const bool symmetric = false,
- const bool transpose = false,
- const bool reverse = false);
+ const unsigned int steps = 1,
+ const bool variable = false,
+ const bool symmetric = false,
+ const bool transpose = false,
+ const bool reverse = false);
/**
* Initialize for matrices. The parameter <tt>matrices</tt> can be any
inline void
MGSmootherBlock<MatrixType, RELAX, number>::smooth(const unsigned int level,
BlockVector<number> &u,
- const BlockVector<number> &rhs) const
+ const BlockVector<number> &rhs) const
{
deallog.push("Smooth");
matrices.resize(p.min_level(), p.max_level());
for (unsigned int level=p.min_level(); level <= p.max_level(); ++level)
matrices[level] = std_cxx11::shared_ptr<PointerMatrixBase<VectorType> >
- (new_pointer_matrix_base(p[level], VectorType()));
+ (new_pointer_matrix_base(p[level], VectorType()));
}
template <typename MatrixType, class RELAX, typename VectorType>
inline void
MGSmootherRelaxation<MatrixType, RELAX, VectorType>::smooth (const unsigned int level,
- VectorType &u,
- const VectorType &rhs) const
+ VectorType &u,
+ const VectorType &rhs) const
{
unsigned int maxlevel = smoothers.max_level();
unsigned int steps2 = this->steps;
void
MGTransferPrebuilt<VectorType>::copy_to_mg
(const DoFHandler<dim,spacedim> &mg_dof_handler,
- MGLevelObject<VectorType> &dst,
- const InVector &src) const
+ MGLevelObject<VectorType> &dst,
+ const InVector &src) const
{
reinit_vector(mg_dof_handler, component_to_block_map, dst);
bool first = true;
template <typename VectorType>
template <int dim>
Multigrid<VectorType>::Multigrid (const DoFHandler<dim> &mg_dof_handler,
- const MGMatrixBase<VectorType> &matrix,
- const MGCoarseGridBase<VectorType> &coarse,
- const MGTransferBase<VectorType> &transfer,
- const MGSmootherBase<VectorType> &pre_smooth,
- const MGSmootherBase<VectorType> &post_smooth,
- Cycle cycle)
+ const MGMatrixBase<VectorType> &matrix,
+ const MGCoarseGridBase<VectorType> &coarse,
+ const MGTransferBase<VectorType> &transfer,
+ const MGSmootherBase<VectorType> &pre_smooth,
+ const MGSmootherBase<VectorType> &post_smooth,
+ Cycle cycle)
:
cycle_type(cycle),
minlevel(0),
template<class OtherVectorType>
void
PreconditionMG<dim, VectorType, TRANSFER>::Tvmult
-(OtherVectorType &,
+(OtherVectorType &,
const OtherVectorType &) const
{
Assert(false, ExcNotImplemented());
template<class OtherVectorType>
void
PreconditionMG<dim, VectorType, TRANSFER>::Tvmult_add
-(OtherVectorType &,
+(OtherVectorType &,
const OtherVectorType &) const
{
Assert(false, ExcNotImplemented());
VectorType &vec,
const bool enforce_zero_boundary = false,
const Quadrature<dim-1> &q_boundary = (dim > 1 ?
- QGauss<dim-1>(2) :
- Quadrature<dim-1>(0)),
+ QGauss<dim-1>(2) :
+ Quadrature<dim-1>(0)),
const bool project_to_boundary_first = false);
/**
VectorType &vec,
const bool enforce_zero_boundary = false,
const Quadrature<dim-1> &q_boundary = (dim > 1 ?
- QGauss<dim-1>(2) :
- Quadrature<dim-1>(0)),
+ QGauss<dim-1>(2) :
+ Quadrature<dim-1>(0)),
const bool project_to_boundary_first = false);
/**
VectorType &vec,
const bool enforce_zero_boundary = false,
const hp::QCollection<dim-1> &q_boundary = hp::QCollection<dim-1>(dim > 1 ?
- QGauss<dim-1>(2) :
- Quadrature<dim-1>(0)),
+ QGauss<dim-1>(2) :
+ Quadrature<dim-1>(0)),
const bool project_to_boundary_first = false);
/**
namespace distributed
{
- template<int dim, typename VECTOR, class DH>
- SolutionTransfer<dim, VECTOR, DH>::SolutionTransfer(const DH &dof)
+ template<int dim, typename VectorType, class DH>
+ SolutionTransfer<dim, VectorType, DH>::SolutionTransfer (const DH &dof)
:
dof_handler(&dof, typeid(*this).name())
{
- template<int dim, typename VECTOR, class DH>
- SolutionTransfer<dim, VECTOR, DH>::~SolutionTransfer()
+ template<int dim, typename VectorType, class DH>
+ SolutionTransfer<dim, VectorType, DH>::~SolutionTransfer ()
{}
- template<int dim, typename VECTOR, class DH>
+ template<int dim, typename VectorType, class DH>
void
- SolutionTransfer<dim, VECTOR, DH>::
- prepare_for_coarsening_and_refinement (const std::vector<const VECTOR *> &all_in)
+ SolutionTransfer<dim, VectorType, DH>::
+ prepare_for_coarsening_and_refinement (const std::vector<const VectorType *> &all_in)
{
input_vectors = all_in;
register_data_attach( get_data_size() * input_vectors.size() );
- template<int dim, typename VECTOR, class DH>
+ template<int dim, typename VectorType, class DH>
void
- SolutionTransfer<dim, VECTOR, DH>::
- register_data_attach(const std::size_t size)
+ SolutionTransfer<dim, VectorType, DH>::register_data_attach (const std::size_t size)
{
Assert(size > 0, ExcMessage("Please transfer at least one vector!"));
offset
= tria->register_data_attach(size,
- std_cxx11::bind(&SolutionTransfer<dim, VECTOR, DH>::pack_callback,
+ std_cxx11::bind(&SolutionTransfer<dim, VectorType, DH>::pack_callback,
this,
std_cxx11::_1,
std_cxx11::_2,
- template<int dim, typename VECTOR, class DH>
+ template<int dim, typename VectorType, class DH>
void
- SolutionTransfer<dim, VECTOR, DH>::
- prepare_for_coarsening_and_refinement (const VECTOR &in)
+ SolutionTransfer<dim, VectorType, DH>::
+ prepare_for_coarsening_and_refinement (const VectorType &in)
{
- std::vector<const VECTOR *> all_in(1, &in);
+ std::vector<const VectorType *> all_in(1, &in);
prepare_for_coarsening_and_refinement(all_in);
}
- template<int dim, typename VECTOR, class DH>
+ template<int dim, typename VectorType, class DH>
void
- SolutionTransfer<dim, VECTOR, DH>::
- prepare_serialization(const VECTOR &in)
+ SolutionTransfer<dim, VectorType, DH>::prepare_serialization (const VectorType &in)
{
- std::vector<const VECTOR *> all_in(1, &in);
+ std::vector<const VectorType *> all_in(1, &in);
prepare_serialization(all_in);
}
- template<int dim, typename VECTOR, class DH>
+ template<int dim, typename VectorType, class DH>
void
- SolutionTransfer<dim, VECTOR, DH>::
- prepare_serialization(const std::vector<const VECTOR *> &all_in)
+ SolutionTransfer<dim, VectorType, DH>::prepare_serialization
+ (const std::vector<const VectorType *> &all_in)
{
prepare_for_coarsening_and_refinement (all_in);
}
- template<int dim, typename VECTOR, class DH>
+ template<int dim, typename VectorType, class DH>
void
- SolutionTransfer<dim, VECTOR, DH>::
- deserialize(VECTOR &in)
+ SolutionTransfer<dim, VectorType, DH>::deserialize (VectorType &in)
{
- std::vector<VECTOR *> all_in(1, &in);
+ std::vector<VectorType *> all_in(1, &in);
deserialize(all_in);
}
- template<int dim, typename VECTOR, class DH>
+ template<int dim, typename VectorType, class DH>
void
- SolutionTransfer<dim, VECTOR, DH>::
- deserialize(std::vector<VECTOR *> &all_in)
+ SolutionTransfer<dim, VectorType, DH>::deserialize (std::vector<VectorType *> &all_in)
{
register_data_attach( get_data_size() * all_in.size() );
}
- template<int dim, typename VECTOR, class DH>
+ template<int dim, typename VectorType, class DH>
void
- SolutionTransfer<dim, VECTOR, DH>::
- interpolate (std::vector<VECTOR *> &all_out)
+ SolutionTransfer<dim, VectorType, DH>::interpolate (std::vector<VectorType *> &all_out)
{
Assert(input_vectors.size()==all_out.size(),
ExcDimensionMismatch(input_vectors.size(), all_out.size()) );
Assert (tria != 0, ExcInternalError());
tria->notify_ready_to_unpack(offset,
- std_cxx11::bind(&SolutionTransfer<dim, VECTOR, DH>::unpack_callback,
+ std_cxx11::bind(&SolutionTransfer<dim, VectorType, DH>::unpack_callback,
this,
std_cxx11::_1,
std_cxx11::_2,
std_cxx11::ref(all_out)));
- for (typename std::vector<VECTOR *>::iterator it=all_out.begin();
+ for (typename std::vector<VectorType *>::iterator it=all_out.begin();
it !=all_out.end();
++it)
(*it)->compress(::dealii::VectorOperation::insert);
- template<int dim, typename VECTOR, class DH>
+ template<int dim, typename VectorType, class DH>
void
- SolutionTransfer<dim, VECTOR, DH>::
- interpolate (VECTOR &out)
+ SolutionTransfer<dim, VectorType, DH>::interpolate (VectorType &out)
{
- std::vector<VECTOR *> all_out(1, &out);
+ std::vector<VectorType *> all_out(1, &out);
interpolate(all_out);
}
- template<int dim, typename VECTOR, class DH>
+ template<int dim, typename VectorType, class DH>
unsigned int
- SolutionTransfer<dim, VECTOR, DH>::
- get_data_size() const
+ SolutionTransfer<dim, VectorType, DH>::get_data_size() const
{
return sizeof(double)* DoFTools::max_dofs_per_cell(*dof_handler);
}
- template<int dim, typename VECTOR, class DH>
+ template<int dim, typename VectorType, class DH>
void
- SolutionTransfer<dim, VECTOR, DH>::
+ SolutionTransfer<dim, VectorType, DH>::
pack_callback(const typename Triangulation<dim,dim>::cell_iterator &cell_,
const typename Triangulation<dim,dim>::CellStatus /*status*/,
void *data)
{
- typename VECTOR::value_type *data_store = reinterpret_cast<typename VECTOR::value_type *>(data);
+ typename VectorType::value_type *data_store = reinterpret_cast<typename VectorType::value_type *>(data);
typename DH::cell_iterator cell(*cell_, dof_handler);
const unsigned int dofs_per_cell=cell->get_fe().dofs_per_cell;
- ::dealii::Vector<typename VECTOR::value_type> dofvalues(dofs_per_cell);
- for (typename std::vector<const VECTOR *>::iterator it=input_vectors.begin();
+ ::dealii::Vector<typename VectorType::value_type> dofvalues(dofs_per_cell);
+ for (typename std::vector<const VectorType *>::iterator it=input_vectors.begin();
it !=input_vectors.end();
++it)
{
cell->get_interpolated_dof_values(*(*it), dofvalues);
- Assert (typeid(typename VECTOR::value_type) == typeid(double), ExcNotImplemented());
- std::memcpy(data_store, &dofvalues(0), sizeof(typename VECTOR::value_type)*dofs_per_cell);
+ Assert (typeid(typename VectorType::value_type) == typeid(double), ExcNotImplemented());
+ std::memcpy(data_store, &dofvalues(0), sizeof(typename VectorType::value_type)*dofs_per_cell);
data_store += dofs_per_cell;
}
}
- template<int dim, typename VECTOR, class DH>
+ template<int dim, typename VectorType, class DH>
void
- SolutionTransfer<dim, VECTOR, DH>::
- unpack_callback(const typename Triangulation<dim,dim>::cell_iterator &cell_,
- const typename Triangulation<dim,dim>::CellStatus /*status*/,
- const void *data,
- std::vector<VECTOR *> &all_out)
+ SolutionTransfer<dim, VectorType, DH>::unpack_callback
+ (const typename Triangulation<dim,dim>::cell_iterator &cell_,
+ const typename Triangulation<dim,dim>::CellStatus /*status*/,
+ const void *data,
+ std::vector<VectorType *> &all_out)
{
typename DH::cell_iterator
cell(*cell_, dof_handler);
const unsigned int dofs_per_cell=cell->get_fe().dofs_per_cell;
- ::dealii::Vector<typename VECTOR::value_type> dofvalues(dofs_per_cell);
- const typename VECTOR::value_type *data_store = reinterpret_cast<const typename VECTOR::value_type *>(data);
+ ::dealii::Vector<typename VectorType::value_type> dofvalues(dofs_per_cell);
+ const typename VectorType::value_type *data_store = reinterpret_cast<const typename VectorType::value_type *>(data);
- for (typename std::vector<VECTOR *>::iterator it = all_out.begin();
+ for (typename std::vector<VectorType *>::iterator it = all_out.begin();
it != all_out.end();
++it)
{
- Assert (typeid(typename VECTOR::value_type) == typeid(double), ExcNotImplemented());
- std::memcpy(&dofvalues(0), data_store, sizeof(typename VECTOR::value_type)*dofs_per_cell);
+ Assert (typeid(typename VectorType::value_type) == typeid(double), ExcNotImplemented());
+ std::memcpy(&dofvalues(0), data_store, sizeof(typename VectorType::value_type)*dofs_per_cell);
cell->set_dof_values_by_interpolation(dofvalues, *(*it));
data_store += dofs_per_cell;
}
DEAL_II_NAMESPACE_OPEN
-template<int dim, int spacedim, class VECTOR, class DH>
-MappingFEField<dim,spacedim,VECTOR,DH>::InternalData::
-InternalData (const FiniteElement<dim,spacedim> &fe,
- const ComponentMask mask)
+template<int dim, int spacedim, typename VectorType, class DH>
+MappingFEField<dim,spacedim,VectorType,DH>::InternalData::InternalData
+(const FiniteElement<dim,spacedim> &fe,
+ const ComponentMask mask)
:
n_shape_functions (fe.dofs_per_cell),
mask (mask),
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
std::size_t
-MappingFEField<dim,spacedim,VECTOR,DH>::InternalData::
-memory_consumption () const
+MappingFEField<dim,spacedim,VectorType,DH>::InternalData::memory_consumption () const
{
Assert (false, ExcNotImplemented());
return 0;
-template<int dim, int spacedim, class DH, class VECTOR>
+template<int dim, int spacedim, class DH, typename VectorType>
double &
-MappingFEField<dim,spacedim,DH,VECTOR>::InternalData::
-shape (const unsigned int qpoint,
- const unsigned int shape_nr)
+MappingFEField<dim,spacedim,DH,VectorType>::InternalData::shape
+(const unsigned int qpoint,
+ const unsigned int shape_nr)
{
Assert(qpoint*n_shape_functions + shape_nr < shape_values.size(),
ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0,
}
-template<int dim, int spacedim, class DH, class VECTOR>
+template<int dim, int spacedim, class DH, typename VectorType>
const Tensor<1,dim> &
-MappingFEField<dim,spacedim,DH,VECTOR>::InternalData::
-derivative (const unsigned int qpoint,
- const unsigned int shape_nr) const
+MappingFEField<dim,spacedim,DH,VectorType>::InternalData::derivative
+(const unsigned int qpoint,
+ const unsigned int shape_nr) const
{
Assert(qpoint*n_shape_functions + shape_nr < shape_derivatives.size(),
ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0,
-template<int dim, int spacedim, class DH, class VECTOR>
+template<int dim, int spacedim, class DH, typename VectorType>
Tensor<1,dim> &
-MappingFEField<dim,spacedim,DH,VECTOR>::InternalData::
-derivative (const unsigned int qpoint,
- const unsigned int shape_nr)
+MappingFEField<dim,spacedim,DH,VectorType>::InternalData::derivative
+(const unsigned int qpoint,
+ const unsigned int shape_nr)
{
Assert(qpoint*n_shape_functions + shape_nr < shape_derivatives.size(),
ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0,
}
-template <int dim, int spacedim, class DH, class VECTOR>
+template <int dim, int spacedim, class DH, typename VectorType>
const Tensor<2,dim> &
-MappingFEField<dim,spacedim,DH,VECTOR>::InternalData::
-second_derivative (const unsigned int qpoint,
- const unsigned int shape_nr) const
+MappingFEField<dim,spacedim,DH,VectorType>::InternalData::second_derivative
+(const unsigned int qpoint,
+ const unsigned int shape_nr) const
{
Assert(qpoint*n_shape_functions + shape_nr < shape_second_derivatives.size(),
ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0,
-template <int dim, int spacedim, class DH, class VECTOR>
+template <int dim, int spacedim, class DH, typename VectorType>
Tensor<2,dim> &
-MappingFEField<dim,spacedim,DH,VECTOR>::InternalData::
-second_derivative (const unsigned int qpoint,
- const unsigned int shape_nr)
+MappingFEField<dim,spacedim,DH,VectorType>::InternalData::second_derivative
+(const unsigned int qpoint,
+ const unsigned int shape_nr)
{
Assert(qpoint*n_shape_functions + shape_nr < shape_second_derivatives.size(),
ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0,
}
-template <int dim, int spacedim, class DH, class VECTOR>
+template <int dim, int spacedim, class DH, typename VectorType>
const Tensor<3,dim> &
-MappingFEField<dim,spacedim,DH,VECTOR>::InternalData::
-third_derivative (const unsigned int qpoint,
- const unsigned int shape_nr) const
+MappingFEField<dim,spacedim,DH,VectorType>::InternalData::third_derivative
+(const unsigned int qpoint,
+ const unsigned int shape_nr) const
{
Assert(qpoint*n_shape_functions + shape_nr < shape_third_derivatives.size(),
ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0,
-template <int dim, int spacedim, class DH, class VECTOR>
+template <int dim, int spacedim, class DH, typename VectorType>
Tensor<3,dim> &
-MappingFEField<dim,spacedim,DH,VECTOR>::InternalData::
-third_derivative (const unsigned int qpoint,
- const unsigned int shape_nr)
+MappingFEField<dim,spacedim,DH,VectorType>::InternalData::third_derivative
+(const unsigned int qpoint,
+ const unsigned int shape_nr)
{
Assert(qpoint*n_shape_functions + shape_nr < shape_third_derivatives.size(),
ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0,
}
-template <int dim, int spacedim, class DH, class VECTOR>
+template <int dim, int spacedim, class DH, typename VectorType>
const Tensor<4,dim> &
-MappingFEField<dim,spacedim,DH,VECTOR>::InternalData::
-fourth_derivative (const unsigned int qpoint,
- const unsigned int shape_nr) const
+MappingFEField<dim,spacedim,DH,VectorType>::InternalData::fourth_derivative
+(const unsigned int qpoint,
+ const unsigned int shape_nr) const
{
Assert(qpoint*n_shape_functions + shape_nr < shape_fourth_derivatives.size(),
ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0,
-template <int dim, int spacedim, class DH, class VECTOR>
+template <int dim, int spacedim, class DH, typename VectorType>
Tensor<4,dim> &
-MappingFEField<dim,spacedim,DH,VECTOR>::InternalData::
-fourth_derivative (const unsigned int qpoint,
- const unsigned int shape_nr)
+MappingFEField<dim,spacedim,DH,VectorType>::InternalData::fourth_derivative
+(const unsigned int qpoint,
+ const unsigned int shape_nr)
{
Assert(qpoint*n_shape_functions + shape_nr < shape_fourth_derivatives.size(),
ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0,
-template<int dim, int spacedim, class VECTOR, class DH>
-MappingFEField<dim,spacedim,VECTOR,DH>::MappingFEField (const DH &euler_dof_handler,
- const VECTOR &euler_vector,
- const ComponentMask mask)
+template<int dim, int spacedim, typename VectorType, class DH>
+MappingFEField<dim,spacedim,VectorType,DH>::MappingFEField
+(const DH &euler_dof_handler,
+ const VectorType &euler_vector,
+ const ComponentMask mask)
:
euler_vector(&euler_vector),
fe(&euler_dof_handler.get_fe()),
}
-template<int dim, int spacedim, class VECTOR, class DH>
-MappingFEField<dim,spacedim,VECTOR,DH>::MappingFEField (const MappingFEField<dim,spacedim,VECTOR,DH> &mapping)
+template<int dim, int spacedim, typename VectorType, class DH>
+MappingFEField<dim,spacedim,VectorType,DH>::MappingFEField
+(const MappingFEField<dim,spacedim,VectorType,DH> &mapping)
:
euler_vector(mapping.euler_vector),
fe(mapping.fe),
-template<int dim, int spacedim, class DH, class VECTOR>
+template<int dim, int spacedim, class DH, typename VectorType>
inline
const double &
-MappingFEField<dim,spacedim,DH,VECTOR>::InternalData::shape (const unsigned int qpoint,
- const unsigned int shape_nr) const
+MappingFEField<dim,spacedim,DH,VectorType>::InternalData::shape
+(const unsigned int qpoint,
+ const unsigned int shape_nr) const
{
Assert(qpoint*n_shape_functions + shape_nr < shape_values.size(),
ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0,
-template <int dim, int spacedim, class DH, class VECTOR>
+template <int dim, int spacedim, class DH, typename VectorType>
bool
-MappingFEField<dim,spacedim,DH,VECTOR>::preserves_vertex_locations () const
+MappingFEField<dim,spacedim,DH,VectorType>::preserves_vertex_locations () const
{
return false;
}
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
void
-MappingFEField<dim,spacedim,VECTOR,DH>::
-compute_shapes_virtual (const std::vector<Point<dim> > &unit_points,
+MappingFEField<dim,spacedim,VectorType,DH>::
+compute_shapes_virtual (const std::vector<Point<dim> > &unit_points,
typename MappingFEField<dim, spacedim>::InternalData &data) const
{
const unsigned int n_points=unit_points.size();
}
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
UpdateFlags
-MappingFEField<dim,spacedim,VECTOR,DH>::requires_update_flags (const UpdateFlags in) const
+MappingFEField<dim,spacedim,VectorType,DH>::requires_update_flags (const UpdateFlags in) const
{
// add flags if the respective quantities are necessary to compute
// what we need. note that some flags appear in both conditions and
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
void
-MappingFEField<dim,spacedim,VECTOR,DH>::compute_data (const UpdateFlags update_flags,
- const Quadrature<dim> &q,
- const unsigned int n_original_q_points,
- InternalData &data) const
+MappingFEField<dim,spacedim,VectorType,DH>::compute_data
+(const UpdateFlags update_flags,
+ const Quadrature<dim> &q,
+ const unsigned int n_original_q_points,
+ InternalData &data) const
{
// store the flags in the internal data object so we can access them
// in fill_fe_*_values(). use the transitive hull of the required
}
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
void
-MappingFEField<dim,spacedim,VECTOR,DH>::compute_face_data (const UpdateFlags update_flags,
- const Quadrature<dim> &q,
- const unsigned int n_original_q_points,
- InternalData &data) const
+MappingFEField<dim,spacedim,VectorType,DH>::compute_face_data
+(const UpdateFlags update_flags,
+ const Quadrature<dim> &q,
+ const unsigned int n_original_q_points,
+ InternalData &data) const
{
compute_data (update_flags, q, n_original_q_points, data);
}
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
typename
-MappingFEField<dim,spacedim,VECTOR,DH>::InternalData *
-MappingFEField<dim,spacedim,VECTOR,DH>::get_data (const UpdateFlags update_flags,
- const Quadrature<dim> &quadrature) const
+MappingFEField<dim,spacedim,VectorType,DH>::InternalData *
+MappingFEField<dim,spacedim,VectorType,DH>::get_data (const UpdateFlags update_flags,
+ const Quadrature<dim> &quadrature) const
{
InternalData *data = new InternalData(*fe, fe_mask);
this->compute_data (update_flags, quadrature,
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
typename Mapping<dim,spacedim>::InternalDataBase *
-MappingFEField<dim,spacedim,VECTOR,DH>::get_face_data (const UpdateFlags update_flags,
- const Quadrature<dim-1>& quadrature) const
+MappingFEField<dim,spacedim,VectorType,DH>::get_face_data
+(const UpdateFlags update_flags,
+ const Quadrature<dim-1> &quadrature) const
{
InternalData *data = new InternalData(*fe, fe_mask);
const Quadrature<dim> q (QProjector<dim>::project_to_all_faces(quadrature));
}
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
typename Mapping<dim,spacedim>::InternalDataBase *
-MappingFEField<dim,spacedim,VECTOR,DH>::get_subface_data (const UpdateFlags update_flags,
- const Quadrature<dim-1>& quadrature) const
+MappingFEField<dim,spacedim,VectorType,DH>::get_subface_data
+(const UpdateFlags update_flags,
+ const Quadrature<dim-1> &quadrature) const
{
InternalData *data = new InternalData(*fe, fe_mask);
const Quadrature<dim> q (QProjector<dim>::project_to_all_subfaces(quadrature));
// Note that the CellSimilarity flag is modifiable, since MappingFEField can need to
// recalculate data even when cells are similar.
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
CellSimilarity::Similarity
-MappingFEField<dim,spacedim,VECTOR,DH>::
+MappingFEField<dim,spacedim,VectorType,DH>::
fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const CellSimilarity::Similarity cell_similarity,
const Quadrature<dim> &quadrature,
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
void
-MappingFEField<dim,spacedim,VECTOR,DH>::
+MappingFEField<dim,spacedim,VectorType,DH>::
fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
const Quadrature<dim-1> &quadrature,
}
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
void
-MappingFEField<dim,spacedim,VECTOR,DH>::
+MappingFEField<dim,spacedim,VectorType,DH>::
fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
const unsigned int subface_no,
namespace
{
- template<int dim, int spacedim, int rank, class VECTOR, class DH>
+ template<int dim, int spacedim, int rank, typename VectorType, class DH>
void
transform_fields(const VectorSlice<const std::vector<Tensor<rank,dim> > > input,
const MappingType mapping_type,
VectorSlice<std::vector<Tensor<rank,spacedim> > > output)
{
AssertDimension (input.size(), output.size());
- Assert ((dynamic_cast<const typename MappingFEField<dim,spacedim,VECTOR,DH>::InternalData *>(&mapping_data) != 0),
+ Assert ((dynamic_cast<const typename MappingFEField<dim,spacedim,VectorType,DH>::InternalData *>(&mapping_data) != 0),
ExcInternalError());
- const typename MappingFEField<dim,spacedim,VECTOR,DH>::InternalData
- &data = static_cast<const typename MappingFEField<dim,spacedim,VECTOR,DH>::InternalData &>(mapping_data);
+ const typename MappingFEField<dim,spacedim,VectorType,DH>::InternalData
+ &data = static_cast<const typename MappingFEField<dim,spacedim,VectorType,DH>::InternalData &>(mapping_data);
switch (mapping_type)
{
}
- template<int dim, int spacedim, int rank, class VECTOR, class DH>
+ template<int dim, int spacedim, int rank, typename VectorType, class DH>
void
- transform_differential_forms(const VectorSlice<const std::vector<DerivativeForm<rank, dim,spacedim> > > input,
- const MappingType mapping_type,
- const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
- VectorSlice<std::vector<Tensor<rank+1, spacedim> > > output)
+ transform_differential_forms(const VectorSlice<const std::vector<DerivativeForm<rank, dim,spacedim> > > input,
+ const MappingType mapping_type,
+ const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
+ VectorSlice<std::vector<Tensor<rank+1, spacedim> > > output)
{
AssertDimension (input.size(), output.size());
- Assert ((dynamic_cast<const typename MappingFEField<dim,spacedim,VECTOR,DH>::InternalData *>(&mapping_data) != 0),
+ Assert ((dynamic_cast<const typename MappingFEField<dim,spacedim,VectorType,DH>::InternalData *>(&mapping_data) != 0),
ExcInternalError());
- const typename MappingFEField<dim,spacedim,VECTOR,DH>::InternalData
- &data = static_cast<const typename MappingFEField<dim,spacedim,VECTOR,DH>::InternalData &>(mapping_data);
+ const typename MappingFEField<dim,spacedim,VectorType,DH>::InternalData
+ &data = static_cast<const typename MappingFEField<dim,spacedim,VectorType,DH>::InternalData &>(mapping_data);
switch (mapping_type)
{
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
void
-MappingFEField<dim,spacedim,VECTOR,DH>::
+MappingFEField<dim,spacedim,VectorType,DH>::
transform (const VectorSlice<const std::vector<Tensor<1,dim> > > input,
const MappingType mapping_type,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
{
AssertDimension (input.size(), output.size());
- transform_fields<dim,spacedim,1,VECTOR,DH>(input, mapping_type, mapping_data, output);
+ transform_fields<dim,spacedim,1,VectorType,DH>(input, mapping_type, mapping_data, output);
}
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
void
-MappingFEField<dim,spacedim,VECTOR,DH>::
+MappingFEField<dim,spacedim,VectorType,DH>::
transform (const VectorSlice<const std::vector<DerivativeForm<1, dim ,spacedim> > > input,
const MappingType mapping_type,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
{
AssertDimension (input.size(), output.size());
- transform_differential_forms<dim,spacedim,1,VECTOR,DH>(input, mapping_type, mapping_data, output);
+ transform_differential_forms<dim,spacedim,1,VectorType,DH>(input, mapping_type, mapping_data, output);
}
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
void
-MappingFEField<dim,spacedim,VECTOR,DH>::
+MappingFEField<dim,spacedim,VectorType,DH>::
transform (const VectorSlice<const std::vector<Tensor<2, dim> > > input,
const MappingType,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
void
-MappingFEField<dim,spacedim,VECTOR,DH>::
+MappingFEField<dim,spacedim,VectorType,DH>::
transform (const VectorSlice<const std::vector< DerivativeForm<2, dim, spacedim> > > input,
const MappingType mapping_type,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
void
-MappingFEField<dim,spacedim,VECTOR,DH>::
+MappingFEField<dim,spacedim,VectorType,DH>::
transform (const VectorSlice<const std::vector< Tensor<3,dim> > > input,
const MappingType /*mapping_type*/,
const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
Point<spacedim>
-MappingFEField<dim,spacedim,VECTOR,DH>::
+MappingFEField<dim,spacedim,VectorType,DH>::
transform_unit_to_real_cell (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const Point<dim> &p) const
+ const Point<dim> &p) const
{
// Use the get_data function to create an InternalData with data vectors of
// the right size and transformation shape values already computed at point
}
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
Point<spacedim>
-MappingFEField<dim,spacedim,VECTOR,DH>::
+MappingFEField<dim,spacedim,VectorType,DH>::
do_transform_unit_to_real_cell (const InternalData &data) const
{
Point<spacedim> p_real;
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
Point<dim>
-MappingFEField<dim,spacedim,VECTOR,DH>::
+MappingFEField<dim,spacedim,VectorType,DH>::
transform_real_to_unit_cell (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const Point<spacedim> &p) const
+ const Point<spacedim> &p) const
{
// first a Newton iteration based on the real mapping. It uses the center
// point of the cell as a starting point
}
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
Point<dim>
-MappingFEField<dim,spacedim,VECTOR,DH>::
+MappingFEField<dim,spacedim,VectorType,DH>::
do_transform_real_to_unit_cell
(const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const Point<spacedim> &p,
- const Point<dim> &initial_p_unit,
- InternalData &mdata) const
+ const Point<spacedim> &p,
+ const Point<dim> &initial_p_unit,
+ InternalData &mdata) const
{
const unsigned int n_shapes=mdata.shape_values.size();
(void)n_shapes;
}
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
unsigned int
-MappingFEField<dim,spacedim,VECTOR,DH>::get_degree() const
+MappingFEField<dim,spacedim,VectorType,DH>::get_degree() const
{
return fe->degree;
}
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
ComponentMask
-MappingFEField<dim,spacedim,VECTOR,DH>::get_component_mask() const
+MappingFEField<dim,spacedim,VectorType,DH>::get_component_mask() const
{
return this->fe_mask;
}
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
Mapping<dim,spacedim> *
-MappingFEField<dim,spacedim,VECTOR,DH>::clone () const
+MappingFEField<dim,spacedim,VectorType,DH>::clone () const
{
- return new MappingFEField<dim,spacedim,VECTOR,DH>(*this);
+ return new MappingFEField<dim,spacedim,VectorType,DH>(*this);
}
-template<int dim, int spacedim, class VECTOR, class DH>
+template<int dim, int spacedim, typename VectorType, class DH>
void
-MappingFEField<dim,spacedim,VECTOR,DH>::update_internal_dofs (
- const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const typename MappingFEField<dim, spacedim>::InternalData &data) const
+MappingFEField<dim,spacedim,VectorType,DH>::update_internal_dofs
+(const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+ const typename MappingFEField<dim, spacedim>::InternalData &data) const
{
Assert(euler_dof_handler != 0, ExcMessage("euler_dof_handler is empty"));
DEAL_II_NAMESPACE_OPEN
-template <class VECTOR>
-MGTransferBase<VECTOR>::~MGTransferBase()
+template <typename VectorType>
+MGTransferBase<VectorType>::~MGTransferBase()
{}
-template <class VECTOR>
-MGMatrixBase<VECTOR>::~MGMatrixBase()
+template <typename VectorType>
+MGMatrixBase<VectorType>::~MGMatrixBase()
{}
-template <class VECTOR>
-MGSmootherBase<VECTOR>::~MGSmootherBase()
+template <typename VectorType>
+MGSmootherBase<VectorType>::~MGSmootherBase()
{}
-template <class VECTOR>
-MGCoarseGridBase<VECTOR>::~MGCoarseGridBase()
+template <typename VectorType>
+MGCoarseGridBase<VectorType>::~MGCoarseGridBase()
{}
DEAL_II_NAMESPACE_OPEN
-template<class VECTOR>
-MGTransferPrebuilt<VECTOR>::MGTransferPrebuilt ()
+template<typename VectorType>
+MGTransferPrebuilt<VectorType>::MGTransferPrebuilt ()
{}
-template<class VECTOR>
-MGTransferPrebuilt<VECTOR>::MGTransferPrebuilt (const ConstraintMatrix &c, const MGConstrainedDoFs &mg_c)
+template<typename VectorType>
+MGTransferPrebuilt<VectorType>::MGTransferPrebuilt (const ConstraintMatrix &c, const MGConstrainedDoFs &mg_c)
:
constraints(&c),
mg_constrained_dofs(&mg_c)
{}
-template <class VECTOR>
-MGTransferPrebuilt<VECTOR>::~MGTransferPrebuilt ()
+template <typename VectorType>
+MGTransferPrebuilt<VectorType>::~MGTransferPrebuilt ()
{}
-template <class VECTOR>
-void MGTransferPrebuilt<VECTOR>::initialize_constraints (
- const ConstraintMatrix &c, const MGConstrainedDoFs &mg_c)
+template <typename VectorType>
+void MGTransferPrebuilt<VectorType>::initialize_constraints
+(const ConstraintMatrix &c, const MGConstrainedDoFs &mg_c)
{
constraints = &c;
mg_constrained_dofs = &mg_c;
}
-template <class VECTOR>
-void MGTransferPrebuilt<VECTOR>::clear ()
+template <typename VectorType>
+void MGTransferPrebuilt<VectorType>::clear ()
{
sizes.resize(0);
prolongation_matrices.resize(0);
}
-template <class VECTOR>
-void MGTransferPrebuilt<VECTOR>::prolongate (
- const unsigned int to_level,
- VECTOR &dst,
- const VECTOR &src) const
+template <typename VectorType>
+void MGTransferPrebuilt<VectorType>::prolongate (const unsigned int to_level,
+ VectorType &dst,
+ const VectorType &src) const
{
Assert ((to_level >= 1) && (to_level<=prolongation_matrices.size()),
ExcIndexRange (to_level, 1, prolongation_matrices.size()+1));
}
-template <class VECTOR>
-void MGTransferPrebuilt<VECTOR>::restrict_and_add (
- const unsigned int from_level,
- VECTOR &dst,
- const VECTOR &src) const
+template <typename VectorType>
+void MGTransferPrebuilt<VectorType>::restrict_and_add (const unsigned int from_level,
+ VectorType &dst,
+ const VectorType &src) const
{
Assert ((from_level >= 1) && (from_level<=prolongation_matrices.size()),
ExcIndexRange (from_level, 1, prolongation_matrices.size()+1));
}
-template <typename VECTOR>
+template <typename VectorType>
template <int dim, int spacedim>
-void MGTransferPrebuilt<VECTOR>::build_matrices (
- const DoFHandler<dim,spacedim> &mg_dof)
+void MGTransferPrebuilt<VectorType>::build_matrices
+(const DoFHandler<dim,spacedim> &mg_dof)
{
const unsigned int n_levels = mg_dof.get_tria().n_global_levels();
const unsigned int dofs_per_cell = mg_dof.get_fe().dofs_per_cell;
for (unsigned int i=0; i<n_levels-1; ++i)
{
prolongation_sparsities.push_back
- (std_cxx11::shared_ptr<typename internal::MatrixSelector<VECTOR>::Sparsity> (new typename internal::MatrixSelector<VECTOR>::Sparsity));
+ (std_cxx11::shared_ptr<typename internal::MatrixSelector<VectorType>::Sparsity> (new typename internal::MatrixSelector<VectorType>::Sparsity));
prolongation_matrices.push_back
- (std_cxx11::shared_ptr<typename internal::MatrixSelector<VECTOR>::Matrix> (new typename internal::MatrixSelector<VECTOR>::Matrix));
+ (std_cxx11::shared_ptr<typename internal::MatrixSelector<VectorType>::Matrix> (new typename internal::MatrixSelector<VectorType>::Matrix));
}
// two fields which will store the
}
}
- internal::MatrixSelector<VECTOR>::reinit(*prolongation_matrices[level],
- *prolongation_sparsities[level],
- level,
- dsp,
- mg_dof);
+ internal::MatrixSelector<VectorType>::reinit(*prolongation_matrices[level],
+ *prolongation_sparsities[level],
+ level,
+ dsp,
+ mg_dof);
dsp.reinit(0,0);
FullMatrix<double> prolongation;
};
}
-template <class VECTOR>
+template <typename VectorType>
template <int dim, int spacedim>
void
-MGTransferPrebuilt<VECTOR>::fill_and_communicate_copy_indices(
- const DoFHandler<dim,spacedim> &mg_dof)
+MGTransferPrebuilt<VectorType>::fill_and_communicate_copy_indices
+(const DoFHandler<dim,spacedim> &mg_dof)
{
// Now we are filling the variables copy_indices*, which are essentially
// maps from global to mgdof for each level stored as a std::vector of
std::sort(copy_indices_global_mine[level].begin(), copy_indices_global_mine[level].end(), compare);
}
-template <class VECTOR>
+template <typename VectorType>
void
-MGTransferPrebuilt<VECTOR>::print_matrices (std::ostream &os) const
+MGTransferPrebuilt<VectorType>::print_matrices (std::ostream &os) const
{
for (unsigned int level = 0; level<prolongation_matrices.size(); ++level)
{
}
}
-template <class VECTOR>
+template <typename VectorType>
void
-MGTransferPrebuilt<VECTOR>::print_indices (std::ostream &os) const
+MGTransferPrebuilt<VectorType>::print_indices (std::ostream &os) const
{
for (unsigned int level = 0; level<copy_indices.size(); ++level)
{
- template <class DH, class VectorType>
+ template <class DH, typename VectorType>
DataEntry<DH,VectorType>::
DataEntry (const DH *dofs,
const VectorType *data,
- template <class DH, class VectorType>
+ template <class DH, typename VectorType>
DataEntry<DH,VectorType>::
DataEntry (const DH *dofs,
const VectorType *data,
namespace
{
- template <class VectorType>
+ template <typename VectorType>
double
- get_vector_element (const VectorType &vector,
- const unsigned int cell_number)
+ get_vector_element (const VectorType &vector,
+ const unsigned int cell_number)
{
return vector[cell_number];
}
- template <class DH, class VectorType>
+ template <class DH, typename VectorType>
double
DataEntry<DH,VectorType>::
get_cell_data_value (const unsigned int cell_number) const
- template <class DH, class VectorType>
+ template <class DH, typename VectorType>
void
- DataEntry<DH,VectorType>::
- get_function_values (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<dealii::Vector<double> > &patch_values_system) const
+ DataEntry<DH,VectorType>::get_function_values
+ (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
+ std::vector<dealii::Vector<double> > &patch_values_system) const
{
// FIXME: FEValuesBase gives us data in types that match that of
// the solution vector. but this function needs to pass it back
template <class DH, typename VectorType>
void
- DataEntry<DH,VectorType>::
- get_function_values (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<double> &patch_values) const
+ DataEntry<DH,VectorType>::get_function_values
+ (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
+ std::vector<double> &patch_values) const
{
// FIXME: FEValuesBase gives us data in types that match that of
// the solution vector. but this function needs to pass it back
- template <class DH, class VectorType>
+ template <class DH, typename VectorType>
void
- DataEntry<DH,VectorType>::
- get_function_gradients (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<std::vector<Tensor<1,DH::space_dimension> > > &patch_gradients_system) const
+ DataEntry<DH,VectorType>::get_function_gradients
+ (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
+ std::vector<std::vector<Tensor<1,DH::space_dimension> > > &patch_gradients_system) const
{
// FIXME: FEValuesBase gives us data in types that match that of
// the solution vector. but this function needs to pass it back
template <class DH, typename VectorType>
void
- DataEntry<DH,VectorType>::
- get_function_gradients (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<Tensor<1,DH::space_dimension> > &patch_gradients) const
+ DataEntry<DH,VectorType>::get_function_gradients
+ (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
+ std::vector<Tensor<1,DH::space_dimension> > &patch_gradients) const
{
// FIXME: FEValuesBase gives us data in types that match that of
// the solution vector. but this function needs to pass it back
- template <class DH, class VectorType>
+ template <class DH, typename VectorType>
void
- DataEntry<DH,VectorType>::
- get_function_hessians (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<std::vector<Tensor<2,DH::space_dimension> > > &patch_hessians_system) const
+ DataEntry<DH,VectorType>::get_function_hessians
+ (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
+ std::vector<std::vector<Tensor<2,DH::space_dimension> > > &patch_hessians_system) const
{
// FIXME: FEValuesBase gives us data in types that match that of
// the solution vector. but this function needs to pass it back
template <class DH, typename VectorType>
void
- DataEntry<DH,VectorType>::
- get_function_hessians (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
- std::vector<Tensor<2,DH::space_dimension> > &patch_hessians) const
+ DataEntry<DH,VectorType>::get_function_hessians
+ (const FEValuesBase<DH::dimension,DH::space_dimension> &fe_patch_values,
+ std::vector<Tensor<2,DH::space_dimension> > &patch_hessians) const
{
// FIXME: FEValuesBase gives us data in types that match that of
// the solution vector. but this function needs to pass it back
- template <class DH, class VectorType>
+ template <class DH, typename VectorType>
void
DataEntry<DH,VectorType>::clear ()
{
template <class DH,
int patch_dim, int patch_space_dim>
-template <class VECTOR>
+template <typename VectorType>
void
DataOut_DoFData<DH,patch_dim,patch_space_dim>::
-add_data_vector (const VECTOR &vec,
+add_data_vector (const VectorType &vec,
const std::string &name,
const DataVectorType type,
const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation)
template <class DH,
int patch_dim, int patch_space_dim>
-template <class VECTOR>
+template <typename VectorType>
void
DataOut_DoFData<DH,patch_dim,patch_space_dim>::
-add_data_vector (const VECTOR &vec,
+add_data_vector (const VectorType &vec,
const std::vector<std::string> &names,
const DataVectorType type,
const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation_)
}
internal::DataOut::DataEntryBase<DH> *new_entry
- = new internal::DataOut::DataEntry<DH,VECTOR>(dofs, &vec, names,
- data_component_interpretation);
+ = new internal::DataOut::DataEntry<DH,VectorType>(dofs, &vec, names,
+ data_component_interpretation);
if (actual_type == type_dof_data)
dof_data.push_back (std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DH> >(new_entry));
else
template <class DH,
int patch_dim, int patch_space_dim>
-template <class VECTOR>
+template <typename VectorType>
void
DataOut_DoFData<DH,patch_dim,patch_space_dim>::
-add_data_vector (const VECTOR &vec,
+add_data_vector (const VectorType &vec,
const DataPostprocessor<DH::space_dimension> &data_postprocessor)
{
// this is a specialized version of the other function where we have a
dofs->get_tria().n_active_cells()));
internal::DataOut::DataEntryBase<DH> *new_entry
- = new internal::DataOut::DataEntry<DH,VECTOR>(dofs, &vec, &data_postprocessor);
+ = new internal::DataOut::DataEntry<DH,VectorType>(dofs, &vec, &data_postprocessor);
dof_data.push_back (std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DH> >(new_entry));
}
template <class DH,
int patch_dim, int patch_space_dim>
-template <class VECTOR>
+template <typename VectorType>
void
DataOut_DoFData<DH,patch_dim,patch_space_dim>::
add_data_vector (const DH &dof_handler,
- const VECTOR &vec,
+ const VectorType &vec,
const DataPostprocessor<DH::space_dimension> &data_postprocessor)
{
// this is a specialized version of the other function where we have a
AssertDimension (vec.size(), dof_handler.n_dofs());
internal::DataOut::DataEntryBase<DH> *new_entry
- = new internal::DataOut::DataEntry<DH,VECTOR>(&dof_handler, &vec, &data_postprocessor);
+ = new internal::DataOut::DataEntry<DH,VectorType>(&dof_handler, &vec, &data_postprocessor);
dof_data.push_back (std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DH> >(new_entry));
}
template <class DH,
int patch_dim, int patch_space_dim>
-template <class VECTOR>
+template <typename VectorType>
void
DataOut_DoFData<DH,patch_dim,patch_space_dim>::
add_data_vector (const DH &dof_handler,
- const VECTOR &data,
+ const VectorType &data,
const std::string &name,
const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation)
{
template <class DH,
int patch_dim, int patch_space_dim>
-template <class VECTOR>
+template <typename VectorType>
void
DataOut_DoFData<DH,patch_dim,patch_space_dim>::
add_data_vector (const DH &dof_handler,
- const VECTOR &data,
+ const VectorType &data,
const std::vector<std::string> &names,
const std::vector<DataComponentInterpretation::DataComponentInterpretation> &data_component_interpretation_)
{
(names.size(), DataComponentInterpretation::component_is_scalar));
internal::DataOut::DataEntryBase<DH> *new_entry
- = new internal::DataOut::DataEntry<DH,VECTOR>(&dof_handler, &data, names,
- data_component_interpretation);
+ = new internal::DataOut::DataEntry<DH,VectorType>(&dof_handler, &data, names,
+ data_component_interpretation);
dof_data.push_back (std_cxx11::shared_ptr<internal::DataOut::DataEntryBase<DH> >(new_entry));
}
template <int dim>
-template <class VECTOR>
+template <typename VectorType>
void PointValueHistory<dim>
-::evaluate_field (const std::string &vector_name, const VECTOR &solution)
+::evaluate_field (const std::string &vector_name, const VectorType &solution)
{
// must be closed to add data to internal
// members.
template <int dim>
-template <class VECTOR>
+template <typename VectorType>
void PointValueHistory<dim>
-::evaluate_field(const std::vector <std::string> &vector_names, const VECTOR &solution, const DataPostprocessor< dim> &data_postprocessor, const Quadrature<dim> &quadrature)
+::evaluate_field (const std::vector <std::string> &vector_names,
+ const VectorType &solution,
+ const DataPostprocessor< dim> &data_postprocessor,
+ const Quadrature<dim> &quadrature)
{
// must be closed to add data to internal
// members.
{
// Extract data for the
// PostProcessor object
- std::vector< typename VECTOR::value_type > uh (n_quadrature_points, 0.0);
- std::vector< Tensor< 1, dim, typename VECTOR::value_type > > duh (n_quadrature_points, Tensor <1, dim, typename VECTOR::value_type> ());
- std::vector< Tensor< 2, dim, typename VECTOR::value_type > > dduh (n_quadrature_points, Tensor <2, dim, typename VECTOR::value_type> ());
+ std::vector< typename VectorType::value_type > uh (n_quadrature_points, 0.0);
+ std::vector< Tensor< 1, dim, typename VectorType::value_type > > duh (n_quadrature_points, Tensor <1, dim, typename VectorType::value_type> ());
+ std::vector< Tensor< 2, dim, typename VectorType::value_type > > dduh (n_quadrature_points, Tensor <2, dim, typename VectorType::value_type> ());
std::vector<Point<dim> > dummy_normals (1, Point<dim> ());
std::vector<Point<dim> > evaluation_points;
// at each point there is
// Call compute_derived_quantities_vector
// or compute_derived_quantities_scalar
- // TODO this function should also operate with typename VECTOR::value_type
+ // TODO this function should also operate with typename VectorType::value_type
data_postprocessor.
compute_derived_quantities_scalar(std::vector< double > (1, uh[selected_point]),
std::vector< Tensor< 1, dim > > (1, Tensor< 1, dim >(duh[selected_point]) ),
else // The case of a vector FE
{
// Extract data for the PostProcessor object
- std::vector< Vector< typename VECTOR::value_type > > uh (n_quadrature_points, Vector <typename VECTOR::value_type> (n_components));
- std::vector< std::vector< Tensor< 1, dim, typename VECTOR::value_type > > > duh (n_quadrature_points, std::vector< Tensor< 1, dim, typename VECTOR::value_type > > (n_components, Tensor< 1, dim, typename VECTOR::value_type >()));
- std::vector< std::vector< Tensor< 2, dim, typename VECTOR::value_type > > > dduh (n_quadrature_points, std::vector< Tensor< 2, dim, typename VECTOR::value_type > > (n_components, Tensor< 2, dim, typename VECTOR::value_type >()));
+ std::vector< Vector< typename VectorType::value_type > > uh (n_quadrature_points, Vector <typename VectorType::value_type> (n_components));
+ std::vector< std::vector< Tensor< 1, dim, typename VectorType::value_type > > > duh (n_quadrature_points, std::vector< Tensor< 1, dim, typename VectorType::value_type > > (n_components, Tensor< 1, dim, typename VectorType::value_type >()));
+ std::vector< std::vector< Tensor< 2, dim, typename VectorType::value_type > > > dduh (n_quadrature_points, std::vector< Tensor< 2, dim, typename VectorType::value_type > > (n_components, Tensor< 2, dim, typename VectorType::value_type >()));
std::vector<Point<dim> > dummy_normals (1, Point<dim> ());
std::vector<Point<dim> > evaluation_points;
// at each point there is
// FIXME: We need tmp vectors below because the data
// postprocessors are not equipped to deal with anything but
// doubles (scalars and tensors).
- const Vector< typename VECTOR::value_type > &uh_s = uh[selected_point];
- const std::vector< Tensor< 1, dim, typename VECTOR::value_type > > &duh_s = duh[selected_point];
- const std::vector< Tensor< 2, dim, typename VECTOR::value_type > > &dduh_s = dduh[selected_point];
+ const Vector< typename VectorType::value_type > &uh_s = uh[selected_point];
+ const std::vector< Tensor< 1, dim, typename VectorType::value_type > > &duh_s = duh[selected_point];
+ const std::vector< Tensor< 2, dim, typename VectorType::value_type > > &dduh_s = dduh[selected_point];
std::vector< Tensor< 1, dim > > tmp_d (duh_s.size());
for (unsigned int i = 0; i < duh_s.size(); i++)
tmp_d[i] = duh_s[i];
template <int dim>
-template <class VECTOR>
+template <typename VectorType>
void PointValueHistory<dim>
-::evaluate_field(const std::string &vector_name, const VECTOR &solution, const DataPostprocessor<dim> &data_postprocessor, const Quadrature<dim> &quadrature)
+::evaluate_field (const std::string &vector_name,
+ const VectorType &solution,
+ const DataPostprocessor<dim> &data_postprocessor,
+ const Quadrature<dim> &quadrature)
{
std::vector <std::string> vector_names;
vector_names.push_back (vector_name);
template <int dim>
-template <class VECTOR>
+template <typename VectorType>
void PointValueHistory<dim>
-::evaluate_field_at_requested_location(const std::string &vector_name, const VECTOR &solution)
+::evaluate_field_at_requested_location (const std::string &vector_name,
+ const VectorType &solution)
{
// must be closed to add data to internal
// members.
DEAL_II_NAMESPACE_CLOSE
-
-template<int dim, typename VECTOR, class DH>
-SolutionTransfer<dim, VECTOR, DH>::SolutionTransfer(const DH &dof)
+template<int dim, typename VectorType, class DH>
+SolutionTransfer<dim, VectorType, DH>::SolutionTransfer(const DH &dof)
:
dof_handler(&dof, typeid(*this).name()),
n_dofs_old(0),
-template<int dim, typename VECTOR, class DH>
-SolutionTransfer<dim, VECTOR, DH>::~SolutionTransfer()
+template<int dim, typename VectorType, class DH>
+SolutionTransfer<dim, VectorType, DH>::~SolutionTransfer()
{
clear ();
}
-template<int dim, typename VECTOR, class DH>
-void SolutionTransfer<dim, VECTOR, DH>::clear ()
+template<int dim, typename VectorType, class DH>
+void SolutionTransfer<dim, VectorType, DH>::clear ()
{
indices_on_cell.clear();
dof_values_on_cell.clear();
-template<int dim, typename VECTOR, class DH>
-void SolutionTransfer<dim, VECTOR, DH>::prepare_for_pure_refinement()
+template<int dim, typename VectorType, class DH>
+void SolutionTransfer<dim, VectorType, DH>::prepare_for_pure_refinement()
{
Assert(prepared_for!=pure_refinement, ExcAlreadyPrepForRef());
Assert(prepared_for!=coarsening_and_refinement,
-template<int dim, typename VECTOR, class DH>
+template<int dim, typename VectorType, class DH>
void
-SolutionTransfer<dim, VECTOR, DH>::refine_interpolate(const VECTOR &in,
- VECTOR &out) const
+SolutionTransfer<dim, VectorType, DH>::refine_interpolate (const VectorType &in,
+ VectorType &out) const
{
Assert(prepared_for==pure_refinement, ExcNotPrepared());
Assert(in.size()==n_dofs_old, ExcDimensionMismatch(in.size(),n_dofs_old));
ExcMessage ("Vectors cannot be used as input and output"
" at the same time!"));
- Vector<typename VECTOR::value_type> local_values(0);
+ Vector<typename VectorType::value_type> local_values(0);
typename DH::cell_iterator cell = dof_handler->begin(),
endc = dof_handler->end();
-template<int dim, typename VECTOR, class DH>
+template<int dim, typename VectorType, class DH>
void
-SolutionTransfer<dim, VECTOR, DH>::
-prepare_for_coarsening_and_refinement(const std::vector<VECTOR> &all_in)
+SolutionTransfer<dim, VectorType, DH>::
+prepare_for_coarsening_and_refinement(const std::vector<VectorType> &all_in)
{
Assert (prepared_for!=pure_refinement, ExcAlreadyPrepForRef());
Assert (prepared_for!=coarsening_and_refinement,
std::vector<std::vector<types::global_dof_index> >(n_cells_to_stay_or_refine)
.swap(indices_on_cell);
- std::vector<std::vector<Vector<typename VECTOR::value_type> > >
+ std::vector<std::vector<Vector<typename VectorType::value_type> > >
(n_coarsen_fathers,
- std::vector<Vector<typename VECTOR::value_type> > (in_size))
+ std::vector<Vector<typename VectorType::value_type> > (in_size))
.swap(dof_values_on_cell);
Table<2,FullMatrix<double> > interpolation_hp;
const unsigned int dofs_per_cell=cell->get_dof_handler().get_fe()[target_fe_index].dofs_per_cell;
- std::vector<Vector<typename VECTOR::value_type> >(in_size,
- Vector<typename VECTOR::value_type>(dofs_per_cell))
+ std::vector<Vector<typename VectorType::value_type> >(in_size,
+ Vector<typename VectorType::value_type>(dofs_per_cell))
.swap(dof_values_on_cell[n_cf]);
-template<int dim, typename VECTOR, class DH>
+template<int dim, typename VectorType, class DH>
void
-SolutionTransfer<dim, VECTOR, DH>::prepare_for_coarsening_and_refinement(const VECTOR &in)
+SolutionTransfer<dim, VectorType, DH>::prepare_for_coarsening_and_refinement (const VectorType &in)
{
- std::vector<VECTOR> all_in=std::vector<VECTOR>(1, in);
+ std::vector<VectorType> all_in=std::vector<VectorType>(1, in);
prepare_for_coarsening_and_refinement(all_in);
}
-template<int dim, typename VECTOR, class DH>
-void SolutionTransfer<dim, VECTOR, DH>::
-interpolate (const std::vector<VECTOR> &all_in,
- std::vector<VECTOR> &all_out) const
+template<int dim, typename VectorType, class DH>
+void SolutionTransfer<dim, VectorType, DH>::
+interpolate (const std::vector<VectorType> &all_in,
+ std::vector<VectorType> &all_out) const
{
Assert(prepared_for==coarsening_and_refinement, ExcNotPrepared());
const unsigned int size=all_in.size();
ExcMessage ("Vectors cannot be used as input and output"
" at the same time!"));
- Vector<typename VECTOR::value_type> local_values;
+ Vector<typename VectorType::value_type> local_values;
std::vector<types::global_dof_index> dofs;
typename std::map<std::pair<unsigned int, unsigned int>, Pointerstruct>::const_iterator
Table<2,FullMatrix<double> > interpolation_hp;
internal::extract_interpolation_matrices (*dof_handler, interpolation_hp);
- Vector<typename VECTOR::value_type> tmp, tmp2;
+ Vector<typename VectorType::value_type> tmp, tmp2;
typename DH::cell_iterator cell = dof_handler->begin(),
endc = dof_handler->end();
const std::vector<types::global_dof_index> *const indexptr
=pointerstruct->second.indices_ptr;
- const std::vector<Vector<typename VECTOR::value_type> > *const valuesptr
+ const std::vector<Vector<typename VectorType::value_type> > *const valuesptr
=pointerstruct->second.dof_values_ptr;
// cell stayed as it was or was refined
// test we would have to
// store the fe_index of all
// cells
- const Vector<typename VECTOR::value_type> *data = 0;
+ const Vector<typename VectorType::value_type> *data = 0;
const unsigned int active_fe_index = cell->active_fe_index();
if (active_fe_index != pointerstruct->second.active_fe_index)
{
-template<int dim, typename VECTOR, class DH>
-void SolutionTransfer<dim, VECTOR, DH>::interpolate(const VECTOR &in,
- VECTOR &out) const
+template<int dim, typename VectorType, class DH>
+void SolutionTransfer<dim, VectorType, DH>::interpolate (const VectorType &in,
+ VectorType &out) const
{
Assert (in.size()==n_dofs_old,
ExcDimensionMismatch(in.size(), n_dofs_old));
Assert (out.size()==dof_handler->n_dofs(),
ExcDimensionMismatch(out.size(), dof_handler->n_dofs()));
- std::vector<VECTOR> all_in(1);
+ std::vector<VectorType> all_in(1);
all_in[0] = in;
- std::vector<VECTOR> all_out(1);
+ std::vector<VectorType> all_out(1);
all_out[0] = out;
interpolate(all_in,
all_out);
-template<int dim, typename VECTOR, class DH>
+template<int dim, typename VectorType, class DH>
std::size_t
-SolutionTransfer<dim, VECTOR, DH>::memory_consumption () const
+SolutionTransfer<dim, VectorType, DH>::memory_consumption () const
{
// at the moment we do not include the memory
// consumption of the cell_map as we have no
-template<int dim, typename VECTOR, class DH>
+template<int dim, typename VectorType, class DH>
std::size_t
-SolutionTransfer<dim, VECTOR, DH>::Pointerstruct::memory_consumption () const
+SolutionTransfer<dim, VectorType, DH>::Pointerstruct::memory_consumption () const
{
return sizeof(*this);
}
mg::Matrix<VectorType> mgmatrix(level_matrices);
Multigrid<VectorType> mg1(minlevel, maxlevel, mgmatrix, all, all, all, all,
- Multigrid<VectorType>::v_cycle);
+ Multigrid<VectorType>::v_cycle);
mg1.set_debug(3);
for (unsigned int i=minlevel; i<=maxlevel; ++i)
mg1.defect[i].reinit(N);
template<class SOLVER, class MATRIX, typename VectorType, class PRECONDITION>
void
check_solve(SOLVER &solver,
- const SolverControl &solver_control,
- const MATRIX &A,
- VectorType &u,
- VectorType &f,
- const PRECONDITION &P)
+ const SolverControl &solver_control,
+ const MATRIX &A,
+ VectorType &u,
+ VectorType &f,
+ const PRECONDITION &P)
{
deallog << "Solver type: " << typeid(solver).name() << std::endl;