* NOT allowed. Interpolating
* several functions can be
* performed in one step.
+ *
+ * If the number of output
+ * vectors is different from the
+ * number of input vectors, or if
+ * their sizes are not correct,
+ * then this is corrected.
*/
void interpolate (const std::vector<Vector<number> >&all_in,
std::vector<Vector<number> > &all_out) const;
ExcWrongVectorSize(all_in[i].size(), n_dofs_old));
- const unsigned int out_size=all_out.size();
- const unsigned int in_size=all_in.size();
+ const unsigned int in_size = all_in.size();
- // resize the output vector
- if (out_size != in_size)
- all_out=std::vector<Vector<number> >(
- in_size, Vector<number>(dof_handler->n_dofs()));
+ // resize the output vector if
+ // necessary
+ if (all_out.size() != in_size)
+ all_out.resize (in_size, Vector<number>(dof_handler->n_dofs()));
else
for (unsigned int i=0; i<in_size; ++i)
if (all_out[i].size() != dof_handler->n_dofs())
// data vectors on this
// cell and prolong it
// to its children
- for (unsigned int j=0; j<out_size; ++j)
+ for (unsigned int j=0; j<in_size; ++j)
{
for (unsigned int i=0; i<dofs_per_cell; ++i)
local_values(i)=all_in[j](indexptr->operator[](i));
// distribute the
// stored data to the
// new vectors
- for (unsigned int j=0; j<out_size; ++j)
+ for (unsigned int j=0; j<in_size; ++j)
for (unsigned int i=0; i<dofs_per_cell; ++i)
all_out[j](dofs[i])=valuesptr->operator[](j)(i);
}
<h3>deal.II</h3>
<ol>
+ <li> <p>
+ Fixed: The <code
+ class="member">SolutionTransfer::interpolate</code>
+ function did not compute all output vectors if the number of
+ output vectors was different from the number of output
+ vectors. This was due to the fact that it stored the number of
+ output vectors before resizing that array. This is now fixed.
+ <br>
+ (Brent Bailey, WB 2003/10/22)
+ </p>
+
<li> <p>
Fixed: The <code
class="member">FEFaceValuesBase::boundary_form</code>