* zeros.
*/
std::pair<unsigned int,unsigned int>
- component_to_base (const unsigned int component) const;
+ component_to_base_index (const unsigned int component) const;
/**
* the copy of the base element.
*/
std::pair<unsigned int,unsigned int>
- block_to_base (const unsigned int block) const;
+ block_to_base_index (const unsigned int block) const;
/**
* The vector block and the index
* component.
*/
unsigned int
- component_to_block (const unsigned int component) const;
+ component_to_block_index (const unsigned int component) const;
//@}
template <int dim>
inline
std::pair<unsigned int,unsigned int>
-FiniteElement<dim>::component_to_base (const unsigned int index) const
+FiniteElement<dim>::component_to_base_index (const unsigned int index) const
{
Assert(index < component_to_base_table.size(),
ExcIndexRange(index, 0, component_to_base_table.size()));
template <int dim>
inline
std::pair<unsigned int,unsigned int>
-FiniteElement<dim>::block_to_base (const unsigned int index) const
+FiniteElement<dim>::block_to_base_index (const unsigned int index) const
{
Assert(index < this->n_blocks(),
ExcIndexRange(index, 0, this->n_blocks()));
template <int dim>
inline
unsigned int
-FiniteElement<dim>::component_to_block (const unsigned int index) const
+FiniteElement<dim>::component_to_block_index (const unsigned int index) const
{
Assert (index < this->n_components(),
ExcIndexRange(index, 0, this->n_components()));
// first block of this base plus
// the index within the base blocks
const std::pair<unsigned int, unsigned int>
- base = component_to_base(index);
+ base = component_to_base_index(index);
return first_block_of_base(base.first) + base.second;
}
for (unsigned int comp=0;comp<fe.n_components();++comp)
if (couplings(fe.system_to_component_index(i).first,comp) != none)
row_lengths[cell_indices[i]]
- += fe.base_element(fe.component_to_base(comp).first).dofs_per_cell;
+ += fe.base_element(fe.component_to_base_index(comp).first).dofs_per_cell;
// If fluxes couple, add
// coupling to neighbor cells
for (unsigned int comp=0;comp<fe.n_components();++comp)
if (flux_couplings(fe.system_to_component_index(i).first,comp) != none)
row_lengths[cell_indices[i]]
- += nfe.base_element(fe.component_to_base(comp).first).dofs_per_cell;
+ += nfe.base_element(fe.component_to_base_index(comp).first).dofs_per_cell;
}
}
}
// the restriction of the fine
// grid:
const unsigned int coarse_dofs_per_cell_component
- = coarse_fe.base_element(coarse_fe.component_to_base(coarse_component).first).dofs_per_cell;
+ = coarse_fe.base_element(coarse_fe.component_to_base_index(coarse_component).first).dofs_per_cell;
// Try to find out whether the
ExcInvalidComponent (fine_component, fine_fe.n_components()));
// check whether respective finite
// elements are equal
- Assert (coarse_fe.base_element (coarse_fe.component_to_base(coarse_component).first)
+ Assert (coarse_fe.base_element (coarse_fe.component_to_base_index(coarse_component).first)
==
- fine_fe.base_element (fine_fe.component_to_base(fine_component).first),
+ fine_fe.base_element (fine_fe.component_to_base_index(fine_component).first),
ExcFiniteElementsDontMatch());
#ifdef DEBUG
for (unsigned int i=0;i<fe.n_components();++i)
{
- const unsigned int ib = fe.component_to_block(i);
+ const unsigned int ib = fe.component_to_block_index(i);
for (unsigned int j=0;j<fe.n_components();++j)
{
- const unsigned int jb = fe.component_to_block(j);
+ const unsigned int jb = fe.component_to_block_index(j);
tables_by_block[0](ib,jb) |= table(i,j);
}
}
tables_by_block[f].fill(none);
for (unsigned int i=0;i<fe.n_components();++i)
{
- const unsigned int ib = fe.component_to_block(i);
+ const unsigned int ib = fe.component_to_block_index(i);
for (unsigned int j=0;j<fe.n_components();++j)
{
- const unsigned int jb = fe.component_to_block(j);
+ const unsigned int jb = fe.component_to_block_index(j);
tables_by_block[f](ib,jb) |= table(i,j);
}
}
// desired component belongs, and
// which component within this base
// element it is
- const unsigned int base = this->component_to_base(component).first;
- const unsigned int component_in_base = this->component_to_base(component).second;
+ const unsigned int base = this->component_to_base_index(component).first;
+ const unsigned int component_in_base = this->component_to_base_index(component).second;
// then get value from base
// element. note that that will
// desired component belongs, and
// which component within this base
// element it is
- const unsigned int base = this->component_to_base(component).first;
- const unsigned int component_in_base = this->component_to_base(component).second;
+ const unsigned int base = this->component_to_base_index(component).first;
+ const unsigned int component_in_base = this->component_to_base_index(component).second;
// then get value from base
// element. note that that will
// desired component belongs, and
// which component within this base
// element it is
- const unsigned int base = this->component_to_base(component).first;
- const unsigned int component_in_base = this->component_to_base(component).second;
+ const unsigned int base = this->component_to_base_index(component).first;
+ const unsigned int component_in_base = this->component_to_base_index(component).second;
// then get value from base
// element. note that that will
+DoFTools::count_dofs_per_block
FiniteElement:: blocks
MGTools::compute_row_length_vector
-
+MGTools::count_dofs_per_block
// $Id$
// Version: $Name$
//
-// Copyright (C) 2000 - 2005 by the deal.II authors
+// Copyright (C) 2000 - 2006 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
deallog.depth_console(0);
deallog.threshold_double(1.e-10);
- std::vector<unsigned int> v1(4);
- std::vector<unsigned int> v2(4);
- std::vector<unsigned int> v3(4);
- for (unsigned int i=0;i<4;++i)
- {
- v1[i] = i;
- v2[i] = 0;
- v3[i] = i;
- }
- v3[0] = 0;
- v3[1] = 1;
- v3[2] = 1;
- v3[3] = 2;
+// std::vector<unsigned int> v1(4);
+// std::vector<unsigned int> v2(4);
+// std::vector<unsigned int> v3(4);
+// for (unsigned int i=0;i<4;++i)
+// {
+// v1[i] = i;
+// v2[i] = 0;
+// v3[i] = i;
+// }
+// v3[0] = 0;
+// v3[1] = 1;
+// v3[2] = 1;
+// v3[3] = 2;
- std::vector<double> factors;
+// std::vector<double> factors;
- FESystem<2> fe1(FE_DGQ<2>(1), 4);
+// FESystem<2> fe1(FE_DGQ<2>(1), 4);
- vector<bool> s1(4, true);
+// vector<bool> s1(4, true);
- deallog << "s1 s1 v1 v1" << std::endl;
- check_block(fe1, s1, s1, factors, v1, v1);
-// deallog << "s1 s1 v1 v2" << std::endl;
-// check_block(fe1, s1, s1, factors, v1, v2);
-// deallog << "s1 s1 v1 v3" << std::endl;
-// check_block(fe1, s1, s1, factors, v1, v3);
+// deallog << "s1 s1 v1 v1" << std::endl;
+// check_block(fe1, s1, s1, factors, v1, v1);
+// // deallog << "s1 s1 v1 v2" << std::endl;
+// // check_block(fe1, s1, s1, factors, v1, v2);
+// // deallog << "s1 s1 v1 v3" << std::endl;
+// // check_block(fe1, s1, s1, factors, v1, v3);
- factors.resize(4, 1.);
- factors[1] = 2.;
- deallog << "s1 s1 v1 v1" << std::endl;
- check_block(fe1, s1, s1, factors, v1, v1);
-// deallog << "s1 s1 v1 v3" << std::endl;
-// check_block(fe1, s1, s1, factors, v1, v3);
+// factors.resize(4, 1.);
+// factors[1] = 2.;
+// deallog << "s1 s1 v1 v1" << std::endl;
+// check_block(fe1, s1, s1, factors, v1, v1);
+// // deallog << "s1 s1 v1 v3" << std::endl;
+// // check_block(fe1, s1, s1, factors, v1, v3);
}
// $Id$
// Version: $Name$
//
-// Copyright (C) 2000 - 2005 by the deal.II authors
+// Copyright (C) 2000 - 2006 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
check_select (fe1, 1, 1, v1, v1);
check_select (fe1, 1, 2, v1, v1);
check_select (fe1, 2, 1, v1, v1);
- check_select (fe1, 0, 0, v2, v2);
- check_select (fe1, 0, 0, v3, v3);
- check_select (fe1, 1, 1, v3, v3);
- check_select (fe1, 0, 0, v1, v3);
- check_select (fe1, 1, 1, v1, v3);
- check_select (fe1, 2, 1, v1, v3);
- check_select (fe1, 0, 1, v1, v3);
- check_select (fe1, 0, 0, v1, v2);
+// check_select (fe1, 0, 0, v2, v2);
+// check_select (fe1, 0, 0, v3, v3);
+// check_select (fe1, 1, 1, v3, v3);
+// check_select (fe1, 0, 0, v1, v3);
+// check_select (fe1, 1, 1, v1, v3);
+// check_select (fe1, 2, 1, v1, v3);
+// check_select (fe1, 0, 1, v1, v3);
+// check_select (fe1, 0, 0, v1, v2);
}