/usr/include/deal.II/numerics/operator.templates.h is in libdeal.ii-dev 6.3.1-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | //---------------------------------------------------------------------------
// $Id: operator.templates.h 20898 2010-03-28 17:10:52Z janssen $
//
// Copyright (C) 2006, 2007, 2008, 2009, 2010 by Guido Kanschat
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
// to the file deal.II/doc/license.html for the text and
// further information on this license.
//
//---------------------------------------------------------------------------
#include <numerics/operator.h>
#include <numerics/data_out.h>
DEAL_II_NAMESPACE_OPEN
namespace Algorithms
{
template <class VECTOR>
Operator<VECTOR>::~Operator()
{}
template <class VECTOR>
void Operator<VECTOR>::notify(const Event& e)
{
notifications += e;
}
template <class VECTOR>
void
Operator<VECTOR>::clear_events ()
{
notifications.clear();
}
template <class VECTOR>
OutputOperator<VECTOR>::~OutputOperator()
{}
template <class VECTOR>
OutputOperator<VECTOR>::OutputOperator()
:
os(0)
{}
template <class VECTOR>
void OutputOperator<VECTOR>::initialize_stream(std::ostream& stream)
{
os =&stream;
}
template <class VECTOR>
OutputOperator<VECTOR>&
OutputOperator<VECTOR>::operator<< (const NamedData<VECTOR*>& vectors)
{
if(os == 0)
{
//TODO: make this possible
//deallog << ' ' << step;
//for (unsigned int i=0;i<vectors.size();++i)
// vectors(i)->print(deallog);
//deallog << std::endl;
}
else
{
(*os) << ' ' << step;
for (unsigned int i=0;i<vectors.size();++i)
vectors(i)->print(*os);
(*os) << std::endl;
}
return *this;
}
template <class VECTOR, int dim, int spacedim>
OutputOperator<VECTOR>&
DoFOutputOperator<VECTOR, dim, spacedim>::operator<<(
const NamedData<VECTOR*>& vectors)
{
Assert ((dof!=0), ExcNotInitialized());
DataOut<dim> out;
out.attach_dof_handler (*dof);
out.add_data_vector (*vectors(vectors.find("solution")), "solution");
out.add_data_vector (*vectors(vectors.find("update")), "update");
out.add_data_vector (*vectors(vectors.find("residual")), "residual");
std::ostringstream streamOut;
streamOut << "Newton_" << std::setw(3) << std::setfill('0') << this->step;
std::ofstream out_filename (streamOut.str().c_str());
out.build_patches (2);
out.write_gnuplot (out_filename);
return *this;
}
}
DEAL_II_NAMESPACE_CLOSE
|