13 #ifndef _DEALII_APPFRAME_FE_VECTORS_H_
14 #define _DEALII_APPFRAME_FE_VECTORS_H_
16 #include <lac/vector_memory.h>
17 #include <lac/block_vector.h>
22 using namespace dealii;
65 void add_scalar(
double& s,
66 const std::string& name);
73 const std::string& name);
77 const std::string& name);
105 unsigned int n_scalars()
const;
108 unsigned int n_vectors()
const;
111 double& scalar(
unsigned int i);
114 const double& scalar(
unsigned int i)
const;
120 const FEVector& vector(
unsigned int i)
const;
123 const std::string& scalar_name(
unsigned int i)
const;
126 const std::string& vector_name(
unsigned int i)
const;
129 unsigned int find_scalar(
const std::string& name)
const;
132 unsigned int find_vector(
const std::string& name)
const;
140 template<
typename OUT>
142 unsigned int verbosity = 1)
const;
155 <<
"Name at position " << arg1 <<
" is not equal to " << arg2);
176 FEVectors::FEVectors()
184 const std::string& name)
194 const std::string& name)
204 const std::string& name)
207 vectors.push_back(const_cast<FEVector*> (&v));
218 for(
unsigned int i = 0; i < other.
n_scalars(); ++i)
221 for(
unsigned int i = 0; i < other.
n_vectors(); ++i)
231 for(
unsigned int i = 0; i < other.
n_scalars(); ++i)
234 for(
unsigned int i = 0; i < other.
n_vectors(); ++i)
308 const std::vector<std::string>::const_iterator
312 return deal_II_numbers::invalid_unsigned_int;
321 const std::vector<std::string>::const_iterator
325 return deal_II_numbers::invalid_unsigned_int;
330 template<
typename OUT>
334 unsigned int verbosity)
const
340 out << std::endl <<
"Scalars:";
341 for(
unsigned int i = 0; i <
n_scalars(); ++i)
345 for(
unsigned int i = 0; i <
n_vectors(); ++i)
351 for(
unsigned int i = 0; i <
n_scalars(); ++i)
356 for(
unsigned int i = 0; i <
n_vectors(); ++i)
359 for(
unsigned int b = 0; b <
vectors[i]->n_blocks(); ++b)
360 out <<
' ' <<
vectors[i]->block(b).size();
361 out <<
" Norm: " <<
vectors[i]->l2_norm();