13 #ifndef _DEALII_APPFRAME_APPLICATION_DATA_H_
14 #define _DEALII_APPFRAME_APPLICATION_DATA_H_
16 #include <lac/vector_memory.h>
17 #include <lac/block_vector.h>
22 using namespace dealii;
65 void enter(std::string name,
71 void enter(std::string name,
78 void erase_scalar(std::string name);
84 void erase_vector(std::string name);
94 const double* scalar(std::string name)
const;
104 const FEVector* vector(std::string name)
const;
153 <<
"A " << arg1 <<
" with name " << arg2 <<
" was not stored in this data object");
171 ApplicationData::~ApplicationData()
176 ApplicationData::enter(std::string name,
179 named_scalars.insert(std::make_pair(name, &s));
184 ApplicationData::enter(std::string name,
187 named_vectors.insert(std::make_pair(name, &v));
192 ApplicationData::erase_scalar(std::string name)
194 scalar_map::iterator iter = named_scalars.find(name);
195 Assert(iter != named_scalars.end(), ExcNotInitialized());
196 named_scalars.erase(iter);
201 ApplicationData::erase_vector(std::string name)
203 vector_map::iterator iter = named_vectors.find(name);
204 Assert(iter != named_vectors.end(), ExcNotInitialized());
205 named_vectors.erase(iter);
210 ApplicationData::scalar(std::string name)
const
212 scalar_map::const_iterator iter = named_scalars.find(name);
213 AssertThrow(iter != named_scalars.end(), ExcNotFound(
"scalar", name));
219 ApplicationData::vector(std::string name)
const
221 vector_map::const_iterator iter = named_vectors.find(name);
222 AssertThrow(iter != named_vectors.end(), ExcNotFound(
"vector", name));
228 ApplicationData::log()
const
230 deallog.push(
"scalar");
231 for(scalar_map::const_iterator iter = named_scalars.begin(); iter != named_scalars.end(); ++iter)
232 deallog << iter->first <<
'\t' << iter->second << std::endl;
235 deallog.push(
"vector");
236 for(vector_map::const_iterator iter = named_vectors.begin(); iter != named_vectors.end(); ++iter)
237 deallog << iter->first <<
'\t' << iter->second->size() << std::endl;