From 29dd663671bc70443be2bda4b0453cf29f6fe7c0 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Sun, 18 Jul 2010 04:00:43 +0000 Subject: [PATCH] move algorithms to lac git-svn-id: https://svn.dealii.org/trunk@21513 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/numerics/dof_output_operator.h | 53 +++++++++++++++++++ .../numerics/dof_output_operator.templates.h | 40 ++++++++++++++ deal.II/deal.II/source/numerics/operator.cc | 4 +- .../include/algorithms}/newton.h | 2 +- .../include/algorithms}/newton.templates.h | 2 +- .../include/algorithms}/operator.h | 22 -------- .../include/algorithms}/operator.templates.h | 22 +------- .../include/algorithms}/theta_timestepping.h | 4 +- .../theta_timestepping.templates.h | 2 +- .../include/algorithms}/timestep_control.h | 0 .../source/operator.cc} | 8 +-- .../source/operator.inst.in} | 0 .../source/timestep_control.cc} | 2 +- 13 files changed, 105 insertions(+), 56 deletions(-) create mode 100644 deal.II/deal.II/include/numerics/dof_output_operator.h create mode 100644 deal.II/deal.II/include/numerics/dof_output_operator.templates.h rename deal.II/{deal.II/include/numerics => lac/include/algorithms}/newton.h (99%) rename deal.II/{deal.II/include/numerics => lac/include/algorithms}/newton.templates.h (99%) rename deal.II/{deal.II/include/numerics => lac/include/algorithms}/operator.h (86%) rename deal.II/{deal.II/include/numerics => lac/include/algorithms}/operator.templates.h (67%) rename deal.II/{deal.II/include/numerics => lac/include/algorithms}/theta_timestepping.h (99%) rename deal.II/{deal.II/include/numerics => lac/include/algorithms}/theta_timestepping.templates.h (98%) rename deal.II/{deal.II/include/numerics => lac/include/algorithms}/timestep_control.h (100%) rename deal.II/{deal.II/source/numerics/operator.all_dimensions.cc => lac/source/operator.cc} (83%) rename deal.II/{deal.II/source/numerics/operator.all_dimensions.inst.in => lac/source/operator.inst.in} (100%) rename deal.II/{deal.II/source/numerics/timestep_control.all_dimensions.cc => lac/source/timestep_control.cc} (98%) diff --git a/deal.II/deal.II/include/numerics/dof_output_operator.h b/deal.II/deal.II/include/numerics/dof_output_operator.h new file mode 100644 index 0000000000..691fb3e480 --- /dev/null +++ b/deal.II/deal.II/include/numerics/dof_output_operator.h @@ -0,0 +1,53 @@ +//--------------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 2010 by the deal.II authors +// +// 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. +// +//--------------------------------------------------------------------------- + +#ifndef __deal2__dof_output_operator_h +#define __deal2__dof_output_operator_h + +#include +#include +#include +#include +#include + +#include + +DEAL_II_NAMESPACE_OPEN + +namespace Algorithms +{ + template + class DoFOutputOperator : public OutputOperator + { + public: + void initialize (DoFHandler& dof_handler); + + virtual OutputOperator& + operator<<(const NamedData& vectors); + + private: + SmartPointer, + DoFOutputOperator > dof; + }; + + template + void DoFOutputOperator::initialize( + DoFHandler& dof_handler) + { + dof = &dof_handler; + } +} + + +DEAL_II_NAMESPACE_CLOSE + +#endif diff --git a/deal.II/deal.II/include/numerics/dof_output_operator.templates.h b/deal.II/deal.II/include/numerics/dof_output_operator.templates.h new file mode 100644 index 0000000000..fccf083f93 --- /dev/null +++ b/deal.II/deal.II/include/numerics/dof_output_operator.templates.h @@ -0,0 +1,40 @@ +//--------------------------------------------------------------------------- +// $Id$ +// +// 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 +#include + +DEAL_II_NAMESPACE_OPEN + +namespace Algorithms +{ + template + OutputOperator& + DoFOutputOperator::operator<<( + const NamedData& vectors) + { + Assert ((dof!=0), ExcNotInitialized()); + DataOut 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 diff --git a/deal.II/deal.II/source/numerics/operator.cc b/deal.II/deal.II/source/numerics/operator.cc index 9e3cd6fe4b..c1e84deae2 100644 --- a/deal.II/deal.II/source/numerics/operator.cc +++ b/deal.II/deal.II/source/numerics/operator.cc @@ -15,9 +15,7 @@ #include #include -#include -#include -#include +#include #include #include diff --git a/deal.II/deal.II/include/numerics/newton.h b/deal.II/lac/include/algorithms/newton.h similarity index 99% rename from deal.II/deal.II/include/numerics/newton.h rename to deal.II/lac/include/algorithms/newton.h index 9dde15d2d1..c7531b5179 100644 --- a/deal.II/deal.II/include/numerics/newton.h +++ b/deal.II/lac/include/algorithms/newton.h @@ -15,7 +15,7 @@ #include #include -#include +#include DEAL_II_NAMESPACE_OPEN diff --git a/deal.II/deal.II/include/numerics/newton.templates.h b/deal.II/lac/include/algorithms/newton.templates.h similarity index 99% rename from deal.II/deal.II/include/numerics/newton.templates.h rename to deal.II/lac/include/algorithms/newton.templates.h index 3728c1fe8c..1f741ab9bc 100644 --- a/deal.II/deal.II/include/numerics/newton.templates.h +++ b/deal.II/lac/include/algorithms/newton.templates.h @@ -10,7 +10,7 @@ // //--------------------------------------------------------------------------- -#include +#include #include #include diff --git a/deal.II/deal.II/include/numerics/operator.h b/deal.II/lac/include/algorithms/operator.h similarity index 86% rename from deal.II/deal.II/include/numerics/operator.h rename to deal.II/lac/include/algorithms/operator.h index cad77faf3b..5c4f3d03e2 100644 --- a/deal.II/deal.II/include/numerics/operator.h +++ b/deal.II/lac/include/algorithms/operator.h @@ -16,7 +16,6 @@ #include #include #include -#include #include @@ -134,27 +133,6 @@ namespace Algorithms step = s; return *this; } - - template - class DoFOutputOperator : public OutputOperator - { - public: - void initialize (DoFHandler& dof_handler); - - virtual OutputOperator& - operator<<(const NamedData& vectors); - - private: - SmartPointer, - DoFOutputOperator > dof; - }; - - template - void DoFOutputOperator::initialize( - DoFHandler& dof_handler) - { - dof = &dof_handler; - } } diff --git a/deal.II/deal.II/include/numerics/operator.templates.h b/deal.II/lac/include/algorithms/operator.templates.h similarity index 67% rename from deal.II/deal.II/include/numerics/operator.templates.h rename to deal.II/lac/include/algorithms/operator.templates.h index cf27cc2a91..c2b3383708 100644 --- a/deal.II/deal.II/include/numerics/operator.templates.h +++ b/deal.II/lac/include/algorithms/operator.templates.h @@ -10,8 +10,7 @@ // //--------------------------------------------------------------------------- -#include -#include +#include DEAL_II_NAMESPACE_OPEN @@ -76,25 +75,6 @@ namespace Algorithms } return *this; } - - template - OutputOperator& - DoFOutputOperator::operator<<( - const NamedData& vectors) - { - Assert ((dof!=0), ExcNotInitialized()); - DataOut 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 diff --git a/deal.II/deal.II/include/numerics/theta_timestepping.h b/deal.II/lac/include/algorithms/theta_timestepping.h similarity index 99% rename from deal.II/deal.II/include/numerics/theta_timestepping.h rename to deal.II/lac/include/algorithms/theta_timestepping.h index 339a289c9a..787ff9df0e 100644 --- a/deal.II/deal.II/include/numerics/theta_timestepping.h +++ b/deal.II/lac/include/algorithms/theta_timestepping.h @@ -14,8 +14,8 @@ #define __deal2__theta_timestepping_h #include -#include -#include +#include +#include DEAL_II_NAMESPACE_OPEN diff --git a/deal.II/deal.II/include/numerics/theta_timestepping.templates.h b/deal.II/lac/include/algorithms/theta_timestepping.templates.h similarity index 98% rename from deal.II/deal.II/include/numerics/theta_timestepping.templates.h rename to deal.II/lac/include/algorithms/theta_timestepping.templates.h index 7b8c9c56bc..8efc3a2ca1 100644 --- a/deal.II/deal.II/include/numerics/theta_timestepping.templates.h +++ b/deal.II/lac/include/algorithms/theta_timestepping.templates.h @@ -10,7 +10,7 @@ // //--------------------------------------------------------------------------- -#include +#include #include #include diff --git a/deal.II/deal.II/include/numerics/timestep_control.h b/deal.II/lac/include/algorithms/timestep_control.h similarity index 100% rename from deal.II/deal.II/include/numerics/timestep_control.h rename to deal.II/lac/include/algorithms/timestep_control.h diff --git a/deal.II/deal.II/source/numerics/operator.all_dimensions.cc b/deal.II/lac/source/operator.cc similarity index 83% rename from deal.II/deal.II/source/numerics/operator.all_dimensions.cc rename to deal.II/lac/source/operator.cc index 79332ded65..f5a2121e40 100644 --- a/deal.II/deal.II/source/numerics/operator.all_dimensions.cc +++ b/deal.II/lac/source/operator.cc @@ -15,9 +15,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -31,7 +31,7 @@ DEAL_II_NAMESPACE_OPEN namespace Algorithms { -#include "operator.all_dimensions.inst" +#include "operator.inst" } DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/deal.II/source/numerics/operator.all_dimensions.inst.in b/deal.II/lac/source/operator.inst.in similarity index 100% rename from deal.II/deal.II/source/numerics/operator.all_dimensions.inst.in rename to deal.II/lac/source/operator.inst.in diff --git a/deal.II/deal.II/source/numerics/timestep_control.all_dimensions.cc b/deal.II/lac/source/timestep_control.cc similarity index 98% rename from deal.II/deal.II/source/numerics/timestep_control.all_dimensions.cc rename to deal.II/lac/source/timestep_control.cc index b2f0fb81a1..9c080ad88a 100644 --- a/deal.II/deal.II/source/numerics/timestep_control.all_dimensions.cc +++ b/deal.II/lac/source/timestep_control.cc @@ -10,7 +10,7 @@ // //--------------------------------------------------------------------------- -#include +#include #include DEAL_II_NAMESPACE_OPEN -- 2.39.5