From 0330835f4c0016cf563496fc45bb474d608e0b8a Mon Sep 17 00:00:00 2001 From: maier Date: Tue, 11 Sep 2012 15:14:21 +0000 Subject: [PATCH] Merge branch 'trunk' into branch_cmake Conflicts: deal.II/common/Make.global_options.in deal.II/configure deal.II/contrib/configure deal.II/doc/news/changes.h deal.II/doc/publications/index.html deal.II/examples/step-42/doc/intro-step-42.tex deal.II/include/deal.II/base/config.h.in deal.II/include/deal.II/integrators/laplace.h deal.II/source/Makefile tests/integrators/laplacian_01.cc tests/integrators/laplacian_01/cmp/generic git-svn-id: https://svn.dealii.org/branches/branch_cmake@26288 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/aclocal.m4 | 474 +- deal.II/common/Make.global_options.in | 98 +- deal.II/common/scripts/report_features.cc | 37 +- deal.II/configure.in | 13 +- .../tuple/detail/preprocessed/tuple_tie.hpp | 2 +- .../boost-1.49.0/include/boost/python.hpp | 73 - .../include/boost/python/arg_from_python.hpp | 76 - .../include/boost/python/args.hpp | 175 - .../include/boost/python/args_fwd.hpp | 52 - .../include/boost/python/back_reference.hpp | 102 - .../include/boost/python/base_type_traits.hpp | 43 - .../include/boost/python/bases.hpp | 68 - .../include/boost/python/borrowed.hpp | 21 - .../include/boost/python/call.hpp | 83 - .../include/boost/python/call_method.hpp | 83 - .../include/boost/python/cast.hpp | 106 - .../include/boost/python/class.hpp | 655 - .../include/boost/python/class_fwd.hpp | 24 - .../python/converter/arg_from_python.hpp | 336 - .../boost/python/converter/arg_to_python.hpp | 261 - .../python/converter/arg_to_python_base.hpp | 32 - .../converter/as_to_python_function.hpp | 49 - .../python/converter/builtin_converters.hpp | 190 - .../python/converter/constructor_function.hpp | 17 - .../converter/context_result_converter.hpp | 17 - .../python/converter/convertible_function.hpp | 14 - .../boost/python/converter/from_python.hpp | 41 - .../boost/python/converter/implicit.hpp | 46 - .../converter/obj_mgr_arg_from_python.hpp | 121 - .../boost/python/converter/object_manager.hpp | 230 - .../python/converter/pointer_type_id.hpp | 68 - .../python/converter/pyobject_traits.hpp | 46 - .../boost/python/converter/pyobject_type.hpp | 37 - .../python/converter/pytype_function.hpp | 132 - .../converter/pytype_object_mgr_traits.hpp | 42 - .../boost/python/converter/registered.hpp | 111 - .../python/converter/registered_pointee.hpp | 62 - .../boost/python/converter/registrations.hpp | 99 - .../boost/python/converter/registry.hpp | 55 - .../python/converter/return_from_python.hpp | 162 - .../converter/rvalue_from_python_data.hpp | 140 - .../python/converter/shared_ptr_deleter.hpp | 22 - .../converter/shared_ptr_from_python.hpp | 63 - .../python/converter/shared_ptr_to_python.hpp | 28 - .../converter/to_python_function_type.hpp | 19 - .../boost/python/copy_const_reference.hpp | 43 - .../boost/python/copy_non_const_reference.hpp | 43 - .../include/boost/python/data_members.hpp | 318 - .../boost-1.49.0/include/boost/python/def.hpp | 114 - .../include/boost/python/def_visitor.hpp | 86 - .../boost/python/default_call_policies.hpp | 91 - .../boost/python/detail/aix_init_module.hpp | 26 - .../boost/python/detail/api_placeholder.hpp | 15 - .../boost/python/detail/borrowed_ptr.hpp | 111 - .../include/boost/python/detail/caller.hpp | 259 - .../include/boost/python/detail/config.hpp | 141 - .../include/boost/python/detail/construct.hpp | 42 - .../boost/python/detail/convertible.hpp | 38 - .../python/detail/copy_ctor_mutates_rhs.hpp | 21 - .../boost/python/detail/cv_category.hpp | 36 - .../include/boost/python/detail/dealloc.hpp | 17 - .../boost/python/detail/decorated_type_id.hpp | 76 - .../boost/python/detail/decref_guard.hpp | 21 - .../boost/python/detail/def_helper.hpp | 212 - .../boost/python/detail/def_helper_fwd.hpp | 17 - .../boost/python/detail/defaults_def.hpp | 291 - .../boost/python/detail/defaults_gen.hpp | 388 - .../include/boost/python/detail/dependent.hpp | 27 - .../include/boost/python/detail/destroy.hpp | 106 - .../include/boost/python/detail/enable_if.hpp | 72 - .../boost/python/detail/exception_handler.hpp | 48 - .../boost/python/detail/force_instantiate.hpp | 32 - .../include/boost/python/detail/if_else.hpp | 116 - .../boost/python/detail/indirect_traits.hpp | 13 - .../include/boost/python/detail/invoke.hpp | 100 - .../boost/python/detail/is_auto_ptr.hpp | 30 - .../boost/python/detail/is_shared_ptr.hpp | 17 - .../boost/python/detail/is_wrapper.hpp | 29 - .../include/boost/python/detail/is_xxx.hpp | 13 - .../python/detail/make_keyword_range_fn.hpp | 72 - .../boost/python/detail/make_tuple.hpp | 32 - .../include/boost/python/detail/map_entry.hpp | 43 - .../boost/python/detail/mpl_lambda.hpp | 12 - .../boost/python/detail/msvc_typeinfo.hpp | 75 - .../include/boost/python/detail/none.hpp | 20 - .../boost/python/detail/not_specified.hpp | 14 - .../detail/nullary_function_adaptor.hpp | 46 - .../boost/python/detail/operator_id.hpp | 63 - .../boost/python/detail/overloads_fwd.hpp | 18 - .../include/boost/python/detail/pointee.hpp | 35 - .../include/boost/python/detail/prefix.hpp | 16 - .../boost/python/detail/preprocessor.hpp | 66 - .../boost/python/detail/python22_fixed.h | 152 - .../boost/python/detail/python_type.hpp | 37 - .../boost/python/detail/raw_pyobject.hpp | 32 - .../boost/python/detail/referent_storage.hpp | 76 - .../include/boost/python/detail/result.hpp | 135 - .../include/boost/python/detail/scope.hpp | 16 - .../include/boost/python/detail/sfinae.hpp | 13 - .../include/boost/python/detail/signature.hpp | 106 - .../boost/python/detail/string_literal.hpp | 88 - .../include/boost/python/detail/target.hpp | 86 - .../python/detail/translate_exception.hpp | 69 - .../include/boost/python/detail/type_list.hpp | 39 - .../boost/python/detail/type_list_impl.hpp | 57 - .../python/detail/type_list_impl_no_pts.hpp | 107 - .../boost/python/detail/unwind_type.hpp | 170 - .../boost/python/detail/unwrap_type_id.hpp | 31 - .../boost/python/detail/unwrap_wrapper.hpp | 34 - .../include/boost/python/detail/value_arg.hpp | 27 - .../python/detail/value_is_shared_ptr.hpp | 17 - .../boost/python/detail/value_is_xxx.hpp | 62 - .../include/boost/python/detail/void_ptr.hpp | 35 - .../boost/python/detail/void_return.hpp | 42 - .../boost/python/detail/wrap_python.hpp | 205 - .../boost/python/detail/wrapper_base.hpp | 90 - .../include/boost/python/dict.hpp | 152 - .../boost/python/docstring_options.hpp | 127 - .../include/boost/python/enum.hpp | 108 - .../include/boost/python/errors.hpp | 55 - .../boost/python/exception_translator.hpp | 27 - .../include/boost/python/exec.hpp | 47 - .../include/boost/python/extract.hpp | 261 - .../include/boost/python/handle.hpp | 264 - .../include/boost/python/handle_fwd.hpp | 16 - .../boost/python/has_back_reference.hpp | 24 - .../include/boost/python/implicit.hpp | 36 - .../include/boost/python/import.hpp | 22 - .../include/boost/python/init.hpp | 421 - .../include/boost/python/instance_holder.hpp | 63 - .../include/boost/python/iterator.hpp | 137 - .../include/boost/python/list.hpp | 148 - .../include/boost/python/long.hpp | 68 - .../boost/python/lvalue_from_pytype.hpp | 116 - .../include/boost/python/make_constructor.hpp | 290 - .../include/boost/python/make_function.hpp | 153 - .../boost/python/manage_new_object.hpp | 41 - .../include/boost/python/module.hpp | 13 - .../include/boost/python/module_init.hpp | 91 - .../include/boost/python/numeric.hpp | 242 - .../include/boost/python/object.hpp | 27 - .../boost/python/object/add_to_namespace.hpp | 23 - .../include/boost/python/object/class.hpp | 64 - .../boost/python/object/class_detail.hpp | 19 - .../boost/python/object/class_metadata.hpp | 297 - .../boost/python/object/class_wrapper.hpp | 51 - .../include/boost/python/object/enum_base.hpp | 36 - .../boost/python/object/find_instance.hpp | 21 - .../include/boost/python/object/forward.hpp | 194 - .../include/boost/python/object/function.hpp | 82 - .../python/object/function_doc_signature.hpp | 36 - .../boost/python/object/function_handle.hpp | 44 - .../boost/python/object/function_object.hpp | 40 - .../boost/python/object/inheritance.hpp | 132 - .../boost/python/object/inheritance_query.hpp | 17 - .../include/boost/python/object/instance.hpp | 51 - .../include/boost/python/object/iterator.hpp | 258 - .../boost/python/object/iterator_core.hpp | 17 - .../boost/python/object/life_support.hpp | 15 - .../boost/python/object/make_holder.hpp | 109 - .../boost/python/object/make_instance.hpp | 78 - .../boost/python/object/make_ptr_instance.hpp | 72 - .../boost/python/object/pickle_support.hpp | 124 - .../boost/python/object/pointer_holder.hpp | 224 - .../boost/python/object/py_function.hpp | 172 - .../boost/python/object/stl_iterator_core.hpp | 27 - .../boost/python/object/value_holder.hpp | 170 - .../boost/python/object/value_holder_fwd.hpp | 16 - .../boost/python/object_attributes.hpp | 116 - .../include/boost/python/object_call.hpp | 23 - .../include/boost/python/object_core.hpp | 583 - .../include/boost/python/object_fwd.hpp | 18 - .../include/boost/python/object_items.hpp | 89 - .../include/boost/python/object_operators.hpp | 136 - .../include/boost/python/object_protocol.hpp | 90 - .../boost/python/object_protocol_core.hpp | 53 - .../include/boost/python/object_slices.hpp | 148 - .../boost/python/opaque_pointer_converter.hpp | 199 - .../include/boost/python/operators.hpp | 374 - .../include/boost/python/other.hpp | 114 - .../include/boost/python/overloads.hpp | 13 - .../include/boost/python/override.hpp | 144 - .../include/boost/python/pointee.hpp | 43 - .../include/boost/python/proxy.hpp | 101 - .../boost-1.49.0/include/boost/python/ptr.hpp | 128 - .../include/boost/python/pure_virtual.hpp | 124 - .../include/boost/python/raw_function.hpp | 61 - .../include/boost/python/refcount.hpp | 41 - .../python/reference_existing_object.hpp | 46 - .../boost/python/register_ptr_to_python.hpp | 31 - .../include/boost/python/return_arg.hpp | 110 - .../include/boost/python/return_by_value.hpp | 31 - .../python/return_internal_reference.hpp | 43 - .../boost/python/return_opaque_pointer.hpp | 47 - .../boost/python/return_value_policy.hpp | 21 - .../include/boost/python/scope.hpp | 78 - .../include/boost/python/self.hpp | 33 - .../include/boost/python/signature.hpp | 252 - .../include/boost/python/slice.hpp | 276 - .../include/boost/python/slice_nil.hpp | 44 - .../include/boost/python/ssize_t.hpp | 29 - .../include/boost/python/stl_iterator.hpp | 61 - .../boost-1.49.0/include/boost/python/str.hpp | 422 - .../python/suite/indexing/container_utils.hpp | 57 - .../indexing/detail/indexing_suite_detail.hpp | 759 - .../python/suite/indexing/indexing_suite.hpp | 299 - .../suite/indexing/map_indexing_suite.hpp | 181 - .../suite/indexing/vector_indexing_suite.hpp | 242 - .../boost-1.49.0/include/boost/python/tag.hpp | 18 - .../boost/python/to_python_converter.hpp | 99 - .../boost/python/to_python_indirect.hpp | 113 - .../include/boost/python/to_python_value.hpp | 176 - .../include/boost/python/tuple.hpp | 70 - .../include/boost/python/type_id.hpp | 192 - .../boost/python/with_custodian_and_ward.hpp | 125 - .../include/boost/python/wrapper.hpp | 35 - .../libs/serialization/example/Jamfile.v2 | 57 - .../libs/serialization/example/demo.cpp | 377 - .../serialization/example/demo_auto_ptr.cpp | 135 - .../libs/serialization/example/demo_dll.cpp | 50 - .../libs/serialization/example/demo_dll_a.hpp | 321 - .../libs/serialization/example/demo_dll_a.ipp | 321 - .../libs/serialization/example/demo_dll_b.hpp | 112 - .../libs/serialization/example/demo_dll_b.ipp | 112 - .../serialization/example/demo_exception.cpp | 258 - .../example/demo_fast_archive.cpp | 181 - .../libs/serialization/example/demo_gps.hpp | 284 - .../libs/serialization/example/demo_log.cpp | 76 - .../serialization/example/demo_output.txt | 51 - .../libs/serialization/example/demo_pimpl.cpp | 34 - .../serialization/example/demo_pimpl_A.cpp | 45 - .../serialization/example/demo_pimpl_A.hpp | 24 - .../example/demo_polymorphic.cpp | 65 - .../example/demo_polymorphic_A.cpp | 26 - .../example/demo_polymorphic_A.hpp | 39 - .../example/demo_portable_archive.cpp | 104 - .../libs/serialization/example/demo_save.xml | 129 - .../serialization/example/demo_shared_ptr.cpp | 164 - .../serialization/example/demo_simple_log.cpp | 75 - .../example/demo_trivial_archive.cpp | 94 - .../libs/serialization/example/demo_xml.cpp | 127 - .../libs/serialization/example/demo_xml.hpp | 284 - .../serialization/example/demo_xml_load.cpp | 45 - .../serialization/example/demo_xml_save.cpp | 91 - .../libs/serialization/example/demofile.txt | 13 - .../libs/serialization/example/fix_six.cpp | 37 - .../serialization/example/log_archive.cpp | 32 - .../serialization/example/log_archive.hpp | 76 - .../polymorphic_portable_binary_iarchive.cpp | 34 - .../polymorphic_portable_binary_iarchive.hpp | 35 - .../polymorphic_portable_binary_oarchive.cpp | 35 - .../polymorphic_portable_binary_oarchive.hpp | 34 - .../example/portable_binary_archive.hpp | 47 - .../example/portable_binary_iarchive.cpp | 131 - .../example/portable_binary_iarchive.hpp | 212 - .../example/portable_binary_oarchive.cpp | 98 - .../example/portable_binary_oarchive.hpp | 192 - .../example/simple_log_archive.hpp | 167 - deal.II/doc/authors.html | 476 +- deal.II/doc/development/makefiles.2.html | 2 +- deal.II/doc/development/testsuite.html | 28 +- deal.II/doc/development/toc.html | 4 +- .../development/writing-documentation.html | 4 +- deal.II/doc/documentation.html | 27 +- deal.II/doc/doxygen/headers/distributed.h | 31 + deal.II/doc/doxygen/headers/glossary.h | 5 +- deal.II/doc/doxygen/headers/vector_valued.h | 7 +- deal.II/doc/external-libs/hdf5.html | 48 + deal.II/doc/external-libs/hsl.html | 2 +- deal.II/doc/external-libs/p4est.html | 2 +- deal.II/doc/mail.html | 91 +- deal.II/doc/news/7.1.0-vs-7.2.0.h | 750 + deal.II/doc/news/changes.h | 652 +- deal.II/doc/news/news.html | 22 +- deal.II/doc/porting.html | 5 +- deal.II/doc/publications/index.html | 192 +- deal.II/doc/readme-petsc-trilinos.html | 18 +- deal.II/doc/readme.html | 85 +- deal.II/doc/reports/multithreading/img1.gif | Bin 90 -> 0 bytes deal.II/doc/reports/multithreading/img2.gif | Bin 137 -> 0 bytes deal.II/doc/reports/multithreading/img3.gif | Bin 399 -> 0 bytes deal.II/doc/reports/multithreading/img4.gif | Bin 674 -> 0 bytes deal.II/doc/reports/multithreading/index.html | 125 - .../reports/multithreading/multithreading.css | 56 - deal.II/doc/reports/multithreading/node1.html | 145 - .../doc/reports/multithreading/node10.html | 311 - .../doc/reports/multithreading/node11.html | 186 - .../doc/reports/multithreading/node12.html | 115 - .../doc/reports/multithreading/node13.html | 110 - .../doc/reports/multithreading/node14.html | 61 - deal.II/doc/reports/multithreading/node2.html | 100 - deal.II/doc/reports/multithreading/node3.html | 84 - deal.II/doc/reports/multithreading/node4.html | 114 - deal.II/doc/reports/multithreading/node5.html | 106 - deal.II/doc/reports/multithreading/node6.html | 281 - deal.II/doc/reports/multithreading/node7.html | 708 - deal.II/doc/reports/multithreading/node8.html | 76 - deal.II/doc/reports/multithreading/node9.html | 169 - deal.II/doc/reports/new-threads/index.html | 124 +- deal.II/doc/screen.css | 1 + deal.II/examples/step-11/step-11.cc | 4 +- deal.II/examples/step-13/step-13.cc | 4 +- deal.II/examples/step-14/step-14.cc | 4 +- deal.II/examples/step-15/step-15.cc | 4 +- deal.II/examples/step-16/step-16.cc | 2 +- deal.II/examples/step-17/doc/results.dox | 13 +- deal.II/examples/step-17/step-17.cc | 4 +- deal.II/examples/step-18/step-18.cc | 4 +- deal.II/examples/step-20/step-20.cc | 4 +- deal.II/examples/step-21/step-21.cc | 4 +- deal.II/examples/step-22/step-22.cc | 4 +- deal.II/examples/step-23/doc/intro.dox | 9 +- deal.II/examples/step-23/step-23.cc | 4 +- deal.II/examples/step-24/step-24.cc | 4 +- deal.II/examples/step-25/step-25.cc | 4 +- deal.II/examples/step-26/step-26.cc | 4 +- deal.II/examples/step-27/step-27.cc | 4 +- deal.II/examples/step-28/step-28.cc | 4 +- deal.II/examples/step-29/step-29.cc | 4 +- deal.II/examples/step-3/step-3.cc | 4 +- deal.II/examples/step-31/step-31.cc | 4 +- deal.II/examples/step-32/step-32.cc | 30 +- deal.II/examples/step-33/step-33.cc | 2 +- deal.II/examples/step-34/step-34.cc | 2 +- deal.II/examples/step-35/step-35.cc | 8 +- deal.II/examples/step-36/step-36.cc | 4 +- deal.II/examples/step-37/step-37.cc | 2 +- deal.II/examples/step-38/step-38.cc | 6 +- deal.II/examples/step-39/output.reference.dat | 13 + deal.II/examples/step-39/step-39.cc | 2 +- deal.II/examples/step-4/step-4.cc | 4 +- deal.II/examples/step-40/step-40.cc | 2 +- deal.II/examples/step-41/Makefile | 18 +- deal.II/examples/step-41/doc/intro.dox | 10 +- deal.II/examples/step-41/step-41.cc | 2 +- .../examples/step-42/doc/intro-step-42.tex | 108 +- deal.II/examples/step-42/step-42.cc | 2508 +- deal.II/examples/step-43/step-43.cc | 2 +- deal.II/examples/step-44/step-44.cc | 2 +- deal.II/examples/step-45/step-45.cc | 2 +- deal.II/examples/step-46/step-46.cc | 2 +- deal.II/examples/step-47/step-47.cc | 4 +- deal.II/examples/step-48/step-48.cc | 2 +- deal.II/examples/step-5/step-5.cc | 4 +- deal.II/examples/step-6/step-6.cc | 4 +- deal.II/examples/step-7/step-7.cc | 4 +- deal.II/examples/step-8/step-8.cc | 4 +- deal.II/examples/step-9/step-9.cc | 4 +- deal.II/include/deal.II/base/data_out_base.h | 80 +- deal.II/include/deal.II/base/geometry_info.h | 13 +- deal.II/include/deal.II/base/numbers.h | 19 +- .../include/deal.II/base/parameter_handler.h | 2 +- deal.II/include/deal.II/base/table.h | 2 +- deal.II/include/deal.II/base/table_handler.h | 17 +- deal.II/include/deal.II/base/table_indices.h | 7 +- deal.II/include/deal.II/base/tensor.h | 8 +- deal.II/include/deal.II/base/tensor_base.h | 4 +- .../include/deal.II/base/thread_management.h | 3 +- deal.II/include/deal.II/base/types.h | 155 +- deal.II/include/deal.II/distributed/tria.h | 44 +- .../deal.II/dofs/dof_accessor.templates.h | 42 +- deal.II/include/deal.II/dofs/dof_handler.h | 19 +- .../include/deal.II/dofs/dof_handler_policy.h | 9 +- deal.II/include/deal.II/dofs/dof_levels.h | 12 +- .../include/deal.II/dofs/dof_renumbering.h | 57 + deal.II/include/deal.II/dofs/dof_tools.h | 32 +- deal.II/include/deal.II/dofs/function_map.h | 2 +- deal.II/include/deal.II/fe/fe.h | 13 +- deal.II/include/deal.II/fe/fe_base.h | 10 +- deal.II/include/deal.II/fe/mapping_q1.h | 6 +- .../include/deal.II/grid/filtered_iterator.h | 12 +- deal.II/include/deal.II/grid/grid_generator.h | 2 +- deal.II/include/deal.II/grid/grid_out.h | 4 +- deal.II/include/deal.II/grid/grid_tools.h | 25 +- deal.II/include/deal.II/grid/tria.h | 537 +- deal.II/include/deal.II/grid/tria_accessor.h | 40 +- .../deal.II/grid/tria_accessor.templates.h | 20 +- deal.II/include/deal.II/grid/tria_iterator.h | 7 +- deal.II/include/deal.II/grid/tria_levels.h | 4 +- deal.II/include/deal.II/grid/tria_objects.h | 12 +- deal.II/include/deal.II/hp/dof_handler.h | 6 +- deal.II/include/deal.II/hp/dof_levels.h | 6 +- deal.II/include/deal.II/hp/fe_collection.h | 14 + .../include/deal.II/integrators/advection.h | 390 + .../include/deal.II/integrators/divergence.h | 124 +- .../include/deal.II/integrators/elasticity.h | 18 +- deal.II/include/deal.II/integrators/l2.h | 20 +- deal.II/include/deal.II/integrators/laplace.h | 70 +- .../deal.II/integrators/local_integrators.h | 2 +- deal.II/include/deal.II/integrators/maxwell.h | 32 +- deal.II/include/deal.II/integrators/patches.h | 2 +- deal.II/include/deal.II/lac/block_list.h | 2 +- .../include/deal.II/lac/block_matrix_base.h | 13 +- deal.II/include/deal.II/lac/block_vector.h | 24 + .../include/deal.II/lac/block_vector_base.h | 25 +- .../include/deal.II/lac/constraint_matrix.h | 77 +- .../deal.II/lac/constraint_matrix.templates.h | 16 +- deal.II/include/deal.II/lac/full_matrix.h | 8 +- .../deal.II/lac/full_matrix.templates.h | 2 +- deal.II/include/deal.II/lac/parallel_vector.h | 31 +- .../include/deal.II/lac/petsc_matrix_base.h | 75 +- .../deal.II/lac/petsc_parallel_vector.h | 2 +- deal.II/include/deal.II/lac/petsc_solver.h | 91 +- deal.II/include/deal.II/lac/petsc_vector.h | 2 +- .../include/deal.II/lac/petsc_vector_base.h | 78 +- .../lac/precondition_block.templates.h | 53 - deal.II/include/deal.II/lac/sparsity_tools.h | 9 + .../include/deal.II/lac/tridiagonal_matrix.h | 2 +- .../lac/trilinos_block_sparse_matrix.h | 14 - .../deal.II/lac/trilinos_block_vector.h | 515 +- .../lac/trilinos_parallel_block_vector.h | 537 + .../deal.II/lac/trilinos_sparse_matrix.h | 5 +- deal.II/include/deal.II/lac/trilinos_vector.h | 2 + .../deal.II/lac/trilinos_vector_base.h | 64 +- deal.II/include/deal.II/lac/vector.h | 20 +- .../deal.II/matrix_free/fe_evaluation.h | 16 +- .../include/deal.II/matrix_free/matrix_free.h | 12 +- deal.II/include/deal.II/meshworker/output.h | 39 +- .../deal.II/multigrid/mg_dof_handler.h | 3 +- .../include/deal.II/multigrid/mg_transfer.h | 9 +- .../deal.II/multigrid/mg_transfer.templates.h | 9 +- .../deal.II/multigrid/mg_transfer_block.h | 9 +- .../deal.II/multigrid/mg_transfer_component.h | 9 +- .../numerics/derivative_approximation.h | 2 +- .../deal.II/numerics/error_estimator.h | 66 +- deal.II/include/deal.II/numerics/matrices.h | 1086 +- .../include/deal.II/numerics/matrix_tools.h | 1098 + .../include/deal.II/numerics/time_dependent.h | 2 +- .../include/deal.II/numerics/vector_tools.h | 2308 + .../deal.II/numerics/vector_tools.templates.h | 5702 + deal.II/include/deal.II/numerics/vectors.h | 2289 +- .../deal.II/numerics/vectors.templates.h | 5687 +- deal.II/lib/Makefile | 64 +- .../source/base/auto_derivative_function.cc | 14 +- deal.II/source/base/data_out_base.cc | 615 +- deal.II/source/base/geometry_info.cc | 4 +- deal.II/source/base/logstream.cc | 4 +- deal.II/source/base/parameter_handler.cc | 53 +- deal.II/source/base/polynomial.cc | 7 +- deal.II/source/base/quadrature_lib.cc | 18 +- deal.II/source/base/table_handler.cc | 60 +- deal.II/source/base/thread_management.cc | 2 +- deal.II/source/base/utilities.cc | 30 +- .../source/distributed/solution_transfer.cc | 40 +- deal.II/source/distributed/tria.cc | 28 +- deal.II/source/dofs/dof_handler.cc | 26 +- deal.II/source/dofs/dof_handler_policy.cc | 49 +- deal.II/source/dofs/dof_levels.cc | 6 +- deal.II/source/dofs/dof_renumbering.cc | 60 +- deal.II/source/dofs/dof_renumbering.inst.in | 14 + deal.II/source/dofs/dof_tools.cc | 80 +- deal.II/source/dofs/dof_tools.inst.in | 111 +- deal.II/source/fe/fe.cc | 7 +- deal.II/source/fe/fe_abf.cc | 26 +- deal.II/source/fe/fe_nedelec.cc | 18 +- deal.II/source/fe/fe_nothing.cc | 2 +- deal.II/source/fe/fe_q.cc | 4 +- deal.II/source/fe/fe_raviart_thomas.cc | 8 +- deal.II/source/fe/fe_system.cc | 36 +- deal.II/source/fe/fe_tools.cc | 8 +- deal.II/source/fe/fe_values.cc | 48 +- deal.II/source/fe/mapping_q1.cc | 2 +- deal.II/source/grid/grid_generator.cc | 26 +- deal.II/source/grid/grid_in.cc | 80 +- deal.II/source/grid/grid_out.cc | 4 +- deal.II/source/grid/grid_tools.cc | 21 +- deal.II/source/grid/grid_tools.inst.in | 10 +- deal.II/source/grid/tria.cc | 76 +- deal.II/source/grid/tria_accessor.cc | 14 +- deal.II/source/grid/tria_boundary_lib.cc | 94 +- deal.II/source/hp/dof_handler.cc | 52 +- deal.II/source/hp/dof_levels.cc | 6 +- deal.II/source/lac/constraint_matrix.cc | 42 +- deal.II/source/lac/operator.inst.in | 2 +- deal.II/source/lac/petsc_matrix_base.cc | 86 +- .../lac/petsc_parallel_block_sparse_matrix.cc | 2 - deal.II/source/lac/petsc_precondition.cc | 22 +- deal.II/source/lac/petsc_solver.cc | 367 +- deal.II/source/lac/petsc_vector_base.cc | 125 +- deal.II/source/lac/sparsity_tools.cc | 100 +- .../lac/trilinos_block_sparse_matrix.cc | 8 - deal.II/source/lac/trilinos_block_vector.cc | 9 - deal.II/source/lac/trilinos_sparse_matrix.cc | 9 +- deal.II/source/lac/trilinos_vector.cc | 4 + deal.II/source/lac/trilinos_vector_base.cc | 4 + deal.II/source/multigrid/mg_dof_handler.cc | 35 +- deal.II/source/multigrid/mg_tools.cc | 4 +- .../numerics/derivative_approximation.cc | 2 +- .../numerics/dof_output_operator.inst.in | 2 +- deal.II/source/numerics/error_estimator.cc | 100 +- .../source/numerics/error_estimator.inst.in | 16 +- .../numerics/{matrices.cc => matrix_tools.cc} | 6 +- ...{matrices.inst.in => matrix_tools.inst.in} | 0 .../mesh_worker_vector_selector.inst.in | 2 +- .../source/numerics/point_value_history.cc | 2 +- deal.II/source/numerics/time_dependent.cc | 6 +- .../numerics/{vectors.cc => vector_tools.cc} | 4 +- .../{vectors.inst.in => vector_tools.inst.in} | 28 +- tests/Makefile | 12 + tests/Makefile.rules | 50 +- tests/all-headers/Makefile | 4 +- tests/aniso/solution_transfer.cc | 2 +- tests/base/data_out_base/cmp/generic | 8 +- tests/base/data_out_base_pvtu/cmp/generic | 4 +- tests/base/data_out_reader_01/cmp/generic | 10 +- tests/base/table_handler_07.cc | 60 + tests/base/table_handler_07/cmp/generic | 8 + tests/base/table_handler_08.cc | 60 + tests/base/table_handler_08/cmp/generic | 8 + tests/base/table_handler_09.cc | 55 + tests/base/table_handler_09/cmp/generic | 8 + tests/base/tensor_05.cc | 5 +- tests/base/tensor_07.cc | 89 + tests/base/tensor_07/cmp/generic | 10 + tests/base/tensor_08.cc | 58 + tests/base/tensor_08/cmp/generic | 7 + tests/benchmarks/spec2006-447.dealII.cc | 4 +- tests/bits/anna_4.cc | 4 +- tests/bits/anna_6.cc | 8 +- tests/bits/apply_boundary_values_01.cc | 4 +- tests/bits/apply_boundary_values_02.cc | 4 +- tests/bits/block_sparse_matrix_1.cc | 4 +- tests/bits/christian_1.cc | 2 +- tests/bits/data_out_01/cmp/generic | 40 +- tests/bits/data_out_02/cmp/generic | 40 +- tests/bits/data_out_curved_cells.cc | 2 +- tests/bits/data_out_faces_01/cmp/generic | 28 +- tests/bits/data_out_faces_02/cmp/generic | 28 +- tests/bits/data_out_rotation_01/cmp/generic | 26 +- tests/bits/data_out_rotation_02/cmp/generic | 26 +- tests/bits/data_out_stack_01/cmp/generic | 12 +- tests/bits/data_out_stack_02/cmp/generic | 12 +- tests/bits/denis_1.cc | 2 +- tests/bits/dof_tools_03.cc | 5 +- tests/bits/dof_tools_03/cmp/generic | 7168 +- tests/bits/dof_tools_05.cc | 2 +- tests/bits/dof_tools_09.cc | 4 +- tests/bits/dof_tools_14.cc | 2 +- tests/bits/dof_tools_16a.cc | 2 +- tests/bits/dof_tools_16b.cc | 2 +- tests/bits/dof_tools_16b_x.cc | 2 +- tests/bits/dof_tools_16c.cc | 2 +- tests/bits/dof_tools_16d.cc | 2 +- tests/bits/dof_tools_16d_x.cc | 2 +- tests/bits/dof_tools_19.cc | 2 +- tests/bits/dof_tools_20.cc | 2 +- tests/bits/dof_tools_21.cc | 2 +- tests/bits/error_estimator_01.cc | 4 +- tests/bits/error_estimator_02.cc | 4 +- .../face_orientation_and_fe_nedelec_01.cc | 2 +- tests/bits/face_orientation_and_fe_q_01.cc | 2 +- tests/bits/face_orientation_and_fe_q_02.cc | 2 +- tests/bits/face_orientation_crash.cc | 2 +- tests/bits/fe_field_function_01.cc | 2 +- tests/bits/fe_field_function_01_vector.cc | 2 +- tests/bits/fe_field_function_02.cc | 2 +- tests/bits/fe_field_function_02_vector.cc | 2 +- tests/bits/fe_field_function_03.cc | 2 +- tests/bits/fe_field_function_03_vector.cc | 2 +- tests/bits/fe_field_function_04.cc | 2 +- tests/bits/fe_field_function_04_vector.cc | 2 +- tests/bits/fe_field_function_05.cc | 2 +- tests/bits/fe_field_function_05_vector.cc | 2 +- tests/bits/fe_field_function_06_vector.cc | 2 +- tests/bits/fe_field_function_07_vector.cc | 2 +- tests/bits/fe_field_function_08_vector.cc | 2 +- tests/bits/fe_q_constraints.cc | 2 +- tests/bits/fe_tools_12.cc | 13 +- tests/bits/fe_tools_12/cmp/generic | 804 +- tests/bits/gerold_1.cc | 4 +- tests/bits/get_boundary_indicators_1d.cc | 2 +- tests/bits/grid_generator_03.cc | 20 +- tests/bits/joa_1.cc | 4 +- tests/bits/make_boundary_constraints_01.cc | 4 +- tests/bits/mapping_q1_eulerian_01.cc | 2 +- tests/bits/mapping_q_eulerian_01.cc | 2 +- tests/bits/mapping_q_eulerian_02.cc | 2 +- tests/bits/mapping_q_eulerian_03.cc | 2 +- tests/bits/mesh_3d_12.cc | 2 +- tests/bits/mesh_3d_22.cc | 2 +- tests/bits/mesh_3d_23.cc | 2 +- tests/bits/mesh_3d_24.cc | 2 +- tests/bits/mesh_3d_25.cc | 2 +- tests/bits/mesh_3d_26.cc | 2 +- tests/bits/point_difference_01.cc | 2 +- tests/bits/point_difference_02.cc | 2 +- tests/bits/point_value_01.cc | 2 +- tests/bits/point_value_02.cc | 2 +- tests/bits/point_value_hp_01.cc | 2 +- tests/bits/point_value_hp_02.cc | 2 +- tests/bits/rt_2.cc | 2 +- tests/bits/solution_transfer.cc | 2 +- tests/bits/step-11.cc | 4 +- tests/bits/step-13.cc | 4 +- tests/bits/step-14.cc | 4 +- tests/bits/step-15.cc | 4 +- tests/bits/step-16.cc | 4 +- tests/bits/step-3.cc | 4 +- tests/bits/step-4.cc | 4 +- tests/bits/step-5.cc | 4 +- tests/bits/step-6.cc | 4 +- tests/bits/step-7.cc | 4 +- tests/bits/step-8.cc | 4 +- tests/codim_one/boundary_indicator_01.cc | 2 +- tests/codim_one/data_out.cc | 2 +- tests/codim_one/data_out_03.cc | 4 +- tests/codim_one/error_estimator_01.cc | 4 +- tests/codim_one/extract_boundary_mesh_00.cc | 2 +- tests/codim_one/extract_boundary_mesh_04.cc | 2 +- tests/codim_one/gradients.cc | 2 +- tests/codim_one/gradients_1.cc | 2 +- tests/codim_one/hanging_nodes_01.cc | 2 +- tests/codim_one/hanging_nodes_02.cc | 2 +- tests/codim_one/hanging_nodes_03.cc | 2 +- .../interpolate_boundary_values_01.cc | 2 +- ...polate_boundary_values_01_vector_valued.cc | 2 +- .../interpolate_boundary_values_02.cc | 2 +- ...polate_boundary_values_02_vector_valued.cc | 2 +- .../interpolate_boundary_values_03.cc | 4 +- ...erpolate_boundary_values_1d_closed_ring.cc | 2 +- tests/codim_one/interpolation.cc | 2 +- tests/codim_one/interpolation_2.cc | 2 +- tests/codim_one/interpolation_3.cc | 2 +- tests/codim_one/mean_value.cc | 2 +- tests/codim_one/projection.cc | 2 +- tests/codim_one/projection_dgp.cc | 2 +- tests/codim_one/solution_transfer_01.cc | 2 +- tests/codim_one/transform_01.cc | 2 +- tests/deal.II/block_matrices.cc | 4 +- tests/deal.II/boundaries.cc | 2 +- tests/deal.II/constraints_block_01.cc | 348 + .../deal.II/constraints_block_01/cmp/generic | 35 + tests/deal.II/constraints_hanging_nodes_bc.cc | 2 +- tests/deal.II/constraints_local_to_global.cc | 2 +- tests/deal.II/create_laplace_matrix_01.cc | 2 +- tests/deal.II/create_laplace_matrix_01b.cc | 2 +- tests/deal.II/create_laplace_matrix_02.cc | 2 +- tests/deal.II/create_laplace_matrix_02b.cc | 2 +- tests/deal.II/create_laplace_matrix_03.cc | 2 +- tests/deal.II/create_laplace_matrix_03b.cc | 2 +- tests/deal.II/create_laplace_matrix_04.cc | 2 +- tests/deal.II/create_laplace_matrix_04b.cc | 2 +- tests/deal.II/create_mass_matrix_01.cc | 2 +- tests/deal.II/create_mass_matrix_01b.cc | 2 +- tests/deal.II/create_mass_matrix_02.cc | 2 +- tests/deal.II/create_mass_matrix_02b.cc | 2 +- tests/deal.II/create_mass_matrix_03.cc | 2 +- tests/deal.II/create_mass_matrix_03b.cc | 2 +- tests/deal.II/create_mass_matrix_04.cc | 2 +- tests/deal.II/create_mass_matrix_04b.cc | 2 +- tests/deal.II/create_mass_matrix_05.cc | 2 +- tests/deal.II/create_point_source.cc | 2 +- tests/deal.II/create_point_source_hp.cc | 2 +- tests/deal.II/data_out.cc | 4 +- tests/deal.II/data_out_postprocessor_01.cc | 4 +- .../data_out_postprocessor_scalar_01.cc | 4 +- .../data_out_postprocessor_vector_01.cc | 4 +- tests/deal.II/derivative_approximation.cc | 2 +- tests/deal.II/derivative_approximation_2.cc | 2 +- tests/deal.II/error_estimator.cc | 4 +- tests/deal.II/error_estimator_01.cc | 4 +- tests/deal.II/extract_dofs_by_component_01.cc | 89 + .../extract_dofs_by_component_01/cmp/generic | 321 + .../extract_dofs_by_component_01_hp.cc | 93 + .../cmp/generic | 25 + tests/deal.II/extract_dofs_by_component_02.cc | 89 + .../extract_dofs_by_component_02/cmp/generic | 33 + .../extract_dofs_by_component_02_hp.cc | 93 + .../cmp/generic | 9 + tests/deal.II/extract_dofs_by_component_03.cc | 84 + .../extract_dofs_by_component_03/cmp/generic | 1015 + tests/deal.II/extract_dofs_by_component_04.cc | 92 + .../extract_dofs_by_component_04/cmp/generic | 2433 + tests/deal.II/extract_dofs_by_component_05.cc | 78 + .../extract_dofs_by_component_05/cmp/generic | 15 + .../extract_dofs_by_component_05_hp.cc | 82 + .../cmp/generic | 8 + tests/deal.II/extract_dofs_by_component_06.cc | 78 + .../extract_dofs_by_component_06/cmp/generic | 15 + .../extract_dofs_by_component_06_hp.cc | 82 + .../cmp/generic | 8 + tests/deal.II/fe_values_view_04.cc | 10 +- tests/deal.II/fe_values_view_04/cmp/generic | 106306 +++++++-------- tests/deal.II/fe_values_view_09.cc | 14 +- tests/deal.II/fe_values_view_09/cmp/generic | 68 +- tests/deal.II/fe_values_view_10.cc | 17 +- tests/deal.II/fe_values_view_10/cmp/generic | 144 +- tests/deal.II/fe_values_view_10_single_01.cc | 18 +- .../fe_values_view_10_single_01/cmp/generic | 56 +- tests/deal.II/fe_values_view_10_single_02.cc | 16 +- .../fe_values_view_10_single_02/cmp/generic | 54 +- tests/deal.II/fe_values_view_10_single_03.cc | 18 +- .../fe_values_view_10_single_03/cmp/generic | 56 +- tests/deal.II/fe_values_view_15.cc | 14 +- tests/deal.II/fe_values_view_15/cmp/generic | 144 +- tests/deal.II/fe_values_view_16.cc | 17 +- tests/deal.II/fe_values_view_16/cmp/generic | 304 +- tests/deal.II/fe_values_view_18.cc | 17 +- tests/deal.II/fe_values_view_18/cmp/generic | 32 +- tests/deal.II/fe_values_view_21.cc | 4 +- tests/deal.II/fe_values_view_22.cc | 4 +- tests/deal.II/filtered_matrix.cc | 4 +- tests/deal.II/inhomogeneous_constraints.cc | 4 +- tests/deal.II/inhomogeneous_constraints_02.cc | 4 +- tests/deal.II/inhomogeneous_constraints_03.cc | 4 +- tests/deal.II/inhomogeneous_constraints_04.cc | 4 +- .../inhomogeneous_constraints_block.cc | 4 +- .../inhomogeneous_constraints_nonsymmetric.cc | 4 +- .../inhomogeneous_constraints_vector.cc | 4 +- .../deal.II/interpolate_boundary_values_01.cc | 4 +- tests/deal.II/interpolate_dgq_01.cc | 2 +- tests/deal.II/interpolate_dgq_02.cc | 2 +- tests/deal.II/interpolate_q_01.cc | 2 +- tests/deal.II/interpolate_q_02.cc | 2 +- tests/deal.II/interpolate_q_system_01.cc | 2 +- tests/deal.II/interpolate_q_system_02.cc | 2 +- tests/deal.II/matrices.cc | 2 +- tests/deal.II/memory_consumption_01.cc | 4 +- tests/deal.II/newton_01.cc | 2 +- tests/deal.II/no_flux_01.cc | 4 +- tests/deal.II/no_flux_02.cc | 4 +- tests/deal.II/no_flux_03.cc | 4 +- tests/deal.II/no_flux_04.cc | 4 +- tests/deal.II/no_flux_05.cc | 4 +- tests/deal.II/no_flux_06.cc | 4 +- tests/deal.II/no_flux_07.cc | 4 +- tests/deal.II/no_flux_08.cc | 6 +- tests/deal.II/no_flux_09.cc | 4 +- tests/deal.II/no_flux_10.cc | 2 +- tests/deal.II/no_flux_hp_01.cc | 4 +- tests/deal.II/no_flux_hp_02.cc | 4 +- tests/deal.II/no_flux_hp_03.cc | 4 +- tests/deal.II/no_flux_hp_04.cc | 4 +- tests/deal.II/no_flux_hp_05.cc | 4 +- tests/deal.II/project_01.cc | 2 +- tests/deal.II/project_02.cc | 2 +- tests/deal.II/project_boundary_rt_01.cc | 4 +- tests/deal.II/project_bv_curl_conf.cc | 2 +- tests/deal.II/project_bv_div_conf.cc | 2 +- tests/deal.II/project_common.h | 2 +- tests/deal.II/vectors_boundary_rhs_01.cc | 2 +- tests/deal.II/vectors_boundary_rhs_02.cc | 2 +- tests/deal.II/vectors_boundary_rhs_03.cc | 2 +- tests/deal.II/vectors_point_source_01.cc | 2 +- tests/deal.II/vectors_rhs_01.cc | 2 +- tests/deal.II/vectors_rhs_03.cc | 2 +- tests/deal.II/vertex_as_face_08.cc | 2 +- tests/deal.II/vertex_as_face_10.cc | 2 +- .../distributed_grids/solution_transfer_02.cc | 2 +- .../distributed_grids/solution_transfer_03.cc | 2 +- tests/fail/abf_approximation_01.cc | 4 +- tests/fail/circular_01.cc | 4 +- tests/fail/hp-step-14.cc | 4 +- tests/fail/hp-step-15.cc | 4 +- tests/fail/rt_crash_01.cc | 2 +- tests/fail/rt_distorted_01.cc | 4 +- tests/fail/rt_distorted_02.cc | 4 +- tests/fail/vectors_boundary_rhs_hp_02.cc | 2 +- tests/fail/vectors_rhs_hp_02.cc | 2 +- tests/fe/abf_01.cc | 6 +- tests/fe/deformed_projection.h | 4 +- tests/fe/fe_tools.cc | 32 +- tests/fe/fe_tools/cmp/generic | 452 +- tests/fe/fe_tools_test.cc | 2 +- tests/fe/internals.cc | 38 +- tests/fe/internals/cmp/generic | 21376 +-- tests/fe/mapping_q_eulerian.cc | 4 +- tests/fe/mass_matrix_arbitrary_nodes.cc | 2 +- tests/fe/rt_8.cc | 4 +- tests/fe/rt_8/cmp/generic | 118 +- tests/fe/rt_9.cc | 2 +- tests/fe/rt_approximation_01.cc | 4 +- tests/fe/rt_normal_02.cc | 2 +- tests/hp/compare_hp_vs_nonhp_01.cc | 4 +- tests/hp/crash_06.cc | 2 +- tests/hp/crash_07.cc | 2 +- tests/hp/crash_08.cc | 2 +- tests/hp/crash_09.cc | 2 +- tests/hp/crash_11.cc | 2 +- tests/hp/crash_12.cc | 2 +- tests/hp/crash_16.cc | 2 +- tests/hp/crash_17.cc | 4 +- tests/hp/crash_17_compressed_set_sparsity.cc | 4 +- tests/hp/crash_18.cc | 4 +- tests/hp/crash_18_compressed_set_sparsity.cc | 4 +- tests/hp/crash_19.cc | 4 +- tests/hp/create_laplace_matrix_01.cc | 2 +- tests/hp/create_laplace_matrix_01b.cc | 2 +- tests/hp/create_laplace_matrix_02.cc | 2 +- tests/hp/create_laplace_matrix_02b.cc | 2 +- tests/hp/create_laplace_matrix_03.cc | 2 +- tests/hp/create_laplace_matrix_03b.cc | 2 +- tests/hp/create_laplace_matrix_04.cc | 2 +- tests/hp/create_laplace_matrix_04b.cc | 2 +- tests/hp/create_mass_matrix_01.cc | 2 +- tests/hp/create_mass_matrix_01b.cc | 2 +- tests/hp/create_mass_matrix_02.cc | 2 +- tests/hp/create_mass_matrix_02b.cc | 2 +- tests/hp/create_mass_matrix_03.cc | 2 +- tests/hp/create_mass_matrix_03b.cc | 2 +- tests/hp/create_mass_matrix_04.cc | 2 +- tests/hp/create_mass_matrix_04b.cc | 2 +- tests/hp/create_mass_matrix_05.cc | 2 +- tests/hp/create_rhs_01.cc | 6 +- tests/hp/fe_nothing_08.cc | 2 +- tests/hp/fe_nothing_09.cc | 2 +- tests/hp/fe_nothing_11.cc | 2 +- tests/hp/fe_nothing_12.cc | 2 +- tests/hp/fe_nothing_13.cc | 2 +- tests/hp/fe_nothing_14.cc | 2 +- tests/hp/hp_constraints_common.h | 2 +- tests/hp/hp_hanging_nodes_01.cc | 4 +- tests/hp/hp_hanging_nodes_02.cc | 4 +- tests/hp/integrate_difference.cc | 2 +- tests/hp/integrate_difference_02.cc | 2 +- tests/hp/interpolate_dgq_01.cc | 2 +- tests/hp/interpolate_dgq_02.cc | 2 +- tests/hp/interpolate_q_01.cc | 2 +- tests/hp/interpolate_q_02.cc | 2 +- tests/hp/interpolate_q_system_01.cc | 2 +- tests/hp/interpolate_q_system_02.cc | 2 +- tests/hp/matrices.cc | 2 +- tests/hp/matrices_hp.cc | 2 +- tests/hp/solution_transfer.cc | 2 +- tests/hp/step-11.cc | 4 +- tests/hp/step-11_compressed_set_sparsity.cc | 4 +- tests/hp/step-13.cc | 4 +- tests/hp/step-3.cc | 4 +- tests/hp/step-3a.cc | 4 +- tests/hp/step-3b.cc | 4 +- tests/hp/step-3c.cc | 4 +- tests/hp/step-4.cc | 4 +- tests/hp/step-5.cc | 4 +- tests/hp/step-6.cc | 4 +- tests/hp/step-7.cc | 4 +- tests/hp/step-8.cc | 4 +- tests/hp/vectors_boundary_rhs_01.cc | 2 +- tests/hp/vectors_boundary_rhs_02.cc | 2 +- tests/hp/vectors_boundary_rhs_03.cc | 2 +- tests/hp/vectors_boundary_rhs_hp_01.cc | 2 +- tests/hp/vectors_boundary_rhs_hp_03.cc | 2 +- tests/hp/vectors_point_source_01.cc | 2 +- tests/hp/vectors_point_source_hp_01.cc | 2 +- tests/hp/vectors_rhs_01.cc | 2 +- tests/hp/vectors_rhs_02.cc | 2 +- tests/hp/vectors_rhs_03.cc | 2 +- tests/hp/vectors_rhs_hp_01.cc | 2 +- tests/hp/vectors_rhs_hp_03.cc | 2 +- tests/hsl/hsl_ma27_01.cc | 4 +- tests/hsl/hsl_ma27_02.cc | 4 +- tests/hsl/hsl_ma47_01.cc | 4 +- tests/hsl/hsl_ma47_02.cc | 4 +- tests/integrators/divergence_01.cc | 281 + tests/integrators/divergence_01/cmp/generic | 196 + tests/integrators/laplacian_01.cc | 17 +- tests/integrators/laplacian_01/cmp/generic | 1141 + tests/lac/constraints_c1.cc | 160 + tests/lac/constraints_c1/cmp/generic | 58 + tests/lac/constraints_c1_02.cc | 66 + tests/lac/constraints_c1_02/cmp/generic | 4 + tests/lac/identity_matrix_06.cc | 81 + tests/lac/identity_matrix_06/cmp/generic | 9 + tests/matrix_free/get_functions_common.h | 2 +- tests/matrix_free/get_functions_multife.cc | 2 +- tests/matrix_free/get_functions_multife2.cc | 2 +- .../get_functions_q_hierarchical.cc | 2 +- tests/matrix_free/get_values_plain.cc | 2 +- tests/matrix_free/integrate_functions.cc | 2 +- .../integrate_functions_multife.cc | 2 +- .../integrate_functions_multife2.cc | 2 +- tests/matrix_free/matrix_vector_common.h | 2 +- tests/matrix_free/matrix_vector_curl.cc | 2 +- tests/matrix_free/matrix_vector_div.cc | 2 +- tests/matrix_free/matrix_vector_stokes.cc | 2 +- .../matrix_vector_stokes_noflux.cc | 2 +- tests/matrix_free/quadrature_points.cc | 2 +- tests/mesh_converter/Makefile | 4 +- tests/metis/metis_01/cmp/generic | 518 +- tests/metis/metis_02/cmp/generic | 29566 ++-- tests/metis/metis_03/cmp/generic | 6 +- tests/mpi/collective_02.cc | 8 +- tests/mpi/collective_02/ncpu_1/cmp/generic | 2 +- tests/mpi/collective_02/ncpu_10/cmp/generic | 2 +- tests/mpi/collective_02/ncpu_4/cmp/generic | 2 +- tests/mpi/collective_03.cc | 8 +- tests/mpi/collective_03/ncpu_1/cmp/generic | 2 +- tests/mpi/collective_03/ncpu_10/cmp/generic | 2 +- tests/mpi/collective_03/ncpu_4/cmp/generic | 2 +- tests/mpi/compute_mean_value.cc | 2 +- tests/mpi/constraint_matrix_trilinos_bug.cc | 2 +- tests/mpi/integrate_difference.cc | 2 +- tests/mpi/interpolate_01.cc | 2 +- tests/mpi/interpolate_02.cc | 2 +- tests/mpi/interpolate_03.cc | 4 +- tests/mpi/interpolate_03/ncpu_10/cmp/generic | 3 +- tests/mpi/interpolate_03/ncpu_4/cmp/generic | 3 +- tests/mpi/matrix_free_01.cc | 2 +- tests/mpi/matrix_free_02.cc | 2 +- tests/mpi/matrix_free_03.cc | 2 +- tests/mpi/no_flux_constraints.cc | 4 +- tests/mpi/no_flux_constraints_02.cc | 7 +- tests/mpi/no_flux_constraints_03.cc | 41 +- .../no_flux_constraints_03/ncpu_1/cmp/generic | 2 +- .../no_flux_constraints_03/ncpu_9/cmp/generic | 2 +- tests/mpi/p4est_2d_constraintmatrix_03.cc | 4 +- tests/mpi/p4est_2d_constraintmatrix_04.cc | 2 +- tests/mpi/p4est_2d_constraintmatrix_05.cc | 2 +- tests/mpi/p4est_3d_constraintmatrix_03.cc | 2 +- tests/mpi/parallel_vector_03.cc | 2 +- tests/mpi/solution_transfer_01.cc | 2 +- tests/mpi/trilinos_01.cc | 104 + tests/mpi/trilinos_01/ncpu_10/cmp/generic | 5 + tests/mpi/trilinos_01/ncpu_4/cmp/generic | 5 + tests/mpi/trilinos_02.cc | 101 + tests/mpi/trilinos_02/ncpu_10/cmp/generic | 3 + tests/mpi/trilinos_02/ncpu_4/cmp/generic | 3 + tests/multigrid/mg_renumbered_01.cc | 4 +- tests/multigrid/mg_renumbered_02.cc | 4 +- tests/multigrid/mg_renumbered_03.cc | 4 +- tests/multigrid/step-16.cc | 2 +- tests/petsc/vector_wrap_01.cc | 8 +- tests/serialization/dof_handler_01.cc | 181 +- tests/serialization/triangulation_01.cc | 150 +- tests/serialization/triangulation_02.cc | 152 +- tests/umfpack/umfpack_01.cc | 4 +- tests/umfpack/umfpack_02.cc | 4 +- tests/umfpack/umfpack_03.cc | 4 +- tests/umfpack/umfpack_04.cc | 4 +- tests/umfpack/umfpack_07.cc | 4 +- tests/umfpack/umfpack_08.cc | 4 +- tests/umfpack/umfpack_09.cc | 4 +- tests/umfpack/umfpack_10.cc | 4 +- 932 files changed, 109049 insertions(+), 127278 deletions(-) delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/arg_from_python.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/args.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/args_fwd.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/back_reference.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/base_type_traits.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/bases.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/borrowed.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/call.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/call_method.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/cast.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/class.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/class_fwd.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/arg_from_python.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/arg_to_python.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/arg_to_python_base.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/as_to_python_function.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/builtin_converters.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/constructor_function.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/context_result_converter.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/convertible_function.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/from_python.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/implicit.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/obj_mgr_arg_from_python.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/object_manager.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/pointer_type_id.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/pyobject_traits.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/pyobject_type.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/pytype_function.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/pytype_object_mgr_traits.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/registered.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/registered_pointee.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/registrations.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/registry.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/return_from_python.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/rvalue_from_python_data.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/shared_ptr_deleter.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/shared_ptr_from_python.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/shared_ptr_to_python.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/converter/to_python_function_type.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/copy_const_reference.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/copy_non_const_reference.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/data_members.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/def.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/def_visitor.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/default_call_policies.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/aix_init_module.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/api_placeholder.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/borrowed_ptr.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/caller.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/config.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/construct.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/convertible.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/copy_ctor_mutates_rhs.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/cv_category.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/dealloc.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/decorated_type_id.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/decref_guard.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/def_helper.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/def_helper_fwd.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/defaults_def.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/defaults_gen.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/dependent.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/destroy.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/enable_if.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/exception_handler.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/force_instantiate.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/if_else.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/indirect_traits.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/invoke.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_auto_ptr.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_shared_ptr.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_wrapper.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_xxx.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/make_keyword_range_fn.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/make_tuple.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/map_entry.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/mpl_lambda.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/msvc_typeinfo.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/none.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/not_specified.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/nullary_function_adaptor.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/operator_id.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/overloads_fwd.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/pointee.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/prefix.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/preprocessor.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/python22_fixed.h delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/python_type.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/raw_pyobject.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/referent_storage.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/result.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/scope.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/sfinae.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/signature.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/string_literal.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/target.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/translate_exception.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/type_list.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/type_list_impl.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/type_list_impl_no_pts.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/unwind_type.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/unwrap_type_id.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/unwrap_wrapper.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/value_arg.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/value_is_shared_ptr.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/value_is_xxx.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/void_ptr.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/void_return.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/wrap_python.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/detail/wrapper_base.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/dict.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/docstring_options.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/enum.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/errors.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/exception_translator.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/exec.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/extract.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/handle.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/handle_fwd.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/has_back_reference.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/implicit.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/import.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/init.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/instance_holder.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/iterator.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/list.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/long.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/lvalue_from_pytype.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/make_constructor.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/make_function.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/manage_new_object.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/module.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/module_init.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/numeric.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/add_to_namespace.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/class.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/class_detail.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/class_metadata.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/class_wrapper.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/enum_base.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/find_instance.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/forward.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/function.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/function_doc_signature.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/function_handle.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/function_object.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/inheritance.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/inheritance_query.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/instance.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/iterator.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/iterator_core.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/life_support.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/make_holder.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/make_instance.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/make_ptr_instance.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/pickle_support.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/pointer_holder.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/py_function.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/stl_iterator_core.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/value_holder.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object/value_holder_fwd.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object_attributes.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object_call.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object_core.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object_fwd.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object_items.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object_operators.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object_protocol.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object_protocol_core.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/object_slices.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/opaque_pointer_converter.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/operators.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/other.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/overloads.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/override.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/pointee.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/proxy.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/ptr.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/pure_virtual.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/raw_function.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/refcount.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/reference_existing_object.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/register_ptr_to_python.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/return_arg.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/return_by_value.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/return_internal_reference.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/return_opaque_pointer.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/return_value_policy.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/scope.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/self.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/signature.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/slice.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/slice_nil.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/ssize_t.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/stl_iterator.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/str.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/container_utils.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/indexing_suite.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/map_indexing_suite.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/vector_indexing_suite.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/tag.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/to_python_converter.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/to_python_indirect.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/to_python_value.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/tuple.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/type_id.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/with_custodian_and_ward.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/include/boost/python/wrapper.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/Jamfile.v2 delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_auto_ptr.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_a.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_a.ipp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_b.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_b.ipp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_exception.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_fast_archive.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_gps.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_log.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_output.txt delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_pimpl.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_pimpl_A.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_pimpl_A.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_polymorphic.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_polymorphic_A.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_polymorphic_A.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_portable_archive.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_save.xml delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_shared_ptr.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_simple_log.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_trivial_archive.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml_load.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml_save.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/demofile.txt delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/fix_six.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/log_archive.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/log_archive.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_iarchive.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_iarchive.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_oarchive.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_oarchive.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_archive.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_iarchive.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_iarchive.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_oarchive.cpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_oarchive.hpp delete mode 100644 deal.II/contrib/boost-1.49.0/libs/serialization/example/simple_log_archive.hpp create mode 100644 deal.II/doc/external-libs/hdf5.html create mode 100644 deal.II/doc/news/7.1.0-vs-7.2.0.h delete mode 100644 deal.II/doc/reports/multithreading/img1.gif delete mode 100644 deal.II/doc/reports/multithreading/img2.gif delete mode 100644 deal.II/doc/reports/multithreading/img3.gif delete mode 100644 deal.II/doc/reports/multithreading/img4.gif delete mode 100644 deal.II/doc/reports/multithreading/index.html delete mode 100644 deal.II/doc/reports/multithreading/multithreading.css delete mode 100644 deal.II/doc/reports/multithreading/node1.html delete mode 100644 deal.II/doc/reports/multithreading/node10.html delete mode 100644 deal.II/doc/reports/multithreading/node11.html delete mode 100644 deal.II/doc/reports/multithreading/node12.html delete mode 100644 deal.II/doc/reports/multithreading/node13.html delete mode 100644 deal.II/doc/reports/multithreading/node14.html delete mode 100644 deal.II/doc/reports/multithreading/node2.html delete mode 100644 deal.II/doc/reports/multithreading/node3.html delete mode 100644 deal.II/doc/reports/multithreading/node4.html delete mode 100644 deal.II/doc/reports/multithreading/node5.html delete mode 100644 deal.II/doc/reports/multithreading/node6.html delete mode 100644 deal.II/doc/reports/multithreading/node7.html delete mode 100644 deal.II/doc/reports/multithreading/node8.html delete mode 100644 deal.II/doc/reports/multithreading/node9.html create mode 100644 deal.II/examples/step-39/output.reference.dat create mode 100644 deal.II/include/deal.II/integrators/advection.h create mode 100644 deal.II/include/deal.II/lac/trilinos_parallel_block_vector.h create mode 100644 deal.II/include/deal.II/numerics/matrix_tools.h create mode 100644 deal.II/include/deal.II/numerics/vector_tools.h create mode 100644 deal.II/include/deal.II/numerics/vector_tools.templates.h rename deal.II/source/numerics/{matrices.cc => matrix_tools.cc} (99%) rename deal.II/source/numerics/{matrices.inst.in => matrix_tools.inst.in} (100%) rename deal.II/source/numerics/{vectors.cc => vector_tools.cc} (94%) rename deal.II/source/numerics/{vectors.inst.in => vector_tools.inst.in} (97%) create mode 100644 tests/base/table_handler_07.cc create mode 100644 tests/base/table_handler_07/cmp/generic create mode 100644 tests/base/table_handler_08.cc create mode 100644 tests/base/table_handler_08/cmp/generic create mode 100644 tests/base/table_handler_09.cc create mode 100644 tests/base/table_handler_09/cmp/generic create mode 100644 tests/base/tensor_07.cc create mode 100644 tests/base/tensor_07/cmp/generic create mode 100644 tests/base/tensor_08.cc create mode 100644 tests/base/tensor_08/cmp/generic create mode 100644 tests/deal.II/constraints_block_01.cc create mode 100644 tests/deal.II/constraints_block_01/cmp/generic create mode 100644 tests/deal.II/extract_dofs_by_component_01.cc create mode 100644 tests/deal.II/extract_dofs_by_component_01/cmp/generic create mode 100644 tests/deal.II/extract_dofs_by_component_01_hp.cc create mode 100644 tests/deal.II/extract_dofs_by_component_01_hp/cmp/generic create mode 100644 tests/deal.II/extract_dofs_by_component_02.cc create mode 100644 tests/deal.II/extract_dofs_by_component_02/cmp/generic create mode 100644 tests/deal.II/extract_dofs_by_component_02_hp.cc create mode 100644 tests/deal.II/extract_dofs_by_component_02_hp/cmp/generic create mode 100644 tests/deal.II/extract_dofs_by_component_03.cc create mode 100644 tests/deal.II/extract_dofs_by_component_03/cmp/generic create mode 100644 tests/deal.II/extract_dofs_by_component_04.cc create mode 100644 tests/deal.II/extract_dofs_by_component_04/cmp/generic create mode 100644 tests/deal.II/extract_dofs_by_component_05.cc create mode 100644 tests/deal.II/extract_dofs_by_component_05/cmp/generic create mode 100644 tests/deal.II/extract_dofs_by_component_05_hp.cc create mode 100644 tests/deal.II/extract_dofs_by_component_05_hp/cmp/generic create mode 100644 tests/deal.II/extract_dofs_by_component_06.cc create mode 100644 tests/deal.II/extract_dofs_by_component_06/cmp/generic create mode 100644 tests/deal.II/extract_dofs_by_component_06_hp.cc create mode 100644 tests/deal.II/extract_dofs_by_component_06_hp/cmp/generic create mode 100644 tests/integrators/divergence_01.cc create mode 100644 tests/integrators/divergence_01/cmp/generic create mode 100644 tests/lac/constraints_c1.cc create mode 100644 tests/lac/constraints_c1/cmp/generic create mode 100644 tests/lac/constraints_c1_02.cc create mode 100644 tests/lac/constraints_c1_02/cmp/generic create mode 100644 tests/lac/identity_matrix_06.cc create mode 100644 tests/lac/identity_matrix_06/cmp/generic create mode 100644 tests/mpi/trilinos_01.cc create mode 100644 tests/mpi/trilinos_01/ncpu_10/cmp/generic create mode 100644 tests/mpi/trilinos_01/ncpu_4/cmp/generic create mode 100644 tests/mpi/trilinos_02.cc create mode 100644 tests/mpi/trilinos_02/ncpu_10/cmp/generic create mode 100644 tests/mpi/trilinos_02/ncpu_4/cmp/generic diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index ccbdaec7bd..97e5b93c7c 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -435,8 +435,31 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl dnl BOOST uses long long, so don't warn about this CXXFLAGSG="$CXXFLAGSG -Wno-long-long" - dnl See whether the gcc we use already has a flag for C++2011 features. + dnl Newer versions have a flag -Wunused-local-typedefs that, though in principle + dnl a good idea, triggers a lot in BOOST in various places. Unfortunately, + dnl this warning is included in -W/-Wall, so disable it if the compiler + dnl supports it. + CXXFLAGS="-Wunused-local-typedefs" + AC_MSG_CHECKING(whether the compiler supports the -Wunused-local-typedefs flag) + AC_TRY_COMPILE( + [ + ], + [;], + [ + AC_MSG_RESULT(yes) + CXXFLAGSG="$CXXFLAGSG -Wno-unused-local-typedefs" + ], + [ + AC_MSG_RESULT(no) + dnl Nothing to do here then. We can't disable it if the + dnl flag doesn't exist + ]) + + + dnl See whether the gcc we use already has a flag for C++2011 features + dnl and whether we can mark functions as deprecated with an attributed DEAL_II_CHECK_CXX1X + DEAL_II_CHECK_DEPRECATED dnl On some gcc 4.3 snapshots, a 'const' qualifier on a return type triggers a @@ -977,8 +1000,12 @@ AC_DEFUN(DEAL_II_SET_CXX_FLAGS, dnl dnl somewhere in BOOST with BOOST_ASSERT. I have no idea dnl what happens here dnl #284: "NULL references not allowed" - CXXFLAGSG="$CXXFLAGSG -DDEBUG -g --display_error_number --diag_suppress 68 --diag_suppress 111 --diag_suppress 128 --diag_suppress 155 --diag_suppress 177 --diag_suppress 175 --diag_suppress 185 --diag_suppress 236 --diag_suppress 284" - CXXFLAGSO="$CXXFLAGSO -fast -O2 --display_error_number --diag_suppress 68 --diag_suppress 111 --diag_suppress 128 --diag_suppress 155 --diag_suppress 177 --diag_suppress 175 --diag_suppress 185 --diag_suppress 236 --diag_suppress 284" + dnl #497: "declaration of "dim" hides template parameter" (while + dnl theoretically useful, pgCC unfortunately gets this one + dnl wrong on legitimate code where no such parameter is + dnl hidden, see the email by ayaydemir on 9/3/2012) + CXXFLAGSG="$CXXFLAGSG -DDEBUG -g --display_error_number --diag_suppress 68 --diag_suppress 111 --diag_suppress 128 --diag_suppress 155 --diag_suppress 177 --diag_suppress 175 --diag_suppress 185 --diag_suppress 236 --diag_suppress 284 --diag_suppress 497" + CXXFLAGSO="$CXXFLAGSO -fast -O2 --display_error_number --diag_suppress 68 --diag_suppress 111 --diag_suppress 128 --diag_suppress 155 --diag_suppress 177 --diag_suppress 175 --diag_suppress 185 --diag_suppress 236 --diag_suppress 284 --diag_suppress 497" CXXFLAGSPIC="-Kpic" dnl pgCC can't (as of writing this, with version 12.5 in mid-2012) compile a part of BOOST. @@ -1156,7 +1183,7 @@ dnl ------------------------------------------------------------- dnl Given the command line flag specified as argument to this macro, dnl test whether all components that we need from the C++1X dnl standard are actually available. If so, add the flag to -dnl CXXFLAGS.g and CXXFLAGS.o, and set a flag in config.h +dnl CXXFLAGSG and CXXFLAGSO, and set a flag in config.h dnl dnl Usage: DEAL_II_CHECK_CXX1X_COMPONENTS(cxxflag) dnl @@ -1336,6 +1363,74 @@ AC_DEFUN(DEAL_II_CHECK_CXX1X_COMPONENTS, dnl ]) + +dnl ------------------------------------------------------------- +dnl See if the compiler understands the attribute to mark functions +dnl as deprecated. +dnl +dnl Usage: DEAL_II_CHECK_DEPRECATED +dnl +dnl ------------------------------------------------------------- +AC_DEFUN(DEAL_II_CHECK_DEPRECATED, dnl +[ + AC_MSG_CHECKING(whether compiler has attributes to deprecate functions) + + + OLD_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="" + + dnl First see if the following compiles without error (it should + dnl produce a warning but we don't care about this + AC_TRY_COMPILE( + [ + int old_fn () __attribute__((deprecated)); + int old_fn (); + int (*fn_ptr)() = old_fn; + ], + [;], + [ + test1=yes + ], + [ + test1=no + ]) + + dnl Now try this again with -Werror. It should now fail + CXXFLAGS=-Werror + AC_TRY_COMPILE( + [ + int old_fn () __attribute__((deprecated)); + int old_fn (); + int (*fn_ptr)() = old_fn; + ], + [;], + [ + test2=yes + ], + [ + test2=no + ]) + CXXFLAGS="${OLD_CXXFLAGS}" + + if test "$test1$test2" = "yesno" ; then + AC_MSG_RESULT(yes) + AC_DEFINE(DEAL_II_DEPRECATED, [__attribute__((deprecated))], + [If the compiler supports this, then this variable is + defined to a string that when written after a function + name makes the compiler emit a warning whenever this + function is used somewhere that its use is deprecated.]) + else + AC_MSG_RESULT(no) + AC_DEFINE(DEAL_II_DEPRECATED, [], + [If the compiler supports this, then this variable is + defined to a string that when written after a function + name makes the compiler emit a warning whenever this + function is used somewhere that its use is deprecated.]) + fi +]) + + + dnl ------------------------------------------------------------- dnl Determine the C compiler in use. Return the name and possibly dnl version of this compiler in CC_VERSION. This function is almost @@ -1680,7 +1775,7 @@ AC_DEFUN(DEAL_II_SET_CC_FLAGS, dnl clang) CFLAGS="$CFLAGS -g" - CFLAGSO="$CFLAGS -fast -O2" + CFLAGSO="$CFLAGS -O2" CFLAGSPIC="-fPIC" ;; @@ -1978,6 +2073,7 @@ AC_DEFUN(DEAL_II_CHECK_DYNAMIC_CAST_BUG, AC_MSG_CHECKING(for dynamic_cast problem with shared libs) if (cd contrib/config/tests/darwin-dynamic-cast ; \ + echo $CXX > compile_line; \ $CXX -dynamiclib BaseClass.cpp -o libDynamicCastTestLib.dylib ; \ $CXX -L. -lDynamicCastTestLib main.cc -o main ; \ ./main) ; then @@ -1987,9 +2083,11 @@ AC_DEFUN(DEAL_II_CHECK_DYNAMIC_CAST_BUG, AC_DEFINE(DEAL_II_HAVE_DARWIN_DYNACAST_BUG, 1, [Defined if the compiler has a bug with dynamic casting and dynamic libraries]) - CXXFLAGSG="$CXXFLAGSG -mmacosx-version-min=10.4" - CXXFLAGSO="$CXXFLAGSO -mmacosx-version-min=10.4" - LDFLAGS="$LDFLAGS -mmacosx-version-min=10.4" + if(test "`sw_vers -productVersion`" != "10.8");then + CXXFLAGSG="$CXXFLAGSG -mmacosx-version-min=10.4" + CXXFLAGSO="$CXXFLAGSO -mmacosx-version-min=10.4" + LDFLAGS="$LDFLAGS -mmacosx-version-min=10.4" + fi fi rm -f contrib/config/tests/darwin-dynamic-cast/libDynamicCastTestLib.dylib rm -f contrib/config/tests/darwin-dynamic-cast/main.o @@ -5602,12 +5700,6 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC_ARCH, dnl dnl from time-to-time; so make sure that what was specified is dnl actually correct. case "${DEAL_II_PETSC_VERSION_MAJOR}.${DEAL_II_PETSC_VERSION_MINOR}.${DEAL_II_PETSC_VERSION_SUBMINOR}" in - 2.3*) dnl - if test ! -d $DEAL_II_PETSC_DIR/lib/$DEAL_II_PETSC_ARCH \ - ; then - AC_MSG_ERROR([PETSc has not been compiled for the architecture specified with --with-petsc-arch]) - fi - ;; 3.*) dnl if test ! -d $DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/lib \ ; then @@ -5683,18 +5775,6 @@ AC_DEFUN(DEAL_II_CHECK_PETSC_MPI_CONSISTENCY, dnl dnl dnl Like always, we have to cake care of version control! case "${DEAL_II_PETSC_VERSION_MAJOR}.${DEAL_II_PETSC_VERSION_MINOR}.${DEAL_II_PETSC_VERSION_SUBMINOR}" in - 2.3.*) dnl - AC_TRY_COMPILE( - [#include "$DEAL_II_PETSC_DIR/bmake/$DEAL_II_PETSC_ARCH/petscconf.h" - ], - [#ifdef PETSC_HAVE_MPIUNI - compile error; - #endif - ], - [AC_MSG_RESULT(yes)], - [AC_MSG_ERROR([PETSc was not built for MPI, but deal.II is!] - )]) - ;; 3.*) dnl AC_TRY_COMPILE( [#include "$DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/include/petscconf.h" @@ -5713,18 +5793,6 @@ AC_DEFUN(DEAL_II_CHECK_PETSC_MPI_CONSISTENCY, dnl esac else case "${DEAL_II_PETSC_VERSION_MAJOR}.${DEAL_II_PETSC_VERSION_MINOR}.${DEAL_II_PETSC_VERSION_SUBMINOR}" in - 2.3*) dnl - AC_TRY_COMPILE( - [#include "$DEAL_II_PETSC_DIR/bmake/$DEAL_II_PETSC_ARCH/petscconf.h" - ], - [#ifndef PETSC_HAVE_MPIUNI - compile error; - #endif - ], - [AC_MSG_RESULT(yes)], - [AC_MSG_ERROR([PETSc was built for MPI, but deal.II is not!] - )]) - ;; 3.*) dnl AC_TRY_COMPILE( [#include "$DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/include/petscconf.h" @@ -5757,11 +5825,6 @@ AC_DEFUN(DEAL_II_CONFIGURE_PETSC_MPIUNI_LIB, dnl [ AC_MSG_CHECKING([for PETSc libmpiuni library]) case "${DEAL_II_PETSC_VERSION_MAJOR}.${DEAL_II_PETSC_VERSION_MINOR}.${DEAL_II_PETSC_VERSION_SUBMINOR}" in - 2.3*) dnl - if test -f $DEAL_II_PETSC_DIR/lib/$DEAL_II_PETSC_ARCH/libmpiuni.a ; then - DEAL_II_PETSC_MPIUNI_LIB="$DEAL_II_PETSC_DIR/lib/$DEAL_II_PETSC_ARCH/libmpiuni.a" - fi - ;; 3.*) dnl if test -f $DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/lib/libmpiuni.a ; then DEAL_II_PETSC_MPIUNI_LIB="$DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/lib/libmpiuni.a" @@ -5793,7 +5856,7 @@ dnl ------------------------------------------------------------ AC_DEFUN(DEAL_II_CONFIGURE_PETSC_COMPLEX, dnl [ case "${DEAL_II_PETSC_VERSION_MAJOR}.${DEAL_II_PETSC_VERSION_MINOR}.${DEAL_II_PETSC_VERSION_SUBMINOR}" in - 3.1*) + 3.3*) AC_MSG_CHECKING([for PETSc scalar complex]) DEAL_II_PETSC_COMPLEX=`cat $DEAL_II_PETSC_DIR/$DEAL_II_PETSC_ARCH/include/petscconf.h \ | grep "#define PETSC_USE_COMPLEX" \ @@ -6550,6 +6613,252 @@ AC_DEFUN(DEAL_II_CHECK_TRILINOS_HEADER_FILES, dnl CXXFLAGS="${OLD_CXXFLAGS}" ]) +dnl =========================================================================== +dnl http://www.gnu.org/software/autoconf-archive/ax_lib_hdf5.html +dnl =========================================================================== +dnl +dnl SYNOPSIS +dnl +dnl AX_LIB_HDF5([serial/parallel]) +dnl +dnl DESCRIPTION +dnl +dnl This macro provides tests of the availability of HDF5 library. +dnl +dnl The optional macro argument should be either 'serial' or 'parallel'. The +dnl former only looks for serial HDF5 installations via h5cc. The latter +dnl only looks for parallel HDF5 installations via h5pcc. If the optional +dnl argument is omitted, serial installations will be preferred over +dnl parallel ones. +dnl +dnl The macro adds a --with-hdf5 option accepting one of three values: +dnl +dnl no - do not check for the HDF5 library. +dnl yes - do check for HDF5 library in standard locations. +dnl path - complete path to where lib/libhdf5* libraries and +dnl include/H5* include files reside. +dnl +dnl If HDF5 is successfully found, this macro calls +dnl +dnl AC_SUBST(DEAL_II_HDF5_VERSION) +dnl AC_SUBST(DEAL_II_HDF5_CFLAGS) +dnl AC_SUBST(DEAL_II_HDF5_CPPFLAGS) +dnl AC_SUBST(DEAL_II_HDF5_LDFLAGS) +dnl AC_SUBST(DEAL_II_HDF5_INCDIR) +dnl AC_DEFINE(DEAL_II_HAVE_HDF5) +dnl +dnl and sets with_hdf5="yes". +dnl +dnl If HDF5 is disabled or not found, this macros sets with_hdf5="no". +dnl +dnl Your configuration script can test $with_hdf to take any further +dnl actions. HDF5_{C,CPP,LD}FLAGS may be used when building with C or C++. +dnl +dnl LICENSE +dnl +dnl Copyright (c) 2009 Timothy Brown +dnl Copyright (c) 2010 Rhys Ulerich +dnl +dnl Copying and distribution of this file, with or without modification, are +dnl permitted in any medium without royalty provided the copyright notice +dnl and this notice are preserved. This file is offered as-is, without any +dnl warranty. + +AC_DEFUN(DEAL_II_CONFIGURE_HDF5, dnl +[ + +AC_REQUIRE([AC_PROG_SED]) +AC_REQUIRE([AC_PROG_AWK]) +AC_REQUIRE([AC_PROG_GREP]) + +dnl Add a default --with-hdf5 configuration option. +AC_ARG_WITH([hdf5], + AS_HELP_STRING( + [--with-hdf5=[yes/no/PATH]], + m4_case(m4_normalize([$1]), + [serial], [location of h5cc for serial HDF5 configuration], + [parallel], [location of h5pcc for parallel HDF5 configuration], + [location of h5cc or h5pcc for HDF5 configuration]) + ), + [if test "$withval" = "no"; then + with_hdf5="no" + elif test "$withval" = "yes"; then + with_hdf5="yes" + warn_if_cannot_find_hdf5="yes" + elif test -z "$withval"; then + with_hdf5="yes" + H5CC="$withval" + else + warn_if_cannot_find_hdf5="yes" + with_hdf5="yes" + H5CC="$withval" + fi], + [with_hdf5="yes"] +) + +dnl Set defaults to blank +USE_CONTRIB_HDF5=no +DEAL_II_HDF5_VERSION="" +DEAL_II_HDF5_CFLAGS="" +DEAL_II_HDF5_CPPFLAGS="" +DEAL_II_HDF5_LDFLAGS="" +DEAL_II_HDF5_INCDIR="" + +dnl Try and find hdf5 compiler tools and options. +if test "$with_hdf5" = "yes"; then + if test -z "$H5CC"; then + dnl Check to see if H5CC is in the path. + AC_PATH_PROGS( + [H5CC], + m4_case(m4_normalize([$1]), + [serial], [h5cc], + [parallel], [h5pcc], + [h5cc h5pcc]), + []) + else + AC_MSG_CHECKING([Using provided HDF5 C wrapper]) + AC_MSG_RESULT([$H5CC]) + fi + AC_MSG_CHECKING([for HDF5 libraries]) + if test ! -x "$H5CC"; then + AC_MSG_RESULT([no]) + if test "$warn_if_cannot_find_hdf5" = "yes"; then + AC_MSG_WARN(m4_case(m4_normalize([$1]), + [serial], [ +Unable to locate serial HDF5 compilation helper script 'h5cc'. +Please specify --with-hdf5= as the full path to h5cc. +HDF5 support is being disabled (equivalent to --with-hdf5=no). +], [parallel],[ +Unable to locate parallel HDF5 compilation helper script 'h5pcc'. +Please specify --with-hdf5= as the full path to h5pcc. +HDF5 support is being disabled (equivalent to --with-hdf5=no). +], [ +Unable to locate HDF5 compilation helper scripts 'h5cc' or 'h5pcc'. +Please specify --with-hdf5= as the full path to h5cc or h5pcc. +HDF5 support is being disabled (equivalent to --with-hdf5=no). +])) + fi + with_hdf5="no" + else + dnl h5cc provides both AM_ and non-AM_ options + dnl depending on how it was compiled either one of + dnl these are empty. Lets roll them both into one. + + dnl Look for "HDF5 Version: X.Y.Z" + DEAL_II_HDF5_VERSION=$(eval $H5CC -showconfig | grep 'HDF5 Version:' \ + | $AWK '{print $[]3}') + +dnl A ideal situation would be where everything we needed was +dnl in the AM_* variables. However most systems are not like this +dnl and seem to have the values in the non-AM variables. +dnl +dnl We try the following to find the flags: +dnl (1) Look for "NAME:" tags +dnl (2) Look for "NAME/H5_NAME:" tags +dnl (3) Look for "AM_NAME:" tags +dnl + dnl (1) + dnl Look for "CFLAGS: " + DEAL_II_HDF5_CFLAGS=$(eval $H5CC -showconfig | grep '\bCFLAGS:' \ + | $AWK -F: '{print $[]2}') + dnl Look for "CPPFLAGS" + DEAL_II_HDF5_CPPFLAGS=$(eval $H5CC -showconfig | grep '\bCPPFLAGS:' \ + | $AWK -F: '{print $[]2}') + dnl Look for "LD_FLAGS" + DEAL_II_HDF5_LDFLAGS=$(eval $H5CC -showconfig | grep '\bLDFLAGS:' \ + | $AWK -F: '{print $[]2}') + + dnl (2) + dnl CFLAGS/H5_CFLAGS: .../.... + dnl We could use $SED with something like the following + dnl 's/CFLAGS.*\/H5_CFLAGS.*[:]\(.*\)\/\(.*\)/\1/p' + if test -z "$DEAL_II_HDF5_CFLAGS"; then + DEAL_II_HDF5_CFLAGS=$(eval $H5CC -showconfig \ + | $SED -n 's/CFLAGS.*[:]\(.*\)\/\(.*\)/\1/p') + fi + dnl Look for "CPPFLAGS" + if test -z "$DEAL_II_HDF5_CPPFLAGS"; then + DEAL_II_HDF5_CPPFLAGS=$(eval $H5CC -showconfig \ + | $SED -n 's/CPPFLAGS.*[:]\(.*\)\/\(.*\)/\1/p') + fi + dnl Look for "LD_FLAGS" + if test -z "$DEAL_II_HDF5_LDFLAGS"; then + DEAL_II_HDF5_LDFLAGS=$(eval $H5CC -showconfig \ + | $SED -n 's/LDFLAGS.*[:]\(.*\)\/\(.*\)/\1/p') + fi + + dnl (3) + dnl Check to see if these are not empty strings. If so + dnl find the AM_ versions and use them. + if test -z "$DEAL_II_HDF5_CFLAGS"; then + DEAL_II_HDF5_CFLAGS=$(eval $H5CC -showconfig \ + | grep '\bAM_CFLAGS:' | $AWK -F: '{print $[]2}') + fi + if test -z "$DEAL_II_HDF5_CPPFLAGS"; then + DEAL_II_HDF5_CPPFLAGS=$(eval $H5CC -showconfig \ + | grep '\bAM_CPPFLAGS:' | $AWK -F: '{print $[]2}') + fi + if test -z "$DEAL_II_HDF5_LDFLAGS"; then + DEAL_II_HDF5_LDFLAGS=$(eval $H5CC -showconfig \ + | grep '\bAM_LDFLAGS:' | $AWK -F: '{print $[]2}') + fi + + dnl Frustratingly, the necessary -Idir,-Ldir still may not be found! + dnl Attempt to pry any more required include directories from wrapper. + for arg in `$H5CC -c -show` + do + case "$arg" in #( + -I*) echo $DEAL_II_HDF5_CPPFLAGS | $GREP -e "$arg" 2>&1 >/dev/null \ + || DEAL_II_HDF5_CPPFLAGS="$arg $DEAL_II_HDF5_CPPFLAGS" + ;; + esac + done + for arg in `$H5CC -show` + do + case "$arg" in #( + -L*) echo $DEAL_II_HDF5_LDFLAGS | $GREP -e "$arg" 2>&1 >/dev/null \ + || DEAL_II_HDF5_LDFLAGS="$arg $DEAL_II_HDF5_LDFLAGS" + ;; + esac + done + + AC_MSG_RESULT([yes (version $[DEAL_II_HDF5_VERSION])]) + + dnl Look for any extra libraries also needed to link properly + EXTRA_LIBS=$(eval $H5CC -showconfig | grep 'Extra libraries:'\ + | $AWK -F: '{print $[]2}') + + dnl Look for HDF5's high level library + ax_lib_hdf5_save_LDFLAGS=$LDFLAGS + ax_lib_hdf5_save_LIBS=$LIBS + LDFLAGS=$DEAL_II_HDF5_LDFLAGS + AC_HAVE_LIBRARY([hdf5_hl], + [DEAL_II_HDF5_LDFLAGS="$DEAL_II_HDF5_LDFLAGS -lhdf5_hl"], + [], + [-lhdf5 $EXTRA_LIBS]) + LIBS=$ax_lib_hdf5_save_LIBS + LDFLAGS=$ax_lib_hdf5_save_LDFLAGS + + dnl Add the HDF5 library itself + DEAL_II_HDF5_LDFLAGS="$DEAL_II_HDF5_LDFLAGS -lhdf5" + + dnl Add any EXTRA_LIBS afterwards + if test "$EXTRA_LIBS"; then + DEAL_II_HDF5_LDFLAGS="$DEAL_II_HDF5_LDFLAGS $EXTRA_LIBS" + fi + + dnl remove "-I" from cpp flags to get include path + DEAL_II_HDF5_INCDIR=$(eval echo $DEAL_II_HDF5_CPPFLAGS | cut -c 3-) + + LDFLAGS="$LDFLAGS $DEAL_II_HDF5_LDFLAGS" + USE_CONTRIB_HDF5=yes + AC_DEFINE([DEAL_II_HAVE_HDF5], [1], [Defined if you have HDF5 support]) + fi +fi +]) + + + dnl ------------------------------------------------------------ @@ -6729,68 +7038,61 @@ AC_DEFUN(DEAL_II_CONFIGURE_METIS, dnl AC_ARG_WITH(metis, [AS_HELP_STRING([--with-metis=/path/to/metis], - [Specify the path to the Metis installation, of which the include and library directories are subdirs; use this if you want to override the METIS_DIR environment variable.])], + [Specify the path to the Metis installation, of which the include and library directories are subdirs; use this if you want to override the METIS_DIR environment variable.])], [ + AC_MSG_CHECKING([for METIS library directory]) USE_CONTRIB_METIS=yes DEAL_II_METIS_DIR="$withval" AC_MSG_RESULT($DEAL_II_METIS_DIR) - dnl Make sure that what was specified is actually correct - if test ! -d $DEAL_II_METIS_DIR/Lib ; then + dnl Make sure that what was specified is actually correct. The + dnl libraries could be in either $DEAL_II_METIS_DIR/lib (metis was + dnl make installed) or $DEAL_II_METIS_DIR/libmetis (metis was make + dnl only and PETSc). + if test ! -d $DEAL_II_METIS_DIR/lib \ + && test ! -d $DEAL_II_METIS_DIR/libmetis ; then AC_MSG_ERROR([Path to Metis specified with --with-metis does not point to a complete Metis installation]) fi - DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR" + dnl If lib is not found, we must have libraries in libmetis + dnl (which was found above). + if test -d $DEAL_II_METIS_DIR/lib ; then + DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR/lib" + else + DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR/libmetis" + fi + + if test ! -d $DEAL_II_METIS_DIR/include ; then + AC_MSG_ERROR([Path to Metis specified with --with-metis does not point to a complete Metis installation]) + fi + + DEAL_II_METIS_INCDIR="$DEAL_II_METIS_DIR/include" ], [ dnl Take something from the environment variables, if it is there if test "x$METIS_DIR" != "x" ; then + AC_MSG_CHECKING([for METIS from the environment]) USE_CONTRIB_METIS=yes DEAL_II_METIS_DIR="$METIS_DIR" AC_MSG_RESULT($DEAL_II_METIS_DIR) - dnl Make sure that what this is actually correct - if test ! -d $DEAL_II_METIS_DIR/Lib ; then + dnl Make sure that what this is actually correct (see notes above). + if test ! -d $DEAL_II_METIS_DIR/lib \ + && test ! -d $DEAL_II_METIS_DIR/libmetis ; then AC_MSG_ERROR([The path to Metis specified in the METIS_DIR environment variable does not point to a complete Metis installation]) fi - DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR" - else - USE_CONTRIB_METIS=no - DEAL_II_METIS_DIR="" - fi - ]) - AC_ARG_WITH(metis-libs, - [AS_HELP_STRING([--with-metis-libs=/path/to/metis], - [Specify the path to the METIS libraries; use this if you want to override the METIS_LIBDIR environment variable.])], - [ - USE_CONTRIB_METIS=yes - DEAL_II_METIS_LIBDIR="$withval" - AC_MSG_RESULT($DEAL_II_METIS_LIBDIR) + if test -d $DEAL_II_METIS_DIR/lib ; then + DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR/lib" + else + DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR/libmetis" + fi - dnl Make sure that what was specified is actually correct - if test ! -d $DEAL_II_METIS_LIBDIR ; then - AC_MSG_ERROR([Path to Metis specified with --with-metis does not point to a complete Metis installation]) - fi - ], - [ - dnl Take something from the environment variables, if it is there - if test "x$METIS_LIBDIR" != "x" ; then - USE_CONTRIB_METIS=yes - DEAL_II_METIS_LIBDIR="$METIS_LIBDIR" - AC_MSG_RESULT($DEAL_II_METIS_LIBDIR) + DEAL_II_METIS_INCDIR="$DEAL_II_METIS_DIR/include" - dnl Make sure that what this is actually correct - if test ! -d $DEAL_II_METIS_LIBDIR ; then - AC_MSG_ERROR([The path to Metis specified in the METIS_DIR environment variable does not point to a complete Metis installation]) - fi else - dnl Unless --with-metis has been set before, declare that METIS - dnl is not desired. - if test "x$USE_CONTRIB_METIS" != "xyes" ; then - USE_CONTRIB_METIS=no - DEAL_II_METIS_LIBDIR="" - fi + USE_CONTRIB_METIS=no + DEAL_II_METIS_DIR="" fi ]) @@ -6800,6 +7102,10 @@ AC_DEFUN(DEAL_II_CONFIGURE_METIS, dnl to be used]) LDFLAGS="$LDFLAGS -L$DEAL_II_METIS_LIBDIR -lmetis" + if test "x$DEAL_II_LD_UNDERSTANDS_RPATH" = "xyes" ; then + LDFLAGS="$LDFLAGS $LD_PATH_OPTION$DEAL_II_METIS_LIBDIR" + fi + dnl AC_MSG_CHECKING(for Metis version) dnl DEAL_II_METIS_VERSION=`cat $DEAL_II_METIS_DIR/VERSION` dnl AC_MSG_RESULT($DEAL_II_METIS_VERSION) diff --git a/deal.II/common/Make.global_options.in b/deal.II/common/Make.global_options.in index 80928d3ba8..159d16c66d 100644 --- a/deal.II/common/Make.global_options.in +++ b/deal.II/common/Make.global_options.in @@ -76,6 +76,13 @@ DEAL_II_TRILINOS_VERSION_MINOR = @DEAL_II_TRILINOS_VERSION_MINOR@ DEAL_II_TRILINOS_VERSION_SUBMINOR = @DEAL_II_TRILINOS_VERSION_SUBMINOR@ DEAL_II_TRILINOS_LIBPREFIX = @DEAL_II_TRILINOS_LIBPREFIX@ +USE_CONTRIB_HDF5 = @USE_CONTRIB_HDF5@ +DEAL_II_HDF5_VERSION = @DEAL_II_HDF5_VERSION@ +DEAL_II_HDF5_CFLAGS = @DEAL_II_HDF5_CFLAGS@ +DEAL_II_HDF5_CPPFLAGS = @DEAL_II_HDF5_CPPFLAGS@ +DEAL_II_HDF5_LDFLAGS = @DEAL_II_HDF5_LDFLAGS@ +DEAL_II_HDF5_INCDIR = @DEAL_II_HDF5_INCDIR@ + USE_CONTRIB_BLAS = @USE_CONTRIB_BLAS@ USE_CONTRIB_LAPACK = @USE_CONTRIB_LAPACK@ @@ -90,7 +97,9 @@ DEAL_II_ARPACK_DIR = @DEAL_II_ARPACK_DIR@ DEAL_II_ARPACK_ARCH = @DEAL_II_ARPACK_ARCH@ USE_CONTRIB_METIS = @USE_CONTRIB_METIS@ +DEAL_II_METIS_DIR = @DEAL_II_METIS_DIR@ DEAL_II_METIS_LIBDIR = @DEAL_II_METIS_LIBDIR@ +DEAL_II_METIS_INCDIR = @DEAL_II_METIS_INCDIR@ USE_CONTRIB_HSL = @USE_CONTRIB_HSL@ USE_CONTRIB_UMFPACK = @USE_CONTRIB_UMFPACK@ @@ -162,31 +171,20 @@ endif # we can link to directly. This avoids problems with recent versions # of gcc. ifeq ($(USE_CONTRIB_PETSC),yes) - ifeq ($(DEAL_II_PETSC_VERSION_MAJOR),2) - lib-contrib-petsc-path.g = $(DEAL_II_PETSC_DIR)/lib/$(DEAL_II_PETSC_ARCH) - lib-contrib-petsc-path.o = $(DEAL_II_PETSC_DIR)/lib/$(DEAL_II_PETSC_ARCH) - else - lib-contrib-petsc-path.g = $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib - lib-contrib-petsc-path.o = $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib - endif + lib-contrib-petsc-path.g = $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib + lib-contrib-petsc-path.o = $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib ifeq ($(enable-shared),yes) - # Starting with PETSc versions 2.3.*: - ifeq ($(DEAL_II_PETSC_VERSION_MAJOR),2) - lib-contrib-petsc.g = $(shell echo $(DEAL_II_PETSC_DIR)/lib/$(DEAL_II_PETSC_ARCH)/*$(lib-suffix)) - lib-contrib-petsc.o = $(shell echo $(DEAL_II_PETSC_DIR)/lib/$(DEAL_II_PETSC_ARCH)/*$(lib-suffix)) + # Starting with PETSc versions 3.0.0: + ifeq ($(DEAL_II_PETSC_VERSION_MAJOR)$(DEAL_II_PETSC_VERSION_MINOR),30) + lib-contrib-petsc.g = $(shell echo $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/*$(lib-suffix)) + lib-contrib-petsc.o = $(shell echo $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/*$(lib-suffix)) else - # which is the similar as for PETSc 3.0.0: - ifeq ($(DEAL_II_PETSC_VERSION_MAJOR)$(DEAL_II_PETSC_VERSION_MINOR),30) - lib-contrib-petsc.g = $(shell echo $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/*$(lib-suffix)) - lib-contrib-petsc.o = $(shell echo $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/*$(lib-suffix)) - else - # but after that (petsc-3.1++), we can use the simpler PETSc - # default "--with-single-library=1" like this: - lib-contrib-petsc.g = $(shell echo $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/libpetsc$(lib-suffix)) - lib-contrib-petsc.o = $(shell echo $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/libpetsc$(lib-suffix)) - endif - endif # if PETSC_VERSION + # but after that (petsc-3.1++), we can use the simpler PETSc + # default "--with-single-library=1" like this: + lib-contrib-petsc.g = $(shell echo $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/libpetsc$(lib-suffix)) + lib-contrib-petsc.o = $(shell echo $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/libpetsc$(lib-suffix)) + endif else # and finally this goes for static libraries lib-contrib-petsc.g = $(LIBDIR)/libpetscall.g$(lib-suffix) @@ -200,7 +198,7 @@ endif # same for metis, except that there is only one library in that case ifeq ($(USE_CONTRIB_METIS),yes) - lib-contrib-metis = $(DEAL_II_METIS_LIBDIR)/libmetis.a + lib-contrib-metis = $(DEAL_II_METIS_LIBDIR)/libmetis$(lib-suffix) endif # List all trilinos libraries that we want to link with. These must be sorted @@ -273,16 +271,15 @@ lib-deal2.g = $(LIBDIR)/libdeal_II.g$(lib-suffix) \ # environment variable, since the compiler will evaluate the value of # that anyway at compile time include-path-petsc = $(DEAL_II_PETSC_DIR)/include -ifeq ($(DEAL_II_PETSC_VERSION_MAJOR),2) - include-path-petsc-bmake = $(DEAL_II_PETSC_DIR)/bmake/$(DEAL_II_PETSC_ARCH) -else - include-path-petsc-bmake = $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/include -endif +include-path-petsc-bmake = $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/include include-path-slepc = $(DEAL_II_SLEPC_DIR)/include include-path-slepc-bmake = $(DEAL_II_SLEPC_DIR)/$(DEAL_II_PETSC_ARCH)/include include-path-slepc-conf = $(DEAL_II_SLEPC_DIR)/$(DEAL_II_PETSC_ARCH)/conf include-path-trilinos = $(DEAL_II_TRILINOS_INCDIR) include-path-mumps = $(DEAL_II_MUMPS_DIR)/include +include-path-metis = $(DEAL_II_METIS_INCDIR) +include-path-hdf5 = $(DEAL_II_HDF5_INCDIR) + # include paths as command line flags. while compilers allow a space between # the '-I' and the actual path, we also send these flags to the @@ -305,9 +302,6 @@ INCLUDE = -I$D/include \ # # also, note that this only works for PETSc before 2.3 :-] ifeq ($(USE_CONTRIB_PETSC),yes) - ifeq ($(DEAL_II_PETSC_VERSION_MAJOR)$(DEAL_II_PETSC_VERSION_MINOR),22) - include $(DEAL_II_PETSC_DIR)/bmake/$(DEAL_II_PETSC_ARCH)/packages - endif INCLUDE += -I$(include-path-petsc) \ -I$(include-path-petsc-bmake) \ $(MPI_INCLUDE) @@ -327,6 +321,15 @@ ifeq ($(USE_CONTRIB_MUMPS),yes) INCLUDE += -I$(include-path-mumps) endif +ifeq ($(USE_CONTRIB_METIS),yes) + INCLUDE += -I$(include-path-metis) +endif + +ifeq ($(USE_CONTRIB_HDF5),yes) + INCLUDE += -I$(include-path-hdf5) +endif + + ifeq ($(enable-threads),yes) INCLUDE += -I$(shell echo $D/contrib/tbb/tbb*/include) endif @@ -353,24 +356,25 @@ ifeq ($(USE_CONTRIB_PETSC),yes) # set PETSC_DIR and PETSC_ARCH to be used in variables file PETSC_DIR = $(DEAL_II_PETSC_DIR) PETSC_ARCH = $(DEAL_II_PETSC_ARCH) - ifeq ($(DEAL_II_PETSC_VERSION_MAJOR),2) - ifeq ($(DEAL_II_PETSC_VERSION_MINOR),2) - include $(DEAL_II_PETSC_DIR)/bmake/$(DEAL_II_PETSC_ARCH)/variables - else - include $(DEAL_II_PETSC_DIR)/bmake/common/variables - endif - else - # PETSC's $(PETSC_ARCH)/conf/petscvariables include file happens - # to have a variable $(CXX) of itself. we need to save our own - # variable and restore it later. this isn't pretty :-( - SAVE_CXX := $(CXX) - include $(DEAL_II_PETSC_DIR)/conf/variables - CXX := $(SAVE_CXX) - endif + + # PETSC's $(PETSC_ARCH)/conf/petscvariables include file happens + # to have a variable $(CXX) of itself. we need to save our own + # variable and restore it later. this isn't pretty :-( + SAVE_CXX := $(CXX) + include $(DEAL_II_PETSC_DIR)/conf/variables + CXX := $(SAVE_CXX) + CXXFLAGS.g += $(GCXX_PETSCFLAGS) CXXFLAGS.o += $(OCXX_PETSCFLAGS) endif +ifeq ($(USE_CONTRIB_HDF5),yes) + CFLAGS.g += $(DEAL_II_HDF5_CFLAGS) + CFLAGS.o += $(DEAL_II_HDF5_CFLAGS) + CXXFLAGS.g += $(DEAL_II_HDF5_CXXFLAGS) + CXXFLAGS.o += $(DEAL_II_HDF5_CXXFLAGS) +endif + ifneq ($(enable-threads),no) MT = MT else @@ -380,15 +384,13 @@ endif ifeq ($(BUILDTEST),yes) print-summary: - @echo "dealii-feature: revision=`svn info .. | grep Revision | sed 's/Revision: //'`" + @svn info .. | perl -ne 'print "dealii-feature: revision=$$_\n" if s/Revision: //; print "dealii-feature: branch=$$1\n" if m/svn\/dealii\/(.+)\/deal.II/;' @echo "dealii-feature: user=$(USER)" @echo "dealii-feature: host=`hostname`" @echo "dealii-feature: target=$(TARGET)" @echo "dealii-feature: compiler=$(GXX-VERSION-DETAILED)" @echo "dealii-feature: multithreading=$(enable-threads)" @echo "dealii-feature: shared_libs=$(enable-shared)" - @echo "dealii-feature: parser=$(subst no,,$(enable-parser))" - @echo "dealii-feature: PETSc=$(subst ..,,$(DEAL_II_PETSC_VERSION_MAJOR).$(DEAL_II_PETSC_VERSION_MINOR).$(DEAL_II_PETSC_VERSION_SUBMINOR))" @echo "dealii-feature: METIS=$(subst no,,$(USE_CONTRIB_METIS))" @cd $D/common/scripts ; make report_features && ./report_features endif diff --git a/deal.II/common/scripts/report_features.cc b/deal.II/common/scripts/report_features.cc index eb913867f6..70eed0faba 100644 --- a/deal.II/common/scripts/report_features.cc +++ b/deal.II/common/scripts/report_features.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2010, 2011 by the deal.II authors +// Copyright (C) 2010, 2011, 2012 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -42,6 +42,12 @@ extern "C" { # include #endif +// Output configuration options from config.h. +// The format of each line is +// +// deal-feature: FEATURE=value +// +// no spaces in any token! int main() { @@ -62,7 +68,7 @@ int main() #if defined(DEAL_II_COMPILER_SUPPORTS_MPI) # ifdef OMPI_MAJOR_VERSION - std::cout << "dealii-feature: MPI=OpenMPI
" + std::cout << "dealii-feature: MPI=OpenMPI-" << OMPI_MAJOR_VERSION << '.' << OMPI_MINOR_VERSION << '.' << OMPI_RELEASE_VERSION << std::endl; @@ -116,4 +122,31 @@ int main() #endif std::cout << std::endl; #endif + +#ifdef DEAL_II_USE_P4EST + std::cout << "dealii-feature: P4est=yes" << std::endl; +#endif + +#ifdef DEAL_II_HAVE_HDF5 + std::cout << "dealii-feature: HDF5=yes" << std::endl; +#endif + +#ifdef DEAL_II_HAVE_TECPLOT + std::cout << "dealii-feature: Tecplot=yes" << std::endl; +#endif + +#ifdef HAVE_LIBNETCDF + std::cout << "dealii-feature: NetCDF=yes" << std::endl; +#endif + +#ifdef HAVE_LIBZ + std::cout << "dealii-feature: LibZ=yes" << std::endl; +#endif + +#ifdef DEAL_II_DISABLE_PARSER + std::cout << "dealii-feature: parser=no" << std::endl; +#else + std::cout << "dealii-feature: parser=yes" << std::endl; +#endif + } diff --git a/deal.II/configure.in b/deal.II/configure.in index 747709fe0e..c7f7c4d868 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -23,7 +23,7 @@ dnl clearing the cache define([AC_CACHE_LOAD], )dnl define([AC_CACHE_SAVE], )dnl -AC_INIT(deal.II, 7.2.pre, dealii@dealii.org, deal.II) +AC_INIT(deal.II, 7.3.pre, dealii@dealii.org, deal.II) AC_REVISION($Revision$) AC_PREREQ(2.61) @@ -507,6 +507,15 @@ AC_SUBST(DEAL_II_TRILINOS_LIBDIR) AC_SUBST(DEAL_II_TRILINOS_SHARED) AC_SUBST(DEAL_II_TRILINOS_STATIC) +DEAL_II_CONFIGURE_HDF5 +AC_SUBST(USE_CONTRIB_HDF5) +AC_SUBST(DEAL_II_HDF5_VERSION) +AC_SUBST(DEAL_II_HDF5_CFLAGS) +AC_SUBST(DEAL_II_HDF5_CPPFLAGS) +AC_SUBST(DEAL_II_HDF5_LDFLAGS) +AC_SUBST(DEAL_II_HDF5_INCDIR) + + DEAL_II_CONFIGURE_ARPACK AC_SUBST(USE_CONTRIB_ARPACK) AC_SUBST(DEAL_II_ARPACK_DIR) @@ -650,7 +659,9 @@ DEAL_II_CONFIGURE_NETCDF DEAL_II_CONFIGURE_METIS AC_SUBST(USE_CONTRIB_METIS) +AC_SUBST(DEAL_II_METIS_DIR) AC_SUBST(DEAL_II_METIS_LIBDIR) +AC_SUBST(DEAL_II_METIS_INCDIR) dnl Check for UMFPack DEAL_II_WITH_UMFPACK diff --git a/deal.II/contrib/boost-1.49.0/include/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp b/deal.II/contrib/boost-1.49.0/include/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp index 02fd8f7fe8..5898c6b978 100644 --- a/deal.II/contrib/boost-1.49.0/include/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp +++ b/deal.II/contrib/boost-1.49.0/include/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp @@ -18,4 +18,4 @@ #include #else #error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers" -#endif \ No newline at end of file +#endif diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python.hpp deleted file mode 100644 index ae49abaf10..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python.hpp +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/python for documentation. - -#ifndef PYTHON_DWA2002810_HPP -# define PYTHON_DWA2002810_HPP - -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include - -#endif // PYTHON_DWA2002810_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/arg_from_python.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/arg_from_python.hpp deleted file mode 100644 index 05611edbbd..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/arg_from_python.hpp +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef ARG_FROM_PYTHON_DWA2002128_HPP -# define ARG_FROM_PYTHON_DWA2002128_HPP - -# include -# include -# if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ - || BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(800)) -# include -#endif - -namespace boost { namespace python { - -template -struct arg_from_python - : converter::select_arg_from_python< -# if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ - || BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(800)) - typename boost::remove_cv::type -# else - T -# endif - >::type -{ - typedef typename converter::select_arg_from_python< -# if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ - || BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(800)) - typename boost::remove_cv::type -# else - T -# endif - >::type base; - - arg_from_python(PyObject*); -}; - -// specialization for PyObject* -template <> -struct arg_from_python -{ - typedef PyObject* result_type; - - arg_from_python(PyObject* p) : m_source(p) {} - bool convertible() const { return true; } - PyObject* operator()() const { return m_source; } - private: - PyObject* m_source; -}; - -template <> -struct arg_from_python -{ - typedef PyObject* const& result_type; - - arg_from_python(PyObject* p) : m_source(p) {} - bool convertible() const { return true; } - PyObject*const& operator()() const { return m_source; } - private: - PyObject* m_source; -}; - -// -// implementations -// -template -inline arg_from_python::arg_from_python(PyObject* source) - : base(source) -{ -} - -}} // namespace boost::python - -#endif // ARG_FROM_PYTHON_DWA2002128_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/args.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/args.hpp deleted file mode 100644 index 8f8791d76f..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/args.hpp +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef KEYWORDS_DWA2002323_HPP -# define KEYWORDS_DWA2002323_HPP - -# include - -# include -# include -# include -# include - -# include -# include -# include - -# include -# include -# include -# include - -# include -# include - -# include - -# include -# include - -namespace boost { namespace python { - -typedef detail::keywords<1> arg; -typedef arg arg_; // gcc 2.96 workaround - -namespace detail -{ - template - struct keywords_base - { - BOOST_STATIC_CONSTANT(std::size_t, size = nkeywords); - - keyword_range range() const - { - return keyword_range(elements, elements + nkeywords); - } - - keyword elements[nkeywords]; - - keywords - operator,(python::arg const &k) const; - - keywords - operator,(char const *name) const; - }; - - template - struct keywords : keywords_base - { - }; - - template <> - struct keywords<1> : keywords_base<1> - { - explicit keywords(char const *name) - { - elements[0].name = name; - } - - template - python::arg& operator=(T const& value) - { - object z(value); - elements[0].default_value = handle<>(python::borrowed(object(value).ptr())); - return *this; - } - - operator detail::keyword const&() const - { - return elements[0]; - } - }; - - template - inline - keywords - keywords_base::operator,(python::arg const &k) const - { - keywords const& l = *static_cast const*>(this); - python::detail::keywords res; - std::copy(l.elements, l.elements+nkeywords, res.elements); - res.elements[nkeywords] = k.elements[0]; - return res; - } - - template - inline - keywords - keywords_base::operator,(char const *name) const - { - return this->operator,(python::arg(name)); - } - -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - template - struct is_keywords - { - BOOST_STATIC_CONSTANT(bool, value = false); - }; - - template - struct is_keywords > - { - BOOST_STATIC_CONSTANT(bool, value = true); - }; - template - struct is_reference_to_keywords - { - BOOST_STATIC_CONSTANT(bool, is_ref = is_reference::value); - typedef typename remove_reference::type deref; - typedef typename remove_cv::type key_t; - BOOST_STATIC_CONSTANT(bool, is_key = is_keywords::value); - BOOST_STATIC_CONSTANT(bool, value = (is_ref & is_key)); - - typedef mpl::bool_ type; - BOOST_PYTHON_MPL_LAMBDA_SUPPORT(1,is_reference_to_keywords,(T)) - }; -# else - typedef char (&yes_keywords_t)[1]; - typedef char (&no_keywords_t)[2]; - - no_keywords_t is_keywords_test(...); - - template - yes_keywords_t is_keywords_test(void (*)(keywords&)); - - template - yes_keywords_t is_keywords_test(void (*)(keywords const&)); - - template - class is_reference_to_keywords - { - public: - BOOST_STATIC_CONSTANT( - bool, value = ( - sizeof(detail::is_keywords_test( (void (*)(T))0 )) - == sizeof(detail::yes_keywords_t))); - - typedef mpl::bool_ type; - BOOST_PYTHON_MPL_LAMBDA_SUPPORT(1,is_reference_to_keywords,(T)) - }; -# endif -} - -inline detail::keywords<1> args(char const* name) -{ - return detail::keywords<1>(name); -} - -# define BOOST_PYTHON_ASSIGN_NAME(z, n, _) result.elements[n].name = name##n; -# define BOOST_PP_LOCAL_MACRO(n) \ -inline detail::keywords args(BOOST_PP_ENUM_PARAMS_Z(1, n, char const* name)) \ -{ \ - detail::keywords result; \ - BOOST_PP_REPEAT_1(n, BOOST_PYTHON_ASSIGN_NAME, _) \ - return result; \ -} -# define BOOST_PP_LOCAL_LIMITS (2, BOOST_PYTHON_MAX_ARITY) -# include BOOST_PP_LOCAL_ITERATE() - -}} // namespace boost::python - - -# endif // KEYWORDS_DWA2002323_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/args_fwd.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/args_fwd.hpp deleted file mode 100644 index 39239461b0..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/args_fwd.hpp +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef ARGS_FWD_DWA2002927_HPP -# define ARGS_FWD_DWA2002927_HPP - -# include - -# include -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - struct keyword - { - keyword(char const* name_=0) - : name(name_) - {} - - char const* name; - handle<> default_value; - }; - - template struct keywords; - - typedef std::pair keyword_range; - - template <> - struct keywords<0> - { - BOOST_STATIC_CONSTANT(std::size_t, size = 0); - static keyword_range range() { return keyword_range(); } - }; - - namespace error - { - template - struct more_keywords_than_function_arguments - { - typedef char too_many_keywords[keywords > function_args ? -1 : 1]; - }; - } -} - -}} // namespace boost::python - -#endif // ARGS_FWD_DWA2002927_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/back_reference.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/back_reference.hpp deleted file mode 100644 index c1daba60c1..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/back_reference.hpp +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef BACK_REFERENCE_DWA2002510_HPP -# define BACK_REFERENCE_DWA2002510_HPP - -# include - -# include -# include -# include - -namespace boost { namespace python { - -template -struct back_reference -{ - private: // types - typedef typename detail::dependent::type source_t; - public: - typedef T type; - - back_reference(PyObject*, T); - source_t const& source() const; - T get() const; - private: - source_t m_source; - T m_value; -}; - -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template -class is_back_reference -{ - public: - BOOST_STATIC_CONSTANT(bool, value = false); -}; - -template -class is_back_reference > -{ - public: - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -# else // no partial specialization - -}} // namespace boost::python - -#include - -namespace boost { namespace python { - -namespace detail -{ - typedef char (&yes_back_reference_t)[1]; - typedef char (&no_back_reference_t)[2]; - - no_back_reference_t is_back_reference_test(...); - - template - yes_back_reference_t is_back_reference_test(boost::type< back_reference >); -} - -template -class is_back_reference -{ - public: - BOOST_STATIC_CONSTANT( - bool, value = ( - sizeof(detail::is_back_reference_test(boost::type())) - == sizeof(detail::yes_back_reference_t))); -}; - -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -// -// implementations -// -template -back_reference::back_reference(PyObject* p, T x) - : m_source(detail::borrowed_reference(p)) - , m_value(x) -{ -} - -template -typename back_reference::source_t const& back_reference::source() const -{ - return m_source; -} - -template -T back_reference::get() const -{ - return m_value; -} - -}} // namespace boost::python - -#endif // BACK_REFERENCE_DWA2002510_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/base_type_traits.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/base_type_traits.hpp deleted file mode 100644 index e1c6a4843f..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/base_type_traits.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef BASE_TYPE_TRAITS_DWA2002614_HPP -# define BASE_TYPE_TRAITS_DWA2002614_HPP - -# include - -namespace boost { namespace python { - -namespace detail -{ - struct unspecialized {}; -} - -// Derive from unspecialized so we can detect whether traits are -// specialized -template struct base_type_traits - : detail::unspecialized -{}; - -template <> -struct base_type_traits -{ - typedef PyObject type; -}; - -template <> -struct base_type_traits -{ - typedef PyObject type; -}; - -template <> -struct base_type_traits -{ - typedef PyObject type; -}; - -}} // namespace boost::python - -#endif // BASE_TYPE_TRAITS_DWA2002614_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/bases.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/bases.hpp deleted file mode 100644 index 0bd7350e55..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/bases.hpp +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef BASES_DWA2002321_HPP -# define BASES_DWA2002321_HPP - -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -# define BOOST_PYTHON_BASE_PARAMS BOOST_PP_ENUM_PARAMS_Z(1, BOOST_PYTHON_MAX_BASES, Base) - - // A type list for specifying bases - template < BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PYTHON_MAX_BASES, typename Base, mpl::void_) > - struct bases : detail::type_list< BOOST_PYTHON_BASE_PARAMS >::type - {}; - - namespace detail - { -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - template struct specifies_bases - : mpl::false_ - { - }; - - template < BOOST_PP_ENUM_PARAMS_Z(1, BOOST_PYTHON_MAX_BASES, class Base) > - struct specifies_bases< bases< BOOST_PYTHON_BASE_PARAMS > > - : mpl::true_ - { - }; -# else - template < BOOST_PP_ENUM_PARAMS(BOOST_PYTHON_MAX_BASES, class Base) > - static char is_bases_helper(bases< BOOST_PYTHON_BASE_PARAMS > const&); - - static char (& is_bases_helper(...) )[256]; - - template - struct specifies_bases - { - private: - static typename add_reference::type make(); - BOOST_STATIC_CONSTANT(bool, non_ref = !is_reference::value); - public: - BOOST_STATIC_CONSTANT(bool, value = non_ref & (sizeof(is_bases_helper(make())) == 1)); - typedef mpl::bool_ type; - }; -# endif - template > - struct select_bases - : mpl::if_< - specifies_bases - , T - , Prev - > - { - }; - } -# undef BOOST_PYTHON_BASE_PARAMS -}} // namespace boost::python - -#endif // BASES_DWA2002321_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/borrowed.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/borrowed.hpp deleted file mode 100644 index fd2716bfbd..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/borrowed.hpp +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef BORROWED_DWA2002614_HPP -# define BORROWED_DWA2002614_HPP - -# include -# include - -namespace boost { namespace python { - -template -inline python::detail::borrowed* borrowed(T* p) -{ - return (detail::borrowed*)p; -} - -}} // namespace boost::python - -#endif // BORROWED_DWA2002614_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/call.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/call.hpp deleted file mode 100644 index 5d2d7d2341..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/call.hpp +++ /dev/null @@ -1,83 +0,0 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -# ifndef CALL_DWA2002411_HPP -# define CALL_DWA2002411_HPP - -# include - -# include - -# include -# include -# include -# include - -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -# define BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET(z, n, _) \ - , converter::arg_to_python(a##n).get() - -# define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PYTHON_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -# undef BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET - -}} // namespace boost::python - -# endif // CALL_DWA2002411_HPP - -// For gcc 4.4 compatability, we must include the -// BOOST_PP_ITERATION_DEPTH test inside an #else clause. -#else // BOOST_PP_IS_ITERATING -#if BOOST_PP_ITERATION_DEPTH() == 1 -# if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100) \ - && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) -# line BOOST_PP_LINE(__LINE__, call.hpp) -# endif - -# define N BOOST_PP_ITERATION() - -template < - class R - BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, class A) - > -typename detail::returnable::type -call(PyObject* callable - BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, const& a) - , boost::type* = 0 - ) -{ - PyObject* const result = - PyEval_CallFunction( - callable - , const_cast("(" BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FIXED, "O") ")") - BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET, nil) - ); - - // This conversion *must not* be done in the same expression as - // the call, because, in the special case where the result is a - // reference a Python object which was created by converting a C++ - // argument for passing to PyEval_CallFunction, its reference - // count will be 2 until the end of the full expression containing - // the conversion, and that interferes with dangling - // pointer/reference detection. - converter::return_from_python converter; - return converter(result); -} - -# undef N - -#endif // BOOST_PP_ITERATION_DEPTH() -#endif diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/call_method.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/call_method.hpp deleted file mode 100644 index 410f66820e..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/call_method.hpp +++ /dev/null @@ -1,83 +0,0 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -# ifndef CALL_METHOD_DWA2002411_HPP -# define CALL_METHOD_DWA2002411_HPP - -# include - -# include - -# include -# include -# include -# include - -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -# define BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET(z, n, _) \ - , converter::arg_to_python(a##n).get() - -# define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PYTHON_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -# undef BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET - -}} // namespace boost::python - -# endif // CALL_METHOD_DWA2002411_HPP - -// For gcc 4.4 compatability, we must include the -// BOOST_PP_ITERATION_DEPTH test inside an #else clause. -#else // BOOST_PP_IS_ITERATING -#if BOOST_PP_ITERATION_DEPTH() == 1 -# if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100) \ - && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) -# line BOOST_PP_LINE(__LINE__, call_method.hpp) -# endif - -# define N BOOST_PP_ITERATION() - -template < - class R - BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, class A) - > -typename detail::returnable::type -call_method(PyObject* self, char const* name - BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, const& a) - , boost::type* = 0 - ) -{ - PyObject* const result = - PyEval_CallMethod( - self - , const_cast(name) - , const_cast("(" BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FIXED, "O") ")") - BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET, nil) - ); - - // This conversion *must not* be done in the same expression as - // the call, because, in the special case where the result is a - // reference a Python object which was created by converting a C++ - // argument for passing to PyEval_CallFunction, its reference - // count will be 2 until the end of the full expression containing - // the conversion, and that interferes with dangling - // pointer/reference detection. - converter::return_from_python converter; - return converter(result); -} - -# undef N - -#endif // BOOST_PP_ITERATION_DEPTH() -#endif // BOOST_PP_IS_ITERATING diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/cast.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/cast.hpp deleted file mode 100644 index 31c61dbf82..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/cast.hpp +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef CAST_DWA200269_HPP -# define CAST_DWA200269_HPP - -# include - -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - template inline Target* upcast_impl(Source*, Target*); - - template - inline Target* upcast(Source* p, yes_convertible, no_convertible, Target*) - { - return p; - } - - template - inline Target* upcast(Source* p, no_convertible, no_convertible, Target*) - { - typedef typename base_type_traits::type base; - - return detail::upcast_impl((base*)p, (Target*)0); - } - - template - struct upcaster - { - template - static inline T* execute(T* x, T*) { return x; } - }; - - template <> - struct upcaster - { - template - static inline Target* execute(Source* x, Target*) - { - return detail::upcast( - x, detail::convertible::check(x) - , detail::convertible::check((Target*)0) - , (Target*)0); - } - }; - - - template - inline Target* downcast(Source* p, yes_convertible) - { - return static_cast(p); - } - - template - inline Target* downcast(Source* p, no_convertible, boost::type* = 0) - { - typedef typename base_type_traits::type base; - return (Target*)detail::downcast(p, convertible::check((base*)0)); - } - - template - inline void assert_castable(boost::type* = 0) - { - typedef char must_be_a_complete_type[sizeof(T)]; - } - - template - inline Target* upcast_impl(Source* x, Target*) - { - typedef typename add_cv::type src_t; - typedef typename add_cv::type target_t; - bool const same = is_same::value; - - return detail::upcaster::execute(x, (Target*)0); - } -} - -template -inline Target* upcast(Source* x, Target* = 0) -{ - detail::assert_castable(); - detail::assert_castable(); - return detail::upcast_impl(x, (Target*)0); - -} - -template -inline Target* downcast(Source* x, Target* = 0) -{ - detail::assert_castable(); - detail::assert_castable(); - return detail::downcast(x, detail::convertible::check((Target*)0)); -} - -}} // namespace boost::python - -#endif // CAST_DWA200269_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/class.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/class.hpp deleted file mode 100644 index 253667bbd7..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/class.hpp +++ /dev/null @@ -1,655 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef CLASS_DWA200216_HPP -# define CLASS_DWA200216_HPP - -# include - -# include - -# include -# include - -# include -# include -# include -# include -# include -# include -# include - -# include -# include -# include - -# include -# include -# include -# include -# include -# include - -# include -# include -# include - -# include -# include -# include -# include - -# include - -# if BOOST_WORKAROUND(__MWERKS__, <= 0x3004) \ - /* pro9 reintroduced the bug */ \ - || (BOOST_WORKAROUND(__MWERKS__, > 0x3100) \ - && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) \ - || BOOST_WORKAROUND(__GNUC__, < 3) - -# define BOOST_PYTHON_NO_MEMBER_POINTER_ORDERING 1 - -# endif - -# ifdef BOOST_PYTHON_NO_MEMBER_POINTER_ORDERING -# include -# include -# endif - -namespace boost { namespace python { - -template class def_visitor; - -enum no_init_t { no_init }; - -namespace detail -{ - // This function object is used with mpl::for_each to write the id - // of the type a pointer to which is passed as its 2nd compile-time - // argument. into the iterator pointed to by its runtime argument - struct write_type_id - { - write_type_id(type_info**p) : p(p) {} - - // Here's the runtime behavior - template - void operator()(T*) const - { - *(*p)++ = type_id(); - } - - type_info** p; - }; - - template - struct is_data_member_pointer - : mpl::and_< - is_member_pointer - , mpl::not_ > - > - {}; - -# ifdef BOOST_PYTHON_NO_MEMBER_POINTER_ORDERING -# define BOOST_PYTHON_DATA_MEMBER_HELPER(D) , detail::is_data_member_pointer() -# define BOOST_PYTHON_YES_DATA_MEMBER , mpl::true_ -# define BOOST_PYTHON_NO_DATA_MEMBER , mpl::false_ -# elif defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) -# define BOOST_PYTHON_DATA_MEMBER_HELPER(D) , 0 -# define BOOST_PYTHON_YES_DATA_MEMBER , int -# define BOOST_PYTHON_NO_DATA_MEMBER , ... -# else -# define BOOST_PYTHON_DATA_MEMBER_HELPER(D) -# define BOOST_PYTHON_YES_DATA_MEMBER -# define BOOST_PYTHON_NO_DATA_MEMBER -# endif - - namespace error - { - // - // A meta-assertion mechanism which prints nice error messages and - // backtraces on lots of compilers. Usage: - // - // assertion::failed - // - // where C is an MPL metafunction class - // - - template struct assertion_failed { }; - template struct assertion_ok { typedef C failed; }; - - template - struct assertion - : mpl::if_, assertion_failed >::type - {}; - - // - // Checks for validity of arguments used to define virtual - // functions with default implementations. - // - - template - void not_a_derived_class_member(Default) {} - - template - struct virtual_function_default - { - template - static void - must_be_derived_class_member(Default const&) - { - // https://svn.boost.org/trac/boost/ticket/5803 - //typedef typename assertion > >::failed test0; -# if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407) - typedef typename assertion >::failed test1; -# endif - typedef typename assertion >::failed test2; - not_a_derived_class_member(Fn()); - } - }; - } -} - -// This is the primary mechanism through which users will expose -// C++ classes to Python. -template < - class W // class being wrapped - , class X1 // = detail::not_specified - , class X2 // = detail::not_specified - , class X3 // = detail::not_specified - > -class class_ : public objects::class_base -{ - public: // types - typedef objects::class_base base; - typedef class_ self; - typedef typename objects::class_metadata metadata; - typedef W wrapped_type; - - private: // types - - // A helper class which will contain an array of id objects to be - // passed to the base class constructor - struct id_vector - { - typedef typename metadata::bases bases; - - id_vector() - { - // Stick the derived class id into the first element of the array - ids[0] = detail::unwrap_type_id((W*)0, (W*)0); - - // Write the rest of the elements into succeeding positions. - type_info* p = ids + 1; - mpl::for_each(detail::write_type_id(&p), (bases*)0, (add_pointer*)0); - } - - BOOST_STATIC_CONSTANT( - std::size_t, size = mpl::size::value + 1); - type_info ids[size]; - }; - friend struct id_vector; - - public: // constructors - - // Construct with the class name, with or without docstring, and default __init__() function - class_(char const* name, char const* doc = 0); - - // Construct with class name, no docstring, and an uncallable __init__ function - class_(char const* name, no_init_t); - - // Construct with class name, docstring, and an uncallable __init__ function - class_(char const* name, char const* doc, no_init_t); - - // Construct with class name and init<> function - template - inline class_(char const* name, init_base const& i) - : base(name, id_vector::size, id_vector().ids) - { - this->initialize(i); - } - - // Construct with class name, docstring and init<> function - template - inline class_(char const* name, char const* doc, init_base const& i) - : base(name, id_vector::size, id_vector().ids, doc) - { - this->initialize(i); - } - - public: // member functions - - // Generic visitation - template - self& def(def_visitor const& visitor) - { - visitor.visit(*this); - return *this; - } - - // Wrap a member function or a non-member function which can take - // a T, T cv&, or T cv* as its first parameter, a callable - // python object, or a generic visitor. - template - self& def(char const* name, F f) - { - this->def_impl( - detail::unwrap_wrapper((W*)0) - , name, f, detail::def_helper(0), &f); - return *this; - } - - template - self& def(char const* name, A1 a1, A2 const& a2) - { - this->def_maybe_overloads(name, a1, a2, &a2); - return *this; - } - - template - self& def(char const* name, Fn fn, A1 const& a1, A2 const& a2) - { - // The arguments are definitely: - // def(name, function, policy, doc_string) - // def(name, function, doc_string, policy) - - this->def_impl( - detail::unwrap_wrapper((W*)0) - , name, fn - , detail::def_helper(a1,a2) - , &fn); - - return *this; - } - - template - self& def(char const* name, Fn fn, A1 const& a1, A2 const& a2, A3 const& a3) - { - this->def_impl( - detail::unwrap_wrapper((W*)0) - , name, fn - , detail::def_helper(a1,a2,a3) - , &fn); - - return *this; - } - - // - // Data member access - // - template - self& def_readonly(char const* name, D const& d, char const* doc=0) - { - return this->def_readonly_impl(name, d, doc BOOST_PYTHON_DATA_MEMBER_HELPER(D)); - } - - template - self& def_readwrite(char const* name, D const& d, char const* doc=0) - { - return this->def_readwrite_impl(name, d, doc BOOST_PYTHON_DATA_MEMBER_HELPER(D)); - } - - template - self& def_readonly(char const* name, D& d, char const* doc=0) - { - return this->def_readonly_impl(name, d, doc BOOST_PYTHON_DATA_MEMBER_HELPER(D)); - } - - template - self& def_readwrite(char const* name, D& d, char const* doc=0) - { - return this->def_readwrite_impl(name, d, doc BOOST_PYTHON_DATA_MEMBER_HELPER(D)); - } - - // Property creation -# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - template - self& add_property(char const* name, Get fget, char const* docstr = 0) - { - base::add_property(name, this->make_getter(fget), docstr); - return *this; - } - - template - self& add_property(char const* name, Get fget, Set fset, char const* docstr = 0) - { - base::add_property( - name, this->make_getter(fget), this->make_setter(fset), docstr); - return *this; - } -# else - private: - template - self& add_property_impl(char const* name, Get fget, char const* docstr, int) - { - base::add_property(name, this->make_getter(fget), docstr); - return *this; - } - - template - self& add_property_impl(char const* name, Get fget, Set fset, ...) - { - base::add_property( - name, this->make_getter(fget), this->make_setter(fset), 0); - return *this; - } - - public: - template - self& add_property(char const* name, Get fget) - { - base::add_property(name, this->make_getter(fget), 0); - return *this; - } - - template - self& add_property(char const* name, Get fget, DocStrOrSet docstr_or_set) - { - this->add_property_impl(name, this->make_getter(fget), docstr_or_set, 0); - return *this; - } - - template - self& - add_property(char const* name, Get fget, Set fset, char const* docstr) - { - base::add_property( - name, this->make_getter(fget), this->make_setter(fset), docstr); - return *this; - } -# endif - - template - self& add_static_property(char const* name, Get fget) - { - base::add_static_property(name, object(fget)); - return *this; - } - - template - self& add_static_property(char const* name, Get fget, Set fset) - { - base::add_static_property(name, object(fget), object(fset)); - return *this; - } - - template - self& setattr(char const* name, U const& x) - { - this->base::setattr(name, object(x)); - return *this; - } - - // Pickle support - template - self& def_pickle(PickleSuiteType const& x) - { - error_messages::must_be_derived_from_pickle_suite(x); - detail::pickle_suite_finalize::register_( - *this, - &PickleSuiteType::getinitargs, - &PickleSuiteType::getstate, - &PickleSuiteType::setstate, - PickleSuiteType::getstate_manages_dict()); - return *this; - } - - self& enable_pickling() - { - this->base::enable_pickling_(false); - return *this; - } - - self& staticmethod(char const* name) - { - this->make_method_static(name); - return *this; - } - private: // helper functions - - // Builds a method for this class around the given [member] - // function pointer or object, appropriately adjusting the type of - // the first signature argument so that if f is a member of a - // (possibly not wrapped) base class of T, an lvalue argument of - // type T will be required. - // - // @group PropertyHelpers { - template - object make_getter(F f) - { - typedef typename api::is_object_operators::type is_obj_or_proxy; - - return this->make_fn_impl( - detail::unwrap_wrapper((W*)0) - , f, is_obj_or_proxy(), (char*)0, detail::is_data_member_pointer() - ); - } - - template - object make_setter(F f) - { - typedef typename api::is_object_operators::type is_obj_or_proxy; - - return this->make_fn_impl( - detail::unwrap_wrapper((W*)0) - , f, is_obj_or_proxy(), (int*)0, detail::is_data_member_pointer() - ); - } - - template - object make_fn_impl(T*, F const& f, mpl::false_, void*, mpl::false_) - { - return python::make_function(f, default_call_policies(), detail::get_signature(f, (T*)0)); - } - - template - object make_fn_impl(T*, D B::*pm_, mpl::false_, char*, mpl::true_) - { - D T::*pm = pm_; - return python::make_getter(pm); - } - - template - object make_fn_impl(T*, D B::*pm_, mpl::false_, int*, mpl::true_) - { - D T::*pm = pm_; - return python::make_setter(pm); - } - - template - object make_fn_impl(T*, F const& x, mpl::true_, void*, mpl::false_) - { - return x; - } - // } - - template - self& def_readonly_impl( - char const* name, D B::*pm_, char const* doc BOOST_PYTHON_YES_DATA_MEMBER) - { - return this->add_property(name, pm_, doc); - } - - template - self& def_readwrite_impl( - char const* name, D B::*pm_, char const* doc BOOST_PYTHON_YES_DATA_MEMBER) - { - return this->add_property(name, pm_, pm_, doc); - } - - template - self& def_readonly_impl( - char const* name, D& d, char const* BOOST_PYTHON_NO_DATA_MEMBER) - { - return this->add_static_property(name, python::make_getter(d)); - } - - template - self& def_readwrite_impl( - char const* name, D& d, char const* BOOST_PYTHON_NO_DATA_MEMBER) - { - return this->add_static_property(name, python::make_getter(d), python::make_setter(d)); - } - - template - inline void initialize(DefVisitor const& i) - { - metadata::register_(); // set up runtime metadata/conversions - - typedef typename metadata::holder holder; - this->set_instance_size( objects::additional_instance_size::value ); - - this->def(i); - } - - inline void initialize(no_init_t) - { - metadata::register_(); // set up runtime metadata/conversions - this->def_no_init(); - } - - // - // These two overloads discriminate between def() as applied to a - // generic visitor and everything else. - // - // @group def_impl { - template - inline void def_impl( - T* - , char const* name - , LeafVisitor - , Helper const& helper - , def_visitor const* v - ) - { - v->visit(*this, name, helper); - } - - template - inline void def_impl( - T* - , char const* name - , Fn fn - , Helper const& helper - , ... - ) - { - objects::add_to_namespace( - *this - , name - , make_function( - fn - , helper.policies() - , helper.keywords() - , detail::get_signature(fn, (T*)0) - ) - , helper.doc() - ); - - this->def_default(name, fn, helper, mpl::bool_()); - } - // } - - // - // These two overloads handle the definition of default - // implementation overloads for virtual functions. The second one - // handles the case where no default implementation was specified. - // - // @group def_default { - template - inline void def_default( - char const* name - , Fn - , Helper const& helper - , mpl::bool_) - { - detail::error::virtual_function_default::must_be_derived_class_member( - helper.default_implementation()); - - objects::add_to_namespace( - *this, name, - make_function( - helper.default_implementation(), helper.policies(), helper.keywords()) - ); - } - - template - inline void def_default(char const*, Fn, Helper const&, mpl::bool_) - { } - // } - - // - // These two overloads discriminate between def() as applied to - // regular functions and def() as applied to the result of - // BOOST_PYTHON_FUNCTION_OVERLOADS(). The final argument is used to - // discriminate. - // - // @group def_maybe_overloads { - template - void def_maybe_overloads( - char const* name - , SigT sig - , OverloadsT const& overloads - , detail::overloads_base const*) - - { - // convert sig to a type_list (see detail::get_signature in signature.hpp) - // before calling detail::define_with_defaults. - detail::define_with_defaults( - name, overloads, *this, detail::get_signature(sig)); - } - - template - void def_maybe_overloads( - char const* name - , Fn fn - , A1 const& a1 - , ...) - { - this->def_impl( - detail::unwrap_wrapper((W*)0) - , name - , fn - , detail::def_helper(a1) - , &fn - ); - - } - // } -}; - - -// -// implementations -// - -template -inline class_::class_(char const* name, char const* doc) - : base(name, id_vector::size, id_vector().ids, doc) -{ - this->initialize(init<>()); -// select_holder::assert_default_constructible(); -} - -template -inline class_::class_(char const* name, no_init_t) - : base(name, id_vector::size, id_vector().ids) -{ - this->initialize(no_init); -} - -template -inline class_::class_(char const* name, char const* doc, no_init_t) - : base(name, id_vector::size, id_vector().ids, doc) -{ - this->initialize(no_init); -} - -}} // namespace boost::python - -# undef BOOST_PYTHON_DATA_MEMBER_HELPER -# undef BOOST_PYTHON_YES_DATA_MEMBER -# undef BOOST_PYTHON_NO_DATA_MEMBER -# undef BOOST_PYTHON_NO_MEMBER_POINTER_ORDERING - -#endif // CLASS_DWA200216_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/class_fwd.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/class_fwd.hpp deleted file mode 100644 index 528e18a1dc..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/class_fwd.hpp +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef CLASS_FWD_DWA200222_HPP -# define CLASS_FWD_DWA200222_HPP - -# include -# include - -namespace boost { namespace python { - -template < - class T // class being wrapped - // arbitrarily-ordered optional arguments. Full qualification needed for MSVC6 - , class X1 = ::boost::python::detail::not_specified - , class X2 = ::boost::python::detail::not_specified - , class X3 = ::boost::python::detail::not_specified - > -class class_; - -}} // namespace boost::python - -#endif // CLASS_FWD_DWA200222_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/arg_from_python.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/arg_from_python.hpp deleted file mode 100644 index e2edce7e1c..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/arg_from_python.hpp +++ /dev/null @@ -1,336 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef ARG_FROM_PYTHON_DWA2002127_HPP -# define ARG_FROM_PYTHON_DWA2002127_HPP - -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python -{ - template struct arg_from_python; -}} - -// This header defines Python->C++ function argument converters, -// parametrized on the argument type. - -namespace boost { namespace python { namespace converter { - -// -// lvalue converters -// -// These require that an lvalue of the type U is stored somewhere in -// the Python object being converted. - -// Used when T == U*const& -template -struct pointer_cref_arg_from_python -{ - typedef T result_type; - - pointer_cref_arg_from_python(PyObject*); - T operator()() const; - bool convertible() const; - - private: // storage for a U* - // needed because not all compilers will let us declare U* as the - // return type of operator() -- we return U*const& instead - typename python::detail::referent_storage::type m_result; -}; - -// Base class for pointer and reference converters -struct arg_lvalue_from_python_base -{ - public: // member functions - arg_lvalue_from_python_base(void* result); - bool convertible() const; - - protected: // member functions - void*const& result() const; - - private: // data members - void* m_result; -}; - -// Used when T == U* -template -struct pointer_arg_from_python : arg_lvalue_from_python_base -{ - typedef T result_type; - - pointer_arg_from_python(PyObject*); - T operator()() const; -}; - -// Used when T == U& and (T != V const& or T == W volatile&) -template -struct reference_arg_from_python : arg_lvalue_from_python_base -{ - typedef T result_type; - - reference_arg_from_python(PyObject*); - T operator()() const; -}; - -// =================== - -// -// rvalue converters -// -// These require only that an object of type T can be created from -// the given Python object, but not that the T object exist -// somewhere in storage. -// - -// Used when T is a plain value (non-pointer, non-reference) type or -// a (non-volatile) const reference to a plain value type. -template -struct arg_rvalue_from_python -{ - typedef typename boost::add_reference< - T - // We can't add_const here, or it would be impossible to pass - // auto_ptr args from Python to C++ - >::type result_type; - - arg_rvalue_from_python(PyObject*); - bool convertible() const; - -# if BOOST_MSVC < 1301 || _MSC_FULL_VER > 13102196 - typename arg_rvalue_from_python:: -# endif - result_type operator()(); - - private: - rvalue_from_python_data m_data; - PyObject* m_source; -}; - - -// ================== - -// Converts to a (PyObject*,T) bundle, for when you need a reference -// back to the Python object -template -struct back_reference_arg_from_python - : boost::python::arg_from_python -{ - typedef T result_type; - - back_reference_arg_from_python(PyObject*); - T operator()(); - private: - typedef boost::python::arg_from_python base; - PyObject* m_source; -}; - - -// ================== - -template -struct if_2 -{ - typedef typename mpl::eval_if, F>::type type; -}; - -// This metafunction selects the appropriate arg_from_python converter -// type for an argument of type T. -template -struct select_arg_from_python -{ - typedef typename if_2< - is_object_manager - , object_manager_value_arg_from_python - , if_2< - is_reference_to_object_manager - , object_manager_ref_arg_from_python - , if_2< - is_pointer - , pointer_arg_from_python - , if_2< - mpl::and_< - indirect_traits::is_reference_to_pointer - , indirect_traits::is_reference_to_const - , mpl::not_ > - > - , pointer_cref_arg_from_python - , if_2< - mpl::or_< - indirect_traits::is_reference_to_non_const - , indirect_traits::is_reference_to_volatile - > - , reference_arg_from_python - , mpl::if_< - boost::python::is_back_reference - , back_reference_arg_from_python - , arg_rvalue_from_python - > - > - > - > - > - >::type type; -}; - -// ================== - -// -// implementations -// - -// arg_lvalue_from_python_base -// -inline arg_lvalue_from_python_base::arg_lvalue_from_python_base(void* result) - : m_result(result) -{ -} - -inline bool arg_lvalue_from_python_base::convertible() const -{ - return m_result != 0; -} - -inline void*const& arg_lvalue_from_python_base::result() const -{ - return m_result; -} - -// pointer_cref_arg_from_python -// -namespace detail -{ - // null_ptr_reference -- a function returning a reference to a null - // pointer of type U. Needed so that extractors for T*const& can - // convert Python's None. - template - struct null_ptr_owner - { - static T value; - }; - template T null_ptr_owner::value = 0; - - template - inline U& null_ptr_reference(U&(*)()) - { - return null_ptr_owner::value; - } -} - -template -inline pointer_cref_arg_from_python::pointer_cref_arg_from_python(PyObject* p) -{ - // T == U*const&: store a U* in the m_result storage. Nonzero - // indicates success. If find returns nonzero, it's a pointer to - // a U object. - python::detail::write_void_ptr_reference( - m_result.bytes - , p == Py_None ? p : converter::get_lvalue_from_python(p, registered_pointee::converters) - , (T(*)())0); -} - -template -inline bool pointer_cref_arg_from_python::convertible() const -{ - return python::detail::void_ptr_to_reference(m_result.bytes, (T(*)())0) != 0; -} -template -inline T pointer_cref_arg_from_python::operator()() const -{ - return (*(void**)m_result.bytes == Py_None) // None ==> 0 - ? detail::null_ptr_reference((T(*)())0) - // Otherwise, return a U*const& to the m_result storage. - : python::detail::void_ptr_to_reference(m_result.bytes, (T(*)())0); -} - -// pointer_arg_from_python -// -template -inline pointer_arg_from_python::pointer_arg_from_python(PyObject* p) - : arg_lvalue_from_python_base( - p == Py_None ? p : converter::get_lvalue_from_python(p, registered_pointee::converters)) -{ -} - -template -inline T pointer_arg_from_python::operator()() const -{ - return (result() == Py_None) ? 0 : T(result()); -} - -// reference_arg_from_python -// -template -inline reference_arg_from_python::reference_arg_from_python(PyObject* p) - : arg_lvalue_from_python_base(converter::get_lvalue_from_python(p,registered::converters)) -{ -} - -template -inline T reference_arg_from_python::operator()() const -{ - return python::detail::void_ptr_to_reference(result(), (T(*)())0); -} - - -// arg_rvalue_from_python -// -template -inline arg_rvalue_from_python::arg_rvalue_from_python(PyObject* obj) - : m_data(converter::rvalue_from_python_stage1(obj, registered::converters)) - , m_source(obj) -{ -} - -template -inline bool arg_rvalue_from_python::convertible() const -{ - return m_data.stage1.convertible != 0; -} - -template -inline typename arg_rvalue_from_python::result_type -arg_rvalue_from_python::operator()() -{ - if (m_data.stage1.construct != 0) - m_data.stage1.construct(m_source, &m_data.stage1); - - return python::detail::void_ptr_to_reference(m_data.stage1.convertible, (result_type(*)())0); -} - -// back_reference_arg_from_python -// -template -back_reference_arg_from_python::back_reference_arg_from_python(PyObject* x) - : base(x), m_source(x) -{ -} - -template -inline T -back_reference_arg_from_python::operator()() -{ - return T(m_source, base::operator()()); -} - -}}} // namespace boost::python::converter - -#endif // ARG_FROM_PYTHON_DWA2002127_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/arg_to_python.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/arg_to_python.hpp deleted file mode 100644 index 3a19ec4395..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/arg_to_python.hpp +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef ARG_TO_PYTHON_DWA200265_HPP -# define ARG_TO_PYTHON_DWA200265_HPP - -# include -# include -# include - -# include -# include -# include -# include -// Bring in specializations -# include - -# include - -# include - -# include -# include -# include -# include - -# include -# include -# include - - -# include - -namespace boost { namespace python { namespace converter { - -template struct is_object_manager; - -namespace detail -{ - template - struct function_arg_to_python : handle<> - { - function_arg_to_python(T const& x); - }; - - template - struct reference_arg_to_python : handle<> - { - reference_arg_to_python(T& x); - private: - static PyObject* get_object(T& x); - }; - - template - struct shared_ptr_arg_to_python : handle<> - { - shared_ptr_arg_to_python(T const& x); - private: - static PyObject* get_object(T& x); - }; - - template - struct value_arg_to_python : arg_to_python_base - { - // Throw an exception if the conversion can't succeed - value_arg_to_python(T const&); - }; - - template - struct pointer_deep_arg_to_python : arg_to_python_base - { - // Throw an exception if the conversion can't succeed - pointer_deep_arg_to_python(Ptr); - }; - - template - struct pointer_shallow_arg_to_python : handle<> - { - // Throw an exception if the conversion can't succeed - pointer_shallow_arg_to_python(Ptr); - private: - static PyObject* get_object(Ptr p); - }; - - // Convert types that manage a Python object to_python - template - struct object_manager_arg_to_python - { - object_manager_arg_to_python(T const& x) : m_src(x) {} - - PyObject* get() const - { - return python::upcast(get_managed_object(m_src, tag)); - } - - private: - T const& m_src; - }; - - template - struct select_arg_to_python - { - typedef typename unwrap_reference::type unwrapped_referent; - typedef typename unwrap_pointer::type unwrapped_ptr; - - typedef typename mpl::if_< - // Special handling for char const[N]; interpret them as char - // const* for the sake of conversion - python::detail::is_string_literal - , arg_to_python - - , typename mpl::if_< - python::detail::value_is_shared_ptr - , shared_ptr_arg_to_python - - , typename mpl::if_< - mpl::or_< - is_function - , indirect_traits::is_pointer_to_function - , is_member_function_pointer - > - , function_arg_to_python - - , typename mpl::if_< - is_object_manager - , object_manager_arg_to_python - - , typename mpl::if_< - is_pointer - , pointer_deep_arg_to_python - - , typename mpl::if_< - is_pointer_wrapper - , pointer_shallow_arg_to_python - - , typename mpl::if_< - is_reference_wrapper - , reference_arg_to_python - , value_arg_to_python - >::type - >::type - >::type - >::type - >::type - >::type - >::type - - type; - }; -} - -template -struct arg_to_python - : detail::select_arg_to_python::type -{ - typedef typename detail::select_arg_to_python::type base; - public: // member functions - // Throw an exception if the conversion can't succeed - arg_to_python(T const& x); -}; - -// -// implementations -// -namespace detail -{ - // reject_raw_object_ptr -- cause a compile-time error if the user - // should pass a raw Python object pointer - using python::detail::yes_convertible; - using python::detail::no_convertible; - using python::detail::unspecialized; - - template struct cannot_convert_raw_PyObject; - - template - struct reject_raw_object_helper - { - static void error(Convertibility) - { - cannot_convert_raw_PyObject::to_python_use_handle_instead(); - } - static void error(...) {} - }; - - template - inline void reject_raw_object_ptr(T*) - { - reject_raw_object_helper::error( - python::detail::convertible::check((T*)0)); - - typedef typename remove_cv::type value_type; - - reject_raw_object_helper::error( - python::detail::convertible::check( - (base_type_traits*)0 - )); - } - // --------- - - template - inline function_arg_to_python::function_arg_to_python(T const& x) - : handle<>(python::objects::make_function_handle(x)) - { - } - - template - inline value_arg_to_python::value_arg_to_python(T const& x) - : arg_to_python_base(&x, registered::converters) - { - } - - template - inline pointer_deep_arg_to_python::pointer_deep_arg_to_python(Ptr x) - : arg_to_python_base(x, registered_pointee::converters) - { - detail::reject_raw_object_ptr((Ptr)0); - } - - template - inline PyObject* reference_arg_to_python::get_object(T& x) - { - to_python_indirect convert; - return convert(x); - } - - template - inline reference_arg_to_python::reference_arg_to_python(T& x) - : handle<>(reference_arg_to_python::get_object(x)) - { - } - - template - inline shared_ptr_arg_to_python::shared_ptr_arg_to_python(T const& x) - : handle<>(shared_ptr_to_python(x)) - { - } - - template - inline pointer_shallow_arg_to_python::pointer_shallow_arg_to_python(Ptr x) - : handle<>(pointer_shallow_arg_to_python::get_object(x)) - { - detail::reject_raw_object_ptr((Ptr)0); - } - - template - inline PyObject* pointer_shallow_arg_to_python::get_object(Ptr x) - { - to_python_indirect convert; - return convert(x); - } -} - -template -inline arg_to_python::arg_to_python(T const& x) - : base(x) -{} - -}}} // namespace boost::python::converter - -#endif // ARG_TO_PYTHON_DWA200265_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/arg_to_python_base.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/arg_to_python_base.hpp deleted file mode 100644 index d85b302e48..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/arg_to_python_base.hpp +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef ARG_TO_PYTHON_BASE_DWA200237_HPP -# define ARG_TO_PYTHON_BASE_DWA200237_HPP -# include - -namespace boost { namespace python { namespace converter { - -struct registration; - -namespace detail -{ - struct BOOST_PYTHON_DECL arg_to_python_base -# if !defined(BOOST_MSVC) || BOOST_MSVC <= 1300 || _MSC_FULL_VER > 13102179 - : handle<> -# endif - { - arg_to_python_base(void const volatile* source, registration const&); -# if defined(BOOST_MSVC) && BOOST_MSVC > 1300 && _MSC_FULL_VER <= 13102179 - PyObject* get() const { return m_ptr.get(); } - PyObject* release() { return m_ptr.release(); } - private: - handle<> m_ptr; -# endif - }; -} - -}}} // namespace boost::python::converter - -#endif // ARG_TO_PYTHON_BASE_DWA200237_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/as_to_python_function.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/as_to_python_function.hpp deleted file mode 100644 index 19a3efaafc..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/as_to_python_function.hpp +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef AS_TO_PYTHON_FUNCTION_DWA2002121_HPP -# define AS_TO_PYTHON_FUNCTION_DWA2002121_HPP -# include - -namespace boost { namespace python { namespace converter { - -// Given a typesafe to_python conversion function, produces a -// to_python_function_t which can be registered in the usual way. -template -struct as_to_python_function -{ - // Assertion functions used to prevent wrapping of converters - // which take non-const reference parameters. The T* argument in - // the first overload ensures it isn't used in case T is a - // reference. - template - static void convert_function_must_take_value_or_const_reference(U(*)(T), int, T* = 0) {} - template - static void convert_function_must_take_value_or_const_reference(U(*)(T const&), long ...) {} - - static PyObject* convert(void const* x) - { - convert_function_must_take_value_or_const_reference(&ToPython::convert, 1L); - - // Yes, the const_cast below opens a hole in const-correctness, - // but it's needed to convert auto_ptr to python. - // - // How big a hole is it? It allows ToPython::convert() to be - // a function which modifies its argument. The upshot is that - // client converters applied to const objects may invoke - // undefined behavior. The damage, however, is limited by the - // use of the assertion function. Thus, the only way this can - // modify its argument is if T is an auto_ptr-like type. There - // is still a const-correctness hole w.r.t. auto_ptr const, - // but c'est la vie. - return ToPython::convert(*const_cast(static_cast(x))); - } -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - static PyTypeObject const * get_pytype() { return ToPython::get_pytype(); } -#endif -}; - -}}} // namespace boost::python::converter - -#endif // AS_TO_PYTHON_FUNCTION_DWA2002121_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/builtin_converters.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/builtin_converters.hpp deleted file mode 100644 index c2e01c03d3..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/builtin_converters.hpp +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef BUILTIN_CONVERTERS_DWA2002124_HPP -# define BUILTIN_CONVERTERS_DWA2002124_HPP -# include -# include -# include -# include -# include -# include -# include -# include - -// Since all we can use to decide how to convert an object to_python -// is its C++ type, there can be only one such converter for each -// type. Therefore, for built-in conversions we can bypass registry -// lookups using explicit specializations of arg_to_python and -// result_to_python. - -namespace boost { namespace python { - -namespace converter -{ - template struct arg_to_python; - BOOST_PYTHON_DECL PyObject* do_return_to_python(char); - BOOST_PYTHON_DECL PyObject* do_return_to_python(char const*); - BOOST_PYTHON_DECL PyObject* do_return_to_python(PyObject*); - BOOST_PYTHON_DECL PyObject* do_arg_to_python(PyObject*); -} - -// Provide specializations of to_python_value -template struct to_python_value; - -namespace detail -{ - // Since there's no registry lookup, always report the existence of - // a converter. - struct builtin_to_python - { - // This information helps make_getter() decide whether to try to - // return an internal reference or not. I don't like it much, - // but it will have to serve for now. - BOOST_STATIC_CONSTANT(bool, uses_registry = false); - }; -} - -// Use expr to create the PyObject corresponding to x -# define BOOST_PYTHON_RETURN_TO_PYTHON_BY_VALUE(T, expr, pytype)\ - template <> struct to_python_value \ - : detail::builtin_to_python \ - { \ - inline PyObject* operator()(T const& x) const \ - { \ - return (expr); \ - } \ - inline PyTypeObject const* get_pytype() const \ - { \ - return (pytype); \ - } \ - }; \ - template <> struct to_python_value \ - : detail::builtin_to_python \ - { \ - inline PyObject* operator()(T const& x) const \ - { \ - return (expr); \ - } \ - inline PyTypeObject const* get_pytype() const \ - { \ - return (pytype); \ - } \ - }; - -# define BOOST_PYTHON_ARG_TO_PYTHON_BY_VALUE(T, expr) \ - namespace converter \ - { \ - template <> struct arg_to_python< T > \ - : handle<> \ - { \ - arg_to_python(T const& x) \ - : python::handle<>(expr) {} \ - }; \ - } - -// Specialize argument and return value converters for T using expr -# define BOOST_PYTHON_TO_PYTHON_BY_VALUE(T, expr, pytype) \ - BOOST_PYTHON_RETURN_TO_PYTHON_BY_VALUE(T,expr, pytype) \ - BOOST_PYTHON_ARG_TO_PYTHON_BY_VALUE(T,expr) - -// Specialize converters for signed and unsigned T to Python Int -#if PY_VERSION_HEX >= 0x03000000 - -# define BOOST_PYTHON_TO_INT(T) \ - BOOST_PYTHON_TO_PYTHON_BY_VALUE(signed T, ::PyLong_FromLong(x), &PyLong_Type) \ - BOOST_PYTHON_TO_PYTHON_BY_VALUE(unsigned T, ::PyLong_FromUnsignedLong(x), &PyLong_Type) - -#else - -# define BOOST_PYTHON_TO_INT(T) \ - BOOST_PYTHON_TO_PYTHON_BY_VALUE(signed T, ::PyInt_FromLong(x), &PyInt_Type) \ - BOOST_PYTHON_TO_PYTHON_BY_VALUE( \ - unsigned T \ - , static_cast(x) > static_cast( \ - (std::numeric_limits::max)()) \ - ? ::PyLong_FromUnsignedLong(x) \ - : ::PyInt_FromLong(x), &PyInt_Type) -#endif - -// Bool is not signed. -#if PY_VERSION_HEX >= 0x02030000 -BOOST_PYTHON_TO_PYTHON_BY_VALUE(bool, ::PyBool_FromLong(x), &PyBool_Type) -#else -BOOST_PYTHON_TO_PYTHON_BY_VALUE(bool, ::PyInt_FromLong(x), &PyInt_Type) -#endif - -// note: handles signed char and unsigned char, but not char (see below) -BOOST_PYTHON_TO_INT(char) - -BOOST_PYTHON_TO_INT(short) -BOOST_PYTHON_TO_INT(int) -BOOST_PYTHON_TO_INT(long) - -# if defined(_MSC_VER) && defined(_WIN64) && PY_VERSION_HEX < 0x03000000 -/* Under 64-bit Windows std::size_t is "unsigned long long". To avoid - getting a Python long for each std::size_t the value is checked before - the conversion. A std::size_t is converted to a simple Python int - if possible; a Python long appears only if the value is too small or - too large to fit into a simple int. */ -BOOST_PYTHON_TO_PYTHON_BY_VALUE( - signed BOOST_PYTHON_LONG_LONG, - ( x < static_cast( - (std::numeric_limits::min)()) - || x > static_cast( - (std::numeric_limits::max)())) - ? ::PyLong_FromLongLong(x) - : ::PyInt_FromLong(static_cast(x)), &PyInt_Type) -BOOST_PYTHON_TO_PYTHON_BY_VALUE( - unsigned BOOST_PYTHON_LONG_LONG, - x > static_cast( - (std::numeric_limits::max)()) - ? ::PyLong_FromUnsignedLongLong(x) - : ::PyInt_FromLong(static_cast(x)), &PyInt_Type) -// -# elif defined(HAVE_LONG_LONG) // using Python's macro instead of Boost's - // - we don't seem to get the config right - // all the time. -BOOST_PYTHON_TO_PYTHON_BY_VALUE(signed BOOST_PYTHON_LONG_LONG, ::PyLong_FromLongLong(x), &PyLong_Type) -BOOST_PYTHON_TO_PYTHON_BY_VALUE(unsigned BOOST_PYTHON_LONG_LONG, ::PyLong_FromUnsignedLongLong(x), &PyLong_Type) -# endif - -# undef BOOST_TO_PYTHON_INT - -#if PY_VERSION_HEX >= 0x03000000 -BOOST_PYTHON_TO_PYTHON_BY_VALUE(char, converter::do_return_to_python(x), &PyUnicode_Type) -BOOST_PYTHON_TO_PYTHON_BY_VALUE(char const*, converter::do_return_to_python(x), &PyUnicode_Type) -BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::string, ::PyUnicode_FromStringAndSize(x.data(),implicit_cast(x.size())), &PyUnicode_Type) -#else -BOOST_PYTHON_TO_PYTHON_BY_VALUE(char, converter::do_return_to_python(x), &PyString_Type) -BOOST_PYTHON_TO_PYTHON_BY_VALUE(char const*, converter::do_return_to_python(x), &PyString_Type) -BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::string, ::PyString_FromStringAndSize(x.data(),implicit_cast(x.size())), &PyString_Type) -#endif - -#if defined(Py_USING_UNICODE) && !defined(BOOST_NO_STD_WSTRING) -BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::wstring, ::PyUnicode_FromWideChar(x.data(),implicit_cast(x.size())), &PyUnicode_Type) -# endif -BOOST_PYTHON_TO_PYTHON_BY_VALUE(float, ::PyFloat_FromDouble(x), &PyFloat_Type) -BOOST_PYTHON_TO_PYTHON_BY_VALUE(double, ::PyFloat_FromDouble(x), &PyFloat_Type) -BOOST_PYTHON_TO_PYTHON_BY_VALUE(long double, ::PyFloat_FromDouble(x), &PyFloat_Type) -BOOST_PYTHON_RETURN_TO_PYTHON_BY_VALUE(PyObject*, converter::do_return_to_python(x), 0) -BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::complex, ::PyComplex_FromDoubles(x.real(), x.imag()), &PyComplex_Type) -BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::complex, ::PyComplex_FromDoubles(x.real(), x.imag()), &PyComplex_Type) -BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::complex, ::PyComplex_FromDoubles(x.real(), x.imag()), &PyComplex_Type) - -# undef BOOST_PYTHON_RETURN_TO_PYTHON_BY_VALUE -# undef BOOST_PYTHON_ARG_TO_PYTHON_BY_VALUE -# undef BOOST_PYTHON_TO_PYTHON_BY_VALUE -# undef BOOST_PYTHON_TO_INT - -namespace converter -{ - - void initialize_builtin_converters(); - -} - -}} // namespace boost::python::converter - -#endif // BUILTIN_CONVERTERS_DWA2002124_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/constructor_function.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/constructor_function.hpp deleted file mode 100644 index 814aa7d763..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/constructor_function.hpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef CONSTRUCTOR_FUNCTION_DWA200278_HPP -# define CONSTRUCTOR_FUNCTION_DWA200278_HPP - -namespace boost { namespace python { namespace converter { - -// Declares the type of functions used to construct C++ objects for -// rvalue from_python conversions. -struct rvalue_from_python_stage1_data; -typedef void (*constructor_function)(PyObject* source, rvalue_from_python_stage1_data*); - -}}} // namespace boost::python::converter - -#endif // CONSTRUCTOR_FUNCTION_DWA200278_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/context_result_converter.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/context_result_converter.hpp deleted file mode 100644 index beb7e9f098..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/context_result_converter.hpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef CONTEXT_RESULT_CONVERTER_DWA2003917_HPP -# define CONTEXT_RESULT_CONVERTER_DWA2003917_HPP - -namespace boost { namespace python { namespace converter { - -// A ResultConverter base class used to indicate that this result -// converter should be constructed with the original Python argument -// list. -struct context_result_converter {}; - -}}} // namespace boost::python::converter - -#endif // CONTEXT_RESULT_CONVERTER_DWA2003917_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/convertible_function.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/convertible_function.hpp deleted file mode 100644 index 4b29fbb00b..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/convertible_function.hpp +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef CONVERTIBLE_FUNCTION_DWA200278_HPP -# define CONVERTIBLE_FUNCTION_DWA200278_HPP - -namespace boost { namespace python { namespace converter { - -typedef void* (*convertible_function)(PyObject*); - -}}} // namespace boost::python::converter - -#endif // CONVERTIBLE_FUNCTION_DWA200278_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/from_python.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/from_python.hpp deleted file mode 100644 index b2f24b3519..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/from_python.hpp +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef FIND_FROM_PYTHON_DWA2002223_HPP -# define FIND_FROM_PYTHON_DWA2002223_HPP - -# include -# include - -namespace boost { namespace python { namespace converter { - -struct registration; - - -BOOST_PYTHON_DECL void* get_lvalue_from_python( - PyObject* source, registration const&); - -BOOST_PYTHON_DECL bool implicit_rvalue_convertible_from_python( - PyObject* source, registration const&); - -BOOST_PYTHON_DECL rvalue_from_python_stage1_data rvalue_from_python_stage1( - PyObject* source, registration const&); - -BOOST_PYTHON_DECL void* rvalue_from_python_stage2( - PyObject* source, rvalue_from_python_stage1_data&, registration const&); - -BOOST_PYTHON_DECL void* rvalue_result_from_python( - PyObject*, rvalue_from_python_stage1_data&); - -BOOST_PYTHON_DECL void* reference_result_from_python(PyObject*, registration const&); -BOOST_PYTHON_DECL void* pointer_result_from_python(PyObject*, registration const&); - -BOOST_PYTHON_DECL void void_result_from_python(PyObject*); - -BOOST_PYTHON_DECL void throw_no_pointer_from_python(PyObject*, registration const&); -BOOST_PYTHON_DECL void throw_no_reference_from_python(PyObject*, registration const&); - -}}} // namespace boost::python::converter - -#endif // FIND_FROM_PYTHON_DWA2002223_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/implicit.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/implicit.hpp deleted file mode 100644 index 8bbbfd5ac1..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/implicit.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef IMPLICIT_DWA2002326_HPP -# define IMPLICIT_DWA2002326_HPP - -# include -# include -# include - -# include - -namespace boost { namespace python { namespace converter { - -template -struct implicit -{ - static void* convertible(PyObject* obj) - { - // Find a converter which can produce a Source instance from - // obj. The user has told us that Source can be converted to - // Target, and instantiating construct() below, ensures that - // at compile-time. - return implicit_rvalue_convertible_from_python(obj, registered::converters) - ? obj : 0; - } - - static void construct(PyObject* obj, rvalue_from_python_stage1_data* data) - { - void* storage = ((rvalue_from_python_storage*)data)->storage.bytes; - - arg_from_python get_source(obj); - bool convertible = get_source.convertible(); - BOOST_VERIFY(convertible); - - new (storage) Target(get_source()); - - // record successful construction - data->convertible = storage; - } -}; - -}}} // namespace boost::python::converter - -#endif // IMPLICIT_DWA2002326_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/obj_mgr_arg_from_python.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/obj_mgr_arg_from_python.hpp deleted file mode 100644 index cd4e1e0ea8..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/obj_mgr_arg_from_python.hpp +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OBJ_MGR_ARG_FROM_PYTHON_DWA2002628_HPP -# define OBJ_MGR_ARG_FROM_PYTHON_DWA2002628_HPP - -# include -# include -# include -# include -# include -# include -# include - -// -// arg_from_python converters for Python type wrappers, to be used as -// base classes for specializations. -// -namespace boost { namespace python { namespace converter { - -template -struct object_manager_value_arg_from_python -{ - typedef T result_type; - - object_manager_value_arg_from_python(PyObject*); - bool convertible() const; - T operator()() const; - private: - PyObject* m_source; -}; - -// Used for converting reference-to-object-manager arguments from -// python. The process used here is a little bit odd. Upon -// construction, we build the object manager object in the m_result -// object, *forcing* it to accept the source Python object by casting -// its pointer to detail::borrowed_reference. This is supposed to -// bypass any type checking of the source object. The convertible -// check then extracts the owned object and checks it. If the check -// fails, nothing else in the program ever gets to touch this strange -// "forced" object. -template -struct object_manager_ref_arg_from_python -{ - typedef Ref result_type; - - object_manager_ref_arg_from_python(PyObject*); - bool convertible() const; - Ref operator()() const; - ~object_manager_ref_arg_from_python(); - private: - typename python::detail::referent_storage::type m_result; -}; - -// -// implementations -// - -template -inline object_manager_value_arg_from_python::object_manager_value_arg_from_python(PyObject* x) - : m_source(x) -{ -} - -template -inline bool object_manager_value_arg_from_python::convertible() const -{ - return object_manager_traits::check(m_source); -} - -template -inline T object_manager_value_arg_from_python::operator()() const -{ - return T(python::detail::borrowed_reference(m_source)); -} - -template -inline object_manager_ref_arg_from_python::object_manager_ref_arg_from_python(PyObject* x) -{ -# if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 243 - // needed for warning suppression - python::detail::borrowed_reference x_ = python::detail::borrowed_reference(x); - python::detail::construct_referent(&m_result.bytes, x_); -# else - python::detail::construct_referent(&m_result.bytes, (python::detail::borrowed_reference)x); -# endif -} - -template -inline object_manager_ref_arg_from_python::~object_manager_ref_arg_from_python() -{ - python::detail::destroy_referent(this->m_result.bytes); -} - -namespace detail -{ - template - inline bool object_manager_ref_check(T const& x) - { - return object_manager_traits::check(get_managed_object(x, tag)); - } -} - -template -inline bool object_manager_ref_arg_from_python::convertible() const -{ - return detail::object_manager_ref_check( - python::detail::void_ptr_to_reference(this->m_result.bytes, (Ref(*)())0)); -} - -template -inline Ref object_manager_ref_arg_from_python::operator()() const -{ - return python::detail::void_ptr_to_reference( - this->m_result.bytes, (Ref(*)())0); -} - -}}} // namespace boost::python::converter - -#endif // OBJ_MGR_ARG_FROM_PYTHON_DWA2002628_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/object_manager.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/object_manager.hpp deleted file mode 100644 index 84e44d475b..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/object_manager.hpp +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OBJECT_MANAGER_DWA2002614_HPP -# define OBJECT_MANAGER_DWA2002614_HPP - -# include -# include -# include -# include -# include -# include -# include - -// Facilities for dealing with types which always manage Python -// objects. Some examples are object, list, str, et. al. Different -// to_python/from_python conversion rules apply here because in -// contrast to other types which are typically embedded inside a -// Python object, these are wrapped around a Python object. For most -// object managers T, a C++ non-const T reference argument does not -// imply the existence of a T lvalue embedded in the corresponding -// Python argument, since mutating member functions on T actually only -// modify the held Python object. -// -// handle is an object manager, though strictly speaking it should -// not be. In other words, even though mutating member functions of -// hanlde actually modify the handle and not the T object, -// handle& arguments of wrapped functions will bind to "rvalues" -// wrapping the actual Python argument, just as with other object -// manager classes. Making an exception for handle is simply not -// worth the trouble. -// -// borrowed cv* is an object manager so that we can use the general -// to_python mechanisms to convert raw Python object pointers to -// python, without the usual semantic problems of using raw pointers. - - -// Object Manager Concept requirements: -// -// T is an Object Manager -// p is a PyObject* -// x is a T -// -// * object_manager_traits::is_specialized == true -// -// * T(detail::borrowed_reference(p)) -// Manages p without checking its type -// -// * get_managed_object(x, boost::python::tag) -// Convertible to PyObject* -// -// Additional requirements if T can be converted from_python: -// -// * T(object_manager_traits::adopt(p)) -// steals a reference to p, or throws a TypeError exception if -// p doesn't have an appropriate type. May assume p is non-null -// -// * X::check(p) -// convertible to bool. True iff T(X::construct(p)) will not -// throw. - -// Forward declarations -// -namespace boost { namespace python -{ - namespace api - { - class object; - } -}} - -namespace boost { namespace python { namespace converter { - - -// Specializations for handle -template -struct handle_object_manager_traits - : pyobject_traits -{ - private: - typedef pyobject_traits base; - - public: - BOOST_STATIC_CONSTANT(bool, is_specialized = true); - - // Initialize with a null_ok pointer for efficiency, bypassing the - // null check since the source is always non-null. - static null_ok* adopt(PyObject* p) - { - return python::allow_null(base::checked_downcast(p)); - } -}; - -template -struct default_object_manager_traits -{ - BOOST_STATIC_CONSTANT( - bool, is_specialized = python::detail::is_borrowed_ptr::value - ); -}; - -template -struct object_manager_traits - : mpl::if_c< - is_handle::value - , handle_object_manager_traits - , default_object_manager_traits - >::type -{ -}; - -// -// Traits for detecting whether a type is an object manager or a -// (cv-qualified) reference to an object manager. -// - -template -struct is_object_manager - : mpl::bool_::is_specialized> -{ -}; - -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template -struct is_reference_to_object_manager - : mpl::false_ -{ -}; - -template -struct is_reference_to_object_manager - : is_object_manager -{ -}; - -template -struct is_reference_to_object_manager - : is_object_manager -{ -}; - -template -struct is_reference_to_object_manager - : is_object_manager -{ -}; - -template -struct is_reference_to_object_manager - : is_object_manager -{ -}; -# else - -namespace detail -{ - typedef char (&yes_reference_to_object_manager)[1]; - typedef char (&no_reference_to_object_manager)[2]; - - // A number of nastinesses go on here in order to work around MSVC6 - // bugs. - template - struct is_object_manager_help - { - typedef typename mpl::if_< - is_object_manager - , yes_reference_to_object_manager - , no_reference_to_object_manager - >::type type; - - // If we just use the type instead of the result of calling this - // function, VC6 will ICE. - static type call(); - }; - - // A set of overloads for each cv-qualification. The same argument - // is passed twice: the first one is used to unwind the cv*, and the - // second one is used to avoid relying on partial ordering for - // overload resolution. - template - typename is_object_manager_help - is_object_manager_helper(U*, void*); - - template - typename is_object_manager_help - is_object_manager_helper(U const*, void const*); - - template - typename is_object_manager_help - is_object_manager_helper(U volatile*, void volatile*); - - template - typename is_object_manager_help - is_object_manager_helper(U const volatile*, void const volatile*); - - template - struct is_reference_to_object_manager_nonref - : mpl::false_ - { - }; - - template - struct is_reference_to_object_manager_ref - { - static T sample_object; - BOOST_STATIC_CONSTANT( - bool, value - = (sizeof(is_object_manager_helper(&sample_object, &sample_object).call()) - == sizeof(detail::yes_reference_to_object_manager) - ) - ); - typedef mpl::bool_ type; - }; -} - -template -struct is_reference_to_object_manager - : mpl::if_< - is_reference - , detail::is_reference_to_object_manager_ref - , detail::is_reference_to_object_manager_nonref - >::type -{ -}; -# endif - -}}} // namespace boost::python::converter - -#endif // OBJECT_MANAGER_DWA2002614_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pointer_type_id.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pointer_type_id.hpp deleted file mode 100644 index 963f58f717..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pointer_type_id.hpp +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef POINTER_TYPE_ID_DWA2002222_HPP -# define POINTER_TYPE_ID_DWA2002222_HPP - -# include -# include - -namespace boost { namespace python { namespace converter { - -namespace detail -{ - template - struct pointer_typeid_select - { - template - static inline type_info execute(T*(*)() = 0) - { - return type_id(); - } - }; - - template <> - struct pointer_typeid_select - { - template - static inline type_info execute(T* const volatile&(*)() = 0) - { - return type_id(); - } - - template - static inline type_info execute(T*volatile&(*)() = 0) - { - return type_id(); - } - - template - static inline type_info execute(T*const&(*)() = 0) - { - return type_id(); - } - - template - static inline type_info execute(T*&(*)() = 0) - { - return type_id(); - } - }; -} - -// Usage: pointer_type_id() -// -// Returns a type_info associated with the type pointed -// to by T, which may be a pointer or a reference to a pointer. -template -type_info pointer_type_id(T(*)() = 0) -{ - return detail::pointer_typeid_select< - is_reference::value - >::execute((T(*)())0); -} - -}}} // namespace boost::python::converter - -#endif // POINTER_TYPE_ID_DWA2002222_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pyobject_traits.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pyobject_traits.hpp deleted file mode 100644 index 43e384af8d..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pyobject_traits.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef PYOBJECT_TRAITS_DWA2002720_HPP -# define PYOBJECT_TRAITS_DWA2002720_HPP - -# include -# include - -namespace boost { namespace python { namespace converter { - -template struct pyobject_traits; - -template <> -struct pyobject_traits -{ - // All objects are convertible to PyObject - static bool check(PyObject*) { return true; } - static PyObject* checked_downcast(PyObject* x) { return x; } -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - static PyTypeObject const* get_pytype() { return 0; } -#endif -}; - -// -// Specializations -// - -# define BOOST_PYTHON_BUILTIN_OBJECT_TRAITS(T) \ - template <> struct pyobject_traits \ - : pyobject_type {} - -// This is not an exhaustive list; should be expanded. -BOOST_PYTHON_BUILTIN_OBJECT_TRAITS(Type); -BOOST_PYTHON_BUILTIN_OBJECT_TRAITS(List); -#if PY_VERSION_HEX < 0x03000000 -BOOST_PYTHON_BUILTIN_OBJECT_TRAITS(Int); -#endif -BOOST_PYTHON_BUILTIN_OBJECT_TRAITS(Long); -BOOST_PYTHON_BUILTIN_OBJECT_TRAITS(Dict); -BOOST_PYTHON_BUILTIN_OBJECT_TRAITS(Tuple); - -}}} // namespace boost::python::converter - -#endif // PYOBJECT_TRAITS_DWA2002720_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pyobject_type.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pyobject_type.hpp deleted file mode 100644 index 526f9f9dba..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pyobject_type.hpp +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef PYOBJECT_TYPE_DWA2002720_HPP -# define PYOBJECT_TYPE_DWA2002720_HPP - -# include - -namespace boost { namespace python { namespace converter { - -BOOST_PYTHON_DECL PyObject* checked_downcast_impl(PyObject*, PyTypeObject*); - -// Used as a base class for specializations which need to provide -// Python type checking capability. -template -struct pyobject_type -{ - static bool check(PyObject* x) - { - return ::PyObject_IsInstance(x, (PyObject*)pytype); - } - - static Object* checked_downcast(PyObject* x) - { - return python::downcast( - (checked_downcast_impl)(x, pytype) - ); - } -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - static PyTypeObject const* get_pytype() { return pytype; } -#endif -}; - -}}} // namespace boost::python::converter - -#endif // PYOBJECT_TYPE_DWA2002720_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pytype_function.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pytype_function.hpp deleted file mode 100644 index 95d0f66d46..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pytype_function.hpp +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright David Abrahams 2002, Nikolay Mladenov 2007. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef WRAP_PYTYPE_NM20070606_HPP -# define WRAP_PYTYPE_NM20070606_HPP - -# include -# include -# include - - -namespace boost { namespace python { - -namespace converter -{ -template -struct wrap_pytype -{ - static PyTypeObject const* get_pytype() - { - return python_type; - } -}; - -typedef PyTypeObject const* (*pytype_function)(); - -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - - - -namespace detail -{ -struct unwind_type_id_helper{ - typedef python::type_info result_type; - template - static result_type execute(U* ){ - return python::type_id(); - } -}; - -template -inline python::type_info unwind_type_id_(boost::type* = 0, mpl::false_ * =0) -{ - return boost::python::detail::unwind_type (); -} - -inline python::type_info unwind_type_id_(boost::type* = 0, mpl::true_* =0) -{ - return type_id(); -} - -template -inline python::type_info unwind_type_id(boost::type* p= 0) -{ - return unwind_type_id_(p, (mpl::bool_::value >*)0 ); -} -} - - -template -struct expected_pytype_for_arg -{ - static PyTypeObject const *get_pytype() - { - const converter::registration *r=converter::registry::query( - detail::unwind_type_id_((boost::type*)0, (mpl::bool_::value >*)0 ) - ); - return r ? r->expected_from_python_type(): 0; - } -}; - - -template -struct registered_pytype -{ - static PyTypeObject const *get_pytype() - { - const converter::registration *r=converter::registry::query( - detail::unwind_type_id_((boost::type*) 0, (mpl::bool_::value >*)0 ) - ); - return r ? r->m_class_object: 0; - } -}; - - -template -struct registered_pytype_direct -{ - static PyTypeObject const* get_pytype() - { - return registered::converters.m_class_object; - } -}; - -template -struct expected_from_python_type : expected_pytype_for_arg{}; - -template -struct expected_from_python_type_direct -{ - static PyTypeObject const* get_pytype() - { - return registered::converters.expected_from_python_type(); - } -}; - -template -struct to_python_target_type -{ - static PyTypeObject const *get_pytype() - { - const converter::registration *r=converter::registry::query( - detail::unwind_type_id_((boost::type*)0, (mpl::bool_::value >*)0 ) - ); - return r ? r->to_python_target_type(): 0; - } -}; - -template -struct to_python_target_type_direct -{ - static PyTypeObject const *get_pytype() - { - return registered::converters.to_python_target_type(); - } -}; -#endif - -}}} // namespace boost::python - -#endif // WRAP_PYTYPE_NM20070606_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pytype_object_mgr_traits.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pytype_object_mgr_traits.hpp deleted file mode 100644 index 8f5b2b7677..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/pytype_object_mgr_traits.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef PYTYPE_OBJECT_MANAGER_TRAITS_DWA2002716_HPP -# define PYTYPE_OBJECT_MANAGER_TRAITS_DWA2002716_HPP - -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace converter { - -// Provide a forward declaration as a convenience for clients, who all -// need it. -template struct object_manager_traits; - -// Derive specializations of object_manager_traits from this class -// when T is an object manager for a particular Python type hierarchy. -// -template -struct pytype_object_manager_traits - : pyobject_type // provides check() -{ - BOOST_STATIC_CONSTANT(bool, is_specialized = true); - static inline python::detail::new_reference adopt(PyObject*); -}; - -// -// implementations -// -template -inline python::detail::new_reference pytype_object_manager_traits::adopt(PyObject* x) -{ - return python::detail::new_reference(python::pytype_check(pytype, x)); -} - -}}} // namespace boost::python::converter - -#endif // PYTYPE_OBJECT_MANAGER_TRAITS_DWA2002716_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/registered.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/registered.hpp deleted file mode 100644 index 2404cb0ff2..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/registered.hpp +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef REGISTERED_DWA2002710_HPP -# define REGISTERED_DWA2002710_HPP -# include -# include -# include -# include -# include -# include -# include -# include -# include - -namespace boost { - -// You'll see shared_ptr mentioned in this header because we need to -// note which types are shared_ptrs in their registrations, to -// implement special shared_ptr handling for rvalue conversions. -template class shared_ptr; - -namespace python { namespace converter { - -struct registration; - -namespace detail -{ - template - struct registered_base - { - static registration const& converters; - }; -} - -template -struct registered - : detail::registered_base< - typename add_reference< - typename add_cv::type - >::type - > -{ -}; - -# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) -// collapses a few more types to the same static instance. MSVC7.1 -// fails to strip cv-qualification from array types in typeid. For -// some reason we can't use this collapse there or array converters -// will not be found. -template -struct registered - : registered {}; -# endif - -// -// implementations -// -namespace detail -{ - inline void - register_shared_ptr0(...) - { - } - - template - inline void - register_shared_ptr0(shared_ptr*) - { - registry::lookup_shared_ptr(type_id >()); - } - - template - inline void - register_shared_ptr1(T const volatile*) - { - detail::register_shared_ptr0((T*)0); - } - - template - inline registration const& - registry_lookup2(T&(*)()) - { - detail::register_shared_ptr1((T*)0); - return registry::lookup(type_id()); - } - - template - inline registration const& - registry_lookup1(type) - { - return registry_lookup2((T(*)())0); - } - - inline registration const& - registry_lookup1(type) - { - detail::register_shared_ptr1((void*)0); - return registry::lookup(type_id()); - } - - template - registration const& registered_base::converters = detail::registry_lookup1(type()); - -} - -}}} // namespace boost::python::converter - -#endif // REGISTERED_DWA2002710_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/registered_pointee.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/registered_pointee.hpp deleted file mode 100644 index d9e7ac75a8..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/registered_pointee.hpp +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef REGISTERED_POINTEE_DWA2002710_HPP -# define REGISTERED_POINTEE_DWA2002710_HPP -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace converter { - -struct registration; - -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template -struct registered_pointee - : registered< - typename remove_pointer< - typename remove_cv< - typename remove_reference::type - >::type - >::type - > -{ -}; -# else -namespace detail -{ - template - struct registered_pointee_base - { - static registration const& converters; - }; -} - -template -struct registered_pointee - : detail::registered_pointee_base< - typename add_reference< - typename add_cv::type - >::type - > -{ -}; - -// -// implementations -// -namespace detail -{ - template - registration const& registered_pointee_base::converters - = registry::lookup(pointer_type_id()); -} - -# endif -}}} // namespace boost::python::converter - -#endif // REGISTERED_POINTEE_DWA2002710_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/registrations.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/registrations.hpp deleted file mode 100644 index 7ef74e8f40..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/registrations.hpp +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef REGISTRATIONS_DWA2002223_HPP -# define REGISTRATIONS_DWA2002223_HPP - -# include - -# include - -# include -# include -# include - -# include - -namespace boost { namespace python { namespace converter { - -struct lvalue_from_python_chain -{ - convertible_function convert; - lvalue_from_python_chain* next; -}; - -struct rvalue_from_python_chain -{ - convertible_function convertible; - constructor_function construct; - PyTypeObject const* (*expected_pytype)(); - rvalue_from_python_chain* next; -}; - -struct BOOST_PYTHON_DECL registration -{ - public: // member functions - explicit registration(type_info target, bool is_shared_ptr = false); - ~registration(); - - // Convert the appropriately-typed data to Python - PyObject* to_python(void const volatile*) const; - - // Return the class object, or raise an appropriate Python - // exception if no class has been registered. - PyTypeObject* get_class_object() const; - - // Return common denominator of the python class objects, - // convertable to target. Inspects the m_class_object and the value_chains. - PyTypeObject const* expected_from_python_type() const; - PyTypeObject const* to_python_target_type() const; - - public: // data members. So sue me. - const python::type_info target_type; - - // The chain of eligible from_python converters when an lvalue is required - lvalue_from_python_chain* lvalue_chain; - - // The chain of eligible from_python converters when an rvalue is acceptable - rvalue_from_python_chain* rvalue_chain; - - // The class object associated with this type - PyTypeObject* m_class_object; - - // The unique to_python converter for the associated C++ type. - to_python_function_t m_to_python; - PyTypeObject const* (*m_to_python_target_type)(); - - - // True iff this type is a shared_ptr. Needed for special rvalue - // from_python handling. - const bool is_shared_ptr; - -# if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) - private: - void operator=(registration); // This is not defined, and just keeps MWCW happy. -# endif -}; - -// -// implementations -// -inline registration::registration(type_info target_type, bool is_shared_ptr) - : target_type(target_type) - , lvalue_chain(0) - , rvalue_chain(0) - , m_class_object(0) - , m_to_python(0) - , m_to_python_target_type(0) - , is_shared_ptr(is_shared_ptr) -{} - -inline bool operator<(registration const& lhs, registration const& rhs) -{ - return lhs.target_type < rhs.target_type; -} - -}}} // namespace boost::python::converter - -#endif // REGISTRATIONS_DWA2002223_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/registry.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/registry.hpp deleted file mode 100644 index 368adcc61d..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/registry.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright David Abrahams 2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef REGISTRY_DWA20011127_HPP -# define REGISTRY_DWA20011127_HPP -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace converter { - -struct registration; - -// This namespace acts as a sort of singleton -namespace registry -{ - // Get the registration corresponding to the type, creating it if necessary - BOOST_PYTHON_DECL registration const& lookup(type_info); - - // Get the registration corresponding to the type, creating it if - // necessary. Use this first when the type is a shared_ptr. - BOOST_PYTHON_DECL registration const& lookup_shared_ptr(type_info); - - // Return a pointer to the corresponding registration, if one exists - BOOST_PYTHON_DECL registration const* query(type_info); - - BOOST_PYTHON_DECL void insert(to_python_function_t, type_info, PyTypeObject const* (*to_python_target_type)() = 0); - - // Insert an lvalue from_python converter - BOOST_PYTHON_DECL void insert(convertible_function, type_info, PyTypeObject const* (*expected_pytype)() = 0); - - // Insert an rvalue from_python converter - BOOST_PYTHON_DECL void insert( - convertible_function - , constructor_function - , type_info - , PyTypeObject const* (*expected_pytype)() = 0 - ); - - // Insert an rvalue from_python converter at the tail of the - // chain. Used for implicit conversions - BOOST_PYTHON_DECL void push_back( - convertible_function - , constructor_function - , type_info - , PyTypeObject const* (*expected_pytype)() = 0 - ); -} - -}}} // namespace boost::python::converter - -#endif // REGISTRY_DWA20011127_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/return_from_python.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/return_from_python.hpp deleted file mode 100644 index 5db9748545..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/return_from_python.hpp +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef RETURN_FROM_PYTHON_DWA200265_HPP -# define RETURN_FROM_PYTHON_DWA200265_HPP - -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace converter { - -template struct is_object_manager; - -namespace detail -{ - template - struct return_pointer_from_python - { - typedef T result_type; - T operator()(PyObject*) const; - }; - - template - struct return_reference_from_python - { - typedef T result_type; - T operator()(PyObject*) const; - }; - - template - struct return_rvalue_from_python - { - typedef T result_type; - - return_rvalue_from_python(); - result_type operator()(PyObject*); - private: - rvalue_from_python_data m_data; - }; - - template - struct return_object_manager_from_python - { - typedef T result_type; - result_type operator()(PyObject*) const; - }; - - template - struct select_return_from_python - { - BOOST_STATIC_CONSTANT( - bool, obj_mgr = is_object_manager::value); - - BOOST_STATIC_CONSTANT( - bool, ptr = is_pointer::value); - - BOOST_STATIC_CONSTANT( - bool, ref = is_reference::value); - - typedef typename mpl::if_c< - obj_mgr - , return_object_manager_from_python - , typename mpl::if_c< - ptr - , return_pointer_from_python - , typename mpl::if_c< - ref - , return_reference_from_python - , return_rvalue_from_python - >::type - >::type - >::type type; - }; -} - -template -struct return_from_python - : detail::select_return_from_python::type -{ -}; - -// Specialization as a convenience for call and call_method -template <> -struct return_from_python -{ - typedef python::detail::returnable::type result_type; - - result_type operator()(PyObject* x) const - { - (void_result_from_python)(x); -# ifdef BOOST_NO_VOID_RETURNS - return result_type(); -# endif - } -}; - -// -// Implementations -// -namespace detail -{ - template - inline return_rvalue_from_python::return_rvalue_from_python() - : m_data( - const_cast(®istered::converters) - ) - { - } - - template - inline typename return_rvalue_from_python::result_type - return_rvalue_from_python::operator()(PyObject* obj) - { - // Take possession of the source object here. If the result is in - // fact going to be a copy of an lvalue embedded in the object, - // and we take possession inside rvalue_result_from_python, it - // will be destroyed too early. - handle<> holder(obj); - - return *(T*) - (rvalue_result_from_python)(obj, m_data.stage1); - } - - template - inline T return_reference_from_python::operator()(PyObject* obj) const - { - return python::detail::void_ptr_to_reference( - (reference_result_from_python)(obj, registered::converters) - , (T(*)())0); - } - - template - inline T return_pointer_from_python::operator()(PyObject* obj) const - { - return T( - (pointer_result_from_python)(obj, registered_pointee::converters) - ); - } - - template - inline T return_object_manager_from_python::operator()(PyObject* obj) const - { - return T( - object_manager_traits::adopt(expect_non_null(obj)) - ); - } -} - -}}} // namespace boost::python::converter - -#endif // RETURN_FROM_PYTHON_DWA200265_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/rvalue_from_python_data.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/rvalue_from_python_data.hpp deleted file mode 100644 index 471a5255b6..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/rvalue_from_python_data.hpp +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef FROM_PYTHON_AUX_DATA_DWA2002128_HPP -# define FROM_PYTHON_AUX_DATA_DWA2002128_HPP - -# include -# include -# include -# include -# include -# include -# include - -// Data management for potential rvalue conversions from Python to C++ -// types. When a client requests a conversion to T* or T&, we -// generally require that an object of type T exists in the source -// Python object, and the code here does not apply**. This implements -// conversions which may create new temporaries of type T. The classic -// example is a conversion which converts a Python tuple to a -// std::vector. Since no std::vector lvalue exists in the Python -// object -- it must be created "on-the-fly" by the converter, and -// which must manage the lifetime of the created object. -// -// Note that the client is not precluded from using a registered -// lvalue conversion to T in this case. In other words, we will -// happily accept a Python object which /does/ contain a std::vector -// lvalue, provided an appropriate converter is registered. So, while -// this is an rvalue conversion from the client's point-of-view, the -// converter registry may serve up lvalue or rvalue conversions for -// the target type. -// -// ** C++ argument from_python conversions to T const& are an -// exception to the rule for references: since in C++, const -// references can bind to temporary rvalues, we allow rvalue -// converters to be chosen when the target type is T const& for some -// T. -namespace boost { namespace python { namespace converter { - -// Conversions begin by filling in and returning a copy of this -// structure. The process looks up a converter in the rvalue converter -// registry for the target type. It calls the convertible() function -// of each registered converter, passing the source PyObject* as an -// argument, until a non-null result is returned. This result goes in -// the convertible field, and the converter's construct() function is -// stored in the construct field. -// -// If no appropriate converter is found, conversion fails and the -// convertible field is null. When used in argument conversion for -// wrapped C++ functions, it causes overload resolution to reject the -// current function but not to fail completely. If an exception is -// thrown, overload resolution stops and the exception propagates back -// through the caller. -// -// If an lvalue converter is matched, its convertible() function is -// expected to return a pointer to the stored T object; its -// construct() function will be NULL. The convertible() function of -// rvalue converters may return any non-singular pointer; the actual -// target object will only be available once the converter's -// construct() function is called. -struct rvalue_from_python_stage1_data -{ - void* convertible; - constructor_function construct; -}; - -// Augments rvalue_from_python_stage1_data by adding storage for -// constructing an object of remove_reference::type. The -// construct() function of rvalue converters (stored in m_construct -// above) will cast the rvalue_from_python_stage1_data to an -// appropriate instantiation of this template in order to access that -// storage. -template -struct rvalue_from_python_storage -{ - rvalue_from_python_stage1_data stage1; - - // Storage for the result, in case an rvalue must be constructed - typename python::detail::referent_storage< - typename add_reference::type - >::type storage; -}; - -// Augments rvalue_from_python_storage with a destructor. If -// stage1.convertible == storage.bytes, it indicates that an object of -// remove_reference::type has been constructed in storage and -// should will be destroyed in ~rvalue_from_python_data(). It is -// crucial that successful rvalue conversions establish this equality -// and that unsuccessful ones do not. -template -struct rvalue_from_python_data : rvalue_from_python_storage -{ -# if (!defined(__MWERKS__) || __MWERKS__ >= 0x3000) \ - && (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= 245) \ - && (!defined(__DECCXX_VER) || __DECCXX_VER > 60590014) \ - && !defined(BOOST_PYTHON_SYNOPSIS) /* Synopsis' OpenCXX has trouble parsing this */ - // This must always be a POD struct with m_data its first member. - BOOST_STATIC_ASSERT(BOOST_PYTHON_OFFSETOF(rvalue_from_python_storage,stage1) == 0); -# endif - - // The usual constructor - rvalue_from_python_data(rvalue_from_python_stage1_data const&); - - // This constructor just sets m_convertible -- used by - // implicitly_convertible<> to perform the final step of the - // conversion, where the construct() function is already known. - rvalue_from_python_data(void* convertible); - - // Destroys any object constructed in the storage. - ~rvalue_from_python_data(); - private: - typedef typename add_reference::type>::type ref_type; -}; - -// -// Implementataions -// -template -inline rvalue_from_python_data::rvalue_from_python_data(rvalue_from_python_stage1_data const& _stage1) -{ - this->stage1 = _stage1; -} - -template -inline rvalue_from_python_data::rvalue_from_python_data(void* convertible) -{ - this->stage1.convertible = convertible; -} - -template -inline rvalue_from_python_data::~rvalue_from_python_data() -{ - if (this->stage1.convertible == this->storage.bytes) - python::detail::destroy_referent(this->storage.bytes); -} - -}}} // namespace boost::python::converter - -#endif // FROM_PYTHON_AUX_DATA_DWA2002128_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/shared_ptr_deleter.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/shared_ptr_deleter.hpp deleted file mode 100644 index 926508d00e..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/shared_ptr_deleter.hpp +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef SHARED_PTR_DELETER_DWA2002121_HPP -# define SHARED_PTR_DELETER_DWA2002121_HPP - -namespace boost { namespace python { namespace converter { - -struct BOOST_PYTHON_DECL shared_ptr_deleter -{ - shared_ptr_deleter(handle<> owner); - ~shared_ptr_deleter(); - - void operator()(void const*); - - handle<> owner; -}; - -}}} // namespace boost::python::converter - -#endif // SHARED_PTR_DELETER_DWA2002121_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/shared_ptr_from_python.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/shared_ptr_from_python.hpp deleted file mode 100644 index c09107765c..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/shared_ptr_from_python.hpp +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef SHARED_PTR_FROM_PYTHON_DWA20021130_HPP -# define SHARED_PTR_FROM_PYTHON_DWA20021130_HPP - -# include -# include -# include -# include -# include -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES -# include -#endif -# include - -namespace boost { namespace python { namespace converter { - -template -struct shared_ptr_from_python -{ - shared_ptr_from_python() - { - converter::registry::insert(&convertible, &construct, type_id >() -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - , &converter::expected_from_python_type_direct::get_pytype -#endif - ); - } - - private: - static void* convertible(PyObject* p) - { - if (p == Py_None) - return p; - - return converter::get_lvalue_from_python(p, registered::converters); - } - - static void construct(PyObject* source, rvalue_from_python_stage1_data* data) - { - void* const storage = ((converter::rvalue_from_python_storage >*)data)->storage.bytes; - // Deal with the "None" case. - if (data->convertible == source) - new (storage) shared_ptr(); - else - { - boost::shared_ptr hold_convertible_ref_count( - (void*)0, shared_ptr_deleter(handle<>(borrowed(source))) ); - // use aliasing constructor - new (storage) shared_ptr( - hold_convertible_ref_count, - static_cast(data->convertible)); - } - - data->convertible = storage; - } -}; - -}}} // namespace boost::python::converter - -#endif // SHARED_PTR_FROM_PYTHON_DWA20021130_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/shared_ptr_to_python.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/shared_ptr_to_python.hpp deleted file mode 100644 index fe867ace13..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/shared_ptr_to_python.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef SHARED_PTR_TO_PYTHON_DWA2003224_HPP -# define SHARED_PTR_TO_PYTHON_DWA2003224_HPP - -# include -# include -# include -# include - -namespace boost { namespace python { namespace converter { - -template -PyObject* shared_ptr_to_python(shared_ptr const& x) -{ - if (!x) - return python::detail::none(); - else if (shared_ptr_deleter* d = boost::get_deleter(x)) - return incref( get_pointer( d->owner ) ); - else - return converter::registered const&>::converters.to_python(&x); -} - -}}} // namespace boost::python::converter - -#endif // SHARED_PTR_TO_PYTHON_DWA2003224_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/to_python_function_type.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/converter/to_python_function_type.hpp deleted file mode 100644 index cccd014d68..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/converter/to_python_function_type.hpp +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef TO_PYTHON_FUNCTION_TYPE_DWA200236_HPP -# define TO_PYTHON_FUNCTION_TYPE_DWA200236_HPP -# include -# include - -namespace boost { namespace python { namespace converter { - -// The type of stored function pointers which actually do conversion -// by-value. The void* points to the object to be converted, and -// type-safety is preserved through runtime registration. -typedef PyObject* (*to_python_function_t)(void const*); - -}}} // namespace boost::python::converter - -#endif // TO_PYTHON_FUNCTION_TYPE_DWA200236_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/copy_const_reference.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/copy_const_reference.hpp deleted file mode 100644 index 19e3b42332..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/copy_const_reference.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef COPY_CONST_REFERENCE_DWA2002131_HPP -# define COPY_CONST_REFERENCE_DWA2002131_HPP - -# include -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - template - struct copy_const_reference_expects_a_const_reference_return_type -# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__) - {} -# endif - ; -} - -template struct to_python_value; - -struct copy_const_reference -{ - template - struct apply - { - typedef typename mpl::if_c< - indirect_traits::is_reference_to_const::value - , to_python_value - , detail::copy_const_reference_expects_a_const_reference_return_type - >::type type; - }; -}; - - -}} // namespace boost::python - -#endif // COPY_CONST_REFERENCE_DWA2002131_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/copy_non_const_reference.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/copy_non_const_reference.hpp deleted file mode 100644 index 78b70f5d3b..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/copy_non_const_reference.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef COPY_NON_CONST_REFERENCE_DWA2002131_HPP -# define COPY_NON_CONST_REFERENCE_DWA2002131_HPP - -# include -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - template - struct copy_non_const_reference_expects_a_non_const_reference_return_type -# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__) - {} -# endif - ; -} - -template struct to_python_value; - -struct copy_non_const_reference -{ - template - struct apply - { - typedef typename mpl::if_c< - indirect_traits::is_reference_to_non_const::value - , to_python_value - , detail::copy_non_const_reference_expects_a_non_const_reference_return_type - >::type type; - }; -}; - - -}} // namespace boost::python - -#endif // COPY_NON_CONST_REFERENCE_DWA2002131_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/data_members.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/data_members.hpp deleted file mode 100644 index b0851fb1b3..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/data_members.hpp +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef DATA_MEMBERS_DWA2002328_HPP -# define DATA_MEMBERS_DWA2002328_HPP - -# include - -# include - -# include -# include -# include -# include - -# include - -# include -# include -# include - -# include -# include -# include - -# if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) -# include -# endif - -# include -# include -# include - -# include - -namespace boost { namespace python { - -// -// This file defines the make_getter and make_setter function -// families, which are responsible for turning pointers, references, -// and pointers-to-data-members into callable Python objects which -// can be used for attribute access on wrapped classes. -// - -namespace detail -{ - - // A small function object which handles the getting and setting of - // data members. - template - struct member - { - public: - member(Data Class::*which) : m_which(which) {} - - Data& operator()(Class& c) const - { - return c.*m_which; - } - - void operator()(Class& c, typename value_arg::type d) const - { - c.*m_which = d; - } - private: - Data Class::*m_which; - }; - - // A small function object which handles the getting and setting of - // non-member objects. - template - struct datum - { - public: - datum(Data *which) : m_which(which) {} - - Data& operator()() const - { - return *m_which; - } - - void operator()(typename value_arg::type d) const - { - *m_which = d; - } - private: - Data *m_which; - }; - - // - // Helper metafunction for determining the default CallPolicy to use - // for attribute access. If T is a [reference to a] class type X - // whose conversion to python would normally produce a new copy of X - // in a wrapped X class instance (as opposed to types such as - // std::string, which are converted to native Python types, and - // smart pointer types which produce a wrapped class instance of the - // pointee type), to-python conversions will attempt to produce an - // object which refers to the original C++ object, rather than a - // copy. See default_member_getter_policy for rationale. - // - template - struct default_getter_by_ref - : mpl::and_< - mpl::bool_< - to_python_value< - typename value_arg::type - >::uses_registry - > - , indirect_traits::is_reference_to_class< - typename value_arg::type - > - > - { - }; - - // Metafunction computing the default CallPolicy to use for reading - // data members - // - // If it's a regular class type (not an object manager or other - // type for which we have to_python specializations, use - // return_internal_reference so that we can do things like - // x.y.z = 1 - // and get the right result. - template - struct default_member_getter_policy - : mpl::if_< - default_getter_by_ref - , return_internal_reference<> - , return_value_policy - > - {}; - - // Metafunction computing the default CallPolicy to use for reading - // non-member data. - template - struct default_datum_getter_policy - : mpl::if_< - default_getter_by_ref - , return_value_policy - , return_value_policy - > - {}; - - // - // make_getter helper function family -- These helpers to - // boost::python::make_getter are used to dispatch behavior. The - // third argument is a workaround for a CWPro8 partial ordering bug - // with pointers to data members. It should be convertible to - // mpl::true_ iff the first argument is a pointer-to-member, and - // mpl::false_ otherwise. The fourth argument is for compilers - // which don't support partial ordering at all and should always be - // passed 0L. - // - -#if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - template - inline object make_getter(D& d, P& p, mpl::false_, ...); -#endif - - // Handle non-member pointers with policies - template - inline object make_getter(D* d, Policies const& policies, mpl::false_, int) - { - return python::make_function( - detail::datum(d), policies, mpl::vector1() - ); - } - - // Handle non-member pointers without policies - template - inline object make_getter(D* d, not_specified, mpl::false_, long) - { - typedef typename default_datum_getter_policy::type policies; - return detail::make_getter(d, policies(), mpl::false_(), 0); - } - - // Handle pointers-to-members with policies - template - inline object make_getter(D C::*pm, Policies const& policies, mpl::true_, int) - { -#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) - typedef typename remove_cv::type Class; -#else - typedef C Class; -#endif - return python::make_function( - detail::member(pm) - , policies - , mpl::vector2() - ); - } - - // Handle pointers-to-members without policies - template - inline object make_getter(D C::*pm, not_specified, mpl::true_, long) - { - typedef typename default_member_getter_policy::type policies; - return detail::make_getter(pm, policies(), mpl::true_(), 0); - } - - // Handle references - template - inline object make_getter(D& d, P& p, mpl::false_, ...) - { - // Just dispatch to the handler for pointer types. - return detail::make_getter(&d, p, mpl::false_(), 0L); - } - - // - // make_setter helper function family -- These helpers to - // boost::python::make_setter are used to dispatch behavior. The - // third argument is for compilers which don't support partial - // ordering at all and should always be passed 0. - // - - - // Handle non-member pointers - template - inline object make_setter(D* p, Policies const& policies, mpl::false_, int) - { - return python::make_function( - detail::datum(p), policies, mpl::vector2() - ); - } - - // Handle pointers-to-members - template - inline object make_setter(D C::*pm, Policies const& policies, mpl::true_, int) - { - return python::make_function( - detail::member(pm) - , policies - , mpl::vector3() - ); - } - - // Handle references - template - inline object make_setter(D& x, Policies const& policies, mpl::false_, ...) - { - return detail::make_setter(&x, policies, mpl::false_(), 0L); - } -} - -// -// make_getter function family -- build a callable object which -// retrieves data through the first argument and is appropriate for -// use as the `get' function in Python properties . The second, -// policies argument, is optional. We need both D& and D const& -// overloads in order be able to handle rvalues. -// -template -inline object make_getter(D& d, Policies const& policies) -{ - return detail::make_getter(d, policies, is_member_pointer(), 0L); -} - -template -inline object make_getter(D const& d, Policies const& policies) -{ - return detail::make_getter(d, policies, is_member_pointer(), 0L); -} - -template -inline object make_getter(D& x) -{ - detail::not_specified policy - = detail::not_specified(); // suppress a SunPro warning - return detail::make_getter(x, policy, is_member_pointer(), 0L); -} - -# if !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) && !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) -template -inline object make_getter(D const& d) -{ - detail::not_specified policy - = detail::not_specified(); // Suppress a SunPro warning - return detail::make_getter(d, policy, is_member_pointer(), 0L); -} -# endif - -// -// make_setter function family -- build a callable object which -// writes data through the first argument and is appropriate for -// use as the `set' function in Python properties . The second, -// policies argument, is optional. We need both D& and D const& -// overloads in order be able to handle rvalues. -// -template -inline object make_setter(D& x, Policies const& policies) -{ - return detail::make_setter(x, policies, is_member_pointer(), 0); -} - -template -inline object make_setter(D const& x, Policies const& policies) -{ - return detail::make_setter(x, policies, is_member_pointer(), 0); -} - -template -inline object make_setter(D& x) -{ - return detail::make_setter(x, default_call_policies(), is_member_pointer(), 0); -} - -# if !(BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(__EDG_VERSION__, <= 238)) -template -inline object make_setter(D const& x) -{ - return detail::make_setter(x, default_call_policies(), is_member_pointer(), 0); -} -# endif - -}} // namespace boost::python - -#endif // DATA_MEMBERS_DWA2002328_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/def.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/def.hpp deleted file mode 100644 index 76829b0855..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/def.hpp +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef DEF_DWA200292_HPP -# define DEF_DWA200292_HPP - -# include - -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - namespace error - { - // Compile-time error messages - template struct multiple_functions_passed_to_def; - template <> struct multiple_functions_passed_to_def { typedef char type; }; - } - - // - // def_from_helper -- - // - // Use a def_helper to define a regular wrapped function in the current scope. - template - void def_from_helper( - char const* name, F const& fn, Helper const& helper) - { - // Must not try to use default implementations except with method definitions. - typedef typename error::multiple_functions_passed_to_def< - Helper::has_default_implementation - >::type assertion; - - detail::scope_setattr_doc( - name, boost::python::make_function( - fn - , helper.policies() - , helper.keywords()) - , helper.doc() - ); - } - - // - // These two overloads discriminate between def() as applied to - // regular functions and def() as applied to the result of - // BOOST_PYTHON_FUNCTION_OVERLOADS(). The final argument is used to - // discriminate. - // - template - void - def_maybe_overloads( - char const* name - , Fn fn - , A1 const& a1 - , ...) - { - detail::def_from_helper(name, fn, def_helper(a1)); - } - - template - void def_maybe_overloads( - char const* name - , SigT sig - , StubsT const& stubs - , detail::overloads_base const*) - { - scope current; - - detail::define_with_defaults( - name, stubs, current, detail::get_signature(sig)); - } - - template - object make_function1(T fn, ...) { return make_function(fn); } - - inline - object make_function1(object const& x, object const*) { return x; } -} - -template -void def(char const* name, Fn fn) -{ - detail::scope_setattr_doc(name, detail::make_function1(fn, &fn), 0); -} - -template -void def(char const* name, Arg1T arg1, Arg2T const& arg2) -{ - detail::def_maybe_overloads(name, arg1, arg2, &arg2); -} - -template -void def(char const* name, F f, A1 const& a1, A2 const& a2) -{ - detail::def_from_helper(name, f, detail::def_helper(a1,a2)); -} - -template -void def(char const* name, F f, A1 const& a1, A2 const& a2, A3 const& a3) -{ - detail::def_from_helper(name, f, detail::def_helper(a1,a2,a3)); -} - -}} // namespace boost::python - -#endif // DEF_DWA200292_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/def_visitor.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/def_visitor.hpp deleted file mode 100644 index 9c8907cd6f..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/def_visitor.hpp +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef DEF_VISITOR_DWA2003810_HPP -# define DEF_VISITOR_DWA2003810_HPP - -# include -# include - -namespace boost { namespace python { - -template class def_visitor; -template class class_; - -class def_visitor_access -{ -# if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) \ - || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) - // Tasteless as this may seem, making all members public allows member templates - // to work in the absence of member template friends. - public: -# else - template friend class def_visitor; -# endif - - // unnamed visit, c.f. init<...>, container suites - template - static void visit(V const& v, classT& c) - { - v.derived_visitor().visit(c); - } - - // named visit, c.f. object, pure_virtual - template - static void visit( - V const& v - , classT& c - , char const* name - , OptionalArgs const& options - ) - { - v.derived_visitor().visit(c, name, options); - } - -}; - - -template -class def_visitor -{ - friend class def_visitor_access; - -# if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) \ - || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) - // Tasteless as this may seem, making all members public allows member templates - // to work in the absence of member template friends. - public: -# else - template friend class class_; -# endif - - // unnamed visit, c.f. init<...>, container suites - template - void visit(classT& c) const - { - def_visitor_access::visit(*this, c); - } - - // named visit, c.f. object, pure_virtual - template - void visit(classT& c, char const* name, OptionalArgs const& options) const - { - def_visitor_access::visit(*this, c, name, options); - } - - protected: - DerivedVisitor const& derived_visitor() const - { - return static_cast(*this); - } -}; - -}} // namespace boost::python - -#endif // DEF_VISITOR_DWA2003810_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/default_call_policies.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/default_call_policies.hpp deleted file mode 100644 index 3d32d2eb49..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/default_call_policies.hpp +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef DEFAULT_CALL_POLICIES_DWA2002131_HPP -# define DEFAULT_CALL_POLICIES_DWA2002131_HPP - -# include -# include -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -template struct to_python_value; - -namespace detail -{ -// for "readable" error messages - template struct specify_a_return_value_policy_to_wrap_functions_returning -# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__) - {} -# endif - ; -} - -struct default_result_converter; - -struct default_call_policies -{ - // Ownership of this argument tuple will ultimately be adopted by - // the caller. - template - static bool precall(ArgumentPackage const&) - { - return true; - } - - // Pass the result through - template - static PyObject* postcall(ArgumentPackage const&, PyObject* result) - { - return result; - } - - typedef default_result_converter result_converter; - typedef PyObject* argument_package; - - template - struct extract_return_type : mpl::front - { - }; - -}; - -struct default_result_converter -{ - template - struct apply - { - typedef typename mpl::if_< - mpl::or_, is_reference > - , detail::specify_a_return_value_policy_to_wrap_functions_returning - , boost::python::to_python_value< - typename detail::value_arg::type - > - >::type type; - }; -}; - -// Exceptions for c strings an PyObject*s -template <> -struct default_result_converter::apply -{ - typedef boost::python::to_python_value type; -}; - -template <> -struct default_result_converter::apply -{ - typedef boost::python::to_python_value type; -}; - -}} // namespace boost::python - -#endif // DEFAULT_CALL_POLICIES_DWA2002131_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/aix_init_module.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/aix_init_module.hpp deleted file mode 100644 index 9214dbf09b..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/aix_init_module.hpp +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef AIX_INIT_MODULE_DWA2002529_HPP -# define AIX_INIT_MODULE_DWA2002529_HPP -# ifdef _AIX -# include -# include -# ifdef __KCC -# include // this works around a problem in KCC 4.0f -# endif - -namespace boost { namespace python { namespace detail { - -extern "C" -{ - typedef PyObject* (*so_load_function)(char*,char*,FILE*); -} - -void aix_init_module(so_load_function, char const* name, void (*init_module)()); - -}}} // namespace boost::python::detail -# endif - -#endif // AIX_INIT_MODULE_DWA2002529_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/api_placeholder.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/api_placeholder.hpp deleted file mode 100644 index 5975a13bda..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/api_placeholder.hpp +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// DEPRECATED HEADER (2006 Jan 12) -// Provided only for backward compatibility. -// The boost::python::len() function is now defined in object.hpp. - -#ifndef BOOST_PYTHON_API_PLACE_HOLDER_HPP -#define BOOST_PYTHON_API_PLACE_HOLDER_HPP - -#include - -#endif // BOOST_PYTHON_API_PLACE_HOLDER_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/borrowed_ptr.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/borrowed_ptr.hpp deleted file mode 100644 index b88457b83a..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/borrowed_ptr.hpp +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef BORROWED_PTR_DWA20020601_HPP -# define BORROWED_PTR_DWA20020601_HPP -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace detail { - -template class borrowed -{ - typedef T type; -}; - -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template -struct is_borrowed_ptr -{ - BOOST_STATIC_CONSTANT(bool, value = false); -}; - -# if !defined(__MWERKS__) || __MWERKS__ > 0x3000 -template -struct is_borrowed_ptr*> -{ - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template -struct is_borrowed_ptr const*> -{ - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template -struct is_borrowed_ptr volatile*> -{ - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template -struct is_borrowed_ptr const volatile*> -{ - BOOST_STATIC_CONSTANT(bool, value = true); -}; -# else -template -struct is_borrowed -{ - BOOST_STATIC_CONSTANT(bool, value = false); -}; -template -struct is_borrowed > -{ - BOOST_STATIC_CONSTANT(bool, value = true); -}; -template -struct is_borrowed_ptr - : is_borrowed::type> -{ -}; -# endif - -# else // no partial specialization - -typedef char (&yes_borrowed_ptr_t)[1]; -typedef char (&no_borrowed_ptr_t)[2]; - -no_borrowed_ptr_t is_borrowed_ptr_test(...); - -template -typename mpl::if_c< - is_pointer::value - , T - , int - >::type -is_borrowed_ptr_test1(boost::type); - -template -yes_borrowed_ptr_t is_borrowed_ptr_test(borrowed const volatile*); - -template -class is_borrowed_ptr -{ - public: - BOOST_STATIC_CONSTANT( - bool, value = ( - sizeof(detail::is_borrowed_ptr_test(is_borrowed_ptr_test1(boost::type()))) - == sizeof(detail::yes_borrowed_ptr_t))); -}; - -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -} - -template -inline T* get_managed_object(detail::borrowed const volatile* p, tag_t) -{ - return (T*)p; -} - -}} // namespace boost::python::detail - -#endif // #ifndef BORROWED_PTR_DWA20020601_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/caller.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/caller.hpp deleted file mode 100644 index e479bf427d..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/caller.hpp +++ /dev/null @@ -1,259 +0,0 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -# ifndef CALLER_DWA20021121_HPP -# define CALLER_DWA20021121_HPP - -# include -# include - -# include - -# include -# include -# include - -# include -# include -# include - -# include -# include -# include -# include -# include -# include -# include - -# include - -# include -# include - -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace detail { - -template -inline PyObject* get(mpl::int_, PyObject* const& args_) -{ - return PyTuple_GET_ITEM(args_,N); -} - -inline unsigned arity(PyObject* const& args_) -{ - return PyTuple_GET_SIZE(args_); -} - -// This "result converter" is really just used as -// a dispatch tag to invoke(...), selecting the appropriate -// implementation -typedef int void_result_to_python; - -// Given a model of CallPolicies and a C++ result type, this -// metafunction selects the appropriate converter to use for -// converting the result to python. -template -struct select_result_converter - : mpl::eval_if< - is_same - , mpl::identity - , mpl::apply1 - > -{ -}; - -template -inline ResultConverter create_result_converter( - ArgPackage const& args_ - , ResultConverter* - , converter::context_result_converter* -) -{ - return ResultConverter(args_); -} - -template -inline ResultConverter create_result_converter( - ArgPackage const& - , ResultConverter* - , ... -) -{ - return ResultConverter(); -} - -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES -template -struct converter_target_type -{ - static PyTypeObject const *get_pytype() - { - return create_result_converter((PyObject*)0, (ResultConverter *)0, (ResultConverter *)0).get_pytype(); - } -}; - -template < > -struct converter_target_type -{ - static PyTypeObject const *get_pytype() - { - return 0; - } -}; -#endif - - -template struct caller_arity; - -template -struct caller; - -# define BOOST_PYTHON_NEXT(init,name,n) \ - typedef BOOST_PP_IF(n,typename mpl::next< BOOST_PP_CAT(name,BOOST_PP_DEC(n)) >::type, init) name##n; - -# define BOOST_PYTHON_ARG_CONVERTER(n) \ - BOOST_PYTHON_NEXT(typename mpl::next::type, arg_iter,n) \ - typedef arg_from_python c_t##n; \ - c_t##n c##n(get(mpl::int_(), inner_args)); \ - if (!c##n.convertible()) \ - return 0; - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, BOOST_PYTHON_MAX_ARITY + 1, )) -# include BOOST_PP_ITERATE() - -# undef BOOST_PYTHON_ARG_CONVERTER -# undef BOOST_PYTHON_NEXT - -// A metafunction returning the base class used for caller. -template -struct caller_base_select -{ - enum { arity = mpl::size::value - 1 }; - typedef typename caller_arity::template impl type; -}; - -// A function object type which wraps C++ objects as Python callable -// objects. -// -// Template Arguments: -// -// F - -// the C++ `function object' that will be called. Might -// actually be any data for which an appropriate invoke_tag() can -// be generated. invoke(...) takes care of the actual invocation syntax. -// -// CallPolicies - -// The precall, postcall, and what kind of resultconverter to -// generate for mpl::front::type -// -// Sig - -// The `intended signature' of the function. An MPL sequence -// beginning with a result type and continuing with a list of -// argument types. -template -struct caller - : caller_base_select::type -{ - typedef typename caller_base_select< - F,CallPolicies,Sig - >::type base; - - typedef PyObject* result_type; - - caller(F f, CallPolicies p) : base(f,p) {} - -}; - -}}} // namespace boost::python::detail - -# endif // CALLER_DWA20021121_HPP - -#else - -# define N BOOST_PP_ITERATION() - -template <> -struct caller_arity -{ - template - struct impl - { - impl(F f, Policies p) : m_data(f,p) {} - - PyObject* operator()(PyObject* args_, PyObject*) // eliminate - // this - // trailing - // keyword dict - { - typedef typename mpl::begin::type first; - typedef typename first::type result_t; - typedef typename select_result_converter::type result_converter; - typedef typename Policies::argument_package argument_package; - - argument_package inner_args(args_); - -# if N -# define BOOST_PP_LOCAL_MACRO(i) BOOST_PYTHON_ARG_CONVERTER(i) -# define BOOST_PP_LOCAL_LIMITS (0, N-1) -# include BOOST_PP_LOCAL_ITERATE() -# endif - // all converters have been checked. Now we can do the - // precall part of the policy - if (!m_data.second().precall(inner_args)) - return 0; - - PyObject* result = detail::invoke( - detail::invoke_tag() - , create_result_converter(args_, (result_converter*)0, (result_converter*)0) - , m_data.first() - BOOST_PP_ENUM_TRAILING_PARAMS(N, c) - ); - - return m_data.second().postcall(inner_args, result); - } - - static unsigned min_arity() { return N; } - - static py_func_sig_info signature() - { - const signature_element * sig = detail::signature::elements(); -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - - typedef BOOST_DEDUCED_TYPENAME Policies::template extract_return_type::type rtype; - typedef typename select_result_converter::type result_converter; - - static const signature_element ret = { - (boost::is_void::value ? "void" : type_id().name()) - , &detail::converter_target_type::get_pytype - , boost::detail::indirect_traits::is_reference_to_non_const::value - }; - py_func_sig_info res = {sig, &ret }; -#else - py_func_sig_info res = {sig, sig }; -#endif - - return res; - } - private: - compressed_pair m_data; - }; -}; - - - -#endif // BOOST_PP_IS_ITERATING - - diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/config.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/config.hpp deleted file mode 100644 index acafc03747..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/config.hpp +++ /dev/null @@ -1,141 +0,0 @@ -// (C) Copyright David Abrahams 2000. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// The author gratefully acknowleges the support of Dragon Systems, Inc., in -// producing this work. - -// Revision History: -// 04 Mar 01 Some fixes so it will compile with Intel C++ (Dave Abrahams) - -#ifndef CONFIG_DWA052200_H_ -# define CONFIG_DWA052200_H_ - -# include -# include - -# ifdef BOOST_NO_OPERATORS_IN_NAMESPACE - // A gcc bug forces some symbols into the global namespace -# define BOOST_PYTHON_BEGIN_CONVERSION_NAMESPACE -# define BOOST_PYTHON_END_CONVERSION_NAMESPACE -# define BOOST_PYTHON_CONVERSION -# define BOOST_PYTHON_IMPORT_CONVERSION(x) using ::x -# else -# define BOOST_PYTHON_BEGIN_CONVERSION_NAMESPACE namespace boost { namespace python { -# define BOOST_PYTHON_END_CONVERSION_NAMESPACE }} // namespace boost::python -# define BOOST_PYTHON_CONVERSION boost::python -# define BOOST_PYTHON_IMPORT_CONVERSION(x) void never_defined() // so we can follow the macro with a ';' -# endif - -# if defined(BOOST_MSVC) -# if _MSC_VER < 1300 -# define BOOST_MSVC6_OR_EARLIER 1 -# endif - -# pragma warning (disable : 4786) // disable truncated debug symbols -# pragma warning (disable : 4251) // disable exported dll function -# pragma warning (disable : 4800) //'int' : forcing value to bool 'true' or 'false' -# pragma warning (disable : 4275) // non dll-interface class - -# elif defined(__ICL) && __ICL < 600 // Intel C++ 5 - -# pragma warning(disable: 985) // identifier was truncated in debug information - -# endif - -// The STLport puts all of the standard 'C' library names in std (as far as the -// user is concerned), but without it you need a fix if you're using MSVC or -// Intel C++ -# if defined(BOOST_NO_STDC_NAMESPACE) -# define BOOST_CSTD_ -# else -# define BOOST_CSTD_ std -# endif - -/***************************************************************************** - * - * Set up dll import/export options: - * - ****************************************************************************/ - -// backwards compatibility: -#ifdef BOOST_PYTHON_STATIC_LIB -# define BOOST_PYTHON_STATIC_LINK -# elif !defined(BOOST_PYTHON_DYNAMIC_LIB) -# define BOOST_PYTHON_DYNAMIC_LIB -#endif - -#if defined(BOOST_PYTHON_DYNAMIC_LIB) - -# if !defined(_WIN32) && !defined(__CYGWIN__) \ - && !defined(BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY) \ - && BOOST_WORKAROUND(__GNUC__, >= 3) && (__GNUC_MINOR__ >=5 || __GNUC__ > 3) -# define BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY 1 -# endif - -# if BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY -# if defined(BOOST_PYTHON_SOURCE) -# define BOOST_PYTHON_DECL __attribute__ ((visibility("default"))) -# define BOOST_PYTHON_BUILD_DLL -# else -# define BOOST_PYTHON_DECL -# endif -# define BOOST_PYTHON_DECL_FORWARD -# define BOOST_PYTHON_DECL_EXCEPTION __attribute__ ((visibility("default"))) -# elif (defined(_WIN32) || defined(__CYGWIN__)) -# if defined(BOOST_PYTHON_SOURCE) -# define BOOST_PYTHON_DECL __declspec(dllexport) -# define BOOST_PYTHON_BUILD_DLL -# else -# define BOOST_PYTHON_DECL __declspec(dllimport) -# endif -# endif - -#endif - -#ifndef BOOST_PYTHON_DECL -# define BOOST_PYTHON_DECL -#endif - -#ifndef BOOST_PYTHON_DECL_FORWARD -# define BOOST_PYTHON_DECL_FORWARD BOOST_PYTHON_DECL -#endif - -#ifndef BOOST_PYTHON_DECL_EXCEPTION -# define BOOST_PYTHON_DECL_EXCEPTION BOOST_PYTHON_DECL -#endif - -#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) -// Replace broken Tru64/cxx offsetof macro -# define BOOST_PYTHON_OFFSETOF(s_name, s_member) \ - ((size_t)__INTADDR__(&(((s_name *)0)->s_member))) -#else -# define BOOST_PYTHON_OFFSETOF offsetof -#endif - -// enable automatic library variant selection ------------------------------// - -#if !defined(BOOST_PYTHON_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_PYTHON_NO_LIB) -// -// Set the name of our library, this will get undef'ed by auto_link.hpp -// once it's done with it: -// -#define BOOST_LIB_NAME boost_python -// -// If we're importing code from a dll, then tell auto_link.hpp about it: -// -#ifdef BOOST_PYTHON_DYNAMIC_LIB -# define BOOST_DYN_LINK -#endif -// -// And include the header that does the work: -// -#include -#endif // auto-linking disabled - -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES -#define BOOST_PYTHON_SUPPORTS_PY_SIGNATURES // enables smooth transition -#endif - -#endif // CONFIG_DWA052200_H_ diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/construct.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/construct.hpp deleted file mode 100644 index 5f15d22c6e..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/construct.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef CONSTRUCT_REFERENCE_DWA2002716_HPP -# define CONSTRUCT_REFERENCE_DWA2002716_HPP - -namespace boost { namespace python { namespace detail { - -template -void construct_pointee(void* storage, Arg& x -# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 - , T const volatile* -# else - , T const* -# endif - ) -{ - new (storage) T(x); -} - -template -void construct_referent_impl(void* storage, Arg& x, T&(*)()) -{ - construct_pointee(storage, x, (T*)0); -} - -template -void construct_referent(void* storage, Arg const& x, T(*tag)() = 0) -{ - construct_referent_impl(storage, x, tag); -} - -template -void construct_referent(void* storage, Arg& x, T(*tag)() = 0) -{ - construct_referent_impl(storage, x, tag); -} - -}}} // namespace boost::python::detail - -#endif // CONSTRUCT_REFERENCE_DWA2002716_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/convertible.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/convertible.hpp deleted file mode 100644 index 2ce552f5f7..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/convertible.hpp +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef CONVERTIBLE_DWA2002614_HPP -# define CONVERTIBLE_DWA2002614_HPP - -# if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 241 -# include -# include -# endif - -// Supplies a runtime is_convertible check which can be used with tag -// dispatching to work around the Metrowerks Pro7 limitation with boost::is_convertible -namespace boost { namespace python { namespace detail { - -typedef char* yes_convertible; -typedef int* no_convertible; - -template -struct convertible -{ -# if !defined(__EDG_VERSION__) || __EDG_VERSION__ > 241 || __EDG_VERSION__ == 238 - static inline no_convertible check(...) { return 0; } - static inline yes_convertible check(Target) { return 0; } -# else - template - static inline typename mpl::if_c< - is_convertible::value - , yes_convertible - , no_convertible - >::type check(X const&) { return 0; } -# endif -}; - -}}} // namespace boost::python::detail - -#endif // CONVERTIBLE_DWA2002614_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/copy_ctor_mutates_rhs.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/copy_ctor_mutates_rhs.hpp deleted file mode 100644 index 4ca8d03911..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/copy_ctor_mutates_rhs.hpp +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef COPY_CTOR_MUTATES_RHS_DWA2003219_HPP -# define COPY_CTOR_MUTATES_RHS_DWA2003219_HPP - -#include -#include - -namespace boost { namespace python { namespace detail { - -template -struct copy_ctor_mutates_rhs - : is_auto_ptr -{ -}; - -}}} // namespace boost::python::detail - -#endif // COPY_CTOR_MUTATES_RHS_DWA2003219_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/cv_category.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/cv_category.hpp deleted file mode 100644 index 1765b36f8c..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/cv_category.hpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef CV_CATEGORY_DWA200222_HPP -# define CV_CATEGORY_DWA200222_HPP -# include - -namespace boost { namespace python { namespace detail { - -template -struct cv_tag -{ - BOOST_STATIC_CONSTANT(bool, is_const = is_const_); - BOOST_STATIC_CONSTANT(bool, is_volatile = is_const_); -}; - -typedef cv_tag cv_unqualified; -typedef cv_tag const_; -typedef cv_tag volatile_; -typedef cv_tag const_volatile_; - -template -struct cv_category -{ -// BOOST_STATIC_CONSTANT(bool, c = is_const::value); -// BOOST_STATIC_CONSTANT(bool, v = is_volatile::value); - typedef cv_tag< - ::boost::is_const::value - , ::boost::is_volatile::value - > type; -}; - -}}} // namespace boost::python::detail - -#endif // CV_CATEGORY_DWA200222_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/dealloc.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/dealloc.hpp deleted file mode 100644 index f2d914b18c..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/dealloc.hpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright Gottfried Ganßauge 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -# ifndef BOOST_PYTHON_DETAIL_DEALLOC_HPP_ -# define BOOST_PYTHON_DETAIL_DEALLOC_HPP_ -namespace boost { namespace python { namespace detail { - extern "C" - { - inline void dealloc(PyObject* self) - { - PyObject_Del(self); - } - } -}}} // namespace boost::python::detail -# endif // BOOST_PYTHON_DETAIL_DEALLOC_HPP_ diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/decorated_type_id.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/decorated_type_id.hpp deleted file mode 100644 index 535508b43d..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/decorated_type_id.hpp +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef DECORATED_TYPE_ID_DWA2002517_HPP -# define DECORATED_TYPE_ID_DWA2002517_HPP - -# include -# include -# include - -namespace boost { namespace python { namespace detail { - -struct decorated_type_info : totally_ordered -{ - enum decoration { const_ = 0x1, volatile_ = 0x2, reference = 0x4 }; - - decorated_type_info(type_info, decoration = decoration()); - - inline bool operator<(decorated_type_info const& rhs) const; - inline bool operator==(decorated_type_info const& rhs) const; - - friend BOOST_PYTHON_DECL std::ostream& operator<<(std::ostream&, decorated_type_info const&); - - operator type_info const&() const; - private: // type - typedef type_info base_id_t; - - private: // data members - decoration m_decoration; - base_id_t m_base_type; -}; - -template -inline decorated_type_info decorated_type_id(boost::type* = 0) -{ - return decorated_type_info( - type_id() - , decorated_type_info::decoration( - (is_const::value || indirect_traits::is_reference_to_const::value - ? decorated_type_info::const_ : 0) - | (is_volatile::value || indirect_traits::is_reference_to_volatile::value - ? decorated_type_info::volatile_ : 0) - | (is_reference::value ? decorated_type_info::reference : 0) - ) - ); -} - -inline decorated_type_info::decorated_type_info(type_info base_t, decoration decoration) - : m_decoration(decoration) - , m_base_type(base_t) -{ -} - -inline bool decorated_type_info::operator<(decorated_type_info const& rhs) const -{ - return m_decoration < rhs.m_decoration - || (m_decoration == rhs.m_decoration - && m_base_type < rhs.m_base_type); -} - -inline bool decorated_type_info::operator==(decorated_type_info const& rhs) const -{ - return m_decoration == rhs.m_decoration && m_base_type == rhs.m_base_type; -} - -inline decorated_type_info::operator type_info const&() const -{ - return m_base_type; -} - -BOOST_PYTHON_DECL std::ostream& operator<<(std::ostream&, decorated_type_info const&); - -}}} // namespace boost::python::detail - -#endif // DECORATED_TYPE_ID_DWA2002517_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/decref_guard.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/decref_guard.hpp deleted file mode 100644 index d713e0a604..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/decref_guard.hpp +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef DECREF_GUARD_DWA20021220_HPP -# define DECREF_GUARD_DWA20021220_HPP - -namespace boost { namespace python { namespace detail { - -struct decref_guard -{ - decref_guard(PyObject* o) : obj(o) {} - ~decref_guard() { Py_XDECREF(obj); } - void cancel() { obj = 0; } - private: - PyObject* obj; -}; - -}}} // namespace boost::python::detail - -#endif // DECREF_GUARD_DWA20021220_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/def_helper.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/def_helper.hpp deleted file mode 100644 index e68ca0cd7b..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/def_helper.hpp +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef DEF_HELPER_DWA200287_HPP -# define DEF_HELPER_DWA200287_HPP - -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -struct default_call_policies; - -namespace detail -{ - // tuple_extract::extract(t) returns the first - // element of a Tuple whose type E satisfies the given Predicate - // applied to add_reference. The Predicate must be an MPL - // metafunction class. - template - struct tuple_extract; - - // Implementation class for when the tuple's head type does not - // satisfy the Predicate - template - struct tuple_extract_impl - { - template - struct apply - { - typedef typename Tuple::head_type result_type; - - static typename Tuple::head_type extract(Tuple const& x) - { - return x.get_head(); - } - }; - }; - - // Implementation specialization for when the tuple's head type - // satisfies the predicate - template <> - struct tuple_extract_impl - { - template - struct apply - { - // recursive application of tuple_extract on the tail of the tuple - typedef tuple_extract next; - typedef typename next::result_type result_type; - - static result_type extract(Tuple const& x) - { - return next::extract(x.get_tail()); - } - }; - }; - - // A metafunction which selects a version of tuple_extract_impl to - // use for the implementation of tuple_extract - template - struct tuple_extract_base_select - { - typedef typename Tuple::head_type head_type; - typedef typename mpl::apply1::type>::type match_t; - BOOST_STATIC_CONSTANT(bool, match = match_t::value); - typedef typename tuple_extract_impl::template apply type; - }; - - template - struct tuple_extract - : tuple_extract_base_select< - Tuple - , typename mpl::lambda::type - >::type - { - }; - - - // - // Specialized extractors for the docstring, keywords, CallPolicies, - // and default implementation of virtual functions - // - - template - struct doc_extract - : tuple_extract< - Tuple - , mpl::not_< - mpl::or_< - indirect_traits::is_reference_to_class - , indirect_traits::is_reference_to_member_function_pointer - > - > - > - { - }; - - template - struct keyword_extract - : tuple_extract > - { - }; - - template - struct policy_extract - : tuple_extract< - Tuple - , mpl::and_< - mpl::not_ > - , indirect_traits::is_reference_to_class - , mpl::not_ > - > - > - { - }; - - template - struct default_implementation_extract - : tuple_extract< - Tuple - , indirect_traits::is_reference_to_member_function_pointer - > - { - }; - - // - // A helper class for decoding the optional arguments to def() - // invocations, which can be supplied in any order and are - // discriminated by their type properties. The template parameters - // are expected to be the types of the actual (optional) arguments - // passed to def(). - // - template - struct def_helper - { - // A tuple type which begins with references to the supplied - // arguments and ends with actual representatives of the default - // types. - typedef boost::tuples::tuple< - T1 const& - , T2 const& - , T3 const& - , T4 const& - , default_call_policies - , detail::keywords<0> - , char const* - , void(not_specified::*)() // A function pointer type which is never an - // appropriate default implementation - > all_t; - - // Constructors; these initialize an member of the tuple type - // shown above. - def_helper(T1 const& a1) : m_all(a1,m_nil,m_nil,m_nil) {} - def_helper(T1 const& a1, T2 const& a2) : m_all(a1,a2,m_nil,m_nil) {} - def_helper(T1 const& a1, T2 const& a2, T3 const& a3) : m_all(a1,a2,a3,m_nil) {} - def_helper(T1 const& a1, T2 const& a2, T3 const& a3, T4 const& a4) : m_all(a1,a2,a3,a4) {} - - private: // types - typedef typename default_implementation_extract::result_type default_implementation_t; - - public: // Constants which can be used for static assertions. - - // Users must not supply a default implementation for non-class - // methods. - BOOST_STATIC_CONSTANT( - bool, has_default_implementation = ( - !is_same::value)); - - public: // Extractor functions which pull the appropriate value out - // of the tuple - char const* doc() const - { - return doc_extract::extract(m_all); - } - - typename keyword_extract::result_type keywords() const - { - return keyword_extract::extract(m_all); - } - - typename policy_extract::result_type policies() const - { - return policy_extract::extract(m_all); - } - - default_implementation_t default_implementation() const - { - return default_implementation_extract::extract(m_all); - } - - private: // data members - all_t m_all; - not_specified m_nil; // for filling in not_specified slots - }; -} - -}} // namespace boost::python::detail - -#endif // DEF_HELPER_DWA200287_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/def_helper_fwd.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/def_helper_fwd.hpp deleted file mode 100644 index 31c22e97a3..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/def_helper_fwd.hpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef DEF_HELPER_FWD_DWA2003810_HPP -# define DEF_HELPER_FWD_DWA2003810_HPP - -# include - -namespace boost { namespace python { namespace detail { - -template -struct def_helper; - -}}} // namespace boost::python::detail - -#endif // DEF_HELPER_FWD_DWA2003810_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/defaults_def.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/defaults_def.hpp deleted file mode 100644 index 68799f83e6..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/defaults_def.hpp +++ /dev/null @@ -1,291 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// Copyright David Abrahams 2002, Joel de Guzman, 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -/////////////////////////////////////////////////////////////////////////////// -#if !defined(BOOST_PP_IS_ITERATING) - -#ifndef DEFAULTS_DEF_JDG20020811_HPP -#define DEFAULTS_DEF_JDG20020811_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////////// -namespace boost { namespace python { - -struct module; - -namespace objects -{ - struct class_base; -} - -namespace detail -{ - // Called as:: - // - // name_space_def(ns, "func", func, kw, policies, docstring, &ns) - // - // Dispatch to properly add f to namespace ns. - // - // @group define_stub_function helpers { - template - static void name_space_def( - NameSpaceT& name_space - , char const* name - , Func f - , keyword_range const& kw - , CallPolicies const& policies - , char const* doc - , objects::class_base* - ) - { - typedef typename NameSpaceT::wrapped_type wrapped_type; - - objects::add_to_namespace( - name_space, name, - detail::make_keyword_range_function( - f, policies, kw, get_signature(f, (wrapped_type*)0)) - , doc - ); - } - - template - static void name_space_def( - object& name_space - , char const* name - , Func f - , keyword_range const& kw - , CallPolicies const& policies - , char const* doc - , ... - ) - { - scope within(name_space); - - detail::scope_setattr_doc( - name - , detail::make_keyword_range_function(f, policies, kw) - , doc); - } - - // For backward compatibility -- is this obsolete? - template - static void name_space_def( - NameSpaceT& name_space - , char const* name - , Func f - , keyword_range const& kw // ignored - , CallPolicies const& policies - , char const* doc - , module* - ) - { - name_space.def(name, f, policies, doc); - } - // } - - - // Expansions of :: - // - // template - // inline void - // define_stub_function( - // char const* name, OverloadsT s, NameSpaceT& name_space, mpl::int_) - // { - // name_space.def(name, &OverloadsT::func_N); - // } - // - // where N runs from 0 to BOOST_PYTHON_MAX_ARITY. - // - // The set of overloaded functions (define_stub_function) expects: - // - // 1. char const* name: function name that will be visible to python - // 2. OverloadsT: a function overloads struct (see defaults_gen.hpp) - // 3. NameSpaceT& name_space: a python::class_ or python::module instance - // 4. int_t: the Nth overloaded function (OverloadsT::func_N) - // (see defaults_gen.hpp) - // 5. char const* name: doc string - // - // @group define_stub_function { - template - struct define_stub_function {}; - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, BOOST_PYTHON_MAX_ARITY, )) - -#include BOOST_PP_ITERATE() - - // } - - // This helper template struct does the actual recursive - // definition. There's a generic version - // define_with_defaults_helper and a terminal case - // define_with_defaults_helper<0>. The struct and its - // specialization has a sole static member function def that - // expects: - // - // 1. char const* name: function name that will be - // visible to python - // - // 2. OverloadsT: a function overloads struct - // (see defaults_gen.hpp) - // - // 3. NameSpaceT& name_space: a python::class_ or - // python::module instance - // - // 4. char const* name: doc string - // - // The def static member function calls a corresponding - // define_stub_function. The general case recursively calls - // define_with_defaults_helper::def until it reaches the - // terminal case case define_with_defaults_helper<0>. - template - struct define_with_defaults_helper { - - template - static void - def( - char const* name, - StubsT stubs, - keyword_range kw, - CallPolicies const& policies, - NameSpaceT& name_space, - char const* doc) - { - // define the NTH stub function of stubs - define_stub_function::define(name, stubs, kw, policies, name_space, doc); - - if (kw.second > kw.first) - --kw.second; - - // call the next define_with_defaults_helper - define_with_defaults_helper::def(name, stubs, kw, policies, name_space, doc); - } - }; - - template <> - struct define_with_defaults_helper<0> { - - template - static void - def( - char const* name, - StubsT stubs, - keyword_range const& kw, - CallPolicies const& policies, - NameSpaceT& name_space, - char const* doc) - { - // define the Oth stub function of stubs - define_stub_function<0>::define(name, stubs, kw, policies, name_space, doc); - // return - } - }; - - // define_with_defaults - // - // 1. char const* name: function name that will be - // visible to python - // - // 2. OverloadsT: a function overloads struct - // (see defaults_gen.hpp) - // - // 3. CallPolicies& policies: Call policies - // 4. NameSpaceT& name_space: a python::class_ or - // python::module instance - // - // 5. SigT sig: Function signature typelist - // (see defaults_gen.hpp) - // - // 6. char const* name: doc string - // - // This is the main entry point. This function recursively - // defines all stub functions of StubT (see defaults_gen.hpp) in - // NameSpaceT name_space which can be either a python::class_ or - // a python::module. The sig argument is a typelist that - // specifies the return type, the class (for member functions, - // and the arguments. Here are some SigT examples: - // - // int foo(int) mpl::vector - // void bar(int, int) mpl::vector - // void C::foo(int) mpl::vector - // - template - inline void - define_with_defaults( - char const* name, - OverloadsT const& overloads, - NameSpaceT& name_space, - SigT const&) - { - typedef typename mpl::front::type return_type; - typedef typename OverloadsT::void_return_type void_return_type; - typedef typename OverloadsT::non_void_return_type non_void_return_type; - - typedef typename mpl::if_c< - boost::is_same::value - , void_return_type - , non_void_return_type - >::type stubs_type; - - BOOST_STATIC_ASSERT( - (stubs_type::max_args) <= mpl::size::value); - - typedef typename stubs_type::template gen gen_type; - define_with_defaults_helper::def( - name - , gen_type() - , overloads.keywords() - , overloads.call_policies() - , name_space - , overloads.doc_string()); - } - -} // namespace detail - -}} // namespace boost::python - -#endif // DEFAULTS_DEF_JDG20020811_HPP - -#else // defined(BOOST_PP_IS_ITERATING) -// PP vertical iteration code - - -template <> -struct define_stub_function { - template - static void define( - char const* name - , StubsT const& - , keyword_range const& kw - , CallPolicies const& policies - , NameSpaceT& name_space - , char const* doc) - { - detail::name_space_def( - name_space - , name - , &StubsT::BOOST_PP_CAT(func_, BOOST_PP_ITERATION()) - , kw - , policies - , doc - , &name_space); - } -}; - -#endif // !defined(BOOST_PP_IS_ITERATING) diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/defaults_gen.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/defaults_gen.hpp deleted file mode 100644 index 0b3e0e2604..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/defaults_gen.hpp +++ /dev/null @@ -1,388 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// Copyright David Abrahams 2002, Joel de Guzman, 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -/////////////////////////////////////////////////////////////////////////////// -#ifndef DEFAULTS_GEN_JDG20020807_HPP -#define DEFAULTS_GEN_JDG20020807_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace python { - -namespace detail -{ - // overloads_base is used as a base class for all function - // stubs. This class holds the doc_string of the stubs. - struct overloads_base - { - overloads_base(char const* doc_) - : m_doc(doc_) {} - - overloads_base(char const* doc_, detail::keyword_range const& kw) - : m_doc(doc_), m_keywords(kw) {} - - char const* doc_string() const - { - return m_doc; - } - - detail::keyword_range const& keywords() const - { - return m_keywords; - } - - private: - char const* m_doc; - detail::keyword_range m_keywords; - }; - - // overloads_proxy is generated by the overloads_common operator[] (see - // below). This class holds a user defined call policies of the stubs. - template - struct overloads_proxy - : public overloads_base - { - typedef typename OverloadsT::non_void_return_type non_void_return_type; - typedef typename OverloadsT::void_return_type void_return_type; - - overloads_proxy( - CallPoliciesT const& policies_ - , char const* doc - , keyword_range const& kw - ) - : overloads_base(doc, kw) - , policies(policies_) - {} - - CallPoliciesT - call_policies() const - { - return policies; - } - - CallPoliciesT policies; - }; - - // overloads_common is our default function stubs base class. This - // class returns the default_call_policies in its call_policies() - // member function. It can generate a overloads_proxy however through - // its operator[] - template - struct overloads_common - : public overloads_base - { - overloads_common(char const* doc) - : overloads_base(doc) {} - - overloads_common(char const* doc, keyword_range const& kw) - : overloads_base(doc, kw) {} - - default_call_policies - call_policies() const - { - return default_call_policies(); - } - - template - overloads_proxy - operator[](CallPoliciesT const& policies) const - { - return overloads_proxy( - policies, this->doc_string(), this->keywords()); - } - }; - -}}} // namespace boost::python::detail - - -#define BOOST_PYTHON_TYPEDEF_GEN(z, index, data) \ - typedef typename ::boost::mpl::next::type \ - BOOST_PP_CAT(iter, BOOST_PP_INC(index)); \ - typedef typename ::boost::mpl::deref::type \ - BOOST_PP_CAT(T, index); - -#define BOOST_PYTHON_FUNC_WRAPPER_GEN(z, index, data) \ - static RT BOOST_PP_CAT(func_, \ - BOOST_PP_SUB_D(1, index, BOOST_PP_TUPLE_ELEM(3, 1, data))) ( \ - BOOST_PP_ENUM_BINARY_PARAMS_Z( \ - 1, index, T, arg)) \ - { \ - BOOST_PP_TUPLE_ELEM(3, 2, data) \ - BOOST_PP_TUPLE_ELEM(3, 0, data)( \ - BOOST_PP_ENUM_PARAMS( \ - index, \ - arg)); \ - } - -#define BOOST_PYTHON_GEN_FUNCTION(fname, fstubs_name, n_args, n_dflts, ret) \ - struct fstubs_name \ - { \ - BOOST_STATIC_CONSTANT(int, n_funcs = BOOST_PP_INC(n_dflts)); \ - BOOST_STATIC_CONSTANT(int, max_args = n_funcs); \ - \ - template \ - struct gen \ - { \ - typedef typename ::boost::mpl::begin::type rt_iter; \ - typedef typename ::boost::mpl::deref::type RT; \ - typedef typename ::boost::mpl::next::type iter0; \ - \ - BOOST_PP_REPEAT_2ND( \ - n_args, \ - BOOST_PYTHON_TYPEDEF_GEN, \ - 0) \ - \ - BOOST_PP_REPEAT_FROM_TO_2( \ - BOOST_PP_SUB_D(1, n_args, n_dflts), \ - BOOST_PP_INC(n_args), \ - BOOST_PYTHON_FUNC_WRAPPER_GEN, \ - (fname, BOOST_PP_SUB_D(1, n_args, n_dflts), ret)) \ - }; \ - }; \ - -/////////////////////////////////////////////////////////////////////////////// -#define BOOST_PYTHON_MEM_FUNC_WRAPPER_GEN(z, index, data) \ - static RT BOOST_PP_CAT(func_, \ - BOOST_PP_SUB_D(1, index, BOOST_PP_TUPLE_ELEM(3, 1, data))) ( \ - ClassT obj BOOST_PP_COMMA_IF(index) \ - BOOST_PP_ENUM_BINARY_PARAMS_Z(1, index, T, arg) \ - ) \ - { \ - BOOST_PP_TUPLE_ELEM(3, 2, data) obj.BOOST_PP_TUPLE_ELEM(3, 0, data)( \ - BOOST_PP_ENUM_PARAMS(index, arg) \ - ); \ - } - -#define BOOST_PYTHON_GEN_MEM_FUNCTION(fname, fstubs_name, n_args, n_dflts, ret) \ - struct fstubs_name \ - { \ - BOOST_STATIC_CONSTANT(int, n_funcs = BOOST_PP_INC(n_dflts)); \ - BOOST_STATIC_CONSTANT(int, max_args = n_funcs + 1); \ - \ - template \ - struct gen \ - { \ - typedef typename ::boost::mpl::begin::type rt_iter; \ - typedef typename ::boost::mpl::deref::type RT; \ - \ - typedef typename ::boost::mpl::next::type class_iter; \ - typedef typename ::boost::mpl::deref::type ClassT; \ - typedef typename ::boost::mpl::next::type iter0; \ - \ - BOOST_PP_REPEAT_2ND( \ - n_args, \ - BOOST_PYTHON_TYPEDEF_GEN, \ - 0) \ - \ - BOOST_PP_REPEAT_FROM_TO_2( \ - BOOST_PP_SUB_D(1, n_args, n_dflts), \ - BOOST_PP_INC(n_args), \ - BOOST_PYTHON_MEM_FUNC_WRAPPER_GEN, \ - (fname, BOOST_PP_SUB_D(1, n_args, n_dflts), ret)) \ - }; \ - }; - -#define BOOST_PYTHON_OVERLOAD_CONSTRUCTORS(fstubs_name, n_args, n_dflts) \ - fstubs_name(char const* doc = 0) \ - : ::boost::python::detail::overloads_common(doc) {} \ - template \ - fstubs_name(char const* doc, ::boost::python::detail::keywords const& keywords) \ - : ::boost::python::detail::overloads_common( \ - doc, keywords.range()) \ - { \ - typedef typename ::boost::python::detail:: \ - error::more_keywords_than_function_arguments< \ - N,n_args>::too_many_keywords assertion; \ - } \ - template \ - fstubs_name(::boost::python::detail::keywords const& keywords, char const* doc = 0) \ - : ::boost::python::detail::overloads_common( \ - doc, keywords.range()) \ - { \ - typedef typename ::boost::python::detail:: \ - error::more_keywords_than_function_arguments< \ - N,n_args>::too_many_keywords assertion; \ - } - -# if defined(BOOST_NO_VOID_RETURNS) - -# define BOOST_PYTHON_GEN_FUNCTION_STUB(fname, fstubs_name, n_args, n_dflts) \ - struct fstubs_name \ - : public ::boost::python::detail::overloads_common \ - { \ - BOOST_PYTHON_GEN_FUNCTION( \ - fname, non_void_return_type, n_args, n_dflts, return) \ - BOOST_PYTHON_GEN_FUNCTION( \ - fname, void_return_type, n_args, n_dflts, ;) \ - \ - BOOST_PYTHON_OVERLOAD_CONSTRUCTORS(fstubs_name, n_args, n_dflts) \ - }; - -# define BOOST_PYTHON_GEN_MEM_FUNCTION_STUB(fname, fstubs_name, n_args, n_dflts) \ - struct fstubs_name \ - : public ::boost::python::detail::overloads_common \ - { \ - BOOST_PYTHON_GEN_MEM_FUNCTION( \ - fname, non_void_return_type, n_args, n_dflts, return) \ - BOOST_PYTHON_GEN_MEM_FUNCTION( \ - fname, void_return_type, n_args, n_dflts, ;) \ - \ - BOOST_PYTHON_OVERLOAD_CONSTRUCTORS(fstubs_name, n_args + 1, n_dflts) \ - }; - -# else // !defined(BOOST_NO_VOID_RETURNS) - -# define BOOST_PYTHON_GEN_FUNCTION_STUB(fname, fstubs_name, n_args, n_dflts) \ - struct fstubs_name \ - : public ::boost::python::detail::overloads_common \ - { \ - BOOST_PYTHON_GEN_FUNCTION( \ - fname, non_void_return_type, n_args, n_dflts, return) \ - \ - typedef non_void_return_type void_return_type; \ - BOOST_PYTHON_OVERLOAD_CONSTRUCTORS(fstubs_name, n_args, n_dflts) \ - }; - - -# define BOOST_PYTHON_GEN_MEM_FUNCTION_STUB(fname, fstubs_name, n_args, n_dflts) \ - struct fstubs_name \ - : public ::boost::python::detail::overloads_common \ - { \ - BOOST_PYTHON_GEN_MEM_FUNCTION( \ - fname, non_void_return_type, n_args, n_dflts, return) \ - \ - typedef non_void_return_type void_return_type; \ - BOOST_PYTHON_OVERLOAD_CONSTRUCTORS(fstubs_name, n_args + 1, n_dflts) \ - }; - -# endif // !defined(BOOST_NO_VOID_RETURNS) - -/////////////////////////////////////////////////////////////////////////////// -// -// MAIN MACROS -// -// Given generator_name, fname, min_args and max_args, These macros -// generate function stubs that forward to a function or member function -// named fname. max_args is the arity of the function or member function -// fname. fname can have default arguments. min_args is the minimum -// arity that fname can accept. -// -// There are two versions: -// -// 1. BOOST_PYTHON_FUNCTION_OVERLOADS for free functions -// 2. BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS for member functions. -// -// For instance, given a function: -// -// int -// foo(int a, char b = 1, unsigned c = 2, double d = 3) -// { -// return a + b + c + int(d); -// } -// -// The macro invocation: -// -// BOOST_PYTHON_FUNCTION_OVERLOADS(foo_stubs, foo, 1, 4) -// -// Generates this code: -// -// struct foo_stubsNonVoid -// { -// static const int n_funcs = 4; -// static const int max_args = n_funcs; -// -// template -// struct gen -// { -// typedef typename ::boost::mpl::begin::type rt_iter; -// typedef typename rt_iter::type RT; -// typedef typename rt_iter::next iter0; -// typedef typename iter0::type T0; -// typedef typename iter0::next iter1; -// typedef typename iter1::type T1; -// typedef typename iter1::next iter2; -// typedef typename iter2::type T2; -// typedef typename iter2::next iter3; -// typedef typename iter3::type T3; -// typedef typename iter3::next iter4; -// -// static RT func_0(T0 arg0) -// { return foo(arg0); } -// -// static RT func_1(T0 arg0, T1 arg1) -// { return foo(arg0, arg1); } -// -// static RT func_2(T0 arg0, T1 arg1, T2 arg2) -// { return foo(arg0, arg1, arg2); } -// -// static RT func_3(T0 arg0, T1 arg1, T2 arg2, T3 arg3) -// { return foo(arg0, arg1, arg2, arg3); } -// }; -// }; -// -// struct foo_overloads -// : public boost::python::detail::overloads_common -// { -// typedef foo_overloadsNonVoid non_void_return_type; -// typedef foo_overloadsNonVoid void_return_type; -// -// foo_overloads(char const* doc = 0) -// : boost::python::detail::overloads_common(doc) {} -// }; -// -// The typedefs non_void_return_type and void_return_type are -// used to handle compilers that do not support void returns. The -// example above typedefs non_void_return_type and -// void_return_type to foo_overloadsNonVoid. On compilers that do -// not support void returns, there are two versions: -// foo_overloadsNonVoid and foo_overloadsVoid. The "Void" -// version is almost identical to the "NonVoid" version except -// for the return type (void) and the lack of the return keyword. -// -// See the overloads_common above for a description of the -// foo_overloads' base class. -// -/////////////////////////////////////////////////////////////////////////////// -#define BOOST_PYTHON_FUNCTION_OVERLOADS(generator_name, fname, min_args, max_args) \ - BOOST_PYTHON_GEN_FUNCTION_STUB( \ - fname, \ - generator_name, \ - max_args, \ - BOOST_PP_SUB_D(1, max_args, min_args)) - -#define BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(generator_name, fname, min_args, max_args) \ - BOOST_PYTHON_GEN_MEM_FUNCTION_STUB( \ - fname, \ - generator_name, \ - max_args, \ - BOOST_PP_SUB_D(1, max_args, min_args)) - -// deprecated macro names (to be removed) -#define BOOST_PYTHON_FUNCTION_GENERATOR BOOST_PYTHON_FUNCTION_OVERLOADS -#define BOOST_PYTHON_MEM_FUN_GENERATOR BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS - -/////////////////////////////////////////////////////////////////////////////// -#endif // DEFAULTS_GEN_JDG20020807_HPP - - diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/dependent.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/dependent.hpp deleted file mode 100644 index 70392c4d78..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/dependent.hpp +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef DEPENDENT_DWA200286_HPP -# define DEPENDENT_DWA200286_HPP - -namespace boost { namespace python { namespace detail { - -// A way to turn a concrete type T into a type dependent on U. This -// keeps conforming compilers (those implementing proper 2-phase -// name lookup for templates) from complaining about incomplete -// types in situations where it would otherwise be inconvenient or -// impossible to re-order code so that all types are defined in time. - -// One such use is when we must return an incomplete T from a member -// function template (which must be defined in the class body to -// keep MSVC happy). -template -struct dependent -{ - typedef T type; -}; - -}}} // namespace boost::python::detail - -#endif // DEPENDENT_DWA200286_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/destroy.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/destroy.hpp deleted file mode 100644 index 0172dca28f..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/destroy.hpp +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef DESTROY_DWA2002221_HPP -# define DESTROY_DWA2002221_HPP - -# include -# include -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) -# include -# endif -namespace boost { namespace python { namespace detail { - -template < - bool array -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) - , bool enum_ // vc7 has a problem destroying enums -# endif - > struct value_destroyer; - -template <> -struct value_destroyer< - false -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) - , false -# endif - > -{ - template - static void execute(T const volatile* p) - { - p->~T(); - } -}; - -template <> -struct value_destroyer< - true -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) - , false -# endif - > -{ - template - static void execute(A*, T const volatile* const first) - { - for (T const volatile* p = first; p != first + sizeof(A)/sizeof(T); ++p) - { - value_destroyer< - boost::is_array::value -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) - , boost::is_enum::value -# endif - >::execute(p); - } - } - - template - static void execute(T const volatile* p) - { - execute(p, *p); - } -}; - -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) -template <> -struct value_destroyer -{ - template - static void execute(T const volatile*) - { - } -}; - -template <> -struct value_destroyer -{ - template - static void execute(T const volatile*) - { - } -}; -# endif -template -inline void destroy_referent_impl(void* p, T& (*)()) -{ - // note: cv-qualification needed for MSVC6 - // must come *before* T for metrowerks - value_destroyer< - (boost::is_array::value) -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) - , (boost::is_enum::value) -# endif - >::execute((const volatile T*)p); -} - -template -inline void destroy_referent(void* p, T(*)() = 0) -{ - destroy_referent_impl(p, (T(*)())0); -} - -}}} // namespace boost::python::detail - -#endif // DESTROY_DWA2002221_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/enable_if.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/enable_if.hpp deleted file mode 100644 index 46a1d532b3..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/enable_if.hpp +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright David Abrahams 2004. Distributed under the Boost -// Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef ENABLE_IF_DWA2004722_HPP -# define ENABLE_IF_DWA2004722_HPP - -# include -# include - -# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) -# include - -namespace boost { namespace python { namespace detail { - -template struct always_void { typedef void type; }; - -template -struct enable_if_arg -{ - typedef typename mpl::if_::type type; -}; - -template -struct disable_if_arg -{ - typedef typename mpl::if_::type type; -}; - -template ::type> -struct enable_if_ret -{ - typedef typename mpl::if_::type type; -}; - -template ::type> -struct disable_if_ret -{ - typedef typename mpl::if_::type type; -}; - -}}} // namespace boost::python::detail - -# elif !defined(BOOST_NO_SFINAE) -# include - -namespace boost { namespace python { namespace detail { - -template -struct enable_if_arg - : enable_if -{}; - -template -struct disable_if_arg - : disable_if -{}; - -template -struct enable_if_ret - : enable_if -{}; - -template -struct disable_if_ret - : disable_if -{}; - -}}} // namespace boost::python::detail - -# endif - -#endif // ENABLE_IF_DWA2004722_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/exception_handler.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/exception_handler.hpp deleted file mode 100644 index 7f49868be6..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/exception_handler.hpp +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef EXCEPTION_HANDLER_DWA2002810_HPP -# define EXCEPTION_HANDLER_DWA2002810_HPP - -# include -# include -# include - -namespace boost { namespace python { namespace detail { - -struct BOOST_PYTHON_DECL_FORWARD exception_handler; - -typedef function2 const&> handler_function; - -struct BOOST_PYTHON_DECL exception_handler -{ - private: // types - - public: - explicit exception_handler(handler_function const& impl); - - inline bool handle(function0 const& f) const; - - bool operator()(function0 const& f) const; - - static exception_handler* chain; - - private: - static exception_handler* tail; - - handler_function m_impl; - exception_handler* m_next; -}; - - -inline bool exception_handler::handle(function0 const& f) const -{ - return this->m_impl(*this, f); -} - -BOOST_PYTHON_DECL void register_exception_handler(handler_function const& f); - -}}} // namespace boost::python::detail - -#endif // EXCEPTION_HANDLER_DWA2002810_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/force_instantiate.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/force_instantiate.hpp deleted file mode 100644 index 63e2874945..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/force_instantiate.hpp +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef FORCE_INSTANTIATE_DWA200265_HPP -# define FORCE_INSTANTIATE_DWA200265_HPP - -namespace boost { namespace python { namespace detail { - -// Allows us to force the argument to be instantiated without -// incurring unused variable warnings - -# if !defined(BOOST_MSVC) || BOOST_MSVC < 1300 || _MSC_FULL_VER > 13102196 - -template -inline void force_instantiate(T const&) {} - -# else - -# pragma optimize("g", off) -inline void force_instantiate_impl(...) {} -# pragma optimize("", on) -template -inline void force_instantiate(T const& x) -{ - detail::force_instantiate_impl(&x); -} -# endif - -}}} // namespace boost::python::detail - -#endif // FORCE_INSTANTIATE_DWA200265_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/if_else.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/if_else.hpp deleted file mode 100644 index 244e63a8ae..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/if_else.hpp +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef IF_ELSE_DWA2002322_HPP -# define IF_ELSE_DWA2002322_HPP -# include - -namespace boost { namespace python { namespace detail { - -template struct elif_selected; - -template -struct if_selected -{ - template - struct elif : elif_selected - { - }; - - template - struct else_ - { - typedef T type; - }; -}; - -# if defined(BOOST_MSVC) && (BOOST_MSVC == 1300) -namespace msvc70_aux { - -template< bool > struct inherit_from -{ - template< typename T > struct result - { - typedef T type; - }; -}; - -template<> struct inherit_from -{ - template< typename T > struct result - { - struct type {}; - }; -}; - -template< typename T > -struct never_true -{ - BOOST_STATIC_CONSTANT(bool, value = false); -}; - -} // namespace msvc70_aux - -#endif // # if defined(BOOST_MSVC) && (BOOST_MSVC == 1300) - -template -struct elif_selected -{ -# if !(defined(BOOST_MSVC) && BOOST_MSVC <= 1300 || defined(__MWERKS__) && __MWERKS__ <= 0x2407) - template class then; -# elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300) - template - struct then : msvc70_aux::inherit_from< msvc70_aux::never_true::value > - ::template result< if_selected >::type - { - }; -# else - template - struct then : if_selected - { - }; -# endif -}; - -# if !(defined(BOOST_MSVC) && BOOST_MSVC <= 1300 || defined(__MWERKS__) && __MWERKS__ <= 0x2407) -template -template -class elif_selected::then : public if_selected -{ -}; -# endif - -template struct if_ -{ - template - struct then : if_selected - { - }; -}; - -struct if_unselected -{ - template struct elif : if_ - { - }; - - template - struct else_ - { - typedef U type; - }; -}; - -template <> -struct if_ -{ - template - struct then : if_unselected - { - }; -}; - -}}} // namespace boost::python::detail - -#endif // IF_ELSE_DWA2002322_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/indirect_traits.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/indirect_traits.hpp deleted file mode 100644 index ce8ba310a2..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/indirect_traits.hpp +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright David Abrahams 2004. Distributed under the Boost -// Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef INDIRECT_TRAITS_DWA2004915_HPP -# define INDIRECT_TRAITS_DWA2004915_HPP - -# include - -namespace boost { namespace python { -namespace indirect_traits = boost::detail::indirect_traits; -}} // namespace boost::python::detail - -#endif // INDIRECT_TRAITS_DWA2004915_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/invoke.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/invoke.hpp deleted file mode 100644 index 939fa11818..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/invoke.hpp +++ /dev/null @@ -1,100 +0,0 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -# ifndef INVOKE_DWA20021122_HPP -# define INVOKE_DWA20021122_HPP - -# include -# include -# include - -# include - -# include -# include -# include -# include -# include -# include - -// This file declares a series of overloaded invoke(...) functions, -// used to invoke wrapped C++ function (object)s from Python. Each one -// accepts: -// -// - a tag which identifies the invocation syntax (e.g. member -// functions must be invoked with a different syntax from regular -// functions) -// -// - a pointer to a result converter type, used solely as a way of -// transmitting the type of the result converter to the function (or -// an int, if the return type is void). -// -// - the "function", which may be a function object, a function or -// member function pointer, or a defaulted_virtual_fn. -// -// - The arg_from_python converters for each of the arguments to be -// passed to the function being invoked. - -namespace boost { namespace python { namespace detail { - -// This "result converter" is really just used as a dispatch tag to -// invoke(...), selecting the appropriate implementation -typedef int void_result_to_python; - -template -struct invoke_tag_ {}; - -// A metafunction returning the appropriate tag type for invoking an -// object of type F with return type R. -template -struct invoke_tag - : invoke_tag_< - is_same::value - , is_member_function_pointer::value - > -{ -}; - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, BOOST_PYTHON_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -}}} // namespace boost::python::detail - -# endif // INVOKE_DWA20021122_HPP -#else - -# define N BOOST_PP_ITERATION() - -template -inline PyObject* invoke(invoke_tag_, RC const& rc, F& f BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z(1, N, AC, & ac) ) -{ - return rc(f( BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, ac, () BOOST_PP_INTERCEPT) )); -} - -template -inline PyObject* invoke(invoke_tag_, RC const&, F& f BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z(1, N, AC, & ac) ) -{ - f( BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, ac, () BOOST_PP_INTERCEPT) ); - return none(); -} - -template -inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z(1, N, AC, & ac) ) -{ - return rc( (tc().*f)(BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, ac, () BOOST_PP_INTERCEPT)) ); -} - -template -inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z(1, N, AC, & ac) ) -{ - (tc().*f)(BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, ac, () BOOST_PP_INTERCEPT)); - return none(); -} - -# undef N - -#endif // BOOST_PP_IS_ITERATING diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_auto_ptr.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_auto_ptr.hpp deleted file mode 100644 index 3b8198b8dd..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_auto_ptr.hpp +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef IS_AUTO_PTR_DWA2003224_HPP -# define IS_AUTO_PTR_DWA2003224_HPP - -# ifndef BOOST_NO_AUTO_PTR -# include -# include -# endif - -namespace boost { namespace python { namespace detail { - -# if !defined(BOOST_NO_AUTO_PTR) - -BOOST_PYTHON_IS_XXX_DEF(auto_ptr, std::auto_ptr, 1) - -# else - -template -struct is_auto_ptr : mpl::false_ -{ -}; - -# endif - -}}} // namespace boost::python::detail - -#endif // IS_AUTO_PTR_DWA2003224_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_shared_ptr.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_shared_ptr.hpp deleted file mode 100644 index 547af3f1cb..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_shared_ptr.hpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef IS_SHARED_PTR_DWA2003224_HPP -# define IS_SHARED_PTR_DWA2003224_HPP - -# include -# include - -namespace boost { namespace python { namespace detail { - -BOOST_PYTHON_IS_XXX_DEF(shared_ptr, shared_ptr, 1) - -}}} // namespace boost::python::detail - -#endif // IS_SHARED_PTR_DWA2003224_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_wrapper.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_wrapper.hpp deleted file mode 100644 index d7bce7b627..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_wrapper.hpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright David Abrahams 2004. Distributed under the Boost -// Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef IS_WRAPPER_DWA2004723_HPP -# define IS_WRAPPER_DWA2004723_HPP - -# include -# include - -namespace boost { namespace python { - -template class wrapper; - -namespace detail -{ - typedef char (&is_not_wrapper)[2]; - is_not_wrapper is_wrapper_helper(...); - template - char is_wrapper_helper(wrapper const volatile*); - - // A metafunction returning true iff T is [derived from] wrapper - template - struct is_wrapper - : mpl::bool_<(sizeof(detail::is_wrapper_helper((T*)0)) == 1)> - {}; - -}}} // namespace boost::python::detail - -#endif // IS_WRAPPER_DWA2004723_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_xxx.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_xxx.hpp deleted file mode 100644 index 9ddfafd3c0..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/is_xxx.hpp +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright David Abrahams 2005. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef IS_XXX_DWA2003224_HPP -# define IS_XXX_DWA2003224_HPP - -# include - -# define BOOST_PYTHON_IS_XXX_DEF(name, qualified_name, nargs) \ - BOOST_DETAIL_IS_XXX_DEF(name, qualified_name, nargs) - -#endif // IS_XXX_DWA2003224_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/make_keyword_range_fn.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/make_keyword_range_fn.hpp deleted file mode 100644 index c4795cf887..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/make_keyword_range_fn.hpp +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef MAKE_KEYWORD_RANGE_FN_DWA2002927_HPP -# define MAKE_KEYWORD_RANGE_FN_DWA2002927_HPP - -# include -# include - -# include - -# include - - -namespace boost { namespace python { namespace detail { - -// Think of this as a version of make_function without a compile-time -// check that the size of kw is no greater than the expected arity of -// F. This version is needed when defining functions with default -// arguments, because compile-time information about the number of -// keywords is missing for all but the initial function definition. -// -// @group make_keyword_range_function { -template -object make_keyword_range_function( - F f - , Policies const& policies - , keyword_range const& kw) -{ - return detail::make_function_aux( - f, policies, detail::get_signature(f), kw, mpl::int_<0>()); -} - -template -object make_keyword_range_function( - F f - , Policies const& policies - , keyword_range const& kw - , Signature const& sig) -{ - return detail::make_function_aux( - f, policies, sig, kw, mpl::int_<0>()); -} -// } - -// Builds an '__init__' function which inserts the given Holder type -// in a wrapped C++ class instance. ArgList is an MPL type sequence -// describing the C++ argument types to be passed to Holder's -// constructor. -// -// Holder and ArgList are intended to be explicitly specified. -template -object make_keyword_range_constructor( - CallPolicies const& policies // The CallPolicies with which to invoke the Holder's constructor - , detail::keyword_range const& kw // The (possibly empty) set of associated argument keywords - , Holder* = 0 - , ArgList* = 0, Arity* = 0) -{ -#if !defined( BOOST_PYTHON_NO_PY_SIGNATURES) && defined( BOOST_PYTHON_PY_SIGNATURES_PROPER_INIT_SELF_TYPE) - python_class::register_(); -#endif - return detail::make_keyword_range_function( - objects::make_holder - ::template apply::execute - , policies - , kw); -} - -}}} // namespace boost::python::detail - -#endif // MAKE_KEYWORD_RANGE_FN_DWA2002927_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/make_tuple.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/make_tuple.hpp deleted file mode 100644 index 57b285be1c..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/make_tuple.hpp +++ /dev/null @@ -1,32 +0,0 @@ -# ifndef BOOST_PYTHON_SYNOPSIS -# // Copyright David Abrahams 2002. -# // Distributed under the Boost Software License, Version 1.0. (See -# // accompanying file LICENSE_1_0.txt or copy at -# // http://www.boost.org/LICENSE_1_0.txt) - -# if !defined(BOOST_PP_IS_ITERATING) -# error Boost.Python - do not include this file! -# endif - -# define N BOOST_PP_ITERATION() - -# define BOOST_PYTHON_MAKE_TUPLE_ARG(z, N, ignored) \ - PyTuple_SET_ITEM( \ - result.ptr() \ - , N \ - , python::incref(python::object(a##N).ptr()) \ - ); - - template - tuple - make_tuple(BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, const& a)) - { - tuple result((detail::new_reference)::PyTuple_New(N)); - BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_MAKE_TUPLE_ARG, _) - return result; - } - -# undef BOOST_PYTHON_MAKE_TUPLE_ARG - -# undef N -# endif // BOOST_PYTHON_SYNOPSIS diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/map_entry.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/map_entry.hpp deleted file mode 100644 index 8bf1759f9f..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/map_entry.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef MAP_ENTRY_DWA2002118_HPP -# define MAP_ENTRY_DWA2002118_HPP - -namespace boost { namespace python { namespace detail { - -// A trivial type that works well as the value_type of associative -// vector maps -template -struct map_entry -{ - map_entry() {} - map_entry(Key k) : key(k), value() {} - map_entry(Key k, Value v) : key(k), value(v) {} - - bool operator<(map_entry const& rhs) const - { - return this->key < rhs.key; - } - - Key key; - Value value; -}; - -template -bool operator<(map_entry const& e, Key const& k) -{ - return e.key < k; -} - -template -bool operator<(Key const& k, map_entry const& e) -{ - return k < e.key; -} - - -}}} // namespace boost::python::detail - -#endif // MAP_ENTRY_DWA2002118_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/mpl_lambda.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/mpl_lambda.hpp deleted file mode 100644 index a20608e710..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/mpl_lambda.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef MPL_LAMBDA_DWA2002122_HPP -# define MPL_LAMBDA_DWA2002122_HPP - -// this header should go away soon -# include -# define BOOST_PYTHON_MPL_LAMBDA_SUPPORT BOOST_MPL_AUX_LAMBDA_SUPPORT - -#endif // MPL_LAMBDA_DWA2002122_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/msvc_typeinfo.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/msvc_typeinfo.hpp deleted file mode 100644 index 10f845058a..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/msvc_typeinfo.hpp +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef MSVC_TYPEINFO_DWA200222_HPP -# define MSVC_TYPEINFO_DWA200222_HPP - -#include -#include -#include - -// -// Fix for MSVC's broken typeid() implementation which doesn't strip -// decoration. This fix doesn't handle cv-qualified array types. It -// could probably be done, but I haven't figured it out yet. -// - -# if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 || defined(BOOST_INTEL_CXX_VERSION) && BOOST_INTEL_CXX_VERSION <= 700 - -namespace boost { namespace python { namespace detail { - -typedef std::type_info const& typeinfo; - -template -static typeinfo typeid_nonref(T const volatile*) { return typeid(T); } - -template -inline typeinfo typeid_ref_1(T&(*)()) -{ - return detail::typeid_nonref((T*)0); -} - -// A non-reference -template -inline typeinfo typeid_ref(type*, T&(*)(type)) -{ - return detail::typeid_nonref((T*)0); -} - -// A reference -template -inline typeinfo typeid_ref(type*, ...) -{ - return detail::typeid_ref_1((T(*)())0); -} - -template< typename T > T&(* is_ref_tester1(type) )(type) { return 0; } -inline char BOOST_TT_DECL is_ref_tester1(...) { return 0; } - -template -inline typeinfo msvc_typeid(boost::type*) -{ - return detail::typeid_ref( - (boost::type*)0, detail::is_ref_tester1(type()) - ); -} - -template <> -inline typeinfo msvc_typeid(boost::type*) -{ - return typeid(void); -} - -# ifndef NDEBUG -inline typeinfo assert_array_typeid_compiles() -{ - return msvc_typeid((boost::type*)0) - , msvc_typeid((boost::type*)0); -} -# endif - -}}} // namespace boost::python::detail - -# endif // BOOST_MSVC -#endif // MSVC_TYPEINFO_DWA200222_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/none.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/none.hpp deleted file mode 100644 index bc3337a234..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/none.hpp +++ /dev/null @@ -1,20 +0,0 @@ -// (C) Copyright David Abrahams 2000. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// The author gratefully acknowleges the support of Dragon Systems, Inc., in -// producing this work. - -#ifndef NONE_DWA_052000_H_ -# define NONE_DWA_052000_H_ - -# include - -namespace boost { namespace python { namespace detail { - -inline PyObject* none() { Py_INCREF(Py_None); return Py_None; } - -}}} // namespace boost::python::detail - -#endif // NONE_DWA_052000_H_ diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/not_specified.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/not_specified.hpp deleted file mode 100644 index 2f7c7ad997..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/not_specified.hpp +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef NOT_SPECIFIED_DWA2002321_HPP -# define NOT_SPECIFIED_DWA2002321_HPP - -namespace boost { namespace python { namespace detail { - - struct not_specified {}; - -}}} // namespace boost::python::detail - -#endif // NOT_SPECIFIED_DWA2002321_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/nullary_function_adaptor.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/nullary_function_adaptor.hpp deleted file mode 100644 index 9dcc434f8e..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/nullary_function_adaptor.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef NULLARY_FUNCTION_ADAPTOR_DWA2003824_HPP -# define NULLARY_FUNCTION_ADAPTOR_DWA2003824_HPP - -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace detail { - -// nullary_function_adaptor -- a class template which ignores its -// arguments and calls a nullary function instead. Used for building -// error-reporting functions, c.f. pure_virtual -template -struct nullary_function_adaptor -{ - nullary_function_adaptor(NullaryFunction fn) - : m_fn(fn) - {} - - void operator()() const { m_fn(); } - -# define BOOST_PP_LOCAL_MACRO(i) \ - template \ - void operator()( \ - BOOST_PP_ENUM_BINARY_PARAMS_Z(1, i, A, const& BOOST_PP_INTERCEPT) \ - ) const \ - { \ - m_fn(); \ - } - -# define BOOST_PP_LOCAL_LIMITS (1, BOOST_PYTHON_MAX_ARITY) -# include BOOST_PP_LOCAL_ITERATE() - - private: - NullaryFunction m_fn; -}; - -}}} // namespace boost::python::detail - -#endif // NULLARY_FUNCTION_ADAPTOR_DWA2003824_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/operator_id.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/operator_id.hpp deleted file mode 100644 index ecfc70f108..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/operator_id.hpp +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OPERATOR_ID_DWA2002531_HPP -# define OPERATOR_ID_DWA2002531_HPP - -namespace boost { namespace python { namespace detail { - -enum operator_id -{ - op_add, - op_sub, - op_mul, - op_div, - op_mod, - op_divmod, - op_pow, - op_lshift, - op_rshift, - op_and, - op_xor, - op_or, - op_neg, - op_pos, - op_abs, - op_invert, - op_int, - op_long, - op_float, - op_str, - op_cmp, - op_gt, - op_ge, - op_lt, - op_le, - op_eq, - op_ne, - op_iadd, - op_isub, - op_imul, - op_idiv, - op_imod, - op_ilshift, - op_irshift, - op_iand, - op_ixor, - op_ior, - op_complex, -#if PY_VERSION_HEX >= 0x03000000 - op_bool, -#else - op_nonzero, -#endif - op_repr -#if PY_VERSION_HEX >= 0x03000000 - ,op_truediv -#endif -}; - -}}} // namespace boost::python::detail - -#endif // OPERATOR_ID_DWA2002531_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/overloads_fwd.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/overloads_fwd.hpp deleted file mode 100644 index 4c7fdf292b..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/overloads_fwd.hpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OVERLOADS_FWD_DWA2002101_HPP -# define OVERLOADS_FWD_DWA2002101_HPP - -namespace boost { namespace python { namespace detail { - -// forward declarations -struct overloads_base; - -template -inline void define_with_defaults(char const* name, OverloadsT const&, NameSpaceT&, SigT const&); - -}}} // namespace boost::python::detail - -#endif // OVERLOADS_FWD_DWA2002101_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/pointee.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/pointee.hpp deleted file mode 100644 index e18c1f49b6..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/pointee.hpp +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef POINTEE_DWA2002323_HPP -# define POINTEE_DWA2002323_HPP - -# include - -namespace boost { namespace python { namespace detail { - -template -struct pointee_impl -{ - template struct apply : remove_pointer {}; -}; - -template <> -struct pointee_impl -{ - template struct apply - { - typedef typename T::element_type type; - }; -}; - -template -struct pointee - : pointee_impl::value>::template apply -{ -}; - -}}} // namespace boost::python::detail - -#endif // POINTEE_DWA2002323_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/prefix.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/prefix.hpp deleted file mode 100644 index 8b34ed7701..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/prefix.hpp +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef PREFIX_DWA2003531_HPP -# define PREFIX_DWA2003531_HPP - -// The rule is that must be included before any system -// headers (so it can get control over some awful macros). -// Unfortunately, Boost.Python needs to #include first, at -// least... but this gets us as close as possible. - -# include -# include - -#endif // PREFIX_DWA2003531_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/preprocessor.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/preprocessor.hpp deleted file mode 100644 index 2c1b2e84ea..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/preprocessor.hpp +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef PREPROCESSOR_DWA200247_HPP -# define PREPROCESSOR_DWA200247_HPP - -# include -# include -# include -# include - -// stuff that should be in the preprocessor library - -# define BOOST_PYTHON_APPLY(x) BOOST_PP_CAT(BOOST_PYTHON_APPLY_, x) - -# define BOOST_PYTHON_APPLY_BOOST_PYTHON_ITEM(v) v -# define BOOST_PYTHON_APPLY_BOOST_PYTHON_NIL - -// cv-qualifiers - -# if !defined(__MWERKS__) || __MWERKS__ > 0x2407 -# define BOOST_PYTHON_CV_COUNT 4 -# else -# define BOOST_PYTHON_CV_COUNT 1 -# endif - -# ifndef BOOST_PYTHON_MAX_ARITY -# define BOOST_PYTHON_MAX_ARITY 15 -# endif - -# ifndef BOOST_PYTHON_MAX_BASES -# define BOOST_PYTHON_MAX_BASES 10 -# endif - -# define BOOST_PYTHON_CV_QUALIFIER(i) \ - BOOST_PYTHON_APPLY( \ - BOOST_PP_TUPLE_ELEM(4, i, BOOST_PYTHON_CV_QUALIFIER_I) \ - ) - -# define BOOST_PYTHON_CV_QUALIFIER_I \ - ( \ - BOOST_PYTHON_NIL, \ - BOOST_PYTHON_ITEM(const), \ - BOOST_PYTHON_ITEM(volatile), \ - BOOST_PYTHON_ITEM(const volatile) \ - ) - -// enumerators -# define BOOST_PYTHON_UNARY_ENUM(c, text) BOOST_PP_REPEAT(c, BOOST_PYTHON_UNARY_ENUM_I, text) -# define BOOST_PYTHON_UNARY_ENUM_I(z, n, text) BOOST_PP_COMMA_IF(n) text ## n - -# define BOOST_PYTHON_BINARY_ENUM(c, a, b) BOOST_PP_REPEAT(c, BOOST_PYTHON_BINARY_ENUM_I, (a, b)) -# define BOOST_PYTHON_BINARY_ENUM_I(z, n, _) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2, 0, _), n) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2, 1, _), n) - -# define BOOST_PYTHON_ENUM_WITH_DEFAULT(c, text, def) BOOST_PP_REPEAT(c, BOOST_PYTHON_ENUM_WITH_DEFAULT_I, (text, def)) -# define BOOST_PYTHON_ENUM_WITH_DEFAULT_I(z, n, _) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2, 0, _), n) = BOOST_PP_TUPLE_ELEM(2, 1, _) - -// fixed text (no commas) -# define BOOST_PYTHON_FIXED(z, n, text) text - -// flags -# define BOOST_PYTHON_FUNCTION_POINTER 0x0001 -# define BOOST_PYTHON_POINTER_TO_MEMBER 0x0002 - -#endif // PREPROCESSOR_DWA200247_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/python22_fixed.h b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/python22_fixed.h deleted file mode 100644 index 32bf941fef..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/python22_fixed.h +++ /dev/null @@ -1,152 +0,0 @@ -// This file is a modified version of Python 2.2/2.2.1 Python.h. As -// such it is: -// -// Copyright (c) 2001, 2002 Python Software Foundation; All Rights -// Reserved -// -// boostinspect:nolicense (don't complain about the lack of a Boost license) -// -// Changes from the original: -// 1. #includes for Python 2.2.1 -// 2. Provides missing extern "C" wrapper for "iterobject.h" and "descrobject.h". -// - -// Changes marked with "Boost.Python modification" -#ifndef Py_PYTHON_H -#define Py_PYTHON_H -/* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */ - - -/* Enable compiler features; switching on C lib defines doesn't work - here, because the symbols haven't necessarily been defined yet. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif - -/* Forcing SUSv2 compatibility still produces problems on some - platforms, True64 and SGI IRIX begin two of them, so for now the - define is switched off. */ -#if 0 -#ifndef _XOPEN_SOURCE -# define _XOPEN_SOURCE 500 -#endif -#endif - -/* Include nearly all Python header files */ - -#include "patchlevel.h" -#include "pyconfig.h" - -#ifdef HAVE_LIMITS_H -#include -#endif - -/* pyconfig.h may or may not define DL_IMPORT */ -#ifndef DL_IMPORT /* declarations for DLL import/export */ -#define DL_IMPORT(RTYPE) RTYPE -#endif -#ifndef DL_EXPORT /* declarations for DLL import/export */ -#define DL_EXPORT(RTYPE) RTYPE -#endif - -#if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE) -#define _SGI_MP_SOURCE -#endif - -#include -#ifndef NULL -# error "Python.h requires that stdio.h define NULL." -#endif - -#include -#include -#ifdef HAVE_STDLIB_H -#include -#endif -#if PY_MICRO_VERSION == 1 // Boost.Python modification: emulate Python 2.2 -#ifdef HAVE_UNISTD_H -#include -#endif -#endif // Boost.Python modification: emulate Python 2.2 - -/* CAUTION: Build setups should ensure that NDEBUG is defined on the - * compiler command line when building Python in release mode; else - * assert() calls won't be removed. - */ -#include - -#include "pyport.h" - -#include "pymem.h" - -#include "object.h" -#include "objimpl.h" - -#include "pydebug.h" - -#include "unicodeobject.h" -#include "intobject.h" -#include "longobject.h" -#include "floatobject.h" -#ifndef WITHOUT_COMPLEX -#include "complexobject.h" -#endif -#include "rangeobject.h" -#include "stringobject.h" -#include "bufferobject.h" -#include "tupleobject.h" -#include "listobject.h" -#include "dictobject.h" -#include "methodobject.h" -#include "moduleobject.h" -#include "funcobject.h" -#include "classobject.h" -#include "fileobject.h" -#include "cobject.h" -#include "traceback.h" -#include "sliceobject.h" -#include "cellobject.h" -extern "C" { // Boost.Python modification: provide missing extern "C" -#include "iterobject.h" -#include "descrobject.h" -} // Boost.Python modification: provide missing extern "C" -#include "weakrefobject.h" - -#include "codecs.h" -#include "pyerrors.h" - -#include "pystate.h" - -#include "modsupport.h" -#include "pythonrun.h" -#include "ceval.h" -#include "sysmodule.h" -#include "intrcheck.h" -#include "import.h" - -#include "abstract.h" - -#define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a)) -#define PyArg_NoArgs(v) PyArg_Parse(v, "") - -/* Convert a possibly signed character to a nonnegative int */ -/* XXX This assumes characters are 8 bits wide */ -#ifdef __CHAR_UNSIGNED__ -#define Py_CHARMASK(c) (c) -#else -#define Py_CHARMASK(c) ((c) & 0xff) -#endif - -#include "pyfpe.h" - -/* These definitions must match corresponding definitions in graminit.h. - There's code in compile.c that checks that they are the same. */ -#define Py_single_input 256 -#define Py_file_input 257 -#define Py_eval_input 258 - -#ifdef HAVE_PTH -/* GNU pth user-space thread support */ -#include -#endif -#endif /* !Py_PYTHON_H */ diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/python_type.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/python_type.hpp deleted file mode 100644 index f7630c175a..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/python_type.hpp +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright Nikolay Mladenov 2007. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_PYTHON_OBJECT_PYTHON_TYPE_H -#define BOOST_PYTHON_OBJECT_PYTHON_TYPE_H - -#include - -namespace boost {namespace python {namespace detail{ - - -template struct python_class : PyObject -{ - typedef python_class this_type; - - typedef T type; - - static void *converter (PyObject *p){ - return p; - } - - static void register_() - { - static bool first_time = true; - - if ( !first_time ) return; - - first_time = false; - converter::registry::insert(&converter, boost::python::type_id(), &converter::registered_pytype_direct::get_pytype); - } -}; - - -}}} //namespace boost :: python :: detail - -#endif //BOOST_PYTHON_OBJECT_PYTHON_TYPE_H diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/raw_pyobject.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/raw_pyobject.hpp deleted file mode 100644 index 194409eda4..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/raw_pyobject.hpp +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef RAW_PYOBJECT_DWA2002628_HPP -# define RAW_PYOBJECT_DWA2002628_HPP - -namespace boost { namespace python { namespace detail { - -// -// Define some types which we can use to get around the vagaries of -// PyObject*. We will use these to initialize object instances, and -// keep them in namespace detail to make sure they stay out of the -// hands of users. That is much simpler than trying to grant -// friendship to all the appropriate parties. -// - -// New references are normally checked for null -struct new_reference_t; -typedef new_reference_t* new_reference; - -// Borrowed references are assumed to be non-null -struct borrowed_reference_t; -typedef borrowed_reference_t* borrowed_reference; - -// New references which aren't checked for null -struct new_non_null_reference_t; -typedef new_non_null_reference_t* new_non_null_reference; - -}}} // namespace boost::python::detail - -#endif // RAW_PYOBJECT_DWA2002628_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/referent_storage.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/referent_storage.hpp deleted file mode 100644 index 0a1ef5a04e..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/referent_storage.hpp +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef REFERENT_STORAGE_DWA200278_HPP -# define REFERENT_STORAGE_DWA200278_HPP -# include -# include - -namespace boost { namespace python { namespace detail { - -struct alignment_dummy; -typedef void (*function_ptr)(); -typedef int (alignment_dummy::*member_ptr); -typedef int (alignment_dummy::*member_function_ptr)(); - -# define BOOST_PYTHON_ALIGNER(T, n) \ - typename mpl::if_c< \ - sizeof(T) <= size, T, char>::type t##n - -// Storage for size bytes, aligned to all fundamental types no larger than size -template -union aligned_storage -{ - BOOST_PYTHON_ALIGNER(char, 0); - BOOST_PYTHON_ALIGNER(short, 1); - BOOST_PYTHON_ALIGNER(int, 2); - BOOST_PYTHON_ALIGNER(long, 3); - BOOST_PYTHON_ALIGNER(float, 4); - BOOST_PYTHON_ALIGNER(double, 5); - BOOST_PYTHON_ALIGNER(long double, 6); - BOOST_PYTHON_ALIGNER(void*, 7); - BOOST_PYTHON_ALIGNER(function_ptr, 8); - BOOST_PYTHON_ALIGNER(member_ptr, 9); - BOOST_PYTHON_ALIGNER(member_function_ptr, 10); - char bytes[size]; -}; - -# undef BOOST_PYTHON_ALIGNER - - // Compute the size of T's referent. We wouldn't need this at all, - // but sizeof() is broken in CodeWarriors <= 8.0 - template struct referent_size; - -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - - template - struct referent_size - { - BOOST_STATIC_CONSTANT( - std::size_t, value = sizeof(T)); - }; - -# else - - template struct referent_size - { - static T f(); - BOOST_STATIC_CONSTANT(std::size_t, value = sizeof(f())); - }; - -# endif - -// A metafunction returning a POD type which can store U, where T == -// U&. If T is not a reference type, returns a POD which can store T. -template -struct referent_storage -{ - typedef aligned_storage< - ::boost::python::detail::referent_size::value - > type; -}; - -}}} // namespace boost::python::detail - -#endif // REFERENT_STORAGE_DWA200278_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/result.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/result.hpp deleted file mode 100644 index 9b8b486423..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/result.hpp +++ /dev/null @@ -1,135 +0,0 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -# ifndef RESULT_DWA2002521_HPP -# define RESULT_DWA2002521_HPP - -# include - -# include - -# include -# include - -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace detail { - -// Defines a family of overloaded function which, given x, a function -// pointer, member [function] pointer, or an AdaptableFunction object, -// returns a pointer to type*, where R is the result type of -// invoking the result of bind(x). -// -// In order to work around bugs in deficient compilers, if x might be -// an AdaptableFunction object, you must pass OL as a second argument -// to get this to work portably. - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (4, (0, BOOST_PYTHON_MAX_ARITY, , BOOST_PYTHON_FUNCTION_POINTER)) -# include BOOST_PP_ITERATE() - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (4, (0, BOOST_PYTHON_CV_COUNT - 1, , BOOST_PYTHON_POINTER_TO_MEMBER)) -# include BOOST_PP_ITERATE() - -template -boost::type* result(R (T::*), int = 0) { return 0; } - -# if (defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140) \ - || (defined(__GNUC__) && __GNUC__ < 3) \ - || (defined(__MWERKS__) && __MWERKS__ < 0x3000) -// This code actually works on all implementations, but why use it when we don't have to? -template -struct get_result_type -{ - typedef boost::type type; -}; - -struct void_type -{ - typedef void type; -}; - -template -struct result_result -{ - typedef typename mpl::if_c< - is_class::value - , get_result_type - , void_type - >::type t1; - - typedef typename t1::type* type; -}; - -template -typename result_result::type -result(X const&, short) { return 0; } - -# else // Simpler code for more-capable compilers -template -boost::type* -result(X const&, short = 0) { return 0; } - -# endif - -}}} // namespace boost::python::detail - -# endif // RESULT_DWA2002521_HPP - -/* --------------- function pointers --------------- */ -// For gcc 4.4 compatability, we must include the -// BOOST_PP_ITERATION_DEPTH test inside an #else clause. -#else // BOOST_PP_IS_ITERATING -#if BOOST_PP_ITERATION_DEPTH() == 1 && BOOST_PP_ITERATION_FLAGS() == BOOST_PYTHON_FUNCTION_POINTER -# if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100) \ - && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) -# line BOOST_PP_LINE(__LINE__, result.hpp(function pointers)) -# endif - -# define N BOOST_PP_ITERATION() - -template -boost::type* result(R (*)(BOOST_PP_ENUM_PARAMS_Z(1, N, A)), int = 0) -{ - return 0; -} - -# undef N - -/* --------------- pointers-to-members --------------- */ -#elif BOOST_PP_ITERATION_DEPTH() == 1 && BOOST_PP_ITERATION_FLAGS() == BOOST_PYTHON_POINTER_TO_MEMBER -// Outer over cv-qualifiers - -# define BOOST_PP_ITERATION_PARAMS_2 (3, (0, BOOST_PYTHON_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -#elif BOOST_PP_ITERATION_DEPTH() == 2 -# if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100) \ - && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) -# line BOOST_PP_LINE(__LINE__, result.hpp(pointers-to-members)) -# endif -// Inner over arities - -# define N BOOST_PP_ITERATION() -# define Q BOOST_PYTHON_CV_QUALIFIER(BOOST_PP_RELATIVE_ITERATION(1)) - -template -boost::type* result(R (T::*)(BOOST_PP_ENUM_PARAMS_Z(1, N, A)) Q, int = 0) -{ - return 0; -} - -# undef N -# undef Q - -#endif // BOOST_PP_ITERATION_DEPTH() -#endif diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/scope.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/scope.hpp deleted file mode 100644 index 5367bbd35c..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/scope.hpp +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef SCOPE_DWA2002927_HPP -# define SCOPE_DWA2002927_HPP - -# include - -namespace boost { namespace python { namespace detail { - -void BOOST_PYTHON_DECL scope_setattr_doc(char const* name, object const& obj, char const* doc); - -}}} // namespace boost::python::detail - -#endif // SCOPE_DWA2002927_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/sfinae.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/sfinae.hpp deleted file mode 100644 index 6281875111..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/sfinae.hpp +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright David Abrahams 2004. Distributed under the Boost -// Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef SFINAE_DWA2004723_HPP -# define SFINAE_DWA2004723_HPP - -# include - -# if defined(BOOST_NO_SFINAE) && !defined(BOOST_MSVC) -# define BOOST_PYTHON_NO_SFINAE -# endif - -#endif // SFINAE_DWA2004723_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/signature.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/signature.hpp deleted file mode 100644 index 11268b92cf..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/signature.hpp +++ /dev/null @@ -1,106 +0,0 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -# ifndef SIGNATURE_DWA20021121_HPP -# define SIGNATURE_DWA20021121_HPP - -# include - -# include -# include -# include - -# include -# include - -# include -# include - -namespace boost { namespace python { namespace detail { - -struct signature_element -{ - char const* basename; - converter::pytype_function pytype_f; - bool lvalue; -}; - -struct py_func_sig_info -{ - signature_element const *signature; - signature_element const *ret; -}; - -template struct signature_arity; - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, BOOST_PYTHON_MAX_ARITY + 1, )) -# include BOOST_PP_ITERATE() - -// A metafunction returning the base class used for -// -// signature. -// -template -struct signature_base_select -{ - enum { arity = mpl::size::value - 1 }; - typedef typename signature_arity::template impl type; -}; - -template -struct signature - : signature_base_select::type -{ -}; - -}}} // namespace boost::python::detail - -# endif // SIGNATURE_DWA20021121_HPP - -#else - -# define N BOOST_PP_ITERATION() - -template <> -struct signature_arity -{ - template - struct impl - { - static signature_element const* elements() - { - static signature_element const result[N+2] = { - -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES -# define BOOST_PP_LOCAL_MACRO(i) \ - { \ - type_id::type>().name() \ - , &converter::expected_pytype_for_arg::type>::get_pytype \ - , indirect_traits::is_reference_to_non_const::type>::value \ - }, -#else -# define BOOST_PP_LOCAL_MACRO(i) \ - { \ - type_id::type>().name() \ - , 0 \ - , indirect_traits::is_reference_to_non_const::type>::value \ - }, -#endif - -# define BOOST_PP_LOCAL_LIMITS (0, N) -# include BOOST_PP_LOCAL_ITERATE() - {0,0,0} - }; - return result; - } - }; -}; - -#endif // BOOST_PP_IS_ITERATING - - diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/string_literal.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/string_literal.hpp deleted file mode 100644 index 50193b6436..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/string_literal.hpp +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef STRING_LITERAL_DWA2002629_HPP -# define STRING_LITERAL_DWA2002629_HPP - -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace detail { - -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template -struct is_string_literal : mpl::false_ -{ -}; - -# if !defined(__MWERKS__) || __MWERKS__ > 0x2407 -template -struct is_string_literal : mpl::true_ -{ -}; - -# if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590040)) \ - || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730) -// This compiler mistakenly gets the type of string literals as char* -// instead of char[NN]. -template <> -struct is_string_literal : mpl::true_ -{ -}; -# endif - -# else - -// CWPro7 has trouble with the array type deduction above -template -struct is_string_literal - : is_same -{ -}; -# endif -# else -template -struct string_literal_helper -{ - typedef char (&yes_string_literal)[1]; - typedef char (&no_string_literal)[2]; - - template - struct apply - { - typedef apply self; - static T x; - static yes_string_literal check(char const*); - static no_string_literal check(char*); - static no_string_literal check(void const volatile*); - - BOOST_STATIC_CONSTANT( - bool, value = sizeof(self::check(x)) == sizeof(yes_string_literal)); - typedef mpl::bool_ type; - }; -}; - -template <> -struct string_literal_helper -{ - template - struct apply : mpl::false_ - { - }; -}; - -template -struct is_string_literal - : string_literal_helper::value>::apply -{ -}; -# endif - -}}} // namespace boost::python::detail - -#endif // STRING_LITERAL_DWA2002629_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/target.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/target.hpp deleted file mode 100644 index 137801bb2b..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/target.hpp +++ /dev/null @@ -1,86 +0,0 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -# ifndef TARGET_DWA2002521_HPP -# define TARGET_DWA2002521_HPP - -# include - -# include - -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace detail { - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (4, (0, BOOST_PYTHON_MAX_ARITY, , BOOST_PYTHON_FUNCTION_POINTER)) -# include BOOST_PP_ITERATE() - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (4, (0, BOOST_PYTHON_CV_COUNT - 1, , BOOST_PYTHON_POINTER_TO_MEMBER)) -# include BOOST_PP_ITERATE() - -template -T& (* target(R (T::*)) )() { return 0; } - -}}} // namespace boost::python::detail - -# endif // TARGET_DWA2002521_HPP - -/* --------------- function pointers --------------- */ -// For gcc 4.4 compatability, we must include the -// BOOST_PP_ITERATION_DEPTH test inside an #else clause. -#else // BOOST_PP_IS_ITERATING -#if BOOST_PP_ITERATION_DEPTH() == 1 && BOOST_PP_ITERATION_FLAGS() == BOOST_PYTHON_FUNCTION_POINTER -# if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100) \ - && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) -# line BOOST_PP_LINE(__LINE__, target.hpp(function_pointers)) -# endif - -# define N BOOST_PP_ITERATION() - -template -BOOST_PP_IF(N, A0, void)(* target(R (*)(BOOST_PP_ENUM_PARAMS_Z(1, N, A))) )() -{ - return 0; -} - -# undef N - -/* --------------- pointers-to-members --------------- */ -#elif BOOST_PP_ITERATION_DEPTH() == 1 && BOOST_PP_ITERATION_FLAGS() == BOOST_PYTHON_POINTER_TO_MEMBER -// Outer over cv-qualifiers - -# define BOOST_PP_ITERATION_PARAMS_2 (3, (0, BOOST_PYTHON_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -#elif BOOST_PP_ITERATION_DEPTH() == 2 -# if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100) \ - && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) -# line BOOST_PP_LINE(__LINE__, target.hpp(pointers-to-members)) -# endif -// Inner over arities - -# define N BOOST_PP_ITERATION() -# define Q BOOST_PYTHON_CV_QUALIFIER(BOOST_PP_RELATIVE_ITERATION(1)) - -template -T& (* target(R (T::*)(BOOST_PP_ENUM_PARAMS_Z(1, N, A)) Q) )() -{ - return 0; -} - -# undef N -# undef Q - -#endif // BOOST_PP_ITERATION_DEPTH() -#endif diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/translate_exception.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/translate_exception.hpp deleted file mode 100644 index df7ec2dd6c..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/translate_exception.hpp +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef TRANSLATE_EXCEPTION_TDS20091020_HPP -# define TRANSLATE_EXCEPTION_TDS20091020_HPP - -# include - -# include -# include -# include -# include - -# include - -namespace boost { namespace python { namespace detail { - -// A ternary function object used to translate C++ exceptions of type -// ExceptionType into Python exceptions by invoking an object of type -// Translate. Typically the translate function will be curried with -// boost::bind(). -template -struct translate_exception -{ -// workaround for broken gcc that ships with SuSE 9.0 and SuSE 9.1 -# if defined(__linux__) && defined(__GNUC__) \ - && BOOST_WORKAROUND(__GNUC__, == 3) \ - && BOOST_WORKAROUND(__GNUC_MINOR__, == 3) \ - && (BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, == 1) \ - || BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, == 3)) - typedef typename remove_reference< - typename add_const::type - >::type exception_non_ref; -# else - typedef typename add_reference< - typename add_const::type - >::type exception_cref; -# endif - - inline bool operator()( - exception_handler const& handler - , function0 const& f - , typename call_traits::param_type translate) const - { - try - { - return handler(f); - } -// workaround for broken gcc that ships with SuSE 9.0 and SuSE 9.1 -# if defined(__linux__) && defined(__GNUC__) \ - && BOOST_WORKAROUND(__GNUC__, == 3) \ - && BOOST_WORKAROUND(__GNUC_MINOR__, == 3) \ - && (BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, == 1) \ - || BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, == 3)) - catch(exception_non_ref& e) -# else - catch(exception_cref e) -# endif - { - translate(e); - return true; - } - } -}; - -}}} // namespace boost::python::detail - -#endif // TRANSLATE_EXCEPTION_DWA2002810_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/type_list.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/type_list.hpp deleted file mode 100644 index 9483c1945c..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/type_list.hpp +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef TYPE_LIST_DWA2002913_HPP -# define TYPE_LIST_DWA2002913_HPP - -# include -# include -# include - -# if BOOST_PYTHON_MAX_ARITY + 2 > BOOST_PYTHON_MAX_BASES -# define BOOST_PYTHON_LIST_SIZE BOOST_PP_INC(BOOST_PP_INC(BOOST_PYTHON_MAX_ARITY)) -# else -# define BOOST_PYTHON_LIST_SIZE BOOST_PYTHON_MAX_BASES -# endif - -// Compute the MPL vector header to use for lists up to BOOST_PYTHON_LIST_SIZE in length -# if BOOST_PYTHON_LIST_SIZE > 48 -# error Arities above 48 not supported by Boost.Python due to MPL internal limit -# elif BOOST_PYTHON_LIST_SIZE > 38 -# include -# elif BOOST_PYTHON_LIST_SIZE > 28 -# include -# elif BOOST_PYTHON_LIST_SIZE > 18 -# include -# elif BOOST_PYTHON_LIST_SIZE > 8 -# include -# else -# include -# endif - -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# include -# else -# include -# endif - -#endif // TYPE_LIST_DWA2002913_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/type_list_impl.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/type_list_impl.hpp deleted file mode 100644 index fdcfa85030..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/type_list_impl.hpp +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef BOOST_PP_IS_ITERATING -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -# ifndef TYPE_LIST_IMPL_DWA2002913_HPP -# define TYPE_LIST_IMPL_DWA2002913_HPP - -# include - -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace detail { - -template -struct type_list - : BOOST_PP_CAT(mpl::vector,BOOST_PYTHON_LIST_SIZE) -{ -}; - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, BOOST_PP_DEC(BOOST_PYTHON_LIST_SIZE), )) -# include BOOST_PP_ITERATE() - - -}}} // namespace boost::python::detail - -# endif // TYPE_LIST_IMPL_DWA2002913_HPP - -#else // BOOST_PP_IS_ITERATING - -# define N BOOST_PP_ITERATION() -# define BOOST_PYTHON_VOID_ARGS BOOST_PP_SUB_D(1,BOOST_PYTHON_LIST_SIZE,N) - -template < - BOOST_PP_ENUM_PARAMS_Z(1, N, class T) - > -struct type_list< - BOOST_PP_ENUM_PARAMS_Z(1, N, T) - BOOST_PP_COMMA_IF(N) - BOOST_PP_ENUM( - BOOST_PYTHON_VOID_ARGS, BOOST_PYTHON_FIXED, mpl::void_) - > - : BOOST_PP_CAT(mpl::vector,N) -{ -}; - -# undef BOOST_PYTHON_VOID_ARGS -# undef N - -#endif // BOOST_PP_IS_ITERATING diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/type_list_impl_no_pts.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/type_list_impl_no_pts.hpp deleted file mode 100644 index 15d9252374..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/type_list_impl_no_pts.hpp +++ /dev/null @@ -1,107 +0,0 @@ -#ifndef BOOST_PP_IS_ITERATING -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -# ifndef TYPE_LIST_IMPL_NO_PTS_DWA2002913_HPP -# define TYPE_LIST_IMPL_NO_PTS_DWA2002913_HPP - -# include - -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace detail { - -template< typename T > -struct is_list_arg -{ - enum { value = true }; -}; - -template<> -struct is_list_arg -{ - enum { value = false }; -}; - -template struct type_list_impl_chooser; - -# define BOOST_PYTHON_LIST_ACTUAL_PARAMS BOOST_PP_ENUM_PARAMS_Z(1,BOOST_PYTHON_LIST_SIZE,T) -# define BOOST_PYTHON_LIST_FORMAL_PARAMS BOOST_PP_ENUM_PARAMS_Z(1,BOOST_PYTHON_LIST_SIZE,class T) - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, BOOST_PYTHON_LIST_SIZE, )) -# include BOOST_PP_ITERATE() - -# define BOOST_PYTHON_PLUS() + -# define BOOST_PYTHON_IS_LIST_ARG(z, n, data) \ - BOOST_PP_IF(n, BOOST_PYTHON_PLUS, BOOST_PP_EMPTY)() \ - is_list_arg< BOOST_PP_CAT(T,n) >::value - -template< - BOOST_PYTHON_LIST_FORMAL_PARAMS - > -struct type_list_count_args -{ - enum { value = - BOOST_PP_REPEAT_1(BOOST_PYTHON_LIST_SIZE, BOOST_PYTHON_IS_LIST_ARG, _) - }; -}; - -template< - BOOST_PYTHON_LIST_FORMAL_PARAMS - > -struct type_list_impl -{ - typedef type_list_count_args< BOOST_PYTHON_LIST_ACTUAL_PARAMS > arg_num_; - typedef typename detail::type_list_impl_chooser< arg_num_::value > - ::template result_< BOOST_PYTHON_LIST_ACTUAL_PARAMS >::type type; -}; - -template< - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PYTHON_LIST_SIZE, class T, mpl::void_) - > -struct type_list - : detail::type_list_impl< BOOST_PYTHON_LIST_ACTUAL_PARAMS >::type -{ - typedef typename detail::type_list_impl< - BOOST_PYTHON_LIST_ACTUAL_PARAMS - >::type type; -}; - -# undef BOOST_PYTHON_IS_LIST_ARG -# undef BOOST_PYTHON_PLUS -# undef BOOST_PYTHON_LIST_FORMAL_PARAMS -# undef BOOST_PYTHON_LIST_ACTUAL_PARAMS - -}}} // namespace boost::python::detail - -# endif // TYPE_LIST_IMPL_NO_PTS_DWA2002913_HPP - -#else // BOOST_PP_IS_ITERATING - -# define N BOOST_PP_ITERATION() - -template<> -struct type_list_impl_chooser -{ - template< - BOOST_PYTHON_LIST_FORMAL_PARAMS - > - struct result_ - { - typedef typename BOOST_PP_CAT(mpl::vector,N)< - BOOST_PP_ENUM_PARAMS(N, T) - >::type type; - }; -}; - -# undef N - -#endif // BOOST_PP_IS_ITERATING diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/unwind_type.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/unwind_type.hpp deleted file mode 100644 index 9a997c9dbd..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/unwind_type.hpp +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef UNWIND_TYPE_DWA200222_HPP -# define UNWIND_TYPE_DWA200222_HPP - -# include -# include -# include - -namespace boost { namespace python { namespace detail { - -#ifndef _MSC_VER //if forward declared, msvc6.5 does not recognize them as inline -// forward declaration, required (at least) by Tru64 cxx V6.5-042 -template -inline typename Generator::result_type -unwind_type(U const& p, Generator* = 0); - -// forward declaration, required (at least) by Tru64 cxx V6.5-042 -template -inline typename Generator::result_type -unwind_type(boost::type*p = 0, Generator* = 0); -#endif - -template -inline typename Generator::result_type -unwind_type_cv(U* p, cv_unqualified, Generator* = 0) -{ - return Generator::execute(p); -} - -template -inline typename Generator::result_type -unwind_type_cv(U const* p, const_, Generator* = 0) -{ - return unwind_type(const_cast(p), (Generator*)0); -} - -template -inline typename Generator::result_type -unwind_type_cv(U volatile* p, volatile_, Generator* = 0) -{ - return unwind_type(const_cast(p), (Generator*)0); -} - -template -inline typename Generator::result_type -unwind_type_cv(U const volatile* p, const_volatile_, Generator* = 0) -{ - return unwind_type(const_cast(p), (Generator*)0); -} - -template -inline typename Generator::result_type -unwind_ptr_type(U* p, Generator* = 0) -{ - typedef typename cv_category::type tag; - return unwind_type_cv(p, tag()); -} - -template -struct unwind_helper -{ - template - static typename Generator::result_type - execute(U p, Generator* = 0) - { - return unwind_ptr_type(p, (Generator*)0); - } -}; - -template <> -struct unwind_helper -{ - template - static typename Generator::result_type - execute(U& p, Generator* = 0) - { - return unwind_ptr_type(&p, (Generator*)0); - } -}; - -template -inline typename Generator::result_type -#ifndef _MSC_VER -unwind_type(U const& p, Generator*) -#else -unwind_type(U const& p, Generator* = 0) -#endif -{ - return unwind_helper::value>::execute(p, (Generator*)0); -} - -enum { direct_ = 0, pointer_ = 1, reference_ = 2, reference_to_pointer_ = 3 }; -template struct unwind_helper2; - -template <> -struct unwind_helper2 -{ - template - static typename Generator::result_type - execute(U(*)(), Generator* = 0) - { - return unwind_ptr_type((U*)0, (Generator*)0); - } -}; - -template <> -struct unwind_helper2 -{ - template - static typename Generator::result_type - execute(U*(*)(), Generator* = 0) - { - return unwind_ptr_type((U*)0, (Generator*)0); - } -}; - -template <> -struct unwind_helper2 -{ - template - static typename Generator::result_type - execute(U&(*)(), Generator* = 0) - { - return unwind_ptr_type((U*)0, (Generator*)0); - } -}; - -template <> -struct unwind_helper2 -{ - template - static typename Generator::result_type - execute(U&(*)(), Generator* = 0) - { - return unwind_ptr_type(U(0), (Generator*)0); - } -}; - -// Call this one with both template parameters explicitly specified -// and no function arguments: -// -// return unwind_type(); -// -// Doesn't work if T is an array type; we could handle that case, but -// why bother? -template -inline typename Generator::result_type -#ifndef _MSC_VER -unwind_type(boost::type*, Generator*) -#else -unwind_type(boost::type*p =0, Generator* =0) -#endif -{ - BOOST_STATIC_CONSTANT(int, indirection - = (boost::is_pointer::value ? pointer_ : 0) - + (indirect_traits::is_reference_to_pointer::value - ? reference_to_pointer_ - : boost::is_reference::value - ? reference_ - : 0)); - - return unwind_helper2::execute((U(*)())0,(Generator*)0); -} - -}}} // namespace boost::python::detail - -#endif // UNWIND_TYPE_DWA200222_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/unwrap_type_id.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/unwrap_type_id.hpp deleted file mode 100644 index 96c1f53013..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/unwrap_type_id.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright David Abrahams 2004. Distributed under the Boost -// Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef UNWRAP_TYPE_ID_DWA2004722_HPP -# define UNWRAP_TYPE_ID_DWA2004722_HPP - -# include - -# include - -namespace boost { namespace python { - -template class wrapper; - -namespace detail { - -template -inline type_info unwrap_type_id(T*, ...) -{ - return type_id(); -} - -template -inline type_info unwrap_type_id(U*, wrapper*) -{ - return type_id(); -} - -}}} // namespace boost::python::detail - -#endif // UNWRAP_TYPE_ID_DWA2004722_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/unwrap_wrapper.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/unwrap_wrapper.hpp deleted file mode 100644 index 95bc233a72..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/unwrap_wrapper.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright David Abrahams 2004. Distributed under the Boost -// Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef UNWRAP_WRAPPER_DWA2004723_HPP -# define UNWRAP_WRAPPER_DWA2004723_HPP - -# include -# include -# include -# include - -namespace boost { namespace python { namespace detail { - -template -struct unwrap_wrapper_helper -{ - typedef typename T::_wrapper_wrapped_type_ type; -}; - -template -struct unwrap_wrapper_ - : mpl::eval_if,unwrap_wrapper_helper,mpl::identity > -{}; - -template -typename unwrap_wrapper_::type* -unwrap_wrapper(T*) -{ - return 0; -} - -}}} // namespace boost::python::detail - -#endif // UNWRAP_WRAPPER_DWA2004723_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/value_arg.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/value_arg.hpp deleted file mode 100644 index 747588d6fd..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/value_arg.hpp +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright David Abrahams 2004. Distributed under the Boost -// Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef VALUE_ARG_DWA2004312_HPP -# define VALUE_ARG_DWA2004312_HPP - -# include -# include -# include -# include - -namespace boost { namespace python { namespace detail { - -template -struct value_arg - : mpl::if_< - copy_ctor_mutates_rhs - , T - , typename add_reference< - typename add_const::type - >::type - > -{}; - -}}} // namespace boost::python::detail - -#endif // VALUE_ARG_DWA2004312_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/value_is_shared_ptr.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/value_is_shared_ptr.hpp deleted file mode 100644 index 361c369b5b..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/value_is_shared_ptr.hpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef VALUE_IS_SHARED_PTR_DWA2003224_HPP -# define VALUE_IS_SHARED_PTR_DWA2003224_HPP - -# include -# include - -namespace boost { namespace python { namespace detail { - -BOOST_PYTHON_VALUE_IS_XXX_DEF(shared_ptr, shared_ptr, 1) - -}}} // namespace boost::python::detail - -#endif // VALUE_IS_SHARED_PTR_DWA2003224_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/value_is_xxx.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/value_is_xxx.hpp deleted file mode 100644 index 2b12564907..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/value_is_xxx.hpp +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef VALUE_IS_XXX_DWA2003224_HPP -# define VALUE_IS_XXX_DWA2003224_HPP - -# include -# include -# include - -# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -# include -# include - -# define BOOST_PYTHON_VALUE_IS_XXX_DEF(name, qualified_name, nargs) \ -template \ -struct value_is_##name \ -{ \ - typedef char yes; \ - typedef char (&no)[2]; \ - \ - static typename add_reference::type dummy; \ - \ - template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class U) > \ - static yes test( \ - qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, U) > const&, int \ - ); \ - \ - template \ - static no test(U&, ...); \ - \ - BOOST_STATIC_CONSTANT( \ - bool, value \ - = (sizeof(test(dummy, 0)) == sizeof(yes))); \ - \ - typedef mpl::bool_ type; \ -}; - -# else - -# include -# include -# include - -# define BOOST_PYTHON_VALUE_IS_XXX_DEF(name, qualified_name, nargs) \ -template \ -struct value_is_##name \ -{ \ - BOOST_PYTHON_IS_XXX_DEF(name,qualified_name,nargs) \ - BOOST_STATIC_CONSTANT(bool, value = is_##name< \ - typename remove_cv< \ - typename remove_reference::type \ - >::type \ - >::value); \ - typedef mpl::bool_ type; \ - \ -}; - -# endif - -#endif // VALUE_IS_XXX_DWA2003224_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/void_ptr.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/void_ptr.hpp deleted file mode 100644 index 06f680104d..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/void_ptr.hpp +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef VOID_PTR_DWA200239_HPP -# define VOID_PTR_DWA200239_HPP - -# include - -namespace boost { namespace python { namespace detail { - -template -inline U& void_ptr_to_reference(void const volatile* p, U&(*)()) -{ - return *(U*)p; -} - -template -inline void write_void_ptr(void const volatile* storage, void* ptr, T*) -{ - *(T**)storage = (T*)ptr; -} - -// writes U(ptr) into the storage -template -inline void write_void_ptr_reference(void const volatile* storage, void* ptr, U&(*)()) -{ - // stripping CV qualification suppresses warnings on older EDGs - typedef typename remove_cv::type u_stripped; - write_void_ptr(storage, ptr, u_stripped(0)); -} - -}}} // namespace boost::python::detail - -#endif // VOID_PTR_DWA200239_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/void_return.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/void_return.hpp deleted file mode 100644 index 30db825177..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/void_return.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef VOID_RETURN_DWA200274_HPP -# define VOID_RETURN_DWA200274_HPP - -# include - -namespace boost { namespace python { namespace detail { - -struct void_return -{ - void_return() {} - private: - void operator=(void_return const&); -}; - -template -struct returnable -{ - typedef T type; -}; - -# ifdef BOOST_NO_VOID_RETURNS -template <> -struct returnable -{ - typedef void_return type; -}; - -# ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -template <> struct returnable : returnable {}; -template <> struct returnable : returnable {}; -template <> struct returnable : returnable {}; -# endif - -# endif // BOOST_NO_VOID_RETURNS - -}}} // namespace boost::python::detail - -#endif // VOID_RETURN_DWA200274_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/wrap_python.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/wrap_python.hpp deleted file mode 100644 index eaef7841d5..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/wrap_python.hpp +++ /dev/null @@ -1,205 +0,0 @@ -// (C) Copyright David Abrahams 2000. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// The author gratefully acknowleges the support of Dragon Systems, Inc., in -// producing this work. - -// This file serves as a wrapper around which allows it to be -// compiled with GCC 2.95.2 under Win32 and which disables the default MSVC -// behavior so that a program may be compiled in debug mode without requiring a -// special debugging build of the Python library. - - -// To use the Python debugging library, #define BOOST_DEBUG_PYTHON on the -// compiler command-line. - -// Revision History: -// 05 Mar 01 Suppress warnings under Cygwin with Python 2.0 (Dave Abrahams) -// 04 Mar 01 Rolled in some changes from the Dragon fork (Dave Abrahams) -// 01 Mar 01 define PyObject_INIT() for Python 1.x (Dave Abrahams) - -#ifdef _DEBUG -# ifndef BOOST_DEBUG_PYTHON -# ifdef _MSC_VER - // VC8.0 will complain if system headers are #included both with - // and without _DEBUG defined, so we have to #include all the - // system headers used by pyconfig.h right here. -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# endif -# undef _DEBUG // Don't let Python force the debug library just because we're debugging. -# define DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H -# endif -#endif - -# include -# if defined(_SGI_COMPILER_VERSION) && _SGI_COMPILER_VERSION >= 740 -# undef _POSIX_C_SOURCE -# undef _XOPEN_SOURCE -# undef HAVE_STDINT_H // undo Python 2.5.1 define -# endif - -// -// Python's LongObject.h helpfully #defines ULONGLONG_MAX for us, -// which confuses Boost's config -// -#include -#ifndef ULONG_MAX -# define BOOST_PYTHON_ULONG_MAX_UNDEFINED -#endif -#ifndef LONGLONG_MAX -# define BOOST_PYTHON_LONGLONG_MAX_UNDEFINED -#endif -#ifndef ULONGLONG_MAX -# define BOOST_PYTHON_ULONGLONG_MAX_UNDEFINED -#endif - -// -// Get ahold of Python's version number -// -#include - -#if PY_MAJOR_VERSION<2 || PY_MAJOR_VERSION==2 && PY_MINOR_VERSION<2 -#error Python 2.2 or higher is required for this version of Boost.Python. -#endif - -// -// Some things we need in order to get Python.h to work with compilers other -// than MSVC on Win32 -// -#if defined(_WIN32) || defined(__CYGWIN__) -# if defined(__GNUC__) && defined(__CYGWIN__) - -# define SIZEOF_LONG 4 - -# if PY_MAJOR_VERSION < 2 || PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 2 - -typedef int pid_t; - -# define WORD_BIT 32 -# define hypot _hypot -# include - -# if PY_MAJOR_VERSION < 2 -# define HAVE_CLOCK -# define HAVE_STRFTIME -# define HAVE_STRERROR -# endif - -# define NT_THREADS - -# ifndef NETSCAPE_PI -# define USE_SOCKET -# endif - -# ifdef USE_DL_IMPORT -# define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE -# endif - -# ifdef USE_DL_EXPORT -# define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE -# define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE -# endif - -# define HAVE_LONG_LONG 1 -# define LONG_LONG long long -# endif - -# elif defined(__MWERKS__) - -# ifndef _MSC_VER -# define PY_MSC_VER_DEFINED_FROM_WRAP_PYTHON_H 1 -# define _MSC_VER 900 -# endif - -# undef hypot // undo the evil #define left by Python. - -# elif defined(__BORLANDC__) -# undef HAVE_HYPOT -# define HAVE_HYPOT 1 -# endif - -#endif // _WIN32 - -#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION == 2 && PY_MICRO_VERSION < 2 -# include -#else -# include -#endif - -#ifdef BOOST_PYTHON_ULONG_MAX_UNDEFINED -# undef ULONG_MAX -# undef BOOST_PYTHON_ULONG_MAX_UNDEFINED -#endif - -#ifdef BOOST_PYTHON_LONGLONG_MAX_UNDEFINED -# undef LONGLONG_MAX -# undef BOOST_PYTHON_LONGLONG_MAX_UNDEFINED -#endif - -#ifdef BOOST_PYTHON_ULONGLONG_MAX_UNDEFINED -# undef ULONGLONG_MAX -# undef BOOST_PYTHON_ULONGLONG_MAX_UNDEFINED -#endif - -#ifdef PY_MSC_VER_DEFINED_FROM_WRAP_PYTHON_H -# undef _MSC_VER -#endif - -#ifdef DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H -# undef DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H -# define _DEBUG -# ifdef _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H -# undef _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H -# undef _CRT_NOFORCE_MANIFEST -# endif -#endif - -#if !defined(PY_MAJOR_VERSION) || PY_MAJOR_VERSION < 2 -# define PyObject_INIT(op, typeobj) \ - ( (op)->ob_type = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) -#endif - -// Define Python 3 macros for Python 2.x -#if PY_VERSION_HEX < 0x02060000 - -# define Py_TYPE(o) (((PyObject*)(o))->ob_type) -# define Py_REFCNT(o) (((PyObject*)(o))->ob_refcnt) -# define Py_SIZE(o) (((PyVarObject*)(o))->ob_size) - -# define PyVarObject_HEAD_INIT(type, size) \ - PyObject_HEAD_INIT(type) size, - -#endif - - -#ifdef __MWERKS__ -# pragma warn_possunwant off -#elif _MSC_VER -# pragma warning(disable:4786) -#endif - -#if defined(HAVE_LONG_LONG) -# if defined(PY_LONG_LONG) -# define BOOST_PYTHON_LONG_LONG PY_LONG_LONG -# elif defined(LONG_LONG) -# define BOOST_PYTHON_LONG_LONG LONG_LONG -# else -# error "HAVE_LONG_LONG defined but not PY_LONG_LONG or LONG_LONG" -# endif -#endif diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/wrapper_base.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/detail/wrapper_base.hpp deleted file mode 100644 index e5b93aa449..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/detail/wrapper_base.hpp +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright David Abrahams 2004. Distributed under the Boost -// Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef WRAPPER_BASE_DWA2004722_HPP -# define WRAPPER_BASE_DWA2004722_HPP - -# include -# include -# include - -namespace boost { namespace python { - -class override; - -namespace detail -{ - class BOOST_PYTHON_DECL_FORWARD wrapper_base; - - namespace wrapper_base_ // ADL disabler - { - inline PyObject* get_owner(wrapper_base const volatile& w); - - inline PyObject* - owner_impl(void const volatile* /*x*/, mpl::false_) - { - return 0; - } - - template - inline PyObject* - owner_impl(T const volatile* x, mpl::true_); - - template - inline PyObject* - owner(T const volatile* x) - { - return wrapper_base_::owner_impl(x,is_polymorphic()); - } - } - - class BOOST_PYTHON_DECL wrapper_base - { - friend void initialize_wrapper(PyObject* self, wrapper_base* w); - friend PyObject* wrapper_base_::get_owner(wrapper_base const volatile& w); - protected: - wrapper_base() : m_self(0) {} - - override get_override( - char const* name, PyTypeObject* class_object) const; - - private: - void detach(); - - private: - PyObject* m_self; - }; - - namespace wrapper_base_ // ADL disabler - { - template - inline PyObject* - owner_impl(T const volatile* x, mpl::true_) - { - if (wrapper_base const volatile* w = dynamic_cast(x)) - { - return wrapper_base_::get_owner(*w); - } - return 0; - } - - inline PyObject* get_owner(wrapper_base const volatile& w) - { - return w.m_self; - } - } - - inline void initialize_wrapper(PyObject* self, wrapper_base* w) - { - w->m_self = self; - } - - inline void initialize_wrapper(PyObject* /*self*/, ...) {} - - - -} // namespace detail - -}} // namespace boost::python - -#endif // WRAPPER_BASE_DWA2004722_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/dict.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/dict.hpp deleted file mode 100644 index 6fcaf14382..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/dict.hpp +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef DICT_20020706_HPP -#define DICT_20020706_HPP - -# include - -#include -#include -#include -#include - -namespace boost { namespace python { - -class dict; - -namespace detail -{ - struct BOOST_PYTHON_DECL dict_base : object - { - // D.clear() -> None. Remove all items from D. - void clear(); - - // D.copy() -> a shallow copy of D - dict copy(); - - // D.get(k[,d]) -> D[k] if D.has_key(k), else d. d defaults to None. - object get(object_cref k) const; - - object get(object_cref k, object_cref d) const; - - // D.has_key(k) -> 1 if D has a key k, else 0 - bool has_key(object_cref k) const; - - // D.items() -> list of D's (key, value) pairs, as 2-tuples - list items() const; - - // D.iteritems() -> an iterator over the (key, value) items of D - object iteritems() const; - - // D.iterkeys() -> an iterator over the keys of D - object iterkeys() const; - - // D.itervalues() -> an iterator over the values of D - object itervalues() const; - - // D.keys() -> list of D's keys - list keys() const; - - // D.popitem() -> (k, v), remove and return some (key, value) pair as a - // 2-tuple; but raise KeyError if D is empty - tuple popitem(); - - // D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if not D.has_key(k) - object setdefault(object_cref k); - - object setdefault(object_cref k, object_cref d); - - // D.update(E) -> None. Update D from E: for k in E.keys(): D[k] = E[k] - void update(object_cref E); - - // D.values() -> list of D's values - list values() const; - - protected: - // dict() -> new empty dictionary. - // dict(mapping) -> new dictionary initialized from a mapping object's - // (key, value) pairs. - // dict(seq) -> new dictionary initialized as if via: - dict_base(); // new dict - explicit dict_base(object_cref data); - - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(dict_base, object) - private: - static detail::new_reference call(object const&); - }; -} - -class dict : public detail::dict_base -{ - typedef detail::dict_base base; - public: - // dict() -> new empty dictionary. - // dict(mapping) -> new dictionary initialized from a mapping object's - // (key, value) pairs. - // dict(seq) -> new dictionary initialized as if via: - dict() {} // new dict - - template - explicit dict(T const& data) - : base(object(data)) - { - } - - template - object get(T const& k) const - { - return base::get(object(k)); - } - - template - object get(T1 const& k, T2 const& d) const - { - return base::get(object(k),object(d)); - } - - template - bool has_key(T const& k) const - { - return base::has_key(object(k)); - } - - template - object setdefault(T const& k) - { - return base::setdefault(object(k)); - } - - template - object setdefault(T1 const& k, T2 const& d) - { - return base::setdefault(object(k),object(d)); - } - - template - void update(T const& E) - { - base::update(object(E)); - } - - public: // implementation detail -- for internal use only - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(dict, base) -}; - -// -// Converter Specializations -// -namespace converter -{ - template <> - struct object_manager_traits - : pytype_object_manager_traits<&PyDict_Type,dict> - { - }; -} - -}} // namespace boost::python - -#endif - diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/docstring_options.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/docstring_options.hpp deleted file mode 100644 index 1914bd51a5..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/docstring_options.hpp +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright Ralf W. Grosse-Kunstleve 2006. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef DOCSTRING_OPTIONS_RWGK20060111_HPP -# define DOCSTRING_OPTIONS_RWGK20060111_HPP - -#include - -namespace boost { namespace python { - -// Note: the static data members are defined in object/function.cpp - -class BOOST_PYTHON_DECL docstring_options : boost::noncopyable -{ - public: - docstring_options(bool show_all=true) - { - previous_show_user_defined_ = show_user_defined_; - previous_show_py_signatures_ = show_py_signatures_; - previous_show_cpp_signatures_ = show_cpp_signatures_; - show_user_defined_ = show_all; - show_cpp_signatures_ = show_all; - show_py_signatures_ = show_all; - } - - docstring_options(bool show_user_defined, bool show_signatures) - { - previous_show_user_defined_ = show_user_defined_; - previous_show_cpp_signatures_ = show_cpp_signatures_; - previous_show_py_signatures_ = show_py_signatures_; - show_user_defined_ = show_user_defined; - show_cpp_signatures_ = show_signatures; - show_py_signatures_ = show_signatures; - } - - docstring_options(bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures) - { - previous_show_user_defined_ = show_user_defined_; - previous_show_cpp_signatures_ = show_cpp_signatures_; - previous_show_py_signatures_ = show_py_signatures_; - show_user_defined_ = show_user_defined; - show_cpp_signatures_ = show_cpp_signatures; - show_py_signatures_ = show_py_signatures; - } - - ~docstring_options() - { - show_user_defined_ = previous_show_user_defined_; - show_cpp_signatures_ = previous_show_cpp_signatures_; - show_py_signatures_ = previous_show_py_signatures_; - } - - void - disable_user_defined() { show_user_defined_ = false; } - - void - enable_user_defined() { show_user_defined_ = true; } - - void - disable_py_signatures() - { - show_py_signatures_ = false; - } - - void - enable_py_signatures() - { - show_py_signatures_ = true; - } - - void - disable_cpp_signatures() - { - show_cpp_signatures_ = false; - } - - void - enable_cpp_signatures() - { - show_cpp_signatures_ = true; - } - - void - disable_signatures() - { - show_cpp_signatures_ = false; - show_py_signatures_ = false; - } - - void - enable_signatures() - { - show_cpp_signatures_ = true; - show_py_signatures_ = true; - } - - void - disable_all() - { - show_user_defined_ = false; - show_cpp_signatures_ = false; - show_py_signatures_ = false; - } - - void - enable_all() - { - show_user_defined_ = true; - show_cpp_signatures_ = true; - show_py_signatures_ = true; - } - - friend struct objects::function; - - private: - static volatile bool show_user_defined_; - static volatile bool show_cpp_signatures_; - static volatile bool show_py_signatures_; - bool previous_show_user_defined_; - bool previous_show_cpp_signatures_; - bool previous_show_py_signatures_; -}; - -}} // namespace boost::python - -#endif // DOCSTRING_OPTIONS_RWGK20060111_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/enum.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/enum.hpp deleted file mode 100644 index 9631a0edc8..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/enum.hpp +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef ENUM_DWA200298_HPP -# define ENUM_DWA200298_HPP - -# include - -# include -# include -# include - -namespace boost { namespace python { - -template -struct enum_ : public objects::enum_base -{ - typedef objects::enum_base base; - - // Declare a new enumeration type in the current scope() - enum_(char const* name, char const* doc = 0); - - // Add a new enumeration value with the given name and value. - inline enum_& value(char const* name, T); - - // Add all of the defined enumeration values to the current scope with the - // same names used here. - inline enum_& export_values(); - private: - static PyObject* to_python(void const* x); - static void* convertible_from_python(PyObject* obj); - static void construct(PyObject* obj, converter::rvalue_from_python_stage1_data* data); -}; - -template -inline enum_::enum_(char const* name, char const* doc ) - : base( - name - , &enum_::to_python - , &enum_::convertible_from_python - , &enum_::construct - , type_id() - , doc - ) -{ -} - -// This is the conversion function that gets registered for converting -// these enums to Python. -template -PyObject* enum_::to_python(void const* x) -{ - return base::to_python( - converter::registered::converters.m_class_object - , static_cast(*(T const*)x)); -} - -// -// The following two static functions serve as the elements of an -// rvalue from_python converter for the enumeration type. -// - -// This checks that a given Python object can be converted to the -// enumeration type. -template -void* enum_::convertible_from_python(PyObject* obj) -{ - return PyObject_IsInstance( - obj - , upcast( - converter::registered::converters.m_class_object)) - - ? obj : 0; -} - -// Constructs an instance of the enumeration type in the from_python -// data. -template -void enum_::construct(PyObject* obj, converter::rvalue_from_python_stage1_data* data) -{ -#if PY_VERSION_HEX >= 0x03000000 - T x = static_cast(PyLong_AS_LONG(obj)); -#else - T x = static_cast(PyInt_AS_LONG(obj)); -#endif - void* const storage = ((converter::rvalue_from_python_storage*)data)->storage.bytes; - new (storage) T(x); - data->convertible = storage; -} - -template -inline enum_& enum_::value(char const* name, T x) -{ - this->add_value(name, static_cast(x)); - return *this; -} - -template -inline enum_& enum_::export_values() -{ - this->base::export_values(); - return *this; -} - -}} // namespace boost::python - -#endif // ENUM_DWA200298_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/errors.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/errors.hpp deleted file mode 100644 index 72960d9ea2..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/errors.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// (C) Copyright David Abrahams 2000. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// The author gratefully acknowleges the support of Dragon Systems, Inc., in -// producing this work. - -#ifndef ERRORS_DWA052500_H_ -# define ERRORS_DWA052500_H_ - -# include -# include - -namespace boost { namespace python { - -struct BOOST_PYTHON_DECL_EXCEPTION error_already_set -{ - virtual ~error_already_set(); -}; - -// Handles exceptions caught just before returning to Python code. -// Returns true iff an exception was caught. -BOOST_PYTHON_DECL bool handle_exception_impl(function0); - -template -bool handle_exception(T f) -{ - return handle_exception_impl(function0(boost::ref(f))); -} - -namespace detail { inline void rethrow() { throw; } } - -inline void handle_exception() -{ - handle_exception(detail::rethrow); -} - -BOOST_PYTHON_DECL void throw_error_already_set(); - -template -inline T* expect_non_null(T* x) -{ - if (x == 0) - throw_error_already_set(); - return x; -} - -// Return source if it is an instance of pytype; throw an appropriate -// exception otherwise. -BOOST_PYTHON_DECL PyObject* pytype_check(PyTypeObject* pytype, PyObject* source); - -}} // namespace boost::python - -#endif // ERRORS_DWA052500_H_ diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/exception_translator.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/exception_translator.hpp deleted file mode 100644 index eb72da62a1..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/exception_translator.hpp +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef EXCEPTION_TRANSLATOR_DWA2002810_HPP -# define EXCEPTION_TRANSLATOR_DWA2002810_HPP - -# include - -# include -# include -# include -# include - -namespace boost { namespace python { - -template -void register_exception_translator(Translate translate, boost::type* = 0) -{ - detail::register_exception_handler( - boost::bind(detail::translate_exception(), _1, _2, translate) - ); -} - -}} // namespace boost::python - -#endif // EXCEPTION_TRANSLATOR_DWA2002810_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/exec.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/exec.hpp deleted file mode 100644 index 3ed1e15ce9..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/exec.hpp +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Stefan Seefeld 2005. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef EXEC_SS20050616_HPP -# define EXEC_SS20050616_HPP - -# include -# include - -namespace boost -{ -namespace python -{ - -// Evaluate python expression from str. -// global and local are the global and local scopes respectively, -// used during evaluation. -object -BOOST_PYTHON_DECL -eval(str string, object global = object(), object local = object()); - -// Execute an individual python statement from str. -// global and local are the global and local scopes respectively, -// used during execution. -object -BOOST_PYTHON_DECL -exec_statement(str string, object global = object(), object local = object()); - -// Execute python source code from str. -// global and local are the global and local scopes respectively, -// used during execution. -object -BOOST_PYTHON_DECL -exec(str string, object global = object(), object local = object()); - -// Execute python source code from file filename. -// global and local are the global and local scopes respectively, -// used during execution. -object -BOOST_PYTHON_DECL -exec_file(str filename, object global = object(), object local = object()); - -} -} - -#endif diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/extract.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/extract.hpp deleted file mode 100644 index 4e876f5009..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/extract.hpp +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef EXTRACT_DWA200265_HPP -# define EXTRACT_DWA200265_HPP - -# include - -# include -# include -# include -# include -# include - -# include -# include - -# include -# include -# include -# include -# include - -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(BOOST_INTEL_WIN, <= 900) -// workaround for VC++ 6.x or 7.0 -# define BOOST_EXTRACT_WORKAROUND () -#else -# define BOOST_EXTRACT_WORKAROUND -#endif - -namespace boost { namespace python { - -namespace api -{ - class object; -} - -namespace converter -{ - template - struct extract_pointer - { - typedef Ptr result_type; - extract_pointer(PyObject*); - - bool check() const; - Ptr operator()() const; - - private: - PyObject* m_source; - void* m_result; - }; - - template - struct extract_reference - { - typedef Ref result_type; - extract_reference(PyObject*); - - bool check() const; - Ref operator()() const; - - private: - PyObject* m_source; - void* m_result; - }; - - template - struct extract_rvalue : private noncopyable - { - typedef typename mpl::if_< - python::detail::copy_ctor_mutates_rhs - , T& - , typename call_traits::param_type - >::type result_type; - - extract_rvalue(PyObject*); - - bool check() const; - result_type operator()() const; - private: - PyObject* m_source; - mutable rvalue_from_python_data m_data; - }; - - template - struct extract_object_manager - { - typedef T result_type; - extract_object_manager(PyObject*); - - bool check() const; - result_type operator()() const; - private: - PyObject* m_source; - }; - - template - struct select_extract - { - BOOST_STATIC_CONSTANT( - bool, obj_mgr = is_object_manager::value); - - BOOST_STATIC_CONSTANT( - bool, ptr = is_pointer::value); - - BOOST_STATIC_CONSTANT( - bool, ref = is_reference::value); - - typedef typename mpl::if_c< - obj_mgr - , extract_object_manager - , typename mpl::if_c< - ptr - , extract_pointer - , typename mpl::if_c< - ref - , extract_reference - , extract_rvalue - >::type - >::type - >::type type; - }; -} - -template -struct extract - : converter::select_extract::type -{ - private: - typedef typename converter::select_extract::type base; - public: - typedef typename base::result_type result_type; - - operator result_type() const - { - return (*this)(); - } - - extract(PyObject*); - extract(api::object const&); -}; - -// -// Implementations -// -template -inline extract::extract(PyObject* o) - : base(o) -{ -} - -template -inline extract::extract(api::object const& o) - : base(o.ptr()) -{ -} - -namespace converter -{ - template - inline extract_rvalue::extract_rvalue(PyObject* x) - : m_source(x) - , m_data( - (rvalue_from_python_stage1)(x, registered::converters) - ) - { - } - - template - inline bool - extract_rvalue::check() const - { - return m_data.stage1.convertible; - } - - template - inline typename extract_rvalue::result_type - extract_rvalue::operator()() const - { - return *(T*)( - // Only do the stage2 conversion once - m_data.stage1.convertible == m_data.storage.bytes - ? m_data.storage.bytes - : (rvalue_from_python_stage2)(m_source, m_data.stage1, registered::converters) - ); - } - - template - inline extract_reference::extract_reference(PyObject* obj) - : m_source(obj) - , m_result( - (get_lvalue_from_python)(obj, registered::converters) - ) - { - } - - template - inline bool extract_reference::check() const - { - return m_result != 0; - } - - template - inline Ref extract_reference::operator()() const - { - if (m_result == 0) - (throw_no_reference_from_python)(m_source, registered::converters); - - return python::detail::void_ptr_to_reference(m_result, (Ref(*)())0); - } - - template - inline extract_pointer::extract_pointer(PyObject* obj) - : m_source(obj) - , m_result( - obj == Py_None ? 0 : (get_lvalue_from_python)(obj, registered_pointee::converters) - ) - { - } - - template - inline bool extract_pointer::check() const - { - return m_source == Py_None || m_result != 0; - } - - template - inline Ptr extract_pointer::operator()() const - { - if (m_result == 0 && m_source != Py_None) - (throw_no_pointer_from_python)(m_source, registered_pointee::converters); - - return Ptr(m_result); - } - - template - inline extract_object_manager::extract_object_manager(PyObject* obj) - : m_source(obj) - { - } - - template - inline bool extract_object_manager::check() const - { - return object_manager_traits::check(m_source); - } - - template - inline T extract_object_manager::operator()() const - { - return T( - object_manager_traits::adopt(python::incref(m_source)) - ); - } -} - -}} // namespace boost::python::converter - -#endif // EXTRACT_DWA200265_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/handle.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/handle.hpp deleted file mode 100644 index 461a219ad8..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/handle.hpp +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef HANDLE_DWA200269_HPP -# define HANDLE_DWA200269_HPP - -# include - -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -template struct null_ok; - -template -inline null_ok* allow_null(T* p) -{ - return (null_ok*)p; -} - -namespace detail -{ - template - inline T* manage_ptr(detail::borrowed >* p, int) - { - return python::xincref((T*)p); - } - - template - inline T* manage_ptr(null_ok >* p, int) - { - return python::xincref((T*)p); - } - - template - inline T* manage_ptr(detail::borrowed* p, long) - { - return python::incref(expect_non_null((T*)p)); - } - - template - inline T* manage_ptr(null_ok* p, long) - { - return (T*)p; - } - - template - inline T* manage_ptr(T* p, ...) - { - return expect_non_null(p); - } -} - -template -class handle -{ - typedef T* (handle::* bool_type )() const; - - public: // types - typedef T element_type; - - public: // member functions - handle(); - ~handle(); - - template - explicit handle(Y* p) - : m_p( - python::upcast( - detail::manage_ptr(p, 0) - ) - ) - { - } - - handle& operator=(handle const& r) - { - python::xdecref(m_p); - m_p = python::xincref(r.m_p); - return *this; - } - -#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1300) - - template - handle& operator=(handle const & r) // never throws - { - python::xdecref(m_p); - m_p = python::xincref(python::upcast(r.get())); - return *this; - } - -#endif - - template - handle(handle const& r) - : m_p(python::xincref(python::upcast(r.get()))) - { - } - - handle(handle const& r) - : m_p(python::xincref(r.m_p)) - { - } - - T* operator-> () const; - T& operator* () const; - T* get() const; - T* release(); - void reset(); - - operator bool_type() const // never throws - { - return m_p ? &handle::get : 0; - } - bool operator! () const; // never throws - - public: // implementation details -- do not touch - // Defining this in the class body suppresses a VC7 link failure - inline handle(detail::borrowed_reference x) - : m_p( - python::incref( - downcast((PyObject*)x) - )) - { - } - - private: // data members - T* m_p; -}; - -#ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -} // namespace python -#endif - -template inline T * get_pointer(python::handle const & p) -{ - return p.get(); -} - -#ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -namespace python { -#else - -// We don't want get_pointer above to hide the others -using boost::get_pointer; - -#endif - -typedef handle type_handle; - -// -// Compile-time introspection -// -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template -class is_handle -{ - public: - BOOST_STATIC_CONSTANT(bool, value = false); -}; - -template -class is_handle > -{ - public: - BOOST_STATIC_CONSTANT(bool, value = true); -}; -# else -namespace detail -{ - typedef char (&yes_handle_t)[1]; - typedef char (&no_handle_t)[2]; - - no_handle_t is_handle_test(...); - - template - yes_handle_t is_handle_test(boost::type< handle >); -} - -template -class is_handle -{ - public: - BOOST_STATIC_CONSTANT( - bool, value = ( - sizeof(detail::is_handle_test(boost::type())) - == sizeof(detail::yes_handle_t))); -}; -# endif - -// -// implementations -// -template -inline handle::handle() - : m_p(0) -{ -} - -template -inline handle::~handle() -{ - python::xdecref(m_p); -} - -template -inline T* handle::operator->() const -{ - return m_p; -} - -template -inline T& handle::operator*() const -{ - return *m_p; -} - -template -inline T* handle::get() const -{ - return m_p; -} - -template -inline bool handle::operator!() const -{ - return m_p == 0; -} - -template -inline T* handle::release() -{ - T* result = m_p; - m_p = 0; - return result; -} - -template -inline void handle::reset() -{ - python::xdecref(m_p); - m_p = 0; -} - -// Because get_managed_object must return a non-null PyObject*, we -// return Py_None if the handle is null. -template -inline PyObject* get_managed_object(handle const& h, tag_t) -{ - return h.get() ? python::upcast(h.get()) : Py_None; -} - -}} // namespace boost::python - - -#endif // HANDLE_DWA200269_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/handle_fwd.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/handle_fwd.hpp deleted file mode 100644 index 5987ec4fdb..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/handle_fwd.hpp +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef HANDLE_FWD_DWA2002615_HPP -# define HANDLE_FWD_DWA2002615_HPP - -# include - -namespace boost { namespace python { - -template class handle; - -}} // namespace boost::python - -#endif // HANDLE_FWD_DWA2002615_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/has_back_reference.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/has_back_reference.hpp deleted file mode 100644 index 67fe24c5cf..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/has_back_reference.hpp +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef HAS_BACK_REFERENCE_DWA2002323_HPP -# define HAS_BACK_REFERENCE_DWA2002323_HPP - -# include -# include - -namespace boost { namespace python { - -// traits class which users can specialize to indicate that a class -// contains a back-reference to its owning PyObject* -template -struct has_back_reference - : mpl::false_ -{ -}; - - -}} // namespace boost::python - -#endif // HAS_BACK_REFERENCE_DWA2002323_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/implicit.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/implicit.hpp deleted file mode 100644 index 4d01b2fb22..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/implicit.hpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef IMPLICIT_DWA2002325_HPP -# define IMPLICIT_DWA2002325_HPP - -# include -# include -# include -# include -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES -# include -#endif -# include - -namespace boost { namespace python { - -template -void implicitly_convertible(boost::type* = 0, boost::type* = 0) -{ - typedef converter::implicit functions; - - converter::registry::push_back( - &functions::convertible - , &functions::construct - , type_id() -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - , &converter::expected_from_python_type_direct::get_pytype -#endif - ); -} - -}} // namespace boost::python - -#endif // IMPLICIT_DWA2002325_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/import.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/import.hpp deleted file mode 100644 index 45c02a9366..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/import.hpp +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright Stefan Seefeld 2005. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef IMPORT_SS20050624_HPP -# define IMPORT_SS20050624_HPP - -# include -# include - -namespace boost -{ -namespace python -{ - -// Import the named module and return a reference to it. -object BOOST_PYTHON_DECL import(str name); - -} -} - -#endif diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/init.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/init.hpp deleted file mode 100644 index 6598fd3547..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/init.hpp +++ /dev/null @@ -1,421 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// Copyright David Abrahams 2002, Joel de Guzman, 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -/////////////////////////////////////////////////////////////////////////////// -#ifndef INIT_JDG20020820_HPP -#define INIT_JDG20020820_HPP - -# include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include - -/////////////////////////////////////////////////////////////////////////////// -#define BOOST_PYTHON_OVERLOAD_TYPES_WITH_DEFAULT \ - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \ - BOOST_PYTHON_MAX_ARITY, \ - class T, \ - mpl::void_) \ - -#define BOOST_PYTHON_OVERLOAD_TYPES \ - BOOST_PP_ENUM_PARAMS_Z(1, \ - BOOST_PYTHON_MAX_ARITY, \ - class T) \ - -#define BOOST_PYTHON_OVERLOAD_ARGS \ - BOOST_PP_ENUM_PARAMS_Z(1, \ - BOOST_PYTHON_MAX_ARITY, \ - T) \ - -/////////////////////////////////////////////////////////////////////////////// -namespace boost { namespace python { - -template -class init; // forward declaration - - -template -struct optional; // forward declaration - -namespace detail -{ - namespace error - { - template - struct more_keywords_than_init_arguments - { - typedef char too_many_keywords[init_args - keywords >= 0 ? 1 : -1]; - }; - } - - // is_optional::value - // - // This metaprogram checks if T is an optional - // -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - - template - struct is_optional { - - private: - - template - static boost::type_traits::yes_type f(optional); - static boost::type_traits::no_type f(...); - static T t(); - - public: - - BOOST_STATIC_CONSTANT( - bool, value = - sizeof(f(t())) == sizeof(::boost::type_traits::yes_type)); - typedef mpl::bool_ type; - }; - -#else - - template - struct is_optional - : mpl::false_ - {}; - - template - struct is_optional > - : mpl::true_ - {}; - -#endif - - template - struct define_class_init_helper; - -} // namespace detail - -template -struct init_base : def_visitor -{ - init_base(char const* doc_, detail::keyword_range const& keywords_) - : m_doc(doc_), m_keywords(keywords_) - {} - - init_base(char const* doc_) - : m_doc(doc_) - {} - - DerivedT const& derived() const - { - return *static_cast(this); - } - - char const* doc_string() const - { - return m_doc; - } - - detail::keyword_range const& keywords() const - { - return m_keywords; - } - - static default_call_policies call_policies() - { - return default_call_policies(); - } - - private: - // visit - // - // Defines a set of n_defaults + 1 constructors for its - // class_<...> argument. Each constructor after the first has - // one less argument to its right. Example: - // - // init > - // - // Defines: - // - // __init__(int, char, long, double) - // __init__(int, char, long) - // __init__(int, char) - // __init__(int) - template - void visit(classT& cl) const - { - typedef typename DerivedT::signature signature; - typedef typename DerivedT::n_arguments n_arguments; - typedef typename DerivedT::n_defaults n_defaults; - - detail::define_class_init_helper::apply( - cl - , derived().call_policies() - , signature() - , n_arguments() - , derived().doc_string() - , derived().keywords()); - } - - friend class python::def_visitor_access; - - private: // data members - char const* m_doc; - detail::keyword_range m_keywords; -}; - -template -class init_with_call_policies - : public init_base > -{ - typedef init_base > base; - public: - typedef typename InitT::n_arguments n_arguments; - typedef typename InitT::n_defaults n_defaults; - typedef typename InitT::signature signature; - - init_with_call_policies( - CallPoliciesT const& policies_ - , char const* doc_ - , detail::keyword_range const& keywords - ) - : base(doc_, keywords) - , m_policies(policies_) - {} - - CallPoliciesT const& call_policies() const - { - return this->m_policies; - } - - private: // data members - CallPoliciesT m_policies; -}; - -// -// drop1 is the initial length(S) elements of S -// -namespace detail -{ - template - struct drop1 - : mpl::iterator_range< - typename mpl::begin::type - , typename mpl::prior< - typename mpl::end::type - >::type - > - {}; -} - -template -class init : public init_base > -{ - typedef init_base > base; - public: - typedef init self_t; - - init(char const* doc_ = 0) - : base(doc_) - { - } - - template - init(char const* doc_, detail::keywords const& kw) - : base(doc_, kw.range()) - { - typedef typename detail::error::more_keywords_than_init_arguments< - N, n_arguments::value + 1 - >::too_many_keywords assertion; - } - - template - init(detail::keywords const& kw, char const* doc_ = 0) - : base(doc_, kw.range()) - { - typedef typename detail::error::more_keywords_than_init_arguments< - N, n_arguments::value + 1 - >::too_many_keywords assertion; - } - - template - init_with_call_policies - operator[](CallPoliciesT const& policies) const - { - return init_with_call_policies( - policies, this->doc_string(), this->keywords()); - } - - typedef detail::type_list signature_; - - typedef detail::is_optional< - typename mpl::eval_if< - mpl::empty - , mpl::false_ - , mpl::back - >::type - > back_is_optional; - - typedef typename mpl::eval_if< - back_is_optional - , mpl::back - , mpl::vector0<> - >::type optional_args; - - typedef typename mpl::eval_if< - back_is_optional - , mpl::if_< - mpl::empty - , detail::drop1 - , mpl::joint_view< - detail::drop1 - , optional_args - > - > - , signature_ - >::type signature; - - // TODO: static assert to make sure there are no other optional elements - - // Count the number of default args - typedef mpl::size n_defaults; - typedef mpl::size n_arguments; -}; - -/////////////////////////////////////////////////////////////////////////////// -// -// optional -// -// optional::type returns a typelist. -// -/////////////////////////////////////////////////////////////////////////////// -template -struct optional - : detail::type_list -{ -}; - -namespace detail -{ - template - inline void def_init_aux( - ClassT& cl - , Signature const& - , NArgs - , CallPoliciesT const& policies - , char const* doc - , detail::keyword_range const& keywords_ - ) - { - cl.def( - "__init__" - , detail::make_keyword_range_constructor( - policies - , keywords_ - , (typename ClassT::metadata::holder*)0 - ) - , doc - ); - } - - /////////////////////////////////////////////////////////////////////////////// - // - // define_class_init_helper::apply - // - // General case - // - // Accepts a class_ and an arguments list. Defines a constructor - // for the class given the arguments and recursively calls - // define_class_init_helper::apply with one fewer argument (the - // rightmost argument is shaved off) - // - /////////////////////////////////////////////////////////////////////////////// - template - struct define_class_init_helper - { - - template - static void apply( - ClassT& cl - , CallPoliciesT const& policies - , Signature const& args - , NArgs - , char const* doc - , detail::keyword_range keywords) - { - detail::def_init_aux(cl, args, NArgs(), policies, doc, keywords); - - if (keywords.second > keywords.first) - --keywords.second; - - typedef typename mpl::prior::type next_nargs; - define_class_init_helper::apply( - cl, policies, Signature(), next_nargs(), doc, keywords); - } - }; - - /////////////////////////////////////////////////////////////////////////////// - // - // define_class_init_helper<0>::apply - // - // Terminal case - // - // Accepts a class_ and an arguments list. Defines a constructor - // for the class given the arguments. - // - /////////////////////////////////////////////////////////////////////////////// - template <> - struct define_class_init_helper<0> { - - template - static void apply( - ClassT& cl - , CallPoliciesT const& policies - , Signature const& args - , NArgs - , char const* doc - , detail::keyword_range const& keywords) - { - detail::def_init_aux(cl, args, NArgs(), policies, doc, keywords); - } - }; -} - -}} // namespace boost::python - -#undef BOOST_PYTHON_OVERLOAD_TYPES_WITH_DEFAULT -#undef BOOST_PYTHON_OVERLOAD_TYPES -#undef BOOST_PYTHON_OVERLOAD_ARGS -#undef BOOST_PYTHON_IS_OPTIONAL_VALUE -#undef BOOST_PYTHON_APPEND_TO_INIT - -/////////////////////////////////////////////////////////////////////////////// -#endif // INIT_JDG20020820_HPP - - - - - - - - diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/instance_holder.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/instance_holder.hpp deleted file mode 100644 index 0916348ef6..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/instance_holder.hpp +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef INSTANCE_HOLDER_DWA2002517_HPP -# define INSTANCE_HOLDER_DWA2002517_HPP - -# include - -# include -# include -# include - -namespace boost { namespace python { - -// Base class for all holders -struct BOOST_PYTHON_DECL instance_holder : private noncopyable -{ - public: - instance_holder(); - virtual ~instance_holder(); - - // return the next holder in a chain - instance_holder* next() const; - - // When the derived holder actually holds by [smart] pointer and - // null_ptr_only is set, only report that the type is held when - // the pointer is null. This is needed for proper shared_ptr - // support, to prevent holding shared_ptrs from being found when - // converting from python so that we can use the conversion method - // that always holds the Python object. - virtual void* holds(type_info, bool null_ptr_only) = 0; - - void install(PyObject* inst) throw(); - - // These functions should probably be located elsewhere. - - // Allocate storage for an object of the given size at the given - // offset in the Python instance<> object if bytes are available - // there. Otherwise allocate size bytes of heap memory. - static void* allocate(PyObject*, std::size_t offset, std::size_t size); - - // Deallocate storage from the heap if it was not carved out of - // the given Python object by allocate(), above. - static void deallocate(PyObject*, void* storage) throw(); - private: - instance_holder* m_next; -}; - -// This macro is needed for implementation of derived holders -# define BOOST_PYTHON_UNFORWARD(N,ignored) (typename unforward::type)(a##N) - -// -// implementation -// -inline instance_holder* instance_holder::next() const -{ - return m_next; -} - -}} // namespace boost::python - -#endif // INSTANCE_HOLDER_DWA2002517_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/iterator.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/iterator.hpp deleted file mode 100644 index a64a920735..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/iterator.hpp +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef ITERATOR_DWA2002512_HPP -# define ITERATOR_DWA2002512_HPP - -# include - -# include -# include -# include - -# include -# include - -# if defined(BOOST_MSVC) && (BOOST_MSVC == 1400) /* -> warning C4180: qualifier applied to function type has no meaning; ignored -Peter Dimov wrote: -This warning is caused by an overload resolution bug in VC8 that cannot be -worked around and will probably not be fixed by MS in the VC8 line. The -problematic overload is only instantiated and never called, and the code -works correctly. */ -# pragma warning(disable: 4180) -# endif - -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - // Adds an additional layer of binding to - // objects::make_iterator(...), which allows us to pass member - // function and member data pointers. - template - inline object make_iterator( - Accessor1 get_start - , Accessor2 get_finish - , NextPolicies next_policies - , Target&(*)() - ) - { - return objects::make_iterator_function( - boost::protect(boost::bind(get_start, _1)) - , boost::protect(boost::bind(get_finish, _1)) - , next_policies - ); - } - - // Guts of template class iterators<>, below. - template - struct iterators_impl - { - template - struct apply - { - typedef typename T::iterator iterator; - static iterator begin(T& x) { return x.begin(); } - static iterator end(T& x) { return x.end(); } - }; - }; - - template <> - struct iterators_impl - { - template - struct apply - { - typedef typename T::const_iterator iterator; - static iterator begin(T& x) { return x.begin(); } - static iterator end(T& x) { return x.end(); } - }; - }; -} - -// An "ordinary function generator" which contains static begin(x) and -// end(x) functions that invoke T::begin() and T::end(), respectively. -template -struct iterators - : detail::iterators_impl< - boost::is_const::value - >::template apply -{ -}; - -// Create an iterator-building function which uses the given -// accessors. Deduce the Target type from the accessors. The iterator -// returns copies of the inderlying elements. -template -object range(Accessor1 start, Accessor2 finish) -{ - return detail::make_iterator( - start, finish - , objects::default_iterator_call_policies() - , detail::target(start) - ); -} - -// Create an iterator-building function which uses the given accessors -// and next() policies. Deduce the Target type. -template -object range(Accessor1 start, Accessor2 finish, NextPolicies* = 0) -{ - return detail::make_iterator(start, finish, NextPolicies(), detail::target(start)); -} - -// Create an iterator-building function which uses the given accessors -// and next() policies, operating on the given Target type -template -object range(Accessor1 start, Accessor2 finish, NextPolicies* = 0, boost::type* = 0) -{ - // typedef typename add_reference::type target; - return detail::make_iterator(start, finish, NextPolicies(), (Target&(*)())0); -} - -// A Python callable object which produces an iterator traversing -// [x.begin(), x.end()), where x is an instance of the Container -// type. NextPolicies are used as the CallPolicies for the iterator's -// next() function. -template -struct iterator : object -{ - iterator() - : object( - python::range( - &iterators::begin, &iterators::end - )) - { - } -}; - -}} // namespace boost::python - -#endif // ITERATOR_DWA2002512_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/list.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/list.hpp deleted file mode 100644 index 10fd40fda5..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/list.hpp +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef LIST_DWA2002627_HPP -# define LIST_DWA2002627_HPP - -# include - -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - struct BOOST_PYTHON_DECL list_base : object - { - void append(object_cref); // append object to end - - ssize_t count(object_cref value) const; // return number of occurrences of value - - void extend(object_cref sequence); // extend list by appending sequence elements - - long index(object_cref value) const; // return index of first occurrence of value - - void insert(ssize_t index, object_cref); // insert object before index - void insert(object const& index, object_cref); - - object pop(); // remove and return item at index (default last) - object pop(ssize_t index); - object pop(object const& index); - - void remove(object_cref value); // remove first occurrence of value - - void reverse(); // reverse *IN PLACE* - - void sort(); // sort *IN PLACE*; if given, cmpfunc(x, y) -> -1, 0, 1 -#if PY_VERSION_HEX >= 0x03000000 - void sort(args_proxy const &args, - kwds_proxy const &kwds); -#else - void sort(object_cref cmpfunc); -#endif - - protected: - list_base(); // new list - explicit list_base(object_cref sequence); // new list initialized from sequence's items - - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(list_base, object) - private: - static detail::new_non_null_reference call(object const&); - }; -} - -class list : public detail::list_base -{ - typedef detail::list_base base; - public: - list() {} // new list - - template - explicit list(T const& sequence) - : base(object(sequence)) - { - } - - template - void append(T const& x) - { - base::append(object(x)); - } - - template - long count(T const& value) const - { - return base::count(object(value)); - } - - template - void extend(T const& x) - { - base::extend(object(x)); - } - - template - long index(T const& x) const - { - return base::index(object(x)); - } - - template - void insert(ssize_t index, T const& x) // insert object before index - { - base::insert(index, object(x)); - } - - template - void insert(object const& index, T const& x) // insert object before index - { - base::insert(index, object(x)); - } - - object pop() { return base::pop(); } - object pop(ssize_t index) { return base::pop(index); } - - template - object pop(T const& index) - { - return base::pop(object(index)); - } - - template - void remove(T const& value) - { - base::remove(object(value)); - } - -#if PY_VERSION_HEX <= 0x03000000 - void sort() { base::sort(); } - - template - void sort(T const& value) - { - base::sort(object(value)); - } -#endif - - public: // implementation detail -- for internal use only - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(list, base) -}; - -// -// Converter Specializations -// -namespace converter -{ - template <> - struct object_manager_traits - : pytype_object_manager_traits<&PyList_Type,list> - { - }; -} - -}} // namespace boost::python - -#endif // LIST_DWA2002627_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/long.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/long.hpp deleted file mode 100644 index 129c61f9e4..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/long.hpp +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef LONG_DWA2002627_HPP -# define LONG_DWA2002627_HPP - -# include - -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - struct BOOST_PYTHON_DECL long_base : object - { - protected: - long_base(); // new long_ - explicit long_base(object_cref rhs); - explicit long_base(object_cref rhs, object_cref base); - - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(long_base, object) - - private: - static detail::new_non_null_reference call(object const&); - static detail::new_non_null_reference call(object const&, object const&); - }; -} - -class long_ : public detail::long_base -{ - typedef detail::long_base base; - public: - long_() {} // new long_ - - template - explicit long_(T const& rhs) - : detail::long_base(object(rhs)) - { - } - - template - explicit long_(T const& rhs, U const& base) - : detail::long_base(object(rhs), object(base)) - { - } - - public: // implementation detail -- for internal use only - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(long_, base) -}; - -// -// Converter Specializations -// -namespace converter -{ - template <> - struct object_manager_traits - : pytype_object_manager_traits<&PyLong_Type,long_> - { - }; -} - -}} // namespace boost::python - -#endif // LONG_DWA2002627_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/lvalue_from_pytype.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/lvalue_from_pytype.hpp deleted file mode 100644 index e15dfbbb85..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/lvalue_from_pytype.hpp +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef LVALUE_FROM_PYTYPE_DWA2002130_HPP -# define LVALUE_FROM_PYTYPE_DWA2002130_HPP - -# include -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES -# include -#endif - -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - // Given a pointer-to-function of 1 parameter returning a reference - // type, return the type_id of the function's return type. - template - inline type_info extractor_type_id(T&(*)(U)) - { - return type_id(); - } - - // A function generator whose static execute() function is an lvalue - // from_python converter using the given Extractor. U is expected to - // be the actual type of the PyObject instance from which the result - // is being extracted. - template - struct normalized_extractor - { - static inline void* execute(PyObject* op) - { - typedef typename boost::add_reference::type param; - return &Extractor::execute( - boost::python::detail::void_ptr_to_reference( - op, (param(*)())0 ) - ); - } - }; - - // Given an Extractor type and a pointer to its execute function, - // return a new object whose static execute function does the same - // job but is a conforming lvalue from_python conversion function. - // - // usage: normalize(&Extractor::execute) - template - inline normalized_extractor - normalize(T(*)(U), Extractor* = 0) - { - return normalized_extractor(); - } -} - -// An Extractor which extracts the given member from a Python object -// whose instances are stored as InstanceType. -template -struct extract_member -{ - static MemberType& execute(InstanceType& c) - { - (void)Py_TYPE(&c); // static assertion - return c.*member; - } -}; - -// An Extractor which simply extracts the entire python object -// instance of InstanceType. -template -struct extract_identity -{ - static InstanceType& execute(InstanceType& c) - { - (void)Py_TYPE(&c); // static assertion - return c; - } -}; - -// Registers a from_python conversion which extracts lvalues using -// Extractor's static execute function from Python objects whose type -// object is python_type. -template -struct lvalue_from_pytype -{ - lvalue_from_pytype() - { - converter::registry::insert - ( &extract - , detail::extractor_type_id(&Extractor::execute) -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - , &get_pytype -#endif - ); - } - private: - static void* extract(PyObject* op) - { - return PyObject_TypeCheck(op, const_cast(python_type)) - ? const_cast( - static_cast( - detail::normalize(&Extractor::execute).execute(op))) - : 0 - ; - } -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - static PyTypeObject const*get_pytype() { return python_type; } -#endif -}; - -}} // namespace boost::python - -#endif // LVALUE_FROM_PYTYPE_DWA2002130_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/make_constructor.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/make_constructor.hpp deleted file mode 100644 index 8ae722bbe3..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/make_constructor.hpp +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright David Abrahams 2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef MAKE_CONSTRUCTOR_DWA20011221_HPP -# define MAKE_CONSTRUCTOR_DWA20011221_HPP - -# include - -# include -# include -# include - -# include -# include -# include -# include - -# include -# include - -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - template - struct install_holder : converter::context_result_converter - { - install_holder(PyObject* args_) - : m_self(PyTuple_GetItem(args_, 0)) {} - - PyObject* operator()(T x) const - { - dispatch(x, is_pointer()); - return none(); - } - - private: - template - void dispatch(U* x, mpl::true_) const - { - std::auto_ptr owner(x); - dispatch(owner, mpl::false_()); - } - - template - void dispatch(Ptr x, mpl::false_) const - { - typedef typename pointee::type value_type; - typedef objects::pointer_holder holder; - typedef objects::instance instance_t; - - void* memory = holder::allocate(this->m_self, offsetof(instance_t, storage), sizeof(holder)); - try { - (new (memory) holder(x))->install(this->m_self); - } - catch(...) { - holder::deallocate(this->m_self, memory); - throw; - } - } - - PyObject* m_self; - }; - - struct constructor_result_converter - { - template - struct apply - { - typedef install_holder type; - }; - }; - - template - struct offset_args - { - offset_args(BaseArgs base_) : base(base_) {} - BaseArgs base; - }; - - template - inline PyObject* get(mpl::int_, offset_args const& args_) - { - return get(mpl::int_<(N+Offset::value)>(), args_.base); - } - - template - inline unsigned arity(offset_args const& args_) - { - return arity(args_.base) - Offset::value; - } - - template - struct constructor_policy : BasePolicy_ - { - constructor_policy(BasePolicy_ base) : BasePolicy_(base) {} - - // If the BasePolicy_ supplied a result converter it would be - // ignored; issue an error if it's not the default. -#if defined _MSC_VER && _MSC_VER < 1300 - typedef is_same< - typename BasePolicy_::result_converter - , default_result_converter - > same_result_converter; - //see above for explanation - BOOST_STATIC_ASSERT(same_result_converter::value) ; -#else - BOOST_MPL_ASSERT_MSG( - (is_same< - typename BasePolicy_::result_converter - , default_result_converter - >::value) - , MAKE_CONSTRUCTOR_SUPPLIES_ITS_OWN_RESULT_CONVERTER_THAT_WOULD_OVERRIDE_YOURS - , (typename BasePolicy_::result_converter) - ); -#endif - typedef constructor_result_converter result_converter; - typedef offset_args > argument_package; - }; - - template - struct outer_constructor_signature - { - typedef typename mpl::pop_front::type inner_args; - typedef typename mpl::push_front::type outer_args; - typedef typename mpl::push_front::type type; - }; - - // ETI workaround - template <> - struct outer_constructor_signature - { - typedef int type; - }; - - // - // These helper functions for make_constructor (below) do the raw work - // of constructing a Python object from some invokable entity. See - // for more information about how - // the Sig arguments is used. - // - // @group make_constructor_aux { - template - object make_constructor_aux( - F f // An object that can be invoked by detail::invoke() - , CallPolicies const& p // CallPolicies to use in the invocation - , Sig const& // An MPL sequence of argument types expected by F - ) - { - typedef typename outer_constructor_signature::type outer_signature; - - typedef constructor_policy inner_policy; - - return objects::function_object( - objects::py_function( - detail::caller(f, inner_policy(p)) - , outer_signature() - ) - ); - } - - // As above, except that it accepts argument keywords. NumKeywords - // is used only for a compile-time assertion to make sure the user - // doesn't pass more keywords than the function can accept. To - // disable all checking, pass mpl::int_<0> for NumKeywords. - template - object make_constructor_aux( - F f - , CallPolicies const& p - , Sig const& - , detail::keyword_range const& kw // a [begin,end) pair of iterators over keyword names - , NumKeywords // An MPL integral type wrapper: the size of kw - ) - { - enum { arity = mpl::size::value - 1 }; - - typedef typename detail::error::more_keywords_than_function_arguments< - NumKeywords::value, arity - >::too_many_keywords assertion; - - typedef typename outer_constructor_signature::type outer_signature; - - typedef constructor_policy inner_policy; - - return objects::function_object( - objects::py_function( - detail::caller(f, inner_policy(p)) - , outer_signature() - ) - , kw - ); - } - // } - - // - // These dispatch functions are used to discriminate between the - // cases when the 3rd argument is keywords or when it is a - // signature. - // - // @group Helpers for make_constructor when called with 3 arguments. { - // - template - object make_constructor_dispatch(F f, CallPolicies const& policies, Keywords const& kw, mpl::true_) - { - return detail::make_constructor_aux( - f - , policies - , detail::get_signature(f) - , kw.range() - , mpl::int_() - ); - } - - template - object make_constructor_dispatch(F f, CallPolicies const& policies, Signature const& sig, mpl::false_) - { - return detail::make_constructor_aux( - f - , policies - , sig - ); - } - // } -} - -// These overloaded functions wrap a function or member function -// pointer as a Python object, using optional CallPolicies, -// Keywords, and/or Signature. @group { -// -template -object make_constructor(F f) -{ - return detail::make_constructor_aux( - f,default_call_policies(), detail::get_signature(f)); -} - -template -object make_constructor(F f, CallPolicies const& policies) -{ - return detail::make_constructor_aux( - f, policies, detail::get_signature(f)); -} - -template -object make_constructor( - F f - , CallPolicies const& policies - , KeywordsOrSignature const& keywords_or_signature) -{ - typedef typename - detail::is_reference_to_keywords::type - is_kw; - - return detail::make_constructor_dispatch( - f - , policies - , keywords_or_signature - , is_kw() - ); -} - -template -object make_constructor( - F f - , CallPolicies const& policies - , Keywords const& kw - , Signature const& sig - ) -{ - return detail::make_constructor_aux( - f - , policies - , sig - , kw.range() - , mpl::int_() - ); -} -// } - -}} - - -#endif // MAKE_CONSTRUCTOR_DWA20011221_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/make_function.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/make_function.hpp deleted file mode 100644 index f2f2a9e545..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/make_function.hpp +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright David Abrahams 2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef MAKE_FUNCTION_DWA20011221_HPP -# define MAKE_FUNCTION_DWA20011221_HPP - -# include - -# include -# include -# include - -# include - -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - // make_function_aux -- - // - // These helper functions for make_function (below) do the raw work - // of constructing a Python object from some invokable entity. See - // for more information about how - // the Sig arguments is used. - template - object make_function_aux( - F f // An object that can be invoked by detail::invoke() - , CallPolicies const& p // CallPolicies to use in the invocation - , Sig const& // An MPL sequence of argument types expected by F - ) - { - return objects::function_object( - detail::caller(f, p) - ); - } - - // As above, except that it accepts argument keywords. NumKeywords - // is used only for a compile-time assertion to make sure the user - // doesn't pass more keywords than the function can accept. To - // disable all checking, pass mpl::int_<0> for NumKeywords. - template - object make_function_aux( - F f - , CallPolicies const& p - , Sig const& - , detail::keyword_range const& kw // a [begin,end) pair of iterators over keyword names - , NumKeywords // An MPL integral type wrapper: the size of kw - ) - { - enum { arity = mpl::size::value - 1 }; - - typedef typename detail::error::more_keywords_than_function_arguments< - NumKeywords::value, arity - >::too_many_keywords assertion; - - return objects::function_object( - detail::caller(f, p) - , kw); - } - - // Helpers for make_function when called with 3 arguments. These - // dispatch functions are used to discriminate between the cases - // when the 3rd argument is keywords or when it is a signature. - // - // @group { - template - object make_function_dispatch(F f, CallPolicies const& policies, Keywords const& kw, mpl::true_) - { - return detail::make_function_aux( - f - , policies - , detail::get_signature(f) - , kw.range() - , mpl::int_() - ); - } - - template - object make_function_dispatch(F f, CallPolicies const& policies, Signature const& sig, mpl::false_) - { - return detail::make_function_aux( - f - , policies - , sig - ); - } - // } - - } - -// These overloaded functions wrap a function or member function -// pointer as a Python object, using optional CallPolicies, -// Keywords, and/or Signature. -// -// @group { -template -object make_function(F f) -{ - return detail::make_function_aux( - f,default_call_policies(), detail::get_signature(f)); -} - -template -object make_function(F f, CallPolicies const& policies) -{ - return detail::make_function_aux( - f, policies, detail::get_signature(f)); -} - -template -object make_function( - F f - , CallPolicies const& policies - , KeywordsOrSignature const& keywords_or_signature) -{ - typedef typename - detail::is_reference_to_keywords::type - is_kw; - - return detail::make_function_dispatch( - f - , policies - , keywords_or_signature - , is_kw() - ); -} - -template -object make_function( - F f - , CallPolicies const& policies - , Keywords const& kw - , Signature const& sig - ) -{ - return detail::make_function_aux( - f - , policies - , sig - , kw.range() - , mpl::int_() - ); -} -// } - -}} - - -#endif // MAKE_FUNCTION_DWA20011221_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/manage_new_object.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/manage_new_object.hpp deleted file mode 100644 index d81421dace..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/manage_new_object.hpp +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef MANAGE_NEW_OBJECT_DWA200222_HPP -# define MANAGE_NEW_OBJECT_DWA200222_HPP - -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - template - struct manage_new_object_requires_a_pointer_return_type -# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__) - {} -# endif - ; -} - -struct manage_new_object -{ - template - struct apply - { - typedef typename mpl::if_c< - boost::is_pointer::value - , to_python_indirect - , detail::manage_new_object_requires_a_pointer_return_type - >::type type; - }; -}; - -}} // namespace boost::python - -#endif // MANAGE_NEW_OBJECT_DWA200222_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/module.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/module.hpp deleted file mode 100644 index 8ad69f5a34..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/module.hpp +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright David Abrahams 2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef MODULE_DWA2001128_HPP -# define MODULE_DWA2001128_HPP - -# include - -# include -# define BOOST_PYTHON_MODULE BOOST_PYTHON_MODULE_INIT - -#endif // MODULE_DWA20011221_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/module_init.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/module_init.hpp deleted file mode 100644 index 54d87e4b41..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/module_init.hpp +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef MODULE_INIT_DWA20020722_HPP -# define MODULE_INIT_DWA20020722_HPP - -# include -# include -# include - -# ifndef BOOST_PYTHON_MODULE_INIT - -namespace boost { namespace python { namespace detail { - -# if PY_VERSION_HEX >= 0x03000000 - -BOOST_PYTHON_DECL PyObject* init_module(PyModuleDef&, void(*)()); - -#else - -BOOST_PYTHON_DECL PyObject* init_module(char const* name, void(*)()); - -#endif - -}}} - -# if PY_VERSION_HEX >= 0x03000000 - -# define _BOOST_PYTHON_MODULE_INIT(name) \ - PyObject* BOOST_PP_CAT(PyInit_, name)() \ - { \ - static PyModuleDef_Base initial_m_base = { \ - PyObject_HEAD_INIT(NULL) \ - 0, /* m_init */ \ - 0, /* m_index */ \ - 0 /* m_copy */ }; \ - static PyMethodDef initial_methods[] = { { 0, 0, 0, 0 } }; \ - \ - static struct PyModuleDef moduledef = { \ - initial_m_base, \ - BOOST_PP_STRINGIZE(name), \ - 0, /* m_doc */ \ - -1, /* m_size */ \ - initial_methods, \ - 0, /* m_reload */ \ - 0, /* m_traverse */ \ - 0, /* m_clear */ \ - 0, /* m_free */ \ - }; \ - \ - return boost::python::detail::init_module( \ - moduledef, BOOST_PP_CAT(init_module_, name) ); \ - } \ - void BOOST_PP_CAT(init_module_, name)() - -# else - -# define _BOOST_PYTHON_MODULE_INIT(name) \ - void BOOST_PP_CAT(init,name)() \ -{ \ - boost::python::detail::init_module( \ - BOOST_PP_STRINGIZE(name),&BOOST_PP_CAT(init_module_,name)); \ -} \ - void BOOST_PP_CAT(init_module_,name)() - -# endif - -# if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(BOOST_PYTHON_STATIC_MODULE) - -# define BOOST_PYTHON_MODULE_INIT(name) \ - void BOOST_PP_CAT(init_module_,name)(); \ -extern "C" __declspec(dllexport) _BOOST_PYTHON_MODULE_INIT(name) - -# elif BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY - -# define BOOST_PYTHON_MODULE_INIT(name) \ - void BOOST_PP_CAT(init_module_,name)(); \ -extern "C" __attribute__ ((visibility("default"))) _BOOST_PYTHON_MODULE_INIT(name) - -# else - -# define BOOST_PYTHON_MODULE_INIT(name) \ - void BOOST_PP_CAT(init_module_,name)(); \ -extern "C" _BOOST_PYTHON_MODULE_INIT(name) - -# endif - -# endif - -#endif // MODULE_INIT_DWA20020722_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/numeric.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/numeric.hpp deleted file mode 100644 index ab4db8c32e..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/numeric.hpp +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef NUMARRAY_DWA2002922_HPP -# define NUMARRAY_DWA2002922_HPP - -# include - -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace numeric { - -class array; - -namespace aux -{ - struct BOOST_PYTHON_DECL array_base : object - { -# define BOOST_PP_LOCAL_MACRO(n) \ - array_base(BOOST_PP_ENUM_PARAMS_Z(1, n, object const& x)); -# define BOOST_PP_LOCAL_LIMITS (1, 7) -# include BOOST_PP_LOCAL_ITERATE() - - object argmax(long axis=-1); - object argmin(long axis=-1); - object argsort(long axis=-1); - object astype(object const& type = object()); - void byteswap(); - object copy() const; - object diagonal(long offset = 0, long axis1 = 0, long axis2 = 1) const; - void info() const; - bool is_c_array() const; - bool isbyteswapped() const; - array new_(object type) const; - void sort(); - object trace(long offset = 0, long axis1 = 0, long axis2 = 1) const; - object type() const; - char typecode() const; - - object factory( - object const& sequence = object() - , object const& typecode = object() - , bool copy = true - , bool savespace = false - , object type = object() - , object shape = object()); - - object getflat() const; - long getrank() const; - object getshape() const; - bool isaligned() const; - bool iscontiguous() const; - long itemsize() const; - long nelements() const; - object nonzero() const; - - void put(object const& indices, object const& values); - - void ravel(); - - object repeat(object const& repeats, long axis=0); - - void resize(object const& shape); - - void setflat(object const& flat); - void setshape(object const& shape); - - void swapaxes(long axis1, long axis2); - - object take(object const& sequence, long axis = 0) const; - - void tofile(object const& file) const; - - str tostring() const; - - void transpose(object const& axes = object()); - - object view() const; - - public: // implementation detail - do not touch. - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(array_base, object); - }; - - struct BOOST_PYTHON_DECL array_object_manager_traits - { - static bool check(PyObject* obj); - static detail::new_non_null_reference adopt(PyObject* obj); - static PyTypeObject const* get_pytype() ; - }; -} // namespace aux - -class array : public aux::array_base -{ - typedef aux::array_base base; - public: - - object astype() { return base::astype(); } - - template - object astype(Type const& type_) - { - return base::astype(object(type_)); - } - - template - array new_(Type const& type_) const - { - return base::new_(object(type_)); - } - - template - void resize(Sequence const& x) - { - base::resize(object(x)); - } - -# define BOOST_PP_LOCAL_MACRO(n) \ - void resize(BOOST_PP_ENUM_PARAMS_Z(1, n, long x)) \ - { \ - resize(make_tuple(BOOST_PP_ENUM_PARAMS_Z(1, n, x))); \ - } -# define BOOST_PP_LOCAL_LIMITS (1, BOOST_PYTHON_MAX_ARITY) -# include BOOST_PP_LOCAL_ITERATE() - - template - void setshape(Sequence const& x) - { - base::setshape(object(x)); - } - -# define BOOST_PP_LOCAL_MACRO(n) \ - void setshape(BOOST_PP_ENUM_PARAMS_Z(1, n, long x)) \ - { \ - setshape(make_tuple(BOOST_PP_ENUM_PARAMS_Z(1, n, x))); \ - } -# define BOOST_PP_LOCAL_LIMITS (1, BOOST_PYTHON_MAX_ARITY) -# include BOOST_PP_LOCAL_ITERATE() - - template - void put(Indices const& indices, Values const& values) - { - base::put(object(indices), object(values)); - } - - template - object take(Sequence const& sequence, long axis = 0) - { - return base::take(object(sequence), axis); - } - - template - void tofile(File const& f) const - { - base::tofile(object(f)); - } - - object factory() - { - return base::factory(); - } - - template - object factory(Sequence const& sequence) - { - return base::factory(object(sequence)); - } - - template - object factory( - Sequence const& sequence - , Typecode const& typecode_ - , bool copy = true - , bool savespace = false - ) - { - return base::factory(object(sequence), object(typecode_), copy, savespace); - } - - template - object factory( - Sequence const& sequence - , Typecode const& typecode_ - , bool copy - , bool savespace - , Type const& type - ) - { - return base::factory(object(sequence), object(typecode_), copy, savespace, object(type)); - } - - template - object factory( - Sequence const& sequence - , Typecode const& typecode_ - , bool copy - , bool savespace - , Type const& type - , Shape const& shape - ) - { - return base::factory(object(sequence), object(typecode_), copy, savespace, object(type), object(shape)); - } - -# define BOOST_PYTHON_ENUM_AS_OBJECT(z, n, x) object(BOOST_PP_CAT(x,n)) -# define BOOST_PP_LOCAL_MACRO(n) \ - template \ - explicit array(BOOST_PP_ENUM_BINARY_PARAMS_Z(1, n, T, const& x)) \ - : base(BOOST_PP_ENUM_1(n, BOOST_PYTHON_ENUM_AS_OBJECT, x)) \ - {} -# define BOOST_PP_LOCAL_LIMITS (1, 7) -# include BOOST_PP_LOCAL_ITERATE() -# undef BOOST_PYTHON_AS_OBJECT - - static BOOST_PYTHON_DECL void set_module_and_type(char const* package_name = 0, char const* type_attribute_name = 0); - static BOOST_PYTHON_DECL std::string get_module_name(); - - public: // implementation detail -- for internal use only - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(array, base); -}; - -} // namespace boost::python::numeric - -namespace converter -{ - template <> - struct object_manager_traits< numeric::array > - : numeric::aux::array_object_manager_traits - { - BOOST_STATIC_CONSTANT(bool, is_specialized = true); - }; -} - -}} // namespace boost::python - -#endif // NUMARRAY_DWA2002922_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object.hpp deleted file mode 100644 index 9adec90f64..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object.hpp +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OBJECT_DWA2002612_HPP -# define OBJECT_DWA2002612_HPP - -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { - - inline ssize_t len(object const& obj) - { - ssize_t result = PyObject_Length(obj.ptr()); - if (PyErr_Occurred()) throw_error_already_set(); - return result; - } - -}} // namespace boost::python - -#endif // OBJECT_DWA2002612_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/add_to_namespace.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/add_to_namespace.hpp deleted file mode 100644 index 9f4167d6d2..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/add_to_namespace.hpp +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef ADD_TO_NAMESPACE_DWA200286_HPP -# define ADD_TO_NAMESPACE_DWA200286_HPP - -# include - -namespace boost { namespace python { namespace objects { - -// -// A setattr that's "smart" about function overloading (and docstrings). -// -BOOST_PYTHON_DECL void add_to_namespace( - object const& name_space, char const* name, object const& attribute); - -BOOST_PYTHON_DECL void add_to_namespace( - object const& name_space, char const* name, object const& attribute, char const* doc); - -}}} // namespace boost::python::objects - -#endif // ADD_TO_NAMESPACE_DWA200286_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/class.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/class.hpp deleted file mode 100644 index 6aad45e786..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/class.hpp +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright David Abrahams 2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef CLASS_DWA20011214_HPP -# define CLASS_DWA20011214_HPP - -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -namespace objects { - -struct BOOST_PYTHON_DECL class_base : python::api::object -{ - // constructor - class_base( - char const* name // The name of the class - - , std::size_t num_types // A list of class_ids. The first is the type - , type_info const*const types // this is wrapping. The rest are the types of - // any bases. - - , char const* doc = 0 // Docstring, if any. - ); - - - // Implementation detail. Hiding this in the private section would - // require use of template friend declarations. - void enable_pickling_(bool getstate_manages_dict); - - protected: - void add_property( - char const* name, object const& fget, char const* docstr); - void add_property(char const* name, - object const& fget, object const& fset, char const* docstr); - - void add_static_property(char const* name, object const& fget); - void add_static_property(char const* name, object const& fget, object const& fset); - - // Retrieve the underlying object - void setattr(char const* name, object const&); - - // Set a special attribute in the class which tells Boost.Python - // to allocate extra bytes for embedded C++ objects in Python - // instances. - void set_instance_size(std::size_t bytes); - - // Set an __init__ function which throws an appropriate exception - // for abstract classes. - void def_no_init(); - - // Effects: - // setattr(self, staticmethod(getattr(self, method_name))) - void make_method_static(const char *method_name); -}; - -}}} // namespace boost::python::objects - -#endif // CLASS_DWA20011214_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/class_detail.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/class_detail.hpp deleted file mode 100644 index a17a4f4330..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/class_detail.hpp +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef CLASS_DETAIL_DWA200295_HPP -# define CLASS_DETAIL_DWA200295_HPP - -# include -# include - -namespace boost { namespace python { namespace objects { - -BOOST_PYTHON_DECL type_handle registered_class_object(type_info id); -BOOST_PYTHON_DECL type_handle class_metatype(); -BOOST_PYTHON_DECL type_handle class_type(); - -}}} // namespace boost::python::object - -#endif // CLASS_DETAIL_DWA200295_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/class_metadata.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/class_metadata.hpp deleted file mode 100644 index 155ae35d06..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/class_metadata.hpp +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright David Abrahams 2004. Distributed under the Boost -// Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef CLASS_METADATA_DWA2004719_HPP -# define CLASS_METADATA_DWA2004719_HPP -# include - -# include -# include -# include -# include -# include -# include - -# include -# include - -# include -# include - -# include -# include -# include - -# include -# include -# include -# include -# include -# include -# include -# include - -# include -# include - -# include - -# include -# include - -namespace boost { namespace python { namespace objects { - -BOOST_PYTHON_DECL -void copy_class_object(type_info const& src, type_info const& dst); - -// -// Support for registering base/derived relationships -// -template -struct register_base_of -{ - template - inline void operator()(Base*) const - { -# if !BOOST_WORKAROUND(BOOST_MSVC, == 1200) - BOOST_MPL_ASSERT_NOT((is_same)); -# else - BOOST_STATIC_ASSERT(!(is_same::value)); -# endif - - // Register the Base class - register_dynamic_id(); - - // Register the up-cast - register_conversion(false); - - // Register the down-cast, if appropriate. - this->register_downcast((Base*)0, is_polymorphic()); - } - - private: - static inline void register_downcast(void*, mpl::false_) {} - - template - static inline void register_downcast(Base*, mpl::true_) - { - register_conversion(true); - } - -}; - -// -// Preamble of register_class. Also used for callback classes, which -// need some registration of their own. -// -template -inline void register_shared_ptr_from_python_and_casts(T*, Bases) -{ - // Constructor performs registration - python::detail::force_instantiate(converter::shared_ptr_from_python()); - - // - // register all up/downcasts here. We're using the alternate - // interface to mpl::for_each to avoid an MSVC 6 bug. - // - register_dynamic_id(); - mpl::for_each(register_base_of(), (Bases*)0, (add_pointer*)0); -} - -// -// Helper for choosing the unnamed held_type argument -// -template -struct select_held_type - : mpl::if_< - mpl::or_< - python::detail::specifies_bases - , is_same - > - , Prev - , T - > -{ -}; - -template < - class T // class being wrapped - , class X1 // = detail::not_specified - , class X2 // = detail::not_specified - , class X3 // = detail::not_specified -> -struct class_metadata -{ - // - // Calculate the unnamed template arguments - // - - // held_type_arg -- not_specified, [a class derived from] T or a - // smart pointer to [a class derived from] T. Preserving - // not_specified allows us to give class_ a back-reference. - typedef typename select_held_type< - X1 - , typename select_held_type< - X2 - , typename select_held_type< - X3 - , python::detail::not_specified - >::type - >::type - >::type held_type_arg; - - // bases - typedef typename python::detail::select_bases< - X1 - , typename python::detail::select_bases< - X2 - , typename python::detail::select_bases< - X3 - , python::bases<> - >::type - >::type - >::type bases; - - typedef mpl::or_< - is_same - , is_same - , is_same - > is_noncopyable; - - // - // Holder computation. - // - - // Compute the actual type that will be held in the Holder. - typedef typename mpl::if_< - is_same, T, held_type_arg - >::type held_type; - - // Determine if the object will be held by value - typedef is_convertible use_value_holder; - - // Compute the "wrapped type", that is, if held_type is a smart - // pointer, we're talking about the pointee. - typedef typename mpl::eval_if< - use_value_holder - , mpl::identity - , pointee - >::type wrapped; - - // Determine whether to use a "back-reference holder" - typedef mpl::or_< - has_back_reference - , is_same - , is_base_and_derived - > use_back_reference; - - // Select the holder. - typedef typename mpl::eval_if< - use_back_reference - , mpl::if_< - use_value_holder - , value_holder_back_reference - , pointer_holder_back_reference - > - , mpl::if_< - use_value_holder - , value_holder - , pointer_holder - > - >::type holder; - - inline static void register_() // Register the runtime metadata. - { - class_metadata::register_aux((T*)0); - } - - private: - template - inline static void register_aux(python::wrapper*) - { - typedef typename mpl::not_ >::type use_callback; - class_metadata::register_aux2((T2*)0, use_callback()); - } - - inline static void register_aux(void*) - { - typedef typename is_base_and_derived::type use_callback; - class_metadata::register_aux2((T*)0, use_callback()); - } - - template - inline static void register_aux2(T2*, Callback) - { - objects::register_shared_ptr_from_python_and_casts((T2*)0, bases()); - - class_metadata::maybe_register_callback_class((T2*)0, Callback()); - - class_metadata::maybe_register_class_to_python((T2*)0, is_noncopyable()); - - class_metadata::maybe_register_pointer_to_python( - (T2*)0, (use_value_holder*)0, (use_back_reference*)0); - } - - - // - // Support for converting smart pointers to python - // - inline static void maybe_register_pointer_to_python(...) {} - -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - inline static void maybe_register_pointer_to_python(void*,void*,mpl::true_*) - { - objects::copy_class_object(python::type_id(), python::type_id >()); - objects::copy_class_object(python::type_id(), python::type_id >()); - } -#endif - - template - inline static void maybe_register_pointer_to_python(T2*, mpl::false_*, mpl::false_*) - { - python::detail::force_instantiate( - objects::class_value_wrapper< - held_type - , make_ptr_instance > - >() - ); -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - // explicit qualification of type_id makes msvc6 happy - objects::copy_class_object(python::type_id(), python::type_id()); -#endif - } - // - // Support for registering to-python converters - // - inline static void maybe_register_class_to_python(void*, mpl::true_) {} - - - template - inline static void maybe_register_class_to_python(T2*, mpl::false_) - { - python::detail::force_instantiate(class_cref_wrapper >()); -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - // explicit qualification of type_id makes msvc6 happy - objects::copy_class_object(python::type_id(), python::type_id()); -#endif - } - - // - // Support for registering callback classes - // - inline static void maybe_register_callback_class(void*, mpl::false_) {} - - template - inline static void maybe_register_callback_class(T2*, mpl::true_) - { - objects::register_shared_ptr_from_python_and_casts( - (wrapped*)0, mpl::single_view()); - - // explicit qualification of type_id makes msvc6 happy - objects::copy_class_object(python::type_id(), python::type_id()); - } -}; - -}}} // namespace boost::python::object - -#endif // CLASS_METADATA_DWA2004719_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/class_wrapper.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/class_wrapper.hpp deleted file mode 100644 index ffee7457ab..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/class_wrapper.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright David Abrahams 2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef CLASS_WRAPPER_DWA20011221_HPP -# define CLASS_WRAPPER_DWA20011221_HPP - -# include -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES -# include -#endif -# include - -namespace boost { namespace python { namespace objects { - -// -// These two classes adapt the static execute function of a class -// MakeInstance execute() function returning a new PyObject* -// reference. The first one is used for class copy constructors, and -// the second one is used to handle smart pointers. -// - -template -struct class_cref_wrapper - : to_python_converter ,true> -{ - static PyObject* convert(Src const& x) - { - return MakeInstance::execute(boost::ref(x)); - } -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - static PyTypeObject const *get_pytype() { return converter::registered_pytype_direct::get_pytype(); } -#endif -}; - -template -struct class_value_wrapper - : to_python_converter ,true> -{ - static PyObject* convert(Src x) - { - return MakeInstance::execute(x); - } -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - static PyTypeObject const *get_pytype() { return MakeInstance::get_pytype(); } -#endif -}; - -}}} // namespace boost::python::objects - -#endif // CLASS_WRAPPER_DWA20011221_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/enum_base.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/enum_base.hpp deleted file mode 100644 index be34274226..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/enum_base.hpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef ENUM_BASE_DWA200298_HPP -# define ENUM_BASE_DWA200298_HPP - -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace objects { - -struct BOOST_PYTHON_DECL enum_base : python::api::object -{ - protected: - enum_base( - char const* name - , converter::to_python_function_t - , converter::convertible_function - , converter::constructor_function - , type_info - , const char *doc = 0 - ); - - void add_value(char const* name, long value); - void export_values(); - - static PyObject* to_python(PyTypeObject* type, long x); -}; - -}}} // namespace boost::python::object - -#endif // ENUM_BASE_DWA200298_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/find_instance.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/find_instance.hpp deleted file mode 100644 index 3202c1cd15..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/find_instance.hpp +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef FIND_INSTANCE_DWA2002312_HPP -# define FIND_INSTANCE_DWA2002312_HPP - -# include - -namespace boost { namespace python { namespace objects { - -// Given a type_id, find the instance data which corresponds to it, or -// return 0 in case no such type is held. If null_shared_ptr_only is -// true and the type being sought is a shared_ptr, only find an -// instance if it turns out to be NULL. Needed for shared_ptr rvalue -// from_python support. -BOOST_PYTHON_DECL void* find_instance_impl(PyObject*, type_info, bool null_shared_ptr_only = false); - -}}} // namespace boost::python::objects - -#endif // FIND_INSTANCE_DWA2002312_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/forward.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/forward.hpp deleted file mode 100644 index 2faf3321ec..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/forward.hpp +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright David Abrahams 2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef FORWARD_DWA20011215_HPP -# define FORWARD_DWA20011215_HPP - -# include -# include -# include -# include -# include -# include -# include -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -# include -# include -# include -# else -# include -# endif - -namespace boost { namespace python { namespace objects { - -// Very much like boost::reference_wrapper, except that in this -// case T can be a reference already without causing a -// reference-to-reference error. -template -struct reference_to_value -{ - typedef typename add_reference::type>::type reference; - - reference_to_value(reference x) : m_value(x) {} - reference get() const { return m_value; } - private: - reference m_value; -}; - -// A little metaprogram which selects the type to pass through an -// intermediate forwarding function when the destination argument type -// is T. -template -struct forward - : mpl::if_< -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - // vc6 chokes on unforwarding enums nested in classes - mpl::and_< - is_scalar - , mpl::not_< - is_enum - > - > -# else - mpl::or_, is_scalar > -# endif - , T - , reference_to_value - > -{ -}; - -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template -struct unforward -{ - typedef typename unwrap_reference::type& type; -}; - -template -struct unforward > -{ - typedef T type; -}; - -template -struct unforward_cref - : python::detail::value_arg< - typename unwrap_reference::type - > -{ -}; - -template -struct unforward_cref > - : add_reference::type> -{ -}; - -# else // no partial specialization - -namespace detail -{ - typedef char (&yes_reference_to_value_t)[1]; - typedef char (&no_reference_to_value_t)[2]; - - no_reference_to_value_t is_reference_to_value_test(...); - - template - yes_reference_to_value_t is_reference_to_value_test(boost::type< reference_to_value >); - - template - struct unforwarder - { - template - struct apply - { - typedef typename unwrap_reference::type& type; - }; - }; - - template<> - struct unforwarder - { - template - struct apply - { - typedef typename T::reference type; - }; - }; - - template - struct cref_unforwarder - { - template - struct apply - : python::detail::value_arg< - typename unwrap_reference::type - > - { - }; - }; - - template<> - struct cref_unforwarder - { - template - struct apply - : python::detail::value_arg< - typename T::reference - > - { - }; - }; - - template - struct is_reference_to_value - { - BOOST_STATIC_CONSTANT( - bool, value = ( - sizeof(is_reference_to_value_test(boost::type())) - == sizeof(yes_reference_to_value_t))); - typedef mpl::bool_ type; - }; -} - -template -struct unforward - : public detail::unforwarder< - detail::is_reference_to_value::value - >::template apply -{}; - -template -struct unforward_cref - : public detail::cref_unforwarder< - detail::is_reference_to_value::value - >::template apply -{}; - -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -template -typename reference_to_value::reference -do_unforward(reference_to_value const& x, int) -{ - return x.get(); -} - -template -typename reference_wrapper::type& -do_unforward(reference_wrapper const& x, int) -{ - return x.get(); -} - -template -T const& do_unforward(T const& x, ...) -{ - return x; -} - -}}} // namespace boost::python::objects - -#endif // FORWARD_DWA20011215_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/function.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/function.hpp deleted file mode 100644 index f29d344820..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/function.hpp +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright David Abrahams 2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef FUNCTION_DWA20011214_HPP -# define FUNCTION_DWA20011214_HPP - -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace objects { - - -struct BOOST_PYTHON_DECL function : PyObject -{ - function( - py_function const& - , python::detail::keyword const* names_and_defaults - , unsigned num_keywords); - - ~function(); - - PyObject* call(PyObject*, PyObject*) const; - - // Add an attribute to the name_space with the given name. If it is - // a function object (this class), and an existing function is - // already there, add it as an overload. - static void add_to_namespace( - object const& name_space, char const* name, object const& attribute); - - static void add_to_namespace( - object const& name_space, char const* name, object const& attribute, char const* doc); - - object const& doc() const; - void doc(object const& x); - - object const& name() const; - - object const& get_namespace() const { return m_namespace; } - - private: // helper functions - object signature(bool show_return_type=false) const; - object signatures(bool show_return_type=false) const; - void argument_error(PyObject* args, PyObject* keywords) const; - void add_overload(handle const&); - - private: // data members - py_function m_fn; - handle m_overloads; - object m_name; - object m_namespace; - object m_doc; - object m_arg_names; - unsigned m_nkeyword_values; - friend class function_doc_signature_generator; -}; - -// -// implementations -// -inline object const& function::doc() const -{ - return this->m_doc; -} - -inline void function::doc(object const& x) -{ - this->m_doc = x; -} - -inline object const& function::name() const -{ - return this->m_name; -} - -}}} // namespace boost::python::objects - -#endif // FUNCTION_DWA20011214_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/function_doc_signature.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/function_doc_signature.hpp deleted file mode 100644 index 4f00cb385a..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/function_doc_signature.hpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright Nikolay Mladenov 2007. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef FUNCTION_SIGNATURE_20070531_HPP -# define FUNCTION_SIGNATURE_20070531_HPP - -#include -#include -#include -#include - -#include - - -#include - -namespace boost { namespace python { namespace objects { - -class function_doc_signature_generator{ - static const char * py_type_str(const python::detail::signature_element &s); - static bool arity_cmp( function const *f1, function const *f2 ); - static bool are_seq_overloads( function const *f1, function const *f2 , bool check_docs); - static std::vector flatten(function const *f); - static std::vector split_seq_overloads( const std::vector &funcs, bool split_on_doc_change); - static str raw_function_pretty_signature(function const *f, size_t n_overloads, bool cpp_types = false); - static str parameter_string(py_function const &f, size_t n, object arg_names, bool cpp_types); - static str pretty_signature(function const *f, size_t n_overloads, bool cpp_types = false); - -public: - static list function_doc_signatures( function const * f); -}; - -}}}//end of namespace boost::python::objects - -#endif //FUNCTION_SIGNATURE_20070531_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/function_handle.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/function_handle.hpp deleted file mode 100644 index 7edaf2ce3a..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/function_handle.hpp +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef FUNCTION_HANDLE_DWA2002725_HPP -# define FUNCTION_HANDLE_DWA2002725_HPP -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace objects { - -BOOST_PYTHON_DECL handle<> function_handle_impl(py_function const& f); - -// Just like function_object, but returns a handle<> instead. Using -// this for arg_to_python<> allows us to break a circular dependency -// between object and arg_to_python. -template -inline handle<> function_handle(F const& f, Signature) -{ - enum { n_arguments = mpl::size::value - 1 }; - - return objects::function_handle_impl( - python::detail::caller< - F,default_call_policies,Signature - >( - f, default_call_policies() - ) - ); -} - -// Just like make_function, but returns a handle<> intead. Same -// reasoning as above. -template -handle<> make_function_handle(F f) -{ - return objects::function_handle(f, python::detail::get_signature(f)); -} - -}}} // namespace boost::python::objects - -#endif // FUNCTION_HANDLE_DWA2002725_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/function_object.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/function_object.hpp deleted file mode 100644 index eaa079fbe0..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/function_object.hpp +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef FUNCTION_OBJECT_DWA2002725_HPP -# define FUNCTION_OBJECT_DWA2002725_HPP -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -namespace objects -{ - BOOST_PYTHON_DECL api::object function_object( - py_function const& f - , python::detail::keyword_range const&); - - BOOST_PYTHON_DECL api::object function_object( - py_function const& f - , python::detail::keyword_range const&); - - BOOST_PYTHON_DECL api::object function_object(py_function const& f); - - // Add an attribute to the name_space with the given name. If it is - // a Boost.Python function object - // (boost/python/object/function.hpp), and an existing function is - // already there, add it as an overload. - BOOST_PYTHON_DECL void add_to_namespace( - object const& name_space, char const* name, object const& attribute); - - BOOST_PYTHON_DECL void add_to_namespace( - object const& name_space, char const* name, object const& attribute, char const* doc); -} - -}} // namespace boost::python::objects - -#endif // FUNCTION_OBJECT_DWA2002725_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/inheritance.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/inheritance.hpp deleted file mode 100644 index b49a0442e2..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/inheritance.hpp +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef INHERITANCE_DWA200216_HPP -# define INHERITANCE_DWA200216_HPP - -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace objects { - -typedef type_info class_id; -using python::type_id; - -// Types used to get address and id of most derived type -typedef std::pair dynamic_id_t; -typedef dynamic_id_t (*dynamic_id_function)(void*); - -BOOST_PYTHON_DECL void register_dynamic_id_aux( - class_id static_id, dynamic_id_function get_dynamic_id); - -BOOST_PYTHON_DECL void add_cast( - class_id src_t, class_id dst_t, void* (*cast)(void*), bool is_downcast); - -// -// a generator with an execute() function which, given a source type -// and a pointer to an object of that type, returns its most-derived -// /reachable/ type identifier and object pointer. -// - -// first, the case where T has virtual functions -template -struct polymorphic_id_generator -{ - static dynamic_id_t execute(void* p_) - { - T* p = static_cast(p_); - return std::make_pair(dynamic_cast(p), class_id(typeid(*p))); - } -}; - -// now, the non-polymorphic case. -template -struct non_polymorphic_id_generator -{ - static dynamic_id_t execute(void* p_) - { - return std::make_pair(p_, python::type_id()); - } -}; - -// Now the generalized selector -template -struct dynamic_id_generator - : mpl::if_< - boost::is_polymorphic - , boost::python::objects::polymorphic_id_generator - , boost::python::objects::non_polymorphic_id_generator - > -{}; - -// Register the dynamic id function for T with the type-conversion -// system. -template -void register_dynamic_id(T* = 0) -{ - typedef typename dynamic_id_generator::type generator; - register_dynamic_id_aux( - python::type_id(), &generator::execute); -} - -// -// a generator with an execute() function which, given a void* -// pointing to an object of type Source will attempt to convert it to -// an object of type Target. -// - -template -struct dynamic_cast_generator -{ - static void* execute(void* source) - { - return dynamic_cast( - static_cast(source)); - } - -}; - -template -struct implicit_cast_generator -{ - static void* execute(void* source) - { - Target* result = static_cast(source); - return result; - } -}; - -template -struct cast_generator - : mpl::if_< - is_base_and_derived - , implicit_cast_generator - , dynamic_cast_generator - > -{ -}; - -template -inline void register_conversion( - bool is_downcast = ::boost::is_base_and_derived::value - // These parameters shouldn't be used; they're an MSVC bug workaround - , Source* = 0, Target* = 0) -{ - typedef typename cast_generator::type generator; - - add_cast( - python::type_id() - , python::type_id() - , &generator::execute - , is_downcast - ); -} - -}}} // namespace boost::python::object - -#endif // INHERITANCE_DWA200216_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/inheritance_query.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/inheritance_query.hpp deleted file mode 100644 index 916e161f29..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/inheritance_query.hpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef INHERITANCE_QUERY_DWA2003520_HPP -# define INHERITANCE_QUERY_DWA2003520_HPP - -# include - -namespace boost { namespace python { namespace objects { - -BOOST_PYTHON_DECL void* find_static_type(void* p, type_info src, type_info dst); -BOOST_PYTHON_DECL void* find_dynamic_type(void* p, type_info src, type_info dst); - -}}} // namespace boost::python::object - -#endif // INHERITANCE_QUERY_DWA2003520_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/instance.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/instance.hpp deleted file mode 100644 index 177576ef82..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/instance.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef INSTANCE_DWA200295_HPP -# define INSTANCE_DWA200295_HPP - -# include -# include -# include - -namespace boost { namespace python -{ - struct BOOST_PYTHON_DECL_FORWARD instance_holder; -}} // namespace boost::python - -namespace boost { namespace python { namespace objects { - -// Each extension instance will be one of these -template -struct instance -{ - PyObject_VAR_HEAD - PyObject* dict; - PyObject* weakrefs; - instance_holder* objects; - - typedef typename type_with_alignment< - ::boost::alignment_of::value - >::type align_t; - - union - { - align_t align; - char bytes[sizeof(Data)]; - } storage; -}; - -template -struct additional_instance_size -{ - typedef instance instance_data; - typedef instance instance_char; - BOOST_STATIC_CONSTANT( - std::size_t, value = sizeof(instance_data) - - BOOST_PYTHON_OFFSETOF(instance_char,storage)); -}; - -}}} // namespace boost::python::object - -#endif // INSTANCE_DWA200295_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/iterator.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/iterator.hpp deleted file mode 100644 index ab748fe82d..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/iterator.hpp +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef ITERATOR_DWA2002510_HPP -# define ITERATOR_DWA2002510_HPP - -# include - -# include -# include -# include -# include -# include - -# include -# include -# include - -# include -# include - -# include - -# include - -# include -# include -# include - -# include - -namespace boost { namespace python { namespace objects { - -// CallPolicies for the next() method of iterators. We don't want -// users to have to explicitly specify that the references returned by -// iterators are copied, so we just replace the result_converter from -// the default_iterator_call_policies with a permissive one which -// always copies the result. -typedef return_value_policy default_iterator_call_policies; - -// Instantiations of these are wrapped to produce Python iterators. -template -struct iterator_range -{ - iterator_range(object sequence, Iterator start, Iterator finish); - - typedef boost::detail::iterator_traits traits_t; - - struct next - { - typedef typename mpl::if_< - is_reference< - typename traits_t::reference - > - , typename traits_t::reference - , typename traits_t::value_type - >::type result_type; - - result_type - operator()(iterator_range& self) - { - if (self.m_start == self.m_finish) - stop_iteration_error(); - return *self.m_start++; - } - -# if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) - // CWPro8 has a codegen problem when this is an empty class - int garbage; -# endif - }; - -# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - // for compilers which can't deduce the value_type of pointers, we - // have a special implementation of next. This takes advantage of - // the fact that T* results are treated like T& results by - // Boost.Python's function wrappers. - struct next_ptr - { - typedef Iterator result_type; - - result_type - operator()(iterator_range& self) - { - if (self.m_start == self.m_finish) - stop_iteration_error(); - return self.m_start++; - } - }; - - typedef mpl::if_< - is_same< - boost::detail::please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_on_cv_unqualified_pointee - , typename traits_t::value_type - > - , next_ptr - , next - >::type next_fn; -# else - typedef next next_fn; -# endif - - object m_sequence; // Keeps the sequence alive while iterating. - Iterator m_start; - Iterator m_finish; -}; - -namespace detail -{ - // Get a Python class which contains the given iterator and - // policies, creating it if necessary. Requires: NextPolicies is - // default-constructible. - template - object demand_iterator_class(char const* name, Iterator* = 0, NextPolicies const& policies = NextPolicies()) - { - typedef iterator_range range_; - - // Check the registry. If one is already registered, return it. - handle<> class_obj( - objects::registered_class_object(python::type_id())); - - if (class_obj.get() != 0) - return object(class_obj); - - typedef typename range_::next_fn next_fn; - typedef typename next_fn::result_type result_type; - - return class_(name, no_init) - .def("__iter__", identity_function()) - .def( -#if PY_VERSION_HEX >= 0x03000000 - "__next__" -#else - "next" -#endif - , make_function( - next_fn() - , policies - , mpl::vector2() - )); - } - - // A function object which builds an iterator_range. - template < - class Target - , class Iterator - , class Accessor1 - , class Accessor2 - , class NextPolicies - > - struct py_iter_ - { - py_iter_(Accessor1 const& get_start, Accessor2 const& get_finish) - : m_get_start(get_start) - , m_get_finish(get_finish) - {} - - // Extract an object x of the Target type from the first Python - // argument, and invoke get_start(x)/get_finish(x) to produce - // iterators, which are used to construct a new iterator_range<> - // object that gets wrapped into a Python iterator. - iterator_range - operator()(back_reference x) const - { - // Make sure the Python class is instantiated. - detail::demand_iterator_class("iterator", (Iterator*)0, NextPolicies()); - - return iterator_range( - x.source() - , m_get_start(x.get()) - , m_get_finish(x.get()) - ); - } - private: - Accessor1 m_get_start; - Accessor2 m_get_finish; - }; - - template - inline object make_iterator_function( - Accessor1 const& get_start - , Accessor2 const& get_finish - , NextPolicies const& /*next_policies*/ - , Iterator const& (*)() - , boost::type* - , int - ) - { - return make_function( - py_iter_(get_start, get_finish) - , default_call_policies() - , mpl::vector2, back_reference >() - ); - } - - template - inline object make_iterator_function( - Accessor1 const& get_start - , Accessor2 const& get_finish - , NextPolicies const& next_policies - , Iterator& (*)() - , boost::type* - , ...) - { - return make_iterator_function( - get_start - , get_finish - , next_policies - , (Iterator const&(*)())0 - , (boost::type*)0 - , 0 - ); - } - -} - -// Create a Python callable object which accepts a single argument -// convertible to the C++ Target type and returns a Python -// iterator. The Python iterator uses get_start(x) and get_finish(x) -// (where x is an instance of Target) to produce begin and end -// iterators for the range, and an instance of NextPolicies is used as -// CallPolicies for the Python iterator's next() function. -template -inline object make_iterator_function( - Accessor1 const& get_start - , Accessor2 const& get_finish - , NextPolicies const& next_policies - , boost::type* = 0 -) -{ - typedef typename Accessor1::result_type iterator; - typedef typename add_const::type iterator_const; - typedef typename add_reference::type iterator_cref; - - return detail::make_iterator_function( - get_start - , get_finish - , next_policies - , (iterator_cref(*)())0 - , (boost::type*)0 - , 0 - ); -} - -// -// implementation -// -template -inline iterator_range::iterator_range( - object sequence, Iterator start, Iterator finish) - : m_sequence(sequence), m_start(start), m_finish(finish) -{ -} - -}}} // namespace boost::python::objects - -#endif // ITERATOR_DWA2002510_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/iterator_core.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/iterator_core.hpp deleted file mode 100644 index 064accc5a8..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/iterator_core.hpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef ITERATOR_CORE_DWA2002512_HPP -# define ITERATOR_CORE_DWA2002512_HPP - -# include - -namespace boost { namespace python { namespace objects { - -BOOST_PYTHON_DECL object const& identity_function(); -BOOST_PYTHON_DECL void stop_iteration_error(); - -}}} // namespace boost::python::object - -#endif // ITERATOR_CORE_DWA2002512_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/life_support.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/life_support.hpp deleted file mode 100644 index 9a1b16b689..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/life_support.hpp +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef LIFE_SUPPORT_DWA200222_HPP -# define LIFE_SUPPORT_DWA200222_HPP -# include - -namespace boost { namespace python { namespace objects { - -BOOST_PYTHON_DECL PyObject* make_nurse_and_patient(PyObject* nurse, PyObject* patient); - -}}} // namespace boost::python::object - -#endif // LIFE_SUPPORT_DWA200222_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/make_holder.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/make_holder.hpp deleted file mode 100644 index 0d54dd9f66..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/make_holder.hpp +++ /dev/null @@ -1,109 +0,0 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -// Copyright David Abrahams 2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -# ifndef MAKE_HOLDER_DWA20011215_HPP -# define MAKE_HOLDER_DWA20011215_HPP - -# include - -# include -# include -#if !defined( BOOST_PYTHON_NO_PY_SIGNATURES) && defined( BOOST_PYTHON_PY_SIGNATURES_PROPER_INIT_SELF_TYPE) -# include -#endif - -# include -# include - -# include -# include -# include - -# include -# include -# include -# include -# include - -# include - -namespace boost { namespace python { namespace objects { - -template struct make_holder; - -# define BOOST_PYTHON_DO_FORWARD_ARG(z, index, _) , f##index(a##index) - -// specializations... -# define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PYTHON_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -# undef BOOST_PYTHON_DO_FORWARD_ARG - -}}} // namespace boost::python::objects - -# endif // MAKE_HOLDER_DWA20011215_HPP - -// For gcc 4.4 compatability, we must include the -// BOOST_PP_ITERATION_DEPTH test inside an #else clause. -#else // BOOST_PP_IS_ITERATING -#if BOOST_PP_ITERATION_DEPTH() == 1 -# if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100) \ - && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) -# line BOOST_PP_LINE(__LINE__, make_holder.hpp) -# endif - -# define N BOOST_PP_ITERATION() - -template <> -struct make_holder -{ - template - struct apply - { -# if N - // Unrolled iteration through each argument type in ArgList, - // choosing the type that will be forwarded on to the holder's - // templated constructor. - typedef typename mpl::begin::type iter0; - -# define BOOST_PP_LOCAL_MACRO(n) \ - typedef typename mpl::deref::type t##n; \ - typedef typename forward::type f##n; \ - typedef typename mpl::next::type \ - BOOST_PP_CAT(iter,BOOST_PP_INC(n)); // Next iterator type - -# define BOOST_PP_LOCAL_LIMITS (0, N-1) -# include BOOST_PP_LOCAL_ITERATE() -# endif - - static void execute( -#if !defined( BOOST_PYTHON_NO_PY_SIGNATURES) && defined( BOOST_PYTHON_PY_SIGNATURES_PROPER_INIT_SELF_TYPE) - boost::python::detail::python_class *p -#else - PyObject *p -#endif - BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z(1, N, t, a)) - { - typedef instance instance_t; - - void* memory = Holder::allocate(p, offsetof(instance_t, storage), sizeof(Holder)); - try { - (new (memory) Holder( - p BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_DO_FORWARD_ARG, nil)))->install(p); - } - catch(...) { - Holder::deallocate(p, memory); - throw; - } - } - }; -}; - -# undef N - -#endif // BOOST_PP_ITERATION_DEPTH() -#endif diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/make_instance.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/make_instance.hpp deleted file mode 100644 index 5f2630adc7..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/make_instance.hpp +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef MAKE_INSTANCE_DWA200296_HPP -# define MAKE_INSTANCE_DWA200296_HPP - -# include -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace objects { - -template -struct make_instance_impl -{ - typedef objects::instance instance_t; - - template - static inline PyObject* execute(Arg& x) - { - BOOST_MPL_ASSERT((mpl::or_, is_union >)); - - PyTypeObject* type = Derived::get_class_object(x); - - if (type == 0) - return python::detail::none(); - - PyObject* raw_result = type->tp_alloc( - type, objects::additional_instance_size::value); - - if (raw_result != 0) - { - python::detail::decref_guard protect(raw_result); - - instance_t* instance = (instance_t*)raw_result; - - // construct the new C++ object and install the pointer - // in the Python object. - Derived::construct(&instance->storage, (PyObject*)instance, x)->install(raw_result); - - // Note the position of the internally-stored Holder, - // for the sake of destruction - Py_SIZE(instance) = offsetof(instance_t, storage); - - // Release ownership of the python object - protect.cancel(); - } - return raw_result; - } -}; - - -template -struct make_instance - : make_instance_impl > -{ - template - static inline PyTypeObject* get_class_object(U&) - { - return converter::registered::converters.get_class_object(); - } - - static inline Holder* construct(void* storage, PyObject* instance, reference_wrapper x) - { - return new (storage) Holder(instance, x); - } -}; - - -}}} // namespace boost::python::object - -#endif // MAKE_INSTANCE_DWA200296_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/make_ptr_instance.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/make_ptr_instance.hpp deleted file mode 100644 index 9fdb23f6be..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/make_ptr_instance.hpp +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef MAKE_PTR_INSTANCE_DWA200296_HPP -# define MAKE_PTR_INSTANCE_DWA200296_HPP - -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace objects { - -template -struct make_ptr_instance - : make_instance_impl > -{ - template - static inline Holder* construct(void* storage, PyObject*, Arg& x) - { - return new (storage) Holder(x); - } - - template - static inline PyTypeObject* get_class_object(Ptr const& x) - { - return get_class_object_impl(get_pointer(x)); - } -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - static inline PyTypeObject const* get_pytype() - { - return converter::registered::converters.get_class_object(); - } -#endif - private: - template - static inline PyTypeObject* get_class_object_impl(U const volatile* p) - { - if (p == 0) - return 0; // means "return None". - - PyTypeObject* derived = get_derived_class_object( - BOOST_DEDUCED_TYPENAME is_polymorphic::type(), p); - - if (derived) - return derived; - return converter::registered::converters.get_class_object(); - } - - template - static inline PyTypeObject* get_derived_class_object(mpl::true_, U const volatile* x) - { - converter::registration const* r = converter::registry::query( - type_info(typeid(*get_pointer(x))) - ); - return r ? r->m_class_object : 0; - } - - template - static inline PyTypeObject* get_derived_class_object(mpl::false_, U*) - { - return 0; - } -}; - - -}}} // namespace boost::python::object - -#endif // MAKE_PTR_INSTANCE_DWA200296_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/pickle_support.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/pickle_support.hpp deleted file mode 100644 index cbdbcbb9d6..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/pickle_support.hpp +++ /dev/null @@ -1,124 +0,0 @@ -// (C) Copyright R.W. Grosse-Kunstleve 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_PYTHON_OBJECT_PICKLE_SUPPORT_RWGK20020603_HPP -# define BOOST_PYTHON_OBJECT_PICKLE_SUPPORT_RWGK20020603_HPP - -# include - -namespace boost { namespace python { - -namespace api -{ - class object; -} -using api::object; -class tuple; - -BOOST_PYTHON_DECL object const& make_instance_reduce_function(); - -struct pickle_suite; - -namespace error_messages { - - template - struct missing_pickle_suite_function_or_incorrect_signature {}; - - inline void must_be_derived_from_pickle_suite(pickle_suite const&) {} -} - -namespace detail { struct pickle_suite_registration; } - -struct pickle_suite -{ - private: - struct inaccessible {}; - friend struct detail::pickle_suite_registration; - public: - static inaccessible* getinitargs() { return 0; } - static inaccessible* getstate() { return 0; } - static inaccessible* setstate() { return 0; } - static bool getstate_manages_dict() { return false; } -}; - -namespace detail { - - struct pickle_suite_registration - { - typedef pickle_suite::inaccessible inaccessible; - - template - static - void - register_( - Class_& cl, - tuple (*getinitargs_fn)(Tgetinitargs), - inaccessible* (* /*getstate_fn*/)(), - inaccessible* (* /*setstate_fn*/)(), - bool) - { - cl.enable_pickling_(false); - cl.def("__getinitargs__", getinitargs_fn); - } - - template - static - void - register_( - Class_& cl, - inaccessible* (* /*getinitargs_fn*/)(), - Rgetstate (*getstate_fn)(Tgetstate), - void (*setstate_fn)(Tsetstate, Ttuple), - bool getstate_manages_dict) - { - cl.enable_pickling_(getstate_manages_dict); - cl.def("__getstate__", getstate_fn); - cl.def("__setstate__", setstate_fn); - } - - template - static - void - register_( - Class_& cl, - tuple (*getinitargs_fn)(Tgetinitargs), - Rgetstate (*getstate_fn)(Tgetstate), - void (*setstate_fn)(Tsetstate, Ttuple), - bool getstate_manages_dict) - { - cl.enable_pickling_(getstate_manages_dict); - cl.def("__getinitargs__", getinitargs_fn); - cl.def("__getstate__", getstate_fn); - cl.def("__setstate__", setstate_fn); - } - - template - static - void - register_( - Class_&, - ...) - { - typedef typename - error_messages::missing_pickle_suite_function_or_incorrect_signature< - Class_>::error_type error_type; - } - }; - - template - struct pickle_suite_finalize - : PickleSuiteType, - pickle_suite_registration - {}; - -} // namespace detail - -}} // namespace boost::python - -#endif // BOOST_PYTHON_OBJECT_PICKLE_SUPPORT_RWGK20020603_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/pointer_holder.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/pointer_holder.hpp deleted file mode 100644 index 4627e34ad2..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/pointer_holder.hpp +++ /dev/null @@ -1,224 +0,0 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -// Copyright David Abrahams 2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -# ifndef POINTER_HOLDER_DWA20011215_HPP -# define POINTER_HOLDER_DWA20011215_HPP - -# include -# include - -# include -# include -# include - -# include -# include - -# include -# include -# include - - -# include -# include - -# include -# include -# include -# include -# include -# include - -# include - -# include - -namespace boost { namespace python { - -template class wrapper; - -}} - - -namespace boost { namespace python { namespace objects { - -# if BOOST_WORKAROUND(__GNUC__, == 2) -# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) (typename unforward::type)objects::do_unforward(a##n,0) -# else -# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) objects::do_unforward(a##n,0) -# endif - -template -struct pointer_holder : instance_holder -{ - typedef Value value_type; - - pointer_holder(Pointer); - - // Forward construction to the held object - -# define BOOST_PP_ITERATION_PARAMS_1 (4, (0, BOOST_PYTHON_MAX_ARITY, , 1)) -# include BOOST_PP_ITERATE() - - private: // types - - private: // required holder implementation - void* holds(type_info, bool null_ptr_only); - - template - inline void* holds_wrapped(type_info dst_t, wrapper*,T* p) - { - return python::type_id() == dst_t ? p : 0; - } - - inline void* holds_wrapped(type_info, ...) - { - return 0; - } - - private: // data members - Pointer m_p; -}; - -template -struct pointer_holder_back_reference : instance_holder -{ - private: - typedef typename python::pointee::type held_type; - public: - typedef Value value_type; - - // Not sure about this one -- can it work? The source object - // undoubtedly does not carry the correct back reference pointer. - pointer_holder_back_reference(Pointer); - - // Forward construction to the held object -# define BOOST_PP_ITERATION_PARAMS_1 (4, (0, BOOST_PYTHON_MAX_ARITY, , 2)) -# include BOOST_PP_ITERATE() - - private: // required holder implementation - void* holds(type_info, bool null_ptr_only); - - private: // data members - Pointer m_p; -}; - -# undef BOOST_PYTHON_UNFORWARD_LOCAL - -template -inline pointer_holder::pointer_holder(Pointer p) - : m_p(p) -{ -} - -template -inline pointer_holder_back_reference::pointer_holder_back_reference(Pointer p) - : m_p(p) -{ -} - -template -void* pointer_holder::holds(type_info dst_t, bool null_ptr_only) -{ - typedef typename boost::remove_const< Value >::type non_const_value; - - if (dst_t == python::type_id() - && !(null_ptr_only && get_pointer(this->m_p)) - ) - return &this->m_p; - - Value* p0 -# if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) - = static_cast( get_pointer(this->m_p) ) -# else - = get_pointer(this->m_p) -# endif - ; - non_const_value* p = const_cast( p0 ); - - if (p == 0) - return 0; - - if (void* wrapped = holds_wrapped(dst_t, p, p)) - return wrapped; - - type_info src_t = python::type_id(); - return src_t == dst_t ? p : find_dynamic_type(p, src_t, dst_t); -} - -template -void* pointer_holder_back_reference::holds(type_info dst_t, bool null_ptr_only) -{ - if (dst_t == python::type_id() - && !(null_ptr_only && get_pointer(this->m_p)) - ) - return &this->m_p; - - if (!get_pointer(this->m_p)) - return 0; - - Value* p = get_pointer(m_p); - - if (dst_t == python::type_id()) - return p; - - type_info src_t = python::type_id(); - return src_t == dst_t ? p : find_dynamic_type(p, src_t, dst_t); -} - -}}} // namespace boost::python::objects - -# endif // POINTER_HOLDER_DWA20011215_HPP - -/* --------------- pointer_holder --------------- */ -// For gcc 4.4 compatability, we must include the -// BOOST_PP_ITERATION_DEPTH test inside an #else clause. -#else // BOOST_PP_IS_ITERATING -#if BOOST_PP_ITERATION_DEPTH() == 1 && BOOST_PP_ITERATION_FLAGS() == 1 -# if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100) \ - && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) -# line BOOST_PP_LINE(__LINE__, pointer_holder.hpp) -# endif - -# define N BOOST_PP_ITERATION() - -# if (N != 0) - template< BOOST_PP_ENUM_PARAMS_Z(1, N, class A) > -# endif - pointer_holder(PyObject* self BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, a)) - : m_p(new Value( - BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_UNFORWARD_LOCAL, nil) - )) - { - python::detail::initialize_wrapper(self, get_pointer(this->m_p)); - } - -# undef N - -/* --------------- pointer_holder_back_reference --------------- */ -#elif BOOST_PP_ITERATION_DEPTH() == 1 && BOOST_PP_ITERATION_FLAGS() == 2 -# if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100) \ - && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) -# line BOOST_PP_LINE(__LINE__, pointer_holder.hpp(pointer_holder_back_reference)) -# endif - -# define N BOOST_PP_ITERATION() - -# if (N != 0) - template < BOOST_PP_ENUM_PARAMS_Z(1, N, class A) > -# endif - pointer_holder_back_reference( - PyObject* p BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, a)) - : m_p(new held_type( - p BOOST_PP_COMMA_IF(N) BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_UNFORWARD_LOCAL, nil) - )) - {} - -# undef N - -#endif // BOOST_PP_ITERATION_DEPTH() -#endif diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/py_function.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/py_function.hpp deleted file mode 100644 index ba9aadf49f..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/py_function.hpp +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef PY_FUNCTION_DWA200286_HPP -# define PY_FUNCTION_DWA200286_HPP - -# include -# include -# include -# include - -namespace boost { namespace python { namespace objects { - -// This type is used as a "generalized Python callback", wrapping the -// function signature: -// -// PyObject* (PyObject* args, PyObject* keywords) - -struct BOOST_PYTHON_DECL py_function_impl_base -{ - virtual ~py_function_impl_base(); - virtual PyObject* operator()(PyObject*, PyObject*) = 0; - virtual unsigned min_arity() const = 0; - virtual unsigned max_arity() const; - virtual python::detail::py_func_sig_info signature() const = 0; -}; - -template -struct caller_py_function_impl : py_function_impl_base -{ - caller_py_function_impl(Caller const& caller) - : m_caller(caller) - {} - - PyObject* operator()(PyObject* args, PyObject* kw) - { - return m_caller(args, kw); - } - - virtual unsigned min_arity() const - { - return m_caller.min_arity(); - } - - virtual python::detail::py_func_sig_info signature() const - { - return m_caller.signature(); - } - - private: - Caller m_caller; -}; - -template -struct signature_py_function_impl : py_function_impl_base -{ - signature_py_function_impl(Caller const& caller) - : m_caller(caller) - {} - - PyObject* operator()(PyObject* args, PyObject* kw) - { - return m_caller(args, kw); - } - - virtual unsigned min_arity() const - { - return mpl::size::value - 1; - } - - virtual python::detail::py_func_sig_info signature() const - { - python::detail::signature_element const* sig = python::detail::signature::elements(); - python::detail::py_func_sig_info res = {sig, sig}; - return res; - } - - private: - Caller m_caller; -}; - -template -struct full_py_function_impl : py_function_impl_base -{ - full_py_function_impl(Caller const& caller, unsigned min_arity, unsigned max_arity) - : m_caller(caller) - , m_min_arity(min_arity) - , m_max_arity(max_arity > min_arity ? max_arity : min_arity) - {} - - PyObject* operator()(PyObject* args, PyObject* kw) - { - return m_caller(args, kw); - } - - virtual unsigned min_arity() const - { - return m_min_arity; - } - - virtual unsigned max_arity() const - { - return m_max_arity; - } - - virtual python::detail::py_func_sig_info signature() const - { - python::detail::signature_element const* sig = python::detail::signature::elements(); - python::detail::py_func_sig_info res = {sig, sig}; - return res; - } - - private: - Caller m_caller; - unsigned m_min_arity; - unsigned m_max_arity; -}; - -struct py_function -{ - template - py_function(Caller const& caller) - : m_impl(new caller_py_function_impl(caller)) - {} - - template - py_function(Caller const& caller, Sig) - : m_impl(new signature_py_function_impl(caller)) - {} - - template - py_function(Caller const& caller, Sig, int min_arity, int max_arity = 0) - : m_impl(new full_py_function_impl(caller, min_arity, max_arity)) - {} - - py_function(py_function const& rhs) - : m_impl(rhs.m_impl) - {} - - PyObject* operator()(PyObject* args, PyObject* kw) const - { - return (*m_impl)(args, kw); - } - - unsigned min_arity() const - { - return m_impl->min_arity(); - } - - unsigned max_arity() const - { - return m_impl->max_arity(); - } - - python::detail::signature_element const* signature() const - { - return m_impl->signature().signature; - } - - python::detail::signature_element const& get_return_type() const - { - return *m_impl->signature().ret; - } - - private: - mutable std::auto_ptr m_impl; -}; - -}}} // namespace boost::python::objects - -#endif // PY_FUNCTION_DWA200286_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/stl_iterator_core.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/stl_iterator_core.hpp deleted file mode 100644 index 68e0c2441b..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/stl_iterator_core.hpp +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright Eric Niebler 2005. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef STL_ITERATOR_CORE_EAN20051028_HPP -# define STL_ITERATOR_CORE_EAN20051028_HPP - -# include -# include - -namespace boost { namespace python { namespace objects { - -struct BOOST_PYTHON_DECL stl_input_iterator_impl -{ - stl_input_iterator_impl(); - stl_input_iterator_impl(boost::python::object const &ob); - void increment(); - bool equal(stl_input_iterator_impl const &that) const; - boost::python::handle<> const ¤t() const; -private: - boost::python::object it_; - boost::python::handle<> ob_; -}; - -}}} // namespace boost::python::object - -#endif // STL_ITERATOR_CORE_EAN20051028_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/value_holder.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/value_holder.hpp deleted file mode 100644 index f4d452cab1..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/value_holder.hpp +++ /dev/null @@ -1,170 +0,0 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -// Copyright David Abrahams 2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -# ifndef VALUE_HOLDER_DWA20011215_HPP -# define VALUE_HOLDER_DWA20011215_HPP - -# include - -# include -# include -# include - -# include -# include - -# include -# include - -# include -# include -# include -# include -# include - -# include -# include - -# include - -namespace boost { namespace python { namespace objects { - -# if BOOST_WORKAROUND(__GNUC__, == 2) -# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) (typename unforward::type)objects::do_unforward(a##n,0) -# else -# define BOOST_PYTHON_UNFORWARD_LOCAL(z, n, _) BOOST_PP_COMMA_IF(n) objects::do_unforward(a##n,0) -# endif - -template -struct value_holder : instance_holder -{ - typedef Value held_type; - typedef Value value_type; - - // Forward construction to the held object -# define BOOST_PP_ITERATION_PARAMS_1 (4, (0, BOOST_PYTHON_MAX_ARITY, , 1)) -# include BOOST_PP_ITERATE() - - private: // required holder implementation - void* holds(type_info, bool null_ptr_only); - - template - inline void* holds_wrapped(type_info dst_t, wrapper*,T* p) - { - return python::type_id() == dst_t ? p : 0; - } - - inline void* holds_wrapped(type_info, ...) - { - return 0; - } - private: // data members - Value m_held; -}; - -template -struct value_holder_back_reference : instance_holder -{ - typedef Held held_type; - typedef Value value_type; - - // Forward construction to the held object -# define BOOST_PP_ITERATION_PARAMS_1 (4, (0, BOOST_PYTHON_MAX_ARITY, , 2)) -# include BOOST_PP_ITERATE() - -private: // required holder implementation - void* holds(type_info, bool null_ptr_only); - - private: // data members - Held m_held; -}; - -# undef BOOST_PYTHON_UNFORWARD_LOCAL - -template -void* value_holder::holds(type_info dst_t, bool /*null_ptr_only*/) -{ - if (void* wrapped = holds_wrapped(dst_t, boost::addressof(m_held), boost::addressof(m_held))) - return wrapped; - - type_info src_t = python::type_id(); - return src_t == dst_t ? boost::addressof(m_held) - : find_static_type(boost::addressof(m_held), src_t, dst_t); -} - -template -void* value_holder_back_reference::holds( - type_info dst_t, bool /*null_ptr_only*/) -{ - type_info src_t = python::type_id(); - Value* x = &m_held; - - if (dst_t == src_t) - return x; - else if (dst_t == python::type_id()) - return &m_held; - else - return find_static_type(x, src_t, dst_t); -} - -}}} // namespace boost::python::objects - -# endif // VALUE_HOLDER_DWA20011215_HPP - -// --------------- value_holder --------------- - -// For gcc 4.4 compatability, we must include the -// BOOST_PP_ITERATION_DEPTH test inside an #else clause. -#else // BOOST_PP_IS_ITERATING -#if BOOST_PP_ITERATION_DEPTH() == 1 && BOOST_PP_ITERATION_FLAGS() == 1 -# if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100) \ - && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) -# line BOOST_PP_LINE(__LINE__, value_holder.hpp(value_holder)) -# endif - -# define N BOOST_PP_ITERATION() - -# if (N != 0) - template -# endif - value_holder( - PyObject* self BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, a)) - : m_held( - BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_UNFORWARD_LOCAL, nil) - ) - { - python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); - } - -# undef N - -// --------------- value_holder_back_reference --------------- - -#elif BOOST_PP_ITERATION_DEPTH() == 1 && BOOST_PP_ITERATION_FLAGS() == 2 -# if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100) \ - && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) -# line BOOST_PP_LINE(__LINE__, value_holder.hpp(value_holder_back_reference)) -# endif - -# define N BOOST_PP_ITERATION() - -# if (N != 0) - template -# endif - value_holder_back_reference( - PyObject* p BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, a)) - : m_held( - p BOOST_PP_COMMA_IF(N) - BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_UNFORWARD_LOCAL, nil) - ) - { - } - -# undef N - -#endif // BOOST_PP_ITERATION_DEPTH() -#endif diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object/value_holder_fwd.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object/value_holder_fwd.hpp deleted file mode 100644 index 3454bac426..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object/value_holder_fwd.hpp +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef VALUE_HOLDER_FWD_DWA2002311_HPP -# define VALUE_HOLDER_FWD_DWA2002311_HPP - -namespace boost { namespace python { namespace objects { - -struct no_back_reference; - -template struct value_holder_generator; - -}}} // namespace boost::python::object - -#endif // VALUE_HOLDER_FWD_DWA2002311_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object_attributes.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object_attributes.hpp deleted file mode 100644 index 26d599113f..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object_attributes.hpp +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OBJECT_ATTRIBUTES_DWA2002615_HPP -# define OBJECT_ATTRIBUTES_DWA2002615_HPP - -# include - -# include -# include -# include - -namespace boost { namespace python { namespace api { - -struct const_attribute_policies -{ - typedef char const* key_type; - static object get(object const& target, char const* key); - static object get(object const& target, object const& key); -}; - -struct attribute_policies : const_attribute_policies -{ - static object const& set(object const& target, char const* key, object const& value); - static void del(object const&target, char const* key); -}; - -struct const_objattribute_policies -{ - typedef object const key_type; - static object get(object const& target, object const& key); -}; - -struct objattribute_policies : const_objattribute_policies -{ - static object const& set(object const& target, object const& key, object const& value); - static void del(object const&target, object const& key); -}; - -// -// implementation -// -template -inline object_attribute object_operators::attr(char const* name) -{ - object_cref2 x = *static_cast(this); - return object_attribute(x, name); -} - -template -inline const_object_attribute object_operators::attr(char const* name) const -{ - object_cref2 x = *static_cast(this); - return const_object_attribute(x, name); -} - -template -inline object_objattribute object_operators::attr(object const& name) -{ - object_cref2 x = *static_cast(this); - return object_objattribute(x, name); -} - -template -inline const_object_objattribute object_operators::attr(object const& name) const -{ - object_cref2 x = *static_cast(this); - return const_object_objattribute(x, name); -} - -inline object const_attribute_policies::get(object const& target, char const* key) -{ - return python::getattr(target, key); -} - -inline object const_objattribute_policies::get(object const& target, object const& key) -{ - return python::getattr(target, key); -} - -inline object const& attribute_policies::set( - object const& target - , char const* key - , object const& value) -{ - python::setattr(target, key, value); - return value; -} - -inline object const& objattribute_policies::set( - object const& target - , object const& key - , object const& value) -{ - python::setattr(target, key, value); - return value; -} - -inline void attribute_policies::del( - object const& target - , char const* key) -{ - python::delattr(target, key); -} - -inline void objattribute_policies::del( - object const& target - , object const& key) -{ - python::delattr(target, key); -} - -}}} // namespace boost::python::api - -#endif // OBJECT_ATTRIBUTES_DWA2002615_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object_call.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object_call.hpp deleted file mode 100644 index 5c4d0f2fbe..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object_call.hpp +++ /dev/null @@ -1,23 +0,0 @@ -# if !defined(BOOST_PYTHON_SYNOPSIS) -# // Copyright David Abrahams 2002. -# // Distributed under the Boost Software License, Version 1.0. (See -# // accompanying file LICENSE_1_0.txt or copy at -# // http://www.boost.org/LICENSE_1_0.txt) - -# if !defined(BOOST_PP_IS_ITERATING) -# error Boost.Python - do not include this file! -# endif - -# define N BOOST_PP_ITERATION() - - template - typename detail::dependent::type - operator()(BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, const& a)) const - { - typedef typename detail::dependent::type obj; - U const& self = *static_cast(this); - return call(get_managed_object(self, tag), BOOST_PP_ENUM_PARAMS_Z(1, N, a)); - } - -# undef N -# endif // BOOST_PYTHON_SYNOPSIS diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object_core.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object_core.hpp deleted file mode 100644 index 4d81e2eae8..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object_core.hpp +++ /dev/null @@ -1,583 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OBJECT_CORE_DWA2002615_HPP -# define OBJECT_CORE_DWA2002615_HPP - -# define BOOST_PYTHON_OBJECT_HAS_IS_NONE // added 2010-03-15 by rwgk - -# include - -# include - -# include -# include -# include -# include -# include -# include -# include - -# include -# include - -# include -# include - -# include -# include - -# include -# include -# include - -# include -# include -# include - -# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) -# include -# endif - -# include - -namespace boost { namespace python { - -namespace detail -{ - class kwds_proxy; - class args_proxy; -} - -namespace converter -{ - template struct arg_to_python; -} - -// Put this in an inner namespace so that the generalized operators won't take over -namespace api -{ - -// This file contains the definition of the object class and enough to -// construct/copy it, but not enough to do operations like -// attribute/item access or addition. - - template class proxy; - - struct const_attribute_policies; - struct attribute_policies; - struct const_objattribute_policies; - struct objattribute_policies; - struct const_item_policies; - struct item_policies; - struct const_slice_policies; - struct slice_policies; - class slice_nil; - - typedef proxy const_object_attribute; - typedef proxy object_attribute; - typedef proxy const_object_objattribute; - typedef proxy object_objattribute; - typedef proxy const_object_item; - typedef proxy object_item; - typedef proxy const_object_slice; - typedef proxy object_slice; - - // - // is_proxy -- proxy type detection - // - BOOST_PYTHON_IS_XXX_DEF(proxy, boost::python::api::proxy, 1) - - template struct object_initializer; - - class object; - typedef PyObject* (object::*bool_type)() const; - - template - class object_operators : public def_visitor - { - protected: -# if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300 - typedef object const& object_cref; -# else - typedef object object_cref; -# endif - public: - // function call - // - object operator()() const; - -# define BOOST_PP_ITERATION_PARAMS_1 (3, (1, BOOST_PYTHON_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - - detail::args_proxy operator* () const; - object operator()(detail::args_proxy const &args) const; - object operator()(detail::args_proxy const &args, - detail::kwds_proxy const &kwds) const; - - // truth value testing - // - operator bool_type() const; - bool operator!() const; // needed for vc6 - - // Attribute access - // - const_object_attribute attr(char const*) const; - object_attribute attr(char const*); - const_object_objattribute attr(object const&) const; - object_objattribute attr(object const&); - - // Wrap 'in' operator (aka. __contains__) - template - object contains(T const& key) const; - - // item access - // - const_object_item operator[](object_cref) const; - object_item operator[](object_cref); - - template - const_object_item - operator[](T const& key) const -# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 - ; -# else - { - return (*this)[object(key)]; - } -# endif - - template - object_item - operator[](T const& key) -# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 - ; -# else - { - return (*this)[object(key)]; - } -# endif - - // slicing - // - const_object_slice slice(object_cref, object_cref) const; - object_slice slice(object_cref, object_cref); - - const_object_slice slice(slice_nil, object_cref) const; - object_slice slice(slice_nil, object_cref); - - const_object_slice slice(object_cref, slice_nil) const; - object_slice slice(object_cref, slice_nil); - - const_object_slice slice(slice_nil, slice_nil) const; - object_slice slice(slice_nil, slice_nil); - - template - const_object_slice - slice(T const& start, V const& end) const -# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 - ; -# else - { - return this->slice( - slice_bound::type(start) - , slice_bound::type(end)); - } -# endif - - template - object_slice - slice(T const& start, V const& end) -# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 - ; -# else - { - return this->slice( - slice_bound::type(start) - , slice_bound::type(end)); - } -# endif - - private: // def visitation for adding callable objects as class methods - - template - void visit(ClassT& cl, char const* name, python::detail::def_helper const& helper) const - { - // It's too late to specify anything other than docstrings if - // the callable object is already wrapped. - BOOST_STATIC_ASSERT( - (is_same::value - || detail::is_string_literal::value)); - - objects::add_to_namespace(cl, name, this->derived_visitor(), helper.doc()); - } - - friend class python::def_visitor_access; - - private: - // there is a confirmed CWPro8 codegen bug here. We prevent the - // early destruction of a temporary by binding a named object - // instead. -# if __MWERKS__ < 0x3000 || __MWERKS__ > 0x3003 - typedef object const& object_cref2; -# else - typedef object const object_cref2; -# endif - }; - - - // VC6 and VC7 require this base class in order to generate the - // correct copy constructor for object. We can't define it there - // explicitly or it will complain of ambiguity. - struct object_base : object_operators - { - // copy constructor without NULL checking, for efficiency. - inline object_base(object_base const&); - inline object_base(PyObject* ptr); - - inline object_base& operator=(object_base const& rhs); - inline ~object_base(); - - // Underlying object access -- returns a borrowed reference - inline PyObject* ptr() const; - - inline bool is_none() const; - - private: - PyObject* m_ptr; - }; - -# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - template - struct is_derived_impl - { - static T x; - template - static X* to_pointer(X const&); - - static char test(U const*); - typedef char (&no)[2]; - static no test(...); - - BOOST_STATIC_CONSTANT(bool, value = sizeof(test(to_pointer(x))) == 1); - }; - - template - struct is_derived - : mpl::bool_::value> - {}; -# else - template - struct is_derived - : is_convertible< - typename remove_reference::type* - , U const* - > - {}; -# endif - - template - typename objects::unforward_cref::type do_unforward_cref(T const& x) - { -# if BOOST_WORKAROUND(__GNUC__, == 2) - typedef typename objects::unforward_cref::type ret; - return ret(x); -# else - return x; -# endif - } - -# if BOOST_WORKAROUND(__GNUC__, == 2) - // GCC 2.x has non-const string literals; this hacks around that problem. - template - char const (& do_unforward_cref(char const(&x)[N]) )[N] - { - return x; - } -# endif - - class object; - - template - PyObject* object_base_initializer(T const& x) - { - typedef typename is_derived< - BOOST_DEDUCED_TYPENAME objects::unforward_cref::type - , object - >::type is_obj; - - return object_initializer< - BOOST_DEDUCED_TYPENAME unwrap_reference::type - >::get( - x - , is_obj() - ); - } - - class object : public object_base - { - public: - // default constructor creates a None object - object(); - - // explicit conversion from any C++ object to Python - template - explicit object( - T const& x -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - // use some SFINAE to un-confuse MSVC about its - // copy-initialization ambiguity claim. - , typename mpl::if_,int&,int>::type* = 0 -# endif - ) - : object_base(object_base_initializer(x)) - { - } - - // Throw error_already_set() if the handle is null. - BOOST_PYTHON_DECL explicit object(handle<> const&); - private: - - public: // implementation detail -- for internal use only - explicit object(detail::borrowed_reference); - explicit object(detail::new_reference); - explicit object(detail::new_non_null_reference); - }; - - // Macros for forwarding constructors in classes derived from - // object. Derived classes will usually want these as an - // implementation detail -# define BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS_(derived, base) \ - inline explicit derived(python::detail::borrowed_reference p) \ - : base(p) {} \ - inline explicit derived(python::detail::new_reference p) \ - : base(p) {} \ - inline explicit derived(python::detail::new_non_null_reference p) \ - : base(p) {} - -# if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300 -# define BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS_ -# else - // MSVC6 has a bug which causes an explicit template constructor to - // be preferred over an appropriate implicit conversion operator - // declared on the argument type. Normally, that would cause a - // runtime failure when using extract to extract a type with a - // templated constructor. This additional constructor will turn that - // runtime failure into an ambiguity error at compile-time due to - // the lack of partial ordering, or at least a link-time error if no - // generalized template constructor is declared. -# define BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(derived, base) \ - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS_(derived, base) \ - template \ - explicit derived(extract const&); -# endif - - // - // object_initializer -- get the handle to construct the object with, - // based on whether T is a proxy or derived from object - // - template - struct object_initializer_impl - { - static PyObject* - get(object const& x, mpl::true_) - { - return python::incref(x.ptr()); - } - - template - static PyObject* - get(T const& x, mpl::false_) - { - return python::incref(converter::arg_to_python(x).get()); - } - }; - - template <> - struct object_initializer_impl - { - template - static PyObject* - get(proxy const& x, mpl::false_) - { - return python::incref(x.operator object().ptr()); - } - }; - - template <> - struct object_initializer_impl - { - template - static PyObject* - get(T const& x, U) - { - return python::incref(get_managed_object(x, boost::python::tag)); - } - }; - - template <> - struct object_initializer_impl - {}; // empty implementation should cause an error - - template - struct object_initializer : object_initializer_impl< - is_proxy::value - , converter::is_object_manager::value - > - {}; - -} -using api::object; -template struct extract; - -// -// implementation -// - -namespace detail -{ - -class call_proxy -{ -public: - call_proxy(object target) : m_target(target) {} - operator object() const { return m_target;} - - private: - object m_target; -}; - -class kwds_proxy : public call_proxy -{ -public: - kwds_proxy(object o = object()) : call_proxy(o) {} -}; -class args_proxy : public call_proxy -{ -public: - args_proxy(object o) : call_proxy(o) {} - kwds_proxy operator* () const { return kwds_proxy(*this);} -}; -} - -template -detail::args_proxy api::object_operators::operator* () const -{ - object_cref2 x = *static_cast(this); - return boost::python::detail::args_proxy(x); -} - -template -object api::object_operators::operator()(detail::args_proxy const &args) const -{ - U const& self = *static_cast(this); - PyObject *result = PyObject_Call(get_managed_object(self, boost::python::tag), - args.operator object().ptr(), - 0); - return object(boost::python::detail::new_reference(result)); - -} - -template -object api::object_operators::operator()(detail::args_proxy const &args, - detail::kwds_proxy const &kwds) const -{ - U const& self = *static_cast(this); - PyObject *result = PyObject_Call(get_managed_object(self, boost::python::tag), - args.operator object().ptr(), - kwds.operator object().ptr()); - return object(boost::python::detail::new_reference(result)); - -} - - -template -template -object api::object_operators::contains(T const& key) const -{ - return this->attr("__contains__")(object(key)); -} - - -inline object::object() - : object_base(python::incref(Py_None)) -{} - -// copy constructor without NULL checking, for efficiency -inline api::object_base::object_base(object_base const& rhs) - : m_ptr(python::incref(rhs.m_ptr)) -{} - -inline api::object_base::object_base(PyObject* p) - : m_ptr(p) -{} - -inline api::object_base& api::object_base::operator=(api::object_base const& rhs) -{ - Py_INCREF(rhs.m_ptr); - Py_DECREF(this->m_ptr); - this->m_ptr = rhs.m_ptr; - return *this; -} - -inline api::object_base::~object_base() -{ - Py_DECREF(m_ptr); -} - -inline object::object(detail::borrowed_reference p) - : object_base(python::incref((PyObject*)p)) -{} - -inline object::object(detail::new_reference p) - : object_base(expect_non_null((PyObject*)p)) -{} - -inline object::object(detail::new_non_null_reference p) - : object_base((PyObject*)p) -{} - -inline PyObject* api::object_base::ptr() const -{ - return m_ptr; -} - -inline bool api::object_base::is_none() const -{ - return (m_ptr == Py_None); -} - -// -// Converter specialization implementations -// -namespace converter -{ - template struct object_manager_traits; - - template <> - struct object_manager_traits - { - BOOST_STATIC_CONSTANT(bool, is_specialized = true); - static bool check(PyObject*) { return true; } - - static python::detail::new_non_null_reference adopt(PyObject* x) - { - return python::detail::new_non_null_reference(x); - } -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - static PyTypeObject const *get_pytype() {return 0;} -#endif - }; -} - -inline PyObject* get_managed_object(object const& x, tag_t) -{ - return x.ptr(); -} - -}} // namespace boost::python - -# include - -#endif // OBJECT_CORE_DWA2002615_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object_fwd.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object_fwd.hpp deleted file mode 100644 index 11efcc7075..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object_fwd.hpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OBJECT_FWD_DWA2002724_HPP -# define OBJECT_FWD_DWA2002724_HPP - -# include - -namespace boost { namespace python { -namespace api -{ - class object; -} -using api::object; -}} // namespace boost::python - -#endif // OBJECT_FWD_DWA2002724_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object_items.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object_items.hpp deleted file mode 100644 index f0761dadbb..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object_items.hpp +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OBJECT_ITEMS_DWA2002615_HPP -# define OBJECT_ITEMS_DWA2002615_HPP - -# include - -# include -# include -# include - -namespace boost { namespace python { namespace api { - -struct const_item_policies -{ - typedef object key_type; - static object get(object const& target, object const& key); -}; - -struct item_policies : const_item_policies -{ - static object const& set(object const& target, object const& key, object const& value); - static void del(object const& target, object const& key); -}; - -// -// implementation -// -template -inline object_item -object_operators::operator[](object_cref key) -{ - object_cref2 x = *static_cast(this); - return object_item(x, key); -} - -template -inline const_object_item -object_operators::operator[](object_cref key) const -{ - object_cref2 x = *static_cast(this); - return const_object_item(x, key); -} - -# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 -template -template -inline const_object_item -object_operators::operator[](T const& key) const -{ - return (*this)[object(key)]; -} - -template -template -inline object_item -object_operators::operator[](T const& key) -{ - return (*this)[object(key)]; -} -# endif - - -inline object const_item_policies::get(object const& target, object const& key) -{ - return getitem(target, key); -} - -inline object const& item_policies::set( - object const& target - , object const& key - , object const& value) -{ - setitem(target, key, value); - return value; -} - -inline void item_policies::del( - object const& target - , object const& key) -{ - delitem(target, key); -} - -}}} // namespace boost::python::api - -#endif // OBJECT_ITEMS_DWA2002615_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object_operators.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object_operators.hpp deleted file mode 100644 index d436bb0144..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object_operators.hpp +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OBJECT_OPERATORS_DWA2002617_HPP -# define OBJECT_OPERATORS_DWA2002617_HPP - -# include - -# include -# include -# include -# include - -# include - -namespace boost { namespace python { namespace api { - -template -char is_object_operators_helper(object_operators const*); - -typedef char (&no_type)[2]; -no_type is_object_operators_helper(...); - -template X* make_ptr(); - -template -struct is_object_operators -{ - enum { - value - = (sizeof(api::is_object_operators_helper(api::make_ptr())) - + sizeof(api::is_object_operators_helper(api::make_ptr())) - < 4 - ) - }; - typedef mpl::bool_ type; -}; - -# if !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_IS_CONVERTIBLE) -template -struct enable_binary - : boost::iterators::enable_if, T> -{}; -# define BOOST_PYTHON_BINARY_RETURN(T) typename enable_binary::type -# else -# define BOOST_PYTHON_BINARY_RETURN(T) T -# endif - -template -object object_operators::operator()() const -{ - object_cref2 f = *static_cast(this); - return call(f.ptr()); -} - - -template -inline -object_operators::operator bool_type() const -{ - object_cref2 x = *static_cast(this); - int is_true = PyObject_IsTrue(x.ptr()); - if (is_true < 0) throw_error_already_set(); - return is_true ? &object::ptr : 0; -} - -template -inline bool -object_operators::operator!() const -{ - object_cref2 x = *static_cast(this); - int is_true = PyObject_IsTrue(x.ptr()); - if (is_true < 0) throw_error_already_set(); - return !is_true; -} - -# define BOOST_PYTHON_COMPARE_OP(op, opid) \ -template \ -BOOST_PYTHON_BINARY_RETURN(object) operator op(L const& l, R const& r) \ -{ \ - return PyObject_RichCompare( \ - object(l).ptr(), object(r).ptr(), opid); \ -} -# undef BOOST_PYTHON_COMPARE_OP - -# define BOOST_PYTHON_BINARY_OPERATOR(op) \ -BOOST_PYTHON_DECL object operator op(object const& l, object const& r); \ -template \ -BOOST_PYTHON_BINARY_RETURN(object) operator op(L const& l, R const& r) \ -{ \ - return object(l) op object(r); \ -} -BOOST_PYTHON_BINARY_OPERATOR(>) -BOOST_PYTHON_BINARY_OPERATOR(>=) -BOOST_PYTHON_BINARY_OPERATOR(<) -BOOST_PYTHON_BINARY_OPERATOR(<=) -BOOST_PYTHON_BINARY_OPERATOR(==) -BOOST_PYTHON_BINARY_OPERATOR(!=) -BOOST_PYTHON_BINARY_OPERATOR(+) -BOOST_PYTHON_BINARY_OPERATOR(-) -BOOST_PYTHON_BINARY_OPERATOR(*) -BOOST_PYTHON_BINARY_OPERATOR(/) -BOOST_PYTHON_BINARY_OPERATOR(%) -BOOST_PYTHON_BINARY_OPERATOR(<<) -BOOST_PYTHON_BINARY_OPERATOR(>>) -BOOST_PYTHON_BINARY_OPERATOR(&) -BOOST_PYTHON_BINARY_OPERATOR(^) -BOOST_PYTHON_BINARY_OPERATOR(|) -# undef BOOST_PYTHON_BINARY_OPERATOR - - -# define BOOST_PYTHON_INPLACE_OPERATOR(op) \ -BOOST_PYTHON_DECL object& operator op(object& l, object const& r); \ -template \ -object& operator op(object& l, R const& r) \ -{ \ - return l op object(r); \ -} -BOOST_PYTHON_INPLACE_OPERATOR(+=) -BOOST_PYTHON_INPLACE_OPERATOR(-=) -BOOST_PYTHON_INPLACE_OPERATOR(*=) -BOOST_PYTHON_INPLACE_OPERATOR(/=) -BOOST_PYTHON_INPLACE_OPERATOR(%=) -BOOST_PYTHON_INPLACE_OPERATOR(<<=) -BOOST_PYTHON_INPLACE_OPERATOR(>>=) -BOOST_PYTHON_INPLACE_OPERATOR(&=) -BOOST_PYTHON_INPLACE_OPERATOR(^=) -BOOST_PYTHON_INPLACE_OPERATOR(|=) -# undef BOOST_PYTHON_INPLACE_OPERATOR - -}}} // namespace boost::python - -#include - -#endif // OBJECT_OPERATORS_DWA2002617_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object_protocol.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object_protocol.hpp deleted file mode 100644 index 7c1c02830e..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object_protocol.hpp +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OBJECT_PROTOCOL_DWA2002615_HPP -# define OBJECT_PROTOCOL_DWA2002615_HPP - -# include - -# include -# include - -# include - -namespace boost { namespace python { namespace api { - -# if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) -// attempt to use SFINAE to prevent functions accepting T const& from -// coming up as ambiguous with the one taking a char const* when a -// string literal is passed -# define BOOST_PYTHON_NO_ARRAY_ARG(T) , T (*)() = 0 -# else -# define BOOST_PYTHON_NO_ARRAY_ARG(T) -# endif - -template -object getattr(Target const& target, Key const& key BOOST_PYTHON_NO_ARRAY_ARG(Key)) -{ - return getattr(object(target), object(key)); -} - -template -object getattr(Target const& target, Key const& key, Default const& default_ BOOST_PYTHON_NO_ARRAY_ARG(Key)) -{ - return getattr(object(target), object(key), object(default_)); -} - - -template -void setattr(object const& target, Key const& key, Value const& value BOOST_PYTHON_NO_ARRAY_ARG(Key)) -{ - setattr(target, object(key), object(value)); -} - -template -void delattr(object const& target, Key const& key BOOST_PYTHON_NO_ARRAY_ARG(Key)) -{ - delattr(target, object(key)); -} - -template -object getitem(Target const& target, Key const& key BOOST_PYTHON_NO_ARRAY_ARG(Key)) -{ - return getitem(object(target), object(key)); -} - - -template -void setitem(object const& target, Key const& key, Value const& value BOOST_PYTHON_NO_ARRAY_ARG(Key)) -{ - setitem(target, object(key), object(value)); -} - -template -void delitem(object const& target, Key const& key BOOST_PYTHON_NO_ARRAY_ARG(Key)) -{ - delitem(target, object(key)); -} - -template -object getslice(Target const& target, Begin const& begin, End const& end) -{ - return getslice(object(target), object(begin), object(end)); -} - -template -void setslice(object const& target, Begin const& begin, End const& end, Value const& value) -{ - setslice(target, object(begin), object(end), object(value)); -} - -template -void delslice(object const& target, Begin const& begin, End const& end) -{ - delslice(target, object(begin), object(end)); -} - -}}} // namespace boost::python::api - -#endif // OBJECT_PROTOCOL_DWA2002615_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object_protocol_core.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object_protocol_core.hpp deleted file mode 100644 index a5bd9afcb4..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object_protocol_core.hpp +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OBJECT_PROTOCOL_CORE_DWA2002615_HPP -# define OBJECT_PROTOCOL_CORE_DWA2002615_HPP - -# include - -# include - -namespace boost { namespace python { - -namespace api -{ - class object; - - BOOST_PYTHON_DECL object getattr(object const& target, object const& key); - BOOST_PYTHON_DECL object getattr(object const& target, object const& key, object const& default_); - BOOST_PYTHON_DECL void setattr(object const& target, object const& key, object const& value); - BOOST_PYTHON_DECL void delattr(object const& target, object const& key); - - // These are defined for efficiency, since attributes are commonly - // accessed through literal strings. - BOOST_PYTHON_DECL object getattr(object const& target, char const* key); - BOOST_PYTHON_DECL object getattr(object const& target, char const* key, object const& default_); - BOOST_PYTHON_DECL void setattr(object const& target, char const* key, object const& value); - BOOST_PYTHON_DECL void delattr(object const& target, char const* key); - - BOOST_PYTHON_DECL object getitem(object const& target, object const& key); - BOOST_PYTHON_DECL void setitem(object const& target, object const& key, object const& value); - BOOST_PYTHON_DECL void delitem(object const& target, object const& key); - - BOOST_PYTHON_DECL object getslice(object const& target, handle<> const& begin, handle<> const& end); - BOOST_PYTHON_DECL void setslice(object const& target, handle<> const& begin, handle<> const& end, object const& value); - BOOST_PYTHON_DECL void delslice(object const& target, handle<> const& begin, handle<> const& end); -} - -using api::getattr; -using api::setattr; -using api::delattr; - -using api::getitem; -using api::setitem; -using api::delitem; - -using api::getslice; -using api::setslice; -using api::delslice; - -}} // namespace boost::python - -#endif // OBJECT_PROTOCOL_CORE_DWA2002615_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/object_slices.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/object_slices.hpp deleted file mode 100644 index 748c2e954b..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/object_slices.hpp +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OBJECT_SLICES_DWA2002615_HPP -# define OBJECT_SLICES_DWA2002615_HPP - -# include - -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace api { - -struct const_slice_policies -{ - typedef std::pair, handle<> > key_type; - static object get(object const& target, key_type const& key); -}; - -struct slice_policies : const_slice_policies -{ - static object const& set(object const& target, key_type const& key, object const& value); - static void del(object const& target, key_type const& key); -}; - -template -inline slice_policies::key_type slice_key(T x, U y) -{ - return slice_policies::key_type(handle<>(x), handle<>(y)); -} - -// -// implementation -// -template -object_slice -object_operators::slice(object_cref start, object_cref finish) -{ - object_cref2 x = *static_cast(this); - return object_slice(x, api::slice_key(borrowed(start.ptr()), borrowed(finish.ptr()))); -} - -template -const_object_slice -object_operators::slice(object_cref start, object_cref finish) const -{ - object_cref2 x = *static_cast(this); - return const_object_slice(x, api::slice_key(borrowed(start.ptr()), borrowed(finish.ptr()))); -} - -template -object_slice -object_operators::slice(slice_nil, object_cref finish) -{ - object_cref2 x = *static_cast(this); - return object_slice(x, api::slice_key(allow_null((PyObject*)0), borrowed(finish.ptr()))); -} - -template -const_object_slice -object_operators::slice(slice_nil, object_cref finish) const -{ - object_cref2 x = *static_cast(this); - return const_object_slice(x, api::slice_key(allow_null((PyObject*)0), borrowed(finish.ptr()))); -} - -template -object_slice -object_operators::slice(slice_nil, slice_nil) -{ - object_cref2 x = *static_cast(this); - return object_slice(x, api::slice_key(allow_null((PyObject*)0), allow_null((PyObject*)0))); -} - -template -const_object_slice -object_operators::slice(slice_nil, slice_nil) const -{ - object_cref2 x = *static_cast(this); - return const_object_slice(x, api::slice_key(allow_null((PyObject*)0), allow_null((PyObject*)0))); -} - -template -object_slice -object_operators::slice(object_cref start, slice_nil) -{ - object_cref2 x = *static_cast(this); - return object_slice(x, api::slice_key(borrowed(start.ptr()), allow_null((PyObject*)0))); -} - -template -const_object_slice -object_operators::slice(object_cref start, slice_nil) const -{ - object_cref2 x = *static_cast(this); - return const_object_slice(x, api::slice_key(borrowed(start.ptr()), allow_null((PyObject*)0))); -} -# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 -template -template -inline const_object_slice -object_operators::slice(T const& start, V const& end) const -{ - return this->slice( - typename slice_bound::type(start) - , typename slice_bound::type(end)); -} - -template -template -inline object_slice -object_operators::slice(T const& start, V const& end) -{ - return this->slice( - typename slice_bound::type(start) - , typename slice_bound::type(end)); -} -# endif - - -inline object const_slice_policies::get(object const& target, key_type const& key) -{ - return getslice(target, key.first, key.second); -} - -inline object const& slice_policies::set( - object const& target - , key_type const& key - , object const& value) -{ - setslice(target, key.first, key.second, value); - return value; -} - -inline void slice_policies::del( - object const& target - , key_type const& key) -{ - delslice(target, key.first, key.second); -} - -}}} // namespace boost::python::api - -#endif // OBJECT_SLICES_DWA2002615_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/opaque_pointer_converter.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/opaque_pointer_converter.hpp deleted file mode 100644 index 10eb4234c8..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/opaque_pointer_converter.hpp +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright Gottfried Ganßauge 2003..2006. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -/* - * Generic Conversion of opaque C++-pointers to a Python-Wrapper. - */ -# ifndef OPAQUE_POINTER_CONVERTER_HPP_ -# define OPAQUE_POINTER_CONVERTER_HPP_ - -# include -# include -# include -# include -# include -# include -# include -# include - -# include -# include -# include - -# include - -# include -# include -# include - -// opaque -- -// -// registers to- and from- python conversions for a type Pointee. -// -// Note: -// In addition you need to define specializations for type_id -// on the type pointed to by Pointer using -// BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(Pointee) -// -// For an example see libs/python/test/opaque.cpp -// -namespace boost { namespace python { - -template -struct opaque -{ - opaque() - { - if (type_object.tp_name == 0) - { - type_object.tp_name = const_cast(type_id().name()); - if (PyType_Ready (&type_object) < 0) - { - throw error_already_set(); - } - - this->register_self(); - } - } - - static opaque instance; -private: - - static void* extract(PyObject* op) - { - return PyObject_TypeCheck(op, &type_object) - ? static_cast(implicit_cast(op))->x - : 0 - ; - } - - static PyObject* wrap(void const* px) - { - Pointee* x = *static_cast(px); - - if (x == 0) - return detail::none(); - - if ( python_instance *o = PyObject_New(python_instance, &type_object) ) - { - o->x = x; - return static_cast(implicit_cast(o)); - } - else - { - throw error_already_set(); - } - } - - void register_self() - { - converter::registration const *existing = - converter::registry::query (type_id()); - - if ((existing == 0) || (existing->m_to_python == 0)) - { -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - converter::registry::insert(&extract, type_id(), &get_pytype); - converter::registry::insert(&wrap, type_id(), &get_pytype); -#else - converter::registry::insert(&extract, type_id()); - converter::registry::insert(&wrap, type_id()); -#endif - } - } - - struct python_instance - { - PyObject_HEAD - Pointee* x; - }; - - static PyTypeObject type_object; -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - static PyTypeObject const *get_pytype(){return &type_object; } -#endif -}; - -template -opaque opaque::instance; - -template -PyTypeObject opaque::type_object = -{ - PyVarObject_HEAD_INIT(NULL, 0) - 0, - sizeof( BOOST_DEDUCED_TYPENAME opaque::python_instance ), - 0, - ::boost::python::detail::dealloc, - 0, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_compare */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - 0, /* tp_flags */ - 0, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#if PYTHON_API_VERSION >= 1012 - 0 /* tp_del */ -#endif -}; -}} // namespace boost::python - -# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - -# define BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(Pointee) - -# else - -// If you change the below, don't forget to alter the end of type_id.hpp -# define BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(Pointee) \ - namespace boost { namespace python { \ - template<> \ - inline type_info type_id(BOOST_PYTHON_EXPLICIT_TT_DEF(Pointee)) \ - { \ - return type_info (typeid (Pointee *)); \ - } \ - template<> \ - inline type_info type_id( \ - BOOST_PYTHON_EXPLICIT_TT_DEF(const volatile Pointee&)) \ - { \ - return type_info (typeid (Pointee *)); \ - } \ - }} - -# endif - -# endif // OPAQUE_POINTER_CONVERTER_HPP_ diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/operators.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/operators.hpp deleted file mode 100644 index ea2be7b98f..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/operators.hpp +++ /dev/null @@ -1,374 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OPERATORS_DWA2002530_HPP -# define OPERATORS_DWA2002530_HPP - -# include - -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - // This is essentially the old v1 to_python(). It will be eliminated - // once the public interface for to_python is settled on. - template - PyObject* convert_result(T const& x) - { - return converter::arg_to_python(x).release(); - } - - // Operator implementation template declarations. The nested apply - // declaration here keeps MSVC6 happy. - template struct operator_l - { - template struct apply; - }; - - template struct operator_r - { - template struct apply; - }; - - template struct operator_1 - { - template struct apply; - }; - - // MSVC6 doesn't want us to do this sort of inheritance on a nested - // class template, so we use this layer of indirection to avoid - // ::template<...> on the nested apply functions below - template - struct operator_l_inner - : operator_l::template apply - {}; - - template - struct operator_r_inner - : operator_r::template apply - {}; - - template - struct operator_1_inner - : operator_1::template apply - {}; - - // Define three different binary_op templates which take care of - // these cases: - // self op self - // self op R - // L op self - // - // The inner apply metafunction is used to adjust the operator to - // the class type being defined. Inheritance of the outer class is - // simply used to provide convenient access to the operation's - // name(). - - // self op self - template - struct binary_op : operator_l - { - template - struct apply : operator_l_inner - { - }; - }; - - // self op R - template - struct binary_op_l : operator_l - { - template - struct apply : operator_l_inner - { - }; - }; - - // L op self - template - struct binary_op_r : operator_r - { - template - struct apply : operator_r_inner - { - }; - }; - - template - struct unary_op : operator_1 - { - template - struct apply : operator_1_inner - { - }; - }; - - // This type is what actually gets returned from operators used on - // self_t - template - struct operator_ - : def_visitor > - { - private: - template - void visit(ClassT& cl) const - { - typedef typename mpl::eval_if< - is_same - , mpl::if_< - is_same - , binary_op - , binary_op_l< - id - , BOOST_DEDUCED_TYPENAME unwrap_other::type - > - > - , mpl::if_< - is_same - , unary_op - , binary_op_r< - id - , BOOST_DEDUCED_TYPENAME unwrap_other::type - > - > - >::type generator; - - cl.def( - generator::name() - , &generator::template apply< - BOOST_DEDUCED_TYPENAME ClassT::wrapped_type - >::execute - ); - } - - friend class python::def_visitor_access; - }; -} - -# define BOOST_PYTHON_BINARY_OPERATION(id, rid, expr) \ -namespace detail \ -{ \ - template <> \ - struct operator_l \ - { \ - template \ - struct apply \ - { \ - typedef typename unwrap_wrapper_::type lhs; \ - typedef typename unwrap_wrapper_::type rhs; \ - static PyObject* execute(lhs& l, rhs const& r) \ - { \ - return detail::convert_result(expr); \ - } \ - }; \ - static char const* name() { return "__" #id "__"; } \ - }; \ - \ - template <> \ - struct operator_r \ - { \ - template \ - struct apply \ - { \ - typedef typename unwrap_wrapper_::type lhs; \ - typedef typename unwrap_wrapper_::type rhs; \ - static PyObject* execute(rhs& r, lhs const& l) \ - { \ - return detail::convert_result(expr); \ - } \ - }; \ - static char const* name() { return "__" #rid "__"; } \ - }; \ -} - -# define BOOST_PYTHON_BINARY_OPERATOR(id, rid, op) \ -BOOST_PYTHON_BINARY_OPERATION(id, rid, l op r) \ -namespace self_ns \ -{ \ - template \ - inline detail::operator_ \ - operator op(L const&, R const&) \ - { \ - return detail::operator_(); \ - } \ -} - -BOOST_PYTHON_BINARY_OPERATOR(add, radd, +) -BOOST_PYTHON_BINARY_OPERATOR(sub, rsub, -) -BOOST_PYTHON_BINARY_OPERATOR(mul, rmul, *) -#if PY_VERSION_HEX >= 0x03000000 - BOOST_PYTHON_BINARY_OPERATOR(truediv, rtruediv, /) -#else - BOOST_PYTHON_BINARY_OPERATOR(div, rdiv, /) -#endif -BOOST_PYTHON_BINARY_OPERATOR(mod, rmod, %) -BOOST_PYTHON_BINARY_OPERATOR(lshift, rlshift, <<) -BOOST_PYTHON_BINARY_OPERATOR(rshift, rrshift, >>) -BOOST_PYTHON_BINARY_OPERATOR(and, rand, &) -BOOST_PYTHON_BINARY_OPERATOR(xor, rxor, ^) -BOOST_PYTHON_BINARY_OPERATOR(or, ror, |) -BOOST_PYTHON_BINARY_OPERATOR(gt, lt, >) -BOOST_PYTHON_BINARY_OPERATOR(ge, le, >=) -BOOST_PYTHON_BINARY_OPERATOR(lt, gt, <) -BOOST_PYTHON_BINARY_OPERATOR(le, ge, <=) -BOOST_PYTHON_BINARY_OPERATOR(eq, eq, ==) -BOOST_PYTHON_BINARY_OPERATOR(ne, ne, !=) -# undef BOOST_PYTHON_BINARY_OPERATOR - -// pow isn't an operator in C++; handle it specially. -BOOST_PYTHON_BINARY_OPERATION(pow, rpow, pow(l,r)) -# undef BOOST_PYTHON_BINARY_OPERATION - -namespace self_ns -{ -# ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP - template - inline detail::operator_ - pow(L const&, R const&) - { - return detail::operator_(); - } -# else - // When there's no argument-dependent lookup, we need these - // overloads to handle the case when everything is imported into the - // global namespace. Note that the plain overload below does /not/ - // take const& arguments. This is needed by MSVC6 at least, or it - // complains of ambiguities, since there's no partial ordering. - inline detail::operator_ - pow(self_t, self_t) - { - return detail::operator_(); - } - template - inline detail::operator_ - pow(self_t const&, R const&) - { - return detail::operator_(); - } - template - inline detail::operator_ - pow(L const&, self_t const&) - { - return detail::operator_(); - } -# endif -} - - -# define BOOST_PYTHON_INPLACE_OPERATOR(id, op) \ -namespace detail \ -{ \ - template <> \ - struct operator_l \ - { \ - template \ - struct apply \ - { \ - typedef typename unwrap_wrapper_::type lhs; \ - typedef typename unwrap_wrapper_::type rhs; \ - static PyObject* \ - execute(back_reference l, rhs const& r) \ - { \ - l.get() op r; \ - return python::incref(l.source().ptr()); \ - } \ - }; \ - static char const* name() { return "__" #id "__"; } \ - }; \ -} \ -namespace self_ns \ -{ \ - template \ - inline detail::operator_ \ - operator op(self_t const&, R const&) \ - { \ - return detail::operator_(); \ - } \ -} - -BOOST_PYTHON_INPLACE_OPERATOR(iadd,+=) -BOOST_PYTHON_INPLACE_OPERATOR(isub,-=) -BOOST_PYTHON_INPLACE_OPERATOR(imul,*=) -BOOST_PYTHON_INPLACE_OPERATOR(idiv,/=) -BOOST_PYTHON_INPLACE_OPERATOR(imod,%=) -BOOST_PYTHON_INPLACE_OPERATOR(ilshift,<<=) -BOOST_PYTHON_INPLACE_OPERATOR(irshift,>>=) -BOOST_PYTHON_INPLACE_OPERATOR(iand,&=) -BOOST_PYTHON_INPLACE_OPERATOR(ixor,^=) -BOOST_PYTHON_INPLACE_OPERATOR(ior,|=) - -# define BOOST_PYTHON_UNARY_OPERATOR(id, op, func_name) \ -namespace detail \ -{ \ - template <> \ - struct operator_1 \ - { \ - template \ - struct apply \ - { \ - typedef typename unwrap_wrapper_::type self_t; \ - static PyObject* execute(self_t& x) \ - { \ - return detail::convert_result(op(x)); \ - } \ - }; \ - static char const* name() { return "__" #id "__"; } \ - }; \ -} \ -namespace self_ns \ -{ \ - inline detail::operator_ \ - func_name(self_t const&) \ - { \ - return detail::operator_(); \ - } \ -} -# undef BOOST_PYTHON_INPLACE_OPERATOR - -BOOST_PYTHON_UNARY_OPERATOR(neg, -, operator-) -BOOST_PYTHON_UNARY_OPERATOR(pos, +, operator+) -BOOST_PYTHON_UNARY_OPERATOR(abs, abs, abs) -BOOST_PYTHON_UNARY_OPERATOR(invert, ~, operator~) -#if PY_VERSION_HEX >= 0x03000000 -BOOST_PYTHON_UNARY_OPERATOR(bool, !!, operator!) -#else -BOOST_PYTHON_UNARY_OPERATOR(nonzero, !!, operator!) -#endif -BOOST_PYTHON_UNARY_OPERATOR(int, long, int_) -BOOST_PYTHON_UNARY_OPERATOR(long, PyLong_FromLong, long_) -BOOST_PYTHON_UNARY_OPERATOR(float, double, float_) -BOOST_PYTHON_UNARY_OPERATOR(complex, std::complex, complex_) -BOOST_PYTHON_UNARY_OPERATOR(str, lexical_cast, str) -BOOST_PYTHON_UNARY_OPERATOR(repr, lexical_cast, repr) -# undef BOOST_PYTHON_UNARY_OPERATOR - -}} // namespace boost::python - -# ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -using boost::python::self_ns::abs; -using boost::python::self_ns::int_; -using boost::python::self_ns::long_; -using boost::python::self_ns::float_; -using boost::python::self_ns::complex_; -using boost::python::self_ns::str; -using boost::python::self_ns::repr; -using boost::python::self_ns::pow; -# endif - -#endif // OPERATORS_DWA2002530_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/other.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/other.hpp deleted file mode 100644 index eeece99b7d..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/other.hpp +++ /dev/null @@ -1,114 +0,0 @@ -#ifndef OTHER_DWA20020601_HPP -# define OTHER_DWA20020601_HPP - -# include -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -# if _MSC_VER+0 >= 1020 -# pragma once -# endif - -# include - -namespace boost { namespace python { - -template struct other -{ - typedef T type; -}; - -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -namespace detail -{ - template - class is_other - { - public: - BOOST_STATIC_CONSTANT(bool, value = false); - }; - - template - class is_other > - { - public: - BOOST_STATIC_CONSTANT(bool, value = true); - }; - - template - class unwrap_other - { - public: - typedef T type; - }; - - template - class unwrap_other > - { - public: - typedef T type; - }; -} -# else // no partial specialization - -}} // namespace boost::python - -#include - -namespace boost { namespace python { - -namespace detail -{ - typedef char (&yes_other_t)[1]; - typedef char (&no_other_t)[2]; - - no_other_t is_other_test(...); - - template - yes_other_t is_other_test(type< other >); - - template - struct other_unwrapper - { - template - struct apply - { - typedef T type; - }; - }; - - template<> - struct other_unwrapper - { - template - struct apply - { - typedef typename T::type type; - }; - }; - - template - class is_other - { - public: - BOOST_STATIC_CONSTANT( - bool, value = ( - sizeof(detail::is_other_test(type())) - == sizeof(detail::yes_other_t))); - }; - - template - class unwrap_other - : public detail::other_unwrapper< - is_other::value - >::template apply - {}; -} - -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -}} // namespace boost::python - -#endif // #ifndef OTHER_DWA20020601_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/overloads.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/overloads.hpp deleted file mode 100644 index e60dc1798e..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/overloads.hpp +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef OVERLOADS_DWA2002101_HPP -# define OVERLOADS_DWA2002101_HPP - -# include - -# include -# include - -#endif // OVERLOADS_DWA2002101_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/override.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/override.hpp deleted file mode 100644 index 39714257f9..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/override.hpp +++ /dev/null @@ -1,144 +0,0 @@ -#if !defined(BOOST_PP_IS_ITERATING) - -// Copyright David Abrahams 2004. Distributed under the Boost -// Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef OVERRIDE_DWA2004721_HPP -# define OVERRIDE_DWA2004721_HPP - -# include - -# include - -# include -# include - -# include -# include -# include -# include -# include - -# include - -namespace boost { namespace python { - -class override; - -namespace detail -{ - class wrapper_base; - - // The result of calling a method. - class method_result - { - private: - friend class boost::python::override; - explicit method_result(PyObject* x) - : m_obj(x) - {} - - public: - template - operator T() - { - converter::return_from_python converter; - return converter(m_obj.release()); - } - -# if BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(140050215)) - template - operator T*() - { - converter::return_from_python converter; - return converter(m_obj.release()); - } -# endif - -# if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) || BOOST_WORKAROUND(BOOST_INTEL_WIN, >= 900) - // No operator T& -# else - - template - operator T&() const - { - converter::return_from_python converter; - return converter(const_cast&>(m_obj).release()); - } -# endif - - template - T as(type* = 0) - { - converter::return_from_python converter; - return converter(m_obj.release()); - } - - template - T unchecked(type* = 0) - { - return extract(m_obj.get())(); - } - private: - mutable handle<> m_obj; - }; -} - -class override : public object -{ - private: - friend class detail::wrapper_base; - override(handle<> x) - : object(x) - {} - - public: - detail::method_result - operator()() const - { - detail::method_result x( - PyEval_CallFunction( - this->ptr() - , const_cast("()") - )); - return x; - } - -# define BOOST_PYTHON_fast_arg_to_python_get(z, n, _) \ - , converter::arg_to_python(a##n).get() - -# define BOOST_PP_ITERATION_PARAMS_1 (3, (1, BOOST_PYTHON_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -# undef BOOST_PYTHON_fast_arg_to_python_get -}; - -}} // namespace boost::python - -#endif // OVERRIDE_DWA2004721_HPP - -#else -# if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100) \ - && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201))) -# line BOOST_PP_LINE(__LINE__, override.hpp) -# endif - -# define N BOOST_PP_ITERATION() - -template < - BOOST_PP_ENUM_PARAMS_Z(1, N, class A) - > -detail::method_result -operator()( BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, const& a) ) const -{ - detail::method_result x( - PyEval_CallFunction( - this->ptr() - , const_cast("(" BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FIXED, "O") ")") - BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_fast_arg_to_python_get, nil) - )); - return x; -} - -# undef N -#endif diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/pointee.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/pointee.hpp deleted file mode 100644 index ab8bb87439..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/pointee.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef POINTEE_DWA2002323_HPP -# define POINTEE_DWA2002323_HPP - -# include - -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - template - struct pointee_impl - { - template struct apply : remove_pointer {}; - }; - - template <> - struct pointee_impl - { - template struct apply - { - typedef typename T::element_type type; - }; - }; -} - -template -struct pointee - : detail::pointee_impl< - ::boost::is_pointer::value - >::template apply -{ -}; - -}} // namespace boost::python::detail - -#endif // POINTEE_DWA2002323_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/proxy.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/proxy.hpp deleted file mode 100644 index a956eac1cc..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/proxy.hpp +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef PROXY_DWA2002615_HPP -# define PROXY_DWA2002615_HPP -# include -# include -# include - -namespace boost { namespace python { namespace api { - -template -class proxy : public object_operators > -{ - typedef typename Policies::key_type key_type; - -# if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300 - typedef proxy const& assignment_self; -# else - typedef proxy assignment_self; -# endif - public: - proxy(object const& target, key_type const& key); - operator object() const; - - // to support a[b] = c[d] - proxy const& operator=(assignment_self) const; - - template - inline proxy const& operator=(T const& rhs) const - { - Policies::set(m_target, m_key, object(rhs)); - return *this; - } - - public: // implementation detail - void del() const; - - private: - object m_target; - key_type m_key; -}; - - -template -inline void del(proxy const& x) -{ - x.del(); -} - -// -// implementation -// - -template -inline proxy::proxy(object const& target, key_type const& key) - : m_target(target), m_key(key) -{} - -template -inline proxy::operator object() const -{ - return Policies::get(m_target, m_key); -} - -// to support a[b] = c[d] -template -inline proxy const& proxy::operator=(typename proxy::assignment_self rhs) const -{ - return *this = python::object(rhs); -} - -# define BOOST_PYTHON_PROXY_INPLACE(op) \ -template \ -proxy const& operator op(proxy const& lhs, R const& rhs) \ -{ \ - object old(lhs); \ - return lhs = (old op rhs); \ -} -BOOST_PYTHON_PROXY_INPLACE(+=) -BOOST_PYTHON_PROXY_INPLACE(-=) -BOOST_PYTHON_PROXY_INPLACE(*=) -BOOST_PYTHON_PROXY_INPLACE(/=) -BOOST_PYTHON_PROXY_INPLACE(%=) -BOOST_PYTHON_PROXY_INPLACE(<<=) -BOOST_PYTHON_PROXY_INPLACE(>>=) -BOOST_PYTHON_PROXY_INPLACE(&=) -BOOST_PYTHON_PROXY_INPLACE(^=) -BOOST_PYTHON_PROXY_INPLACE(|=) -# undef BOOST_PYTHON_PROXY_INPLACE - -template -inline void proxy::del() const -{ - Policies::del(m_target, m_key); -} - -}}} // namespace boost::python::api - -#endif // PROXY_DWA2002615_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/ptr.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/ptr.hpp deleted file mode 100644 index af1339c426..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/ptr.hpp +++ /dev/null @@ -1,128 +0,0 @@ -#ifndef PTR_DWA20020601_HPP -# define PTR_DWA20020601_HPP - -# include -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// Based on boost/ref.hpp, thus: -// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) -// Copyright (C) 2001 Peter Dimov - -# if _MSC_VER+0 >= 1020 -# pragma once -# endif - -# include -# include - -namespace boost { namespace python { - -template class pointer_wrapper -{ - public: - typedef Ptr type; - - explicit pointer_wrapper(Ptr x): p_(x) {} - operator Ptr() const { return p_; } - Ptr get() const { return p_; } - private: - Ptr p_; -}; - -template -inline pointer_wrapper ptr(T t) -{ - return pointer_wrapper(t); -} - -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template -class is_pointer_wrapper - : public mpl::false_ -{ -}; - -template -class is_pointer_wrapper > - : public mpl::true_ -{ -}; - -template -class unwrap_pointer -{ - public: - typedef T type; -}; - -template -class unwrap_pointer > -{ - public: - typedef T type; -}; -# else // no partial specialization - -}} // namespace boost::python - -#include - -namespace boost { namespace python { - -namespace detail -{ - typedef char (&yes_pointer_wrapper_t)[1]; - typedef char (&no_pointer_wrapper_t)[2]; - - no_pointer_wrapper_t is_pointer_wrapper_test(...); - - template - yes_pointer_wrapper_t is_pointer_wrapper_test(boost::type< pointer_wrapper >); - - template - struct pointer_unwrapper - { - template - struct apply - { - typedef T type; - }; - }; - - template<> - struct pointer_unwrapper - { - template - struct apply - { - typedef typename T::type type; - }; - }; -} - -template -class is_pointer_wrapper -{ - public: - BOOST_STATIC_CONSTANT( - bool, value = ( - sizeof(detail::is_pointer_wrapper_test(boost::type())) - == sizeof(detail::yes_pointer_wrapper_t))); - typedef mpl::bool_ type; -}; - -template -class unwrap_pointer - : public detail::pointer_unwrapper< - is_pointer_wrapper::value - >::template apply -{}; - -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -}} // namespace boost::python - -#endif // #ifndef PTR_DWA20020601_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/pure_virtual.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/pure_virtual.hpp deleted file mode 100644 index b3b34ffcdb..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/pure_virtual.hpp +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef PURE_VIRTUAL_DWA2003810_HPP -# define PURE_VIRTUAL_DWA2003810_HPP - -# include -# include -# include -# include - -# include - -namespace boost { namespace python { - -namespace detail -{ - // - // @group Helpers for pure_virtual_visitor. { - // - - // Raises a Python RuntimeError reporting that a pure virtual - // function was called. - void BOOST_PYTHON_DECL pure_virtual_called(); - - // Replace the two front elements of S with T1 and T2 - template - struct replace_front2 - { - // Metafunction forwarding seemed to confound vc6 - typedef typename mpl::push_front< - typename mpl::push_front< - typename mpl::pop_front< - typename mpl::pop_front< - S - >::type - >::type - , T2 - >::type - , T1 - >::type type; - }; - - // Given an MPL sequence representing a member function [object] - // signature, returns a new MPL sequence whose return type is - // replaced by void, and whose first argument is replaced by C&. - template - typename replace_front2::type - error_signature(S BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(C)) - { - typedef typename replace_front2::type r; - return r(); - } - - // - // } - // - - // - // A def_visitor which defines a method as usual, then adds a - // corresponding function which raises a "pure virtual called" - // exception unless it's been overridden. - // - template - struct pure_virtual_visitor - : def_visitor > - { - pure_virtual_visitor(PointerToMemberFunction pmf) - : m_pmf(pmf) - {} - - private: - friend class python::def_visitor_access; - - template - void visit(C_& c, char const* name, Options& options) const - { - // This should probably be a nicer error message - BOOST_STATIC_ASSERT(!Options::has_default_implementation); - - // Add the virtual function dispatcher - c.def( - name - , m_pmf - , options.doc() - , options.keywords() - , options.policies() - ); - - typedef BOOST_DEDUCED_TYPENAME C_::metadata::held_type held_type; - - // Add the default implementation which raises the exception - c.def( - name - , make_function( - detail::nullary_function_adaptor(pure_virtual_called) - , default_call_policies() - , detail::error_signature(detail::get_signature(m_pmf)) - ) - ); - } - - private: // data members - PointerToMemberFunction m_pmf; - }; -} - -// -// Passed a pointer to member function, generates a def_visitor which -// creates a method that only dispatches to Python if the function has -// been overridden, either in C++ or in Python, raising a "pure -// virtual called" exception otherwise. -// -template -detail::pure_virtual_visitor -pure_virtual(PointerToMemberFunction pmf) -{ - return detail::pure_virtual_visitor(pmf); -} - -}} // namespace boost::python - -#endif // PURE_VIRTUAL_DWA2003810_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/raw_function.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/raw_function.hpp deleted file mode 100644 index 9d9f6b8b1b..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/raw_function.hpp +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright David Abrahams 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef RAW_FUNCTION_DWA200336_HPP -# define RAW_FUNCTION_DWA200336_HPP - -# include - -# include -# include -# include -# include - -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - template - struct raw_dispatcher - { - raw_dispatcher(F f) : f(f) {} - - PyObject* operator()(PyObject* args, PyObject* keywords) - { - return incref( - object( - f( - tuple(borrowed_reference(args)) - , keywords ? dict(borrowed_reference(keywords)) : dict() - ) - ).ptr() - ); - } - - private: - F f; - }; - - object BOOST_PYTHON_DECL make_raw_function(objects::py_function); -} - -template -object raw_function(F f, std::size_t min_args = 0) -{ - return detail::make_raw_function( - objects::py_function( - detail::raw_dispatcher(f) - , mpl::vector1() - , min_args - , (std::numeric_limits::max)() - ) - ); -} - -}} // namespace boost::python - -#endif // RAW_FUNCTION_DWA200336_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/refcount.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/refcount.hpp deleted file mode 100644 index 5ba5433c22..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/refcount.hpp +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef REFCOUNT_DWA2002615_HPP -# define REFCOUNT_DWA2002615_HPP - -# include -# include - -namespace boost { namespace python { - -template -inline T* incref(T* p) -{ - Py_INCREF(python::upcast(p)); - return p; -} - -template -inline T* xincref(T* p) -{ - Py_XINCREF(python::upcast(p)); - return p; -} - -template -inline void decref(T* p) -{ - Py_DECREF(python::upcast(p)); -} - -template -inline void xdecref(T* p) -{ - Py_XDECREF(python::upcast(p)); -} - -}} // namespace boost::python - -#endif // REFCOUNT_DWA2002615_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/reference_existing_object.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/reference_existing_object.hpp deleted file mode 100644 index bb8ddf7380..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/reference_existing_object.hpp +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef REFERENCE_EXISTING_OBJECT_DWA200222_HPP -# define REFERENCE_EXISTING_OBJECT_DWA200222_HPP - -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - template - struct reference_existing_object_requires_a_pointer_or_reference_return_type -# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__) - {} -# endif - ; -} - -template struct to_python_value; - -struct reference_existing_object -{ - template - struct apply - { - BOOST_STATIC_CONSTANT( - bool, ok = is_pointer::value || is_reference::value); - - typedef typename mpl::if_c< - ok - , to_python_indirect - , detail::reference_existing_object_requires_a_pointer_or_reference_return_type - >::type type; - }; -}; - -}} // namespace boost::python - -#endif // REFERENCE_EXISTING_OBJECT_DWA200222_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/register_ptr_to_python.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/register_ptr_to_python.hpp deleted file mode 100644 index 7a22fe5052..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/register_ptr_to_python.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef REGISTER_PTR_TO_PYTHON_HPP -#define REGISTER_PTR_TO_PYTHON_HPP - -#include -#include -#include - -namespace boost { namespace python { - -template -void register_ptr_to_python(BOOST_EXPLICIT_TEMPLATE_TYPE(P)) -{ - typedef typename boost::python::pointee

::type X; - objects::class_value_wrapper< - P - , objects::make_ptr_instance< - X - , objects::pointer_holder - > - >(); -} - -}} // namespace boost::python - -#endif // REGISTER_PTR_TO_PYTHON_HPP - - diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/return_arg.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/return_arg.hpp deleted file mode 100644 index c36f898d7d..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/return_arg.hpp +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright David Abrahams and Nikolay Mladenov 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef RETURN_ARG_DWA2003719_HPP -# define RETURN_ARG_DWA2003719_HPP -# include -# include -# include - -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES -# include -#endif - -# include -# include - -# include -# include - -# include -# include - -# include - -namespace boost { namespace python { - -namespace detail -{ - template - struct return_arg_pos_argument_must_be_positive -# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__) - {} -# endif - ; - - struct return_none - { - template struct apply - { - struct type - { - static bool convertible() - { - return true; - } - - PyObject *operator()( typename value_arg::type ) const - { - return none(); - } -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - PyTypeObject const *get_pytype() const { return converter::expected_pytype_for_arg::get_pytype() ; } -#endif - }; - }; - }; -} - -template < - std::size_t arg_pos=1 - , class Base = default_call_policies -> -struct return_arg : Base -{ - private: - BOOST_STATIC_CONSTANT(bool, legal = arg_pos > 0); - - public: - typedef typename mpl::if_c< - legal - , detail::return_none - , detail::return_arg_pos_argument_must_be_positive - // we could default to the base result_converter in case or - // arg_pos==0 since return arg 0 means return result, but I - // think it is better to issue an error instead, cause it can - // lead to confusions - >::type result_converter; - - template - static PyObject* postcall(ArgumentPackage const& args, PyObject* result) - { - // In case of arg_pos == 0 we could simply return Base::postcall, - // but this is redundant - BOOST_STATIC_ASSERT(arg_pos > 0); - - result = Base::postcall(args,result); - if (!result) - return 0; - Py_DECREF(result); - return incref( detail::get(mpl::int_(),args) ); - } - - template - struct extract_return_type : mpl::at_c - { - }; - -}; - -template < - class Base = default_call_policies - > -struct return_self - : return_arg<1,Base> -{}; - -}} // namespace boost::python - -#endif // RETURN_ARG_DWA2003719_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/return_by_value.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/return_by_value.hpp deleted file mode 100644 index 593fc59cfe..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/return_by_value.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef BY_VALUE_DWA20021015_HPP -# define BY_VALUE_DWA20021015_HPP - -# include - -# include -# include -# include - -# include - -namespace boost { namespace python { - -struct return_by_value -{ - template - struct apply - { - typedef to_python_value< - typename detail::value_arg::type - > type; - }; -}; - -}} // namespace boost::python - -#endif // BY_VALUE_DWA20021015_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/return_internal_reference.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/return_internal_reference.hpp deleted file mode 100644 index acb89e6dc8..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/return_internal_reference.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef RETURN_INTERNAL_REFERENCE_DWA2002131_HPP -# define RETURN_INTERNAL_REFERENCE_DWA2002131_HPP - -# include - -# include -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - template - struct return_internal_reference_owner_arg_must_be_greater_than_zero -# if defined(__GNUC__) && __GNUC__ >= 3 || defined(__EDG__) - {} -# endif - ; -} - -template -struct return_internal_reference - : with_custodian_and_ward_postcall<0, owner_arg, BasePolicy_> -{ - private: - BOOST_STATIC_CONSTANT(bool, legal = owner_arg > 0); - public: - typedef typename mpl::if_c< - legal - , reference_existing_object - , detail::return_internal_reference_owner_arg_must_be_greater_than_zero - >::type result_converter; -}; - -}} // namespace boost::python - -#endif // RETURN_INTERNAL_REFERENCE_DWA2002131_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/return_opaque_pointer.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/return_opaque_pointer.hpp deleted file mode 100644 index cf544d8030..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/return_opaque_pointer.hpp +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Gottfried Ganßauge 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -/* - * Generic Return value converter generator for opaque C++-pointers - */ -# ifndef RETURN_OPAQUE_POINTER_HPP_ -# define RETURN_OPAQUE_POINTER_HPP_ - -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - template - static void opaque_pointee(Pointee const volatile*) - { - force_instantiate(opaque::instance); - } -} - -struct return_opaque_pointer -{ - template - struct apply - { - BOOST_MPL_ASSERT_MSG( is_pointer::value, RETURN_OPAQUE_POINTER_EXPECTS_A_POINTER_TYPE, (R)); - - struct type : - boost::python::to_python_value< - typename detail::value_arg::type - > - { - type() { detail::opaque_pointee(R()); } - }; - }; -}; - -}} // namespace boost::python -# endif // RETURN_OPAQUE_POINTER_HPP_ diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/return_value_policy.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/return_value_policy.hpp deleted file mode 100644 index 9a5fba380b..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/return_value_policy.hpp +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef RETURN_VALUE_POLICY_DWA2002131_HPP -# define RETURN_VALUE_POLICY_DWA2002131_HPP - -# include -# include - -namespace boost { namespace python { - -template -struct return_value_policy : BasePolicy_ -{ - typedef ResultConverterGenerator result_converter; -}; - -}} // namespace boost::python - -#endif // RETURN_VALUE_POLICY_DWA2002131_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/scope.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/scope.hpp deleted file mode 100644 index ae9a40a383..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/scope.hpp +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef SCOPE_DWA2002724_HPP -# define SCOPE_DWA2002724_HPP - -# include -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - // Making this a namespace-scope variable to avoid Cygwin issues. - // Use a PyObject* to avoid problems with static destruction after Py_Finalize - extern BOOST_PYTHON_DECL PyObject* current_scope; -} - -class scope - : public object -{ - public: - inline scope(scope const&); - inline scope(object const&); - inline scope(); - inline ~scope(); - - private: // data members - PyObject* m_previous_scope; - - private: // unimplemented functions - void operator=(scope const&); -}; - -inline scope::scope(object const& new_scope) - : object(new_scope) - , m_previous_scope(detail::current_scope) -{ - detail::current_scope = python::incref(new_scope.ptr()); -} - -inline scope::scope() - : object(detail::borrowed_reference( - detail::current_scope ? detail::current_scope : Py_None - )) - , m_previous_scope(python::xincref(detail::current_scope)) -{ -} - -inline scope::~scope() -{ - python::xdecref(detail::current_scope); - detail::current_scope = m_previous_scope; -} - -namespace converter -{ - template <> - struct object_manager_traits - : object_manager_traits - { - }; -} - -// Placing this after the specialization above suppresses a CWPro8.3 bug -inline scope::scope(scope const& new_scope) - : object(new_scope) - , m_previous_scope(detail::current_scope) -{ - detail::current_scope = python::incref(new_scope.ptr()); -} - -}} // namespace boost::python - -#endif // SCOPE_DWA2002724_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/self.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/self.hpp deleted file mode 100644 index 99ec5b8fbe..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/self.hpp +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef SELF_DWA2002531_HPP -# define SELF_DWA2002531_HPP - -# include - -namespace boost { namespace python { - -#define BOOST_PYTHON_SELF_IS_CLASS - -// Sink self_t into its own namespace so that we have a safe place to -// put the completely general operator templates which operate on -// it. It is possible to avoid this, but it turns out to be much more -// complicated and finally GCC 2.95.2 chokes on it. -namespace self_ns -{ -# ifndef BOOST_PYTHON_SELF_IS_CLASS - enum self_t { self }; -# else - struct self_t {}; - extern BOOST_PYTHON_DECL self_t self; -# endif -} - -using self_ns::self_t; -using self_ns::self; - -}} // namespace boost::python - -#endif // SELF_DWA2002531_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/signature.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/signature.hpp deleted file mode 100644 index f1143e3abe..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/signature.hpp +++ /dev/null @@ -1,252 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// Copyright David Abrahams 2002, Joel de Guzman, 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -/////////////////////////////////////////////////////////////////////////////// -#if !defined(BOOST_PP_IS_ITERATING) - -# ifndef SIGNATURE_JDG20020813_HPP -# define SIGNATURE_JDG20020813_HPP - -# include - -# include -# include - -# include -# include -# include -# include -# include -# include -# include -# include - -# include -# include -# include -# include - -# define BOOST_PYTHON_LIST_INC(n) \ - BOOST_PP_CAT(mpl::vector, BOOST_PP_INC(n)) - -/////////////////////////////////////////////////////////////////////////////// -namespace boost { namespace python { namespace detail { - -// A metafunction returning C1 if C1 is derived from C2, and C2 -// otherwise -template -struct most_derived -{ - typedef typename mpl::if_< - is_convertible - , C1 - , C2 - >::type type; -}; - -// The following macros generate expansions for:: -// -// template -// inline mpl::vector -// get_signature(RT(BOOST_PYTHON_FN_CC *)(T0...TN), void* = 0) -// { -// return mpl::list(); -// } -// -// where BOOST_PYTHON_FN_CC is a calling convention keyword, can be -// -// empty, for default calling convention -// __cdecl (if BOOST_PYTHON_ENABLE_CDECL is defined) -// __stdcall (if BOOST_PYTHON_ENABLE_STDCALL is defined) -// __fastcall (if BOOST_PYTHON_ENABLE_FASTCALL is defined) -// -// And, for an appropriate assortment of cv-qualifications:: -// -// template -// inline mpl::vector -// get_signature(RT(BOOST_PYTHON_FN_CC ClassT::*)(T0...TN) cv)) -// { -// return mpl::list(); -// } -// -// template -// inline mpl::vector< -// RT -// , typename most_derived::type& -// , T0...TN -// > -// get_signature(RT(BOOST_PYTHON_FN_CC ClassT::*)(T0...TN) cv), Target*) -// { -// return mpl::list(); -// } -// -// There are two forms for invoking get_signature:: -// -// get_signature(f) -// -// and :: -// -// get_signature(f,(Target*)0) -// -// These functions extract the return type, class (for member -// functions) and arguments of the input signature and stuff them in -// an mpl type sequence (the calling convention is dropped). -// Note that cv-qualification is dropped from -// the "hidden this" argument of member functions; that is a -// necessary sacrifice to ensure that an lvalue from_python converter -// is used. A pointer is not used so that None will be rejected for -// overload resolution. -// -// The second form of get_signature essentially downcasts the "hidden -// this" argument of member functions to Target, because the function -// may actually be a member of a base class which is not wrapped, and -// in that case conversion from python would fail. -// -// @group { - -// 'default' calling convention - -# define BOOST_PYTHON_FN_CC - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, BOOST_PYTHON_MAX_ARITY, )) - -# include BOOST_PP_ITERATE() - -# undef BOOST_PYTHON_FN_CC - -// __cdecl calling convention - -# if defined(BOOST_PYTHON_ENABLE_CDECL) - -# define BOOST_PYTHON_FN_CC __cdecl -# define BOOST_PYTHON_FN_CC_IS_CDECL - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, BOOST_PYTHON_MAX_ARITY, )) - -# include BOOST_PP_ITERATE() - -# undef BOOST_PYTHON_FN_CC -# undef BOOST_PYTHON_FN_CC_IS_CDECL - -# endif // defined(BOOST_PYTHON_ENABLE_CDECL) - -// __stdcall calling convention - -# if defined(BOOST_PYTHON_ENABLE_STDCALL) - -# define BOOST_PYTHON_FN_CC __stdcall - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, BOOST_PYTHON_MAX_ARITY, )) - -# include BOOST_PP_ITERATE() - -# undef BOOST_PYTHON_FN_CC - -# endif // defined(BOOST_PYTHON_ENABLE_STDCALL) - -// __fastcall calling convention - -# if defined(BOOST_PYTHON_ENABLE_FASTCALL) - -# define BOOST_PYTHON_FN_CC __fastcall - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, BOOST_PYTHON_MAX_ARITY, )) - -# include BOOST_PP_ITERATE() - -# undef BOOST_PYTHON_FN_CC - -# endif // defined(BOOST_PYTHON_ENABLE_FASTCALL) - -# undef BOOST_PYTHON_LIST_INC - -// } - -}}} // namespace boost::python::detail - - -# endif // SIGNATURE_JDG20020813_HPP - -// For gcc 4.4 compatability, we must include the -// BOOST_PP_ITERATION_DEPTH test inside an #else clause. -#else // BOOST_PP_IS_ITERATING -#if BOOST_PP_ITERATION_DEPTH() == 1 // defined(BOOST_PP_IS_ITERATING) - -# define N BOOST_PP_ITERATION() - - // as 'get_signature(RT(*)(T0...TN), void* = 0)' is the same - // function as 'get_signature(RT(__cdecl *)(T0...TN), void* = 0)', - // we don't define it twice -# if !defined(BOOST_PYTHON_FN_CC_IS_CDECL) - -template < - class RT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, class T)> -inline BOOST_PYTHON_LIST_INC(N)< - RT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, T)> -get_signature(RT(BOOST_PYTHON_FN_CC *)(BOOST_PP_ENUM_PARAMS_Z(1, N, T)), void* = 0) -{ - return BOOST_PYTHON_LIST_INC(N)< - RT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, T) - >(); -} - -# endif // !defined(BOOST_PYTHON_FN_CC_IS_CDECL) - -# undef N - -# define BOOST_PP_ITERATION_PARAMS_2 \ - (3, (0, 3, )) -# include BOOST_PP_ITERATE() - -#else - -# define N BOOST_PP_RELATIVE_ITERATION(1) -# define Q BOOST_PYTHON_CV_QUALIFIER(BOOST_PP_ITERATION()) - -template < - class RT, class ClassT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, class T)> -inline BOOST_PYTHON_LIST_INC(BOOST_PP_INC(N))< - RT, ClassT& BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, T)> -get_signature(RT(BOOST_PYTHON_FN_CC ClassT::*)(BOOST_PP_ENUM_PARAMS_Z(1, N, T)) Q) -{ - return BOOST_PYTHON_LIST_INC(BOOST_PP_INC(N))< - RT, ClassT& BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, T) - >(); -} - -template < - class Target - , class RT - , class ClassT - BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, class T) -> -inline BOOST_PYTHON_LIST_INC(BOOST_PP_INC(N))< - RT - , typename most_derived::type& - BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, T) -> -get_signature( - RT(BOOST_PYTHON_FN_CC ClassT::*)(BOOST_PP_ENUM_PARAMS_Z(1, N, T)) Q - , Target* -) -{ - return BOOST_PYTHON_LIST_INC(BOOST_PP_INC(N))< - RT - , BOOST_DEDUCED_TYPENAME most_derived::type& - BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, T) - >(); -} - -# undef Q -# undef N - -#endif // BOOST_PP_ITERATION_DEPTH() -#endif // !defined(BOOST_PP_IS_ITERATING) diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/slice.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/slice.hpp deleted file mode 100644 index 19f316a1e7..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/slice.hpp +++ /dev/null @@ -1,276 +0,0 @@ -#ifndef BOOST_PYTHON_SLICE_JDB20040105_HPP -#define BOOST_PYTHON_SLICE_JDB20040105_HPP - -// Copyright (c) 2004 Jonathan Brandmeyer -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include -#include -#include - -#include - -#include -#include - -namespace boost { namespace python { - -namespace detail -{ - class BOOST_PYTHON_DECL slice_base : public object - { - public: - // Get the Python objects associated with the slice. In principle, these - // may be any arbitrary Python type, but in practice they are usually - // integers. If one or more parameter is ommited in the Python expression - // that created this slice, than that parameter is None here, and compares - // equal to a default-constructed boost::python::object. - // If a user-defined type wishes to support slicing, then support for the - // special meaning associated with negative indices is up to the user. - object start() const; - object stop() const; - object step() const; - - protected: - explicit slice_base(PyObject*, PyObject*, PyObject*); - - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(slice_base, object) - }; -} - -class slice : public detail::slice_base -{ - typedef detail::slice_base base; - public: - // Equivalent to slice(::) - slice() : base(0,0,0) {} - - // Each argument must be slice_nil, or implicitly convertable to object. - // They should normally be integers. - template - slice( Integer1 start, Integer2 stop) - : base( object(start).ptr(), object(stop).ptr(), 0 ) - {} - - template - slice( Integer1 start, Integer2 stop, Integer3 stride) - : base( object(start).ptr(), object(stop).ptr(), object(stride).ptr() ) - {} - - // The following algorithm is intended to automate the process of - // determining a slice range when you want to fully support negative - // indices and non-singular step sizes. Its functionallity is simmilar to - // PySlice_GetIndicesEx() in the Python/C API, but tailored for C++ users. - // This template returns a slice::range struct that, when used in the - // following iterative loop, will traverse a slice of the function's - // arguments. - // while (start != end) { - // do_foo(...); - // std::advance( start, step); - // } - // do_foo(...); // repeat exactly once more. - - // Arguments: a [begin, end) pair of STL-conforming random-access iterators. - - // Return: slice::range, where start and stop define a _closed_ interval - // that covers at most [begin, end-1] of the provided arguments, and a step - // that is non-zero. - - // Throws: error_already_set() if any of the indices are neither None nor - // integers, or the slice has a step value of zero. - // std::invalid_argument if the resulting range would be empty. Normally, - // you should catch this exception and return an empty sequence of the - // appropriate type. - - // Performance: constant time for random-access iterators. - - // Rationale: - // closed-interval: If an open interval were used, then for a non-singular - // value for step, the required state for the end iterator could be - // beyond the one-past-the-end postion of the specified range. While - // probably harmless, the behavior of STL-conforming iterators is - // undefined in this case. - // exceptions on zero-length range: It is impossible to define a closed - // interval over an empty range, so some other form of error checking - // would have to be used by the user to prevent undefined behavior. In - // the case where the user fails to catch the exception, it will simply - // be translated to Python by the default exception handling mechanisms. - - template - struct range - { - RandomAccessIterator start; - RandomAccessIterator stop; - typename iterator_difference::type step; - }; - - template - slice::range - get_indices( const RandomAccessIterator& begin, - const RandomAccessIterator& end) const - { - // This is based loosely on PySlice_GetIndicesEx(), but it has been - // carefully crafted to ensure that these iterators never fall out of - // the range of the container. - slice::range ret; - - typedef typename iterator_difference::type difference_type; - difference_type max_dist = boost::detail::distance(begin, end); - - object slice_start = this->start(); - object slice_stop = this->stop(); - object slice_step = this->step(); - - // Extract the step. - if (slice_step == object()) { - ret.step = 1; - } - else { - ret.step = extract( slice_step); - if (ret.step == 0) { - PyErr_SetString( PyExc_IndexError, "step size cannot be zero."); - throw_error_already_set(); - } - } - - // Setup the start iterator. - if (slice_start == object()) { - if (ret.step < 0) { - ret.start = end; - --ret.start; - } - else - ret.start = begin; - } - else { - difference_type i = extract( slice_start); - if (i >= max_dist && ret.step > 0) - throw std::invalid_argument( "Zero-length slice"); - if (i >= 0) { - ret.start = begin; - BOOST_USING_STD_MIN(); - std::advance( ret.start, min BOOST_PREVENT_MACRO_SUBSTITUTION(i, max_dist-1)); - } - else { - if (i < -max_dist && ret.step < 0) - throw std::invalid_argument( "Zero-length slice"); - ret.start = end; - // Advance start (towards begin) not farther than begin. - std::advance( ret.start, (-i < max_dist) ? i : -max_dist ); - } - } - - // Set up the stop iterator. This one is a little trickier since slices - // define a [) range, and we are returning a [] range. - if (slice_stop == object()) { - if (ret.step < 0) { - ret.stop = begin; - } - else { - ret.stop = end; - std::advance( ret.stop, -1); - } - } - else { - difference_type i = extract(slice_stop); - // First, branch on which direction we are going with this. - if (ret.step < 0) { - if (i+1 >= max_dist || i == -1) - throw std::invalid_argument( "Zero-length slice"); - - if (i >= 0) { - ret.stop = begin; - std::advance( ret.stop, i+1); - } - else { // i is negative, but more negative than -1. - ret.stop = end; - std::advance( ret.stop, (-i < max_dist) ? i : -max_dist); - } - } - else { // stepping forward - if (i == 0 || -i >= max_dist) - throw std::invalid_argument( "Zero-length slice"); - - if (i > 0) { - ret.stop = begin; - std::advance( ret.stop, (std::min)( i-1, max_dist-1)); - } - else { // i is negative, but not more negative than -max_dist - ret.stop = end; - std::advance( ret.stop, i-1); - } - } - } - - // Now the fun part, handling the possibilites surrounding step. - // At this point, step has been initialized, ret.stop, and ret.step - // represent the widest possible range that could be traveled - // (inclusive), and final_dist is the maximum distance covered by the - // slice. - typename iterator_difference::type final_dist = - boost::detail::distance( ret.start, ret.stop); - - // First case, if both ret.start and ret.stop are equal, then step - // is irrelevant and we can return here. - if (final_dist == 0) - return ret; - - // Second, if there is a sign mismatch, than the resulting range and - // step size conflict: std::advance( ret.start, ret.step) goes away from - // ret.stop. - if ((final_dist > 0) != (ret.step > 0)) - throw std::invalid_argument( "Zero-length slice."); - - // Finally, if the last step puts us past the end, we move ret.stop - // towards ret.start in the amount of the remainder. - // I don't remember all of the oolies surrounding negative modulii, - // so I am handling each of these cases separately. - if (final_dist < 0) { - difference_type remainder = -final_dist % -ret.step; - std::advance( ret.stop, remainder); - } - else { - difference_type remainder = final_dist % ret.step; - std::advance( ret.stop, -remainder); - } - - return ret; - } - - // Incorrect spelling. DO NOT USE. Only here for backward compatibility. - // Corrected 2011-06-14. - template - slice::range - get_indicies( const RandomAccessIterator& begin, - const RandomAccessIterator& end) const - { - return get_indices(begin, end); - } - - public: - // This declaration, in conjunction with the specialization of - // object_manager_traits<> below, allows C++ functions accepting slice - // arguments to be called from from Python. These constructors should never - // be used in client code. - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(slice, detail::slice_base) -}; - - -namespace converter { - -template<> -struct object_manager_traits - : pytype_object_manager_traits<&PySlice_Type, slice> -{ -}; - -} // !namesapce converter - -} } // !namespace ::boost::python - - -#endif // !defined BOOST_PYTHON_SLICE_JDB20040105_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/slice_nil.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/slice_nil.hpp deleted file mode 100644 index e911f06801..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/slice_nil.hpp +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef SLICE_NIL_DWA2002620_HPP -# define SLICE_NIL_DWA2002620_HPP - -# include -# include - -namespace boost { namespace python { namespace api { - -class slice_nil : public object -{ - public: - slice_nil() : object() {} -}; - -# ifndef _ // Watch out for GNU gettext users, who #define _(x) -static const slice_nil _ = slice_nil(); -# endif - -template -struct slice_bound -{ - typedef object type; -}; - -template <> -struct slice_bound -{ - typedef slice_nil type; -}; - -} - -using api::slice_nil; -# ifndef _ // Watch out for GNU gettext users, who #define _(x) -using api::_; -# endif - -}} // namespace boost::python - -#endif // SLICE_NIL_DWA2002620_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/ssize_t.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/ssize_t.hpp deleted file mode 100644 index e8a2d92f63..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/ssize_t.hpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright Ralf W. Grosse-Kunstleve & David Abrahams 2006. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PYTHON_SSIZE_T_RWGK20060924_HPP -# define BOOST_PYTHON_SSIZE_T_RWGK20060924_HPP - -# include - -namespace boost { namespace python { - -#if PY_VERSION_HEX >= 0x02050000 - -typedef Py_ssize_t ssize_t; -ssize_t const ssize_t_max = PY_SSIZE_T_MAX; -ssize_t const ssize_t_min = PY_SSIZE_T_MIN; - -#else - -typedef int ssize_t; -ssize_t const ssize_t_max = INT_MAX; -ssize_t const ssize_t_min = INT_MIN; - -#endif - -}} // namespace boost::python - -#endif // BOOST_PYTHON_SSIZE_T_RWGK20060924_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/stl_iterator.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/stl_iterator.hpp deleted file mode 100644 index 838954879a..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/stl_iterator.hpp +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright Eric Niebler 2005. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef STL_ITERATOR_EAN20051028_HPP -# define STL_ITERATOR_EAN20051028_HPP - -# include - -# include - -# include - -namespace boost { namespace python -{ - -// An STL input iterator over a python sequence -template -struct stl_input_iterator - : boost::iterator_facade< - stl_input_iterator - , ValueT - , std::input_iterator_tag - , ValueT - > -{ - stl_input_iterator() - : impl_() - { - } - - // ob is the python sequence - stl_input_iterator(boost::python::object const &ob) - : impl_(ob) - { - } - -private: - friend class boost::iterator_core_access; - - void increment() - { - this->impl_.increment(); - } - - ValueT dereference() const - { - return extract(this->impl_.current().get())(); - } - - bool equal(stl_input_iterator const &that) const - { - return this->impl_.equal(that.impl_); - } - - objects::stl_input_iterator_impl impl_; -}; - -}} // namespace boost::python - -#endif // STL_ITERATOR_EAN20051028_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/str.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/str.hpp deleted file mode 100644 index 426a3a255c..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/str.hpp +++ /dev/null @@ -1,422 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef STR_20020703_HPP -#define STR_20020703_HPP - -# include - -#include -#include -#include - -// disable defines in provided by some system libraries -#undef isspace -#undef islower -#undef isalpha -#undef isdigit -#undef isalnum -#undef isupper - -namespace boost { namespace python { - -class str; - -namespace detail -{ - struct BOOST_PYTHON_DECL str_base : object - { - str capitalize() const; - - str center(object_cref width) const; - - long count(object_cref sub) const; - - long count(object_cref sub, object_cref start) const; - - long count(object_cref sub, object_cref start, object_cref end) const; - -#if PY_VERSION_HEX < 0x03000000 - object decode() const; - object decode(object_cref encoding) const; - - object decode(object_cref encoding, object_cref errors) const; -#endif - - object encode() const; - object encode(object_cref encoding) const; - object encode(object_cref encoding, object_cref errors) const; - - bool endswith(object_cref suffix) const; - - bool endswith(object_cref suffix, object_cref start) const; - bool endswith(object_cref suffix, object_cref start, object_cref end) const; - - str expandtabs() const; - str expandtabs(object_cref tabsize) const; - - long find(object_cref sub) const; - long find(object_cref sub, object_cref start) const; - - long find(object_cref sub, object_cref start, object_cref end) const; - - long index(object_cref sub) const; - - long index(object_cref sub, object_cref start) const; - long index(object_cref sub, object_cref start, object_cref end) const; - - bool isalnum() const; - bool isalpha() const; - bool isdigit() const; - bool islower() const; - bool isspace() const; - bool istitle() const; - bool isupper() const; - - str join(object_cref sequence) const; - - str ljust(object_cref width) const; - str lower() const; - str lstrip() const; - - str replace(object_cref old, object_cref new_) const; - str replace(object_cref old, object_cref new_, object_cref maxsplit) const; - long rfind(object_cref sub) const; - - long rfind(object_cref sub, object_cref start) const; - - long rfind(object_cref sub, object_cref start, object_cref end) const; - long rindex(object_cref sub) const; - long rindex(object_cref sub, object_cref start) const; - - - long rindex(object_cref sub, object_cref start, object_cref end) const; - - str rjust(object_cref width) const; - - str rstrip() const; - - list split() const; - list split(object_cref sep) const; - - list split(object_cref sep, object_cref maxsplit) const; - - - list splitlines() const; - list splitlines(object_cref keepends) const; - - bool startswith(object_cref prefix) const; - - - bool startswith(object_cref prefix, object_cref start) const; - bool startswith(object_cref prefix, object_cref start, object_cref end) const; - - str strip() const; - str swapcase() const; - str title() const; - - str translate(object_cref table) const; - - str translate(object_cref table, object_cref deletechars) const; - - - str upper() const; - - protected: - str_base(); // new str - - str_base(const char* s); // new str - - str_base(char const* start, char const* finish); - - str_base(char const* start, std::size_t length); - - explicit str_base(object_cref other); - - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(str_base, object) - private: - static new_reference call(object const&); - }; -} - - -class str : public detail::str_base -{ - typedef detail::str_base base; - public: - str() {} // new str - - str(const char* s) : base(s) {} // new str - - str(char const* start, char const* finish) // new str - : base(start, finish) - {} - - str(char const* start, std::size_t length) // new str - : base(start, length) - {} - - template - explicit str(T const& other) - : base(object(other)) - { - } - - template - str center(T const& width) const - { - return base::center(object(width)); - } - - template - long count(T const& sub) const - { - return base::count(object(sub)); - } - - template - long count(T1 const& sub,T2 const& start) const - { - return base::count(object(sub), object(start)); - } - - template - long count(T1 const& sub,T2 const& start, T3 const& end) const - { - return base::count(object(sub), object(start)); - } - -#if PY_VERSION_HEX < 0x03000000 - object decode() const { return base::decode(); } - - template - object decode(T const& encoding) const - { - return base::decode(object(encoding)); - } - - template - object decode(T1 const& encoding, T2 const& errors) const - { - return base::decode(object(encoding),object(errors)); - } -#endif - - object encode() const { return base::encode(); } - - template - object encode(T const& encoding) const - { - return base::encode(object(encoding)); - } - - template - object encode(T1 const& encoding, T2 const& errors) const - { - return base::encode(object(encoding),object(errors)); - } - - template - bool endswith(T const& suffix) const - { - return base::endswith(object(suffix)); - } - - template - bool endswith(T1 const& suffix, T2 const& start) const - { - return base::endswith(object(suffix), object(start)); - } - - template - bool endswith(T1 const& suffix, T2 const& start, T3 const& end) const - { - return base::endswith(object(suffix), object(start), object(end)); - } - - str expandtabs() const { return base::expandtabs(); } - - template - str expandtabs(T const& tabsize) const - { - return base::expandtabs(object(tabsize)); - } - - template - long find(T const& sub) const - { - return base::find(object(sub)); - } - - template - long find(T1 const& sub, T2 const& start) const - { - return base::find(object(sub), object(start)); - } - - template - long find(T1 const& sub, T2 const& start, T3 const& end) const - { - return base::find(object(sub), object(start), object(end)); - } - - template - long index(T const& sub) const - { - return base::index(object(sub)); - } - - template - long index(T1 const& sub, T2 const& start) const - { - return base::index(object(sub), object(start)); - } - - template - long index(T1 const& sub, T2 const& start, T3 const& end) const - { - return base::index(object(sub), object(start), object(end)); - } - - template - str join(T const& sequence) const - { - return base::join(object(sequence)); - } - - template - str ljust(T const& width) const - { - return base::ljust(object(width)); - } - - template - str replace(T1 const& old, T2 const& new_) const - { - return base::replace(object(old),object(new_)); - } - - template - str replace(T1 const& old, T2 const& new_, T3 const& maxsplit) const - { - return base::replace(object(old),object(new_), object(maxsplit)); - } - - template - long rfind(T const& sub) const - { - return base::rfind(object(sub)); - } - - template - long rfind(T1 const& sub, T2 const& start) const - { - return base::rfind(object(sub), object(start)); - } - - template - long rfind(T1 const& sub, T2 const& start, T3 const& end) const - { - return base::rfind(object(sub), object(start), object(end)); - } - - template - long rindex(T const& sub) const - { - return base::rindex(object(sub)); - } - - template - long rindex(T1 const& sub, T2 const& start) const - { - return base::rindex(object(sub), object(start)); - } - - template - long rindex(T1 const& sub, T2 const& start, T3 const& end) const - { - return base::rindex(object(sub), object(start), object(end)); - } - - template - str rjust(T const& width) const - { - return base::rjust(object(width)); - } - - list split() const { return base::split(); } - - template - list split(T const& sep) const - { - return base::split(object(sep)); - } - - template - list split(T1 const& sep, T2 const& maxsplit) const - { - return base::split(object(sep), object(maxsplit)); - } - - list splitlines() const { return base::splitlines(); } - - template - list splitlines(T const& keepends) const - { - return base::splitlines(object(keepends)); - } - - template - bool startswith(T const& prefix) const - { - return base::startswith(object(prefix)); - } - - template - bool startswith(T1 const& prefix, T2 const& start) const - { - return base::startswith(object(prefix), object(start)); - } - - template - bool startswith(T1 const& prefix, T2 const& start, T3 const& end) const - { - return base::startswith(object(prefix), object(start), object(end)); - } - - template - str translate(T const& table) const - { - return base::translate(object(table)); - } - - template - str translate(T1 const& table, T2 const& deletechars) const - { - return base::translate(object(table), object(deletechars)); - } - - public: // implementation detail -- for internal use only - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(str, base) -}; - -// -// Converter Specializations -// -namespace converter -{ - template <> - struct object_manager_traits -#if PY_VERSION_HEX >= 0x03000000 - : pytype_object_manager_traits<&PyUnicode_Type,str> -#else - : pytype_object_manager_traits<&PyString_Type,str> -#endif - { - }; -} - -}} // namespace boost::python - -#endif // STR_20020703_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/container_utils.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/container_utils.hpp deleted file mode 100644 index 72710bb8b0..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/container_utils.hpp +++ /dev/null @@ -1,57 +0,0 @@ - -// (C) Copyright Joel de Guzman 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef PY_CONTAINER_UTILS_JDG20038_HPP -# define PY_CONTAINER_UTILS_JDG20038_HPP - -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { namespace container_utils { - - template - void - extend_container(Container& container, object l) - { - typedef typename Container::value_type data_type; - - // l must be iterable - BOOST_FOREACH(object elem, - std::make_pair( - boost::python::stl_input_iterator(l), - boost::python::stl_input_iterator() - )) - { - extract x(elem); - // try if elem is an exact data_type type - if (x.check()) - { - container.push_back(x()); - } - else - { - // try to convert elem to data_type type - extract x(elem); - if (x.check()) - { - container.push_back(x()); - } - else - { - PyErr_SetString(PyExc_TypeError, "Incompatible Data Type"); - throw_error_already_set(); - } - } - } - } - -}}} // namespace boost::python::container_utils - -#endif diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp deleted file mode 100644 index 70df8a7273..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp +++ /dev/null @@ -1,759 +0,0 @@ -// (C) Copyright Joel de Guzman 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef INDEXING_SUITE_DETAIL_JDG20036_HPP -# define INDEXING_SUITE_DETAIL_JDG20036_HPP - -# include -# include -# include -# include -# include -# include -# include -# include -#include - -namespace boost { namespace python { namespace detail { - -#if defined(NDEBUG) -#define BOOST_PYTHON_INDEXING_CHECK_INVARIANT -#else -#define BOOST_PYTHON_INDEXING_CHECK_INVARIANT check_invariant() -#endif - - template - struct compare_proxy_index - { - // This functor compares a proxy and an index. - // This is used by proxy_group::first_proxy to - // get first proxy with index i. - - template - bool operator()(PyObject* prox, Index i) const - { - typedef typename Proxy::policies_type policies_type; - Proxy& proxy = extract(prox)(); - return policies_type:: - compare_index(proxy.get_container(), proxy.get_index(), i); - } - }; - - // The proxy_group class holds a vector of container element - // proxies. First, what is a container element proxy? A container - // element proxy acts like a smart pointer holding a reference to - // a container and an index (see container_element, for details). - // - // The proxies are held in a vector always sorted by its index. - // Various functions manage the addition, removal and searching - // of proxies from the vector. - // - template - class proxy_group - { - public: - - typedef typename std::vector::const_iterator const_iterator; - typedef typename std::vector::iterator iterator; - typedef typename Proxy::index_type index_type; - typedef typename Proxy::policies_type policies_type; - - iterator - first_proxy(index_type i) - { - // Return the first proxy with index <= i - return boost::detail::lower_bound( - proxies.begin(), proxies.end(), - i, compare_proxy_index()); - } - - void - remove(Proxy& proxy) - { - // Remove a proxy - for (iterator iter = first_proxy(proxy.get_index()); - iter != proxies.end(); ++iter) - { - if (&extract(*iter)() == &proxy) - { - proxies.erase(iter); - break; - } - } - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - } - - void - add(PyObject* prox) - { - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - // Add a proxy - proxies.insert( - first_proxy(extract(prox)().get_index()), prox); - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - } - - void - erase(index_type i, mpl::false_) - { - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - // Erase the proxy with index i - replace(i, i+1, 0); - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - } - - void - erase(index_type i, mpl::true_) - { - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - // Erase the proxy with index i - - iterator iter = first_proxy(i); - extract p(*iter); - - if (iter != proxies.end() && p().get_index() == i) - { - extract p(*iter); - p().detach(); - proxies.erase(iter); - } - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - } - - void - erase(index_type from, index_type to) - { - // note: this cannot be called when container is not sliceable - - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - // Erase all proxies with indexes from..to - replace(from, to, 0); - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - } - - void - replace( - index_type from, - index_type to, - typename std::vector::size_type len) - { - // note: this cannot be called when container is not sliceable - - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - // Erase all proxies with indexes from..to. - // Adjust the displaced indexes such that the - // final effect is that we have inserted *len* - // number of proxies in the vacated region. This - // procedure involves adjusting the indexes of - // the proxies. - - iterator left = first_proxy(from); - iterator right = proxies.end(); // we'll adjust this later - - for (iterator iter = left; iter != right; ++iter) - { - if (extract(*iter)().get_index() > to) - { - right = iter; // adjust right - break; - } - extract p(*iter); - p().detach(); - } - - typename std::vector::size_type - offset = left-proxies.begin(); - proxies.erase(left, right); - right = proxies.begin()+offset; - - while (right != proxies.end()) - { - typedef typename Proxy::container_type::difference_type difference_type; - extract p(*right); - p().set_index( - extract(*right)().get_index() - - (difference_type(to) - from - len) - ); - - ++right; - } - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - } - - PyObject* - find(index_type i) - { - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - // Find the proxy with *exact* index i. - // Return 0 (null) if no proxy with the - // given index is found. - iterator iter = first_proxy(i); - if (iter != proxies.end() - && extract(*iter)().get_index() == i) - { - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - return *iter; - } - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - return 0; - } - - typename std::vector::size_type - size() const - { - BOOST_PYTHON_INDEXING_CHECK_INVARIANT; - // How many proxies are there so far? - return proxies.size(); - } - - private: - -#if !defined(NDEBUG) - void - check_invariant() const - { - for (const_iterator i = proxies.begin(); i != proxies.end(); ++i) - { - if ((*i)->ob_refcnt <= 0) - { - PyErr_SetString(PyExc_RuntimeError, - "Invariant: Proxy vector in an inconsistent state"); - throw_error_already_set(); - } - - if (i+1 != proxies.end()) - { - if (extract(*(i+1))().get_index() == - extract(*(i))().get_index()) - { - PyErr_SetString(PyExc_RuntimeError, - "Invariant: Proxy vector in an inconsistent state (duplicate proxy)"); - throw_error_already_set(); - } - } - } - } -#endif - - std::vector proxies; - }; - - // proxy_links holds a map of Container pointers (keys) - // with proxy_group(s) (data). Various functions manage - // the addition, removal and searching of proxies from - // the map. - // - template - class proxy_links - { - public: - - typedef std::map > links_t; - typedef typename Proxy::index_type index_type; - - void - remove(Proxy& proxy) - { - // Remove a proxy. - typename links_t::iterator r = links.find(&proxy.get_container()); - if (r != links.end()) - { - r->second.remove(proxy); - if (r->second.size() == 0) - links.erase(r); - } - } - - void - add(PyObject* prox, Container& container) - { - // Add a proxy - links[&container].add(prox); - } - - template - void erase(Container& container, index_type i, NoSlice no_slice) - { - // Erase the proxy with index i - typename links_t::iterator r = links.find(&container); - if (r != links.end()) - { - r->second.erase(i, no_slice); - if (r->second.size() == 0) - links.erase(r); - } - } - - void - erase(Container& container, index_type from, index_type to) - { - // Erase all proxies with indexes from..to - typename links_t::iterator r = links.find(&container); - if (r != links.end()) - { - r->second.erase(from, to); - if (r->second.size() == 0) - links.erase(r); - } - } - - void - replace( - Container& container, - index_type from, index_type to, index_type len) - { - // Erase all proxies with indexes from..to. - // Adjust the displaced indexes such that the - // final effect is that we have inserted *len* - // number of proxies in the vacated region. This - // procedure involves adjusting the indexes of - // the proxies. - - typename links_t::iterator r = links.find(&container); - if (r != links.end()) - { - r->second.replace(from, to, len); - if (r->second.size() == 0) - links.erase(r); - } - } - - PyObject* - find(Container& container, index_type i) - { - // Find the proxy with *exact* index i. - // Return 0 (null) if no proxy with the given - // index is found. - typename links_t::iterator r = links.find(&container); - if (r != links.end()) - return r->second.find(i); - return 0; - } - - private: - - links_t links; - }; - - // container_element is our container proxy class. - // This class acts like a smart pointer to a container - // element. The class holds an index and a reference to - // a container. Dereferencing the smart pointer will - // retrieve the nth (index) element from the container. - // - // A container_element can also be detached from the - // container. In such a detached state, the container_element - // holds a copy of the nth (index) element, which it - // returns when dereferenced. - // - template - class container_element - { - public: - - typedef Index index_type; - typedef Container container_type; - typedef typename Policies::data_type element_type; - typedef Policies policies_type; - typedef container_element self_t; - typedef proxy_group links_type; - - container_element(object container, Index index) - : ptr() - , container(container) - , index(index) - { - } - - container_element(container_element const& ce) - : ptr(ce.ptr.get() == 0 ? 0 : new element_type(*ce.ptr.get())) - , container(ce.container) - , index(ce.index) - { - } - - ~container_element() - { - if (!is_detached()) - get_links().remove(*this); - } - - element_type& operator*() const - { - if (is_detached()) - return *get_pointer(ptr); - return Policies::get_item(get_container(), index); - } - - element_type* get() const - { - if (is_detached()) - return get_pointer(ptr); - return &Policies::get_item(get_container(), index); - } - - void - detach() - { - if (!is_detached()) - { - ptr.reset( - new element_type( - Policies::get_item(get_container(), index))); - container = object(); // free container. reset it to None - } - } - - bool - is_detached() const - { - return get_pointer(ptr) != 0; - } - - Container& - get_container() const - { - return extract(container)(); - } - - Index - get_index() const - { - return index; - } - - void - set_index(Index i) - { - index = i; - } - - static proxy_links& - get_links() - { - // All container_element(s) maintain links to - // its container in a global map (see proxy_links). - // This global "links" map is a singleton. - - static proxy_links links; - return links; // singleton - } - - private: - - container_element& operator=(container_element const& ce); - - scoped_ptr ptr; - object container; - Index index; - }; - - template < - class Container - , class DerivedPolicies - , class ContainerElement - , class Index - > - struct no_proxy_helper - { - static void - register_container_element() - { - } - - template - static object - base_get_item_helper(DataType const& p, mpl::true_) - { - return object(ptr(p)); - } - - template - static object - base_get_item_helper(DataType const& x, mpl::false_) - { - return object(x); - } - - static object - base_get_item_(back_reference const& container, PyObject* i) - { - return base_get_item_helper( - DerivedPolicies::get_item( - container.get(), DerivedPolicies:: - convert_index(container.get(), i)) - , is_pointer() - ); - } - - static void - base_replace_indexes( - Container& /*container*/, Index /*from*/, - Index /*to*/, Index /*n*/) - { - } - - template - static void - base_erase_index( - Container& /*container*/, Index /*i*/, NoSlice /*no_slice*/) - { - } - - static void - base_erase_indexes(Container& /*container*/, Index /*from*/, Index /*to*/) - { - } - }; - - template < - class Container - , class DerivedPolicies - , class ContainerElement - , class Index - > - struct proxy_helper - { - static void - register_container_element() - { - register_ptr_to_python(); - } - - static object - base_get_item_(back_reference const& container, PyObject* i) - { - // Proxy - Index idx = DerivedPolicies::convert_index(container.get(), i); - - if (PyObject* shared = - ContainerElement::get_links().find(container.get(), idx)) - { - handle<> h(python::borrowed(shared)); - return object(h); - } - else - { - object prox(ContainerElement(container.source(), idx)); - ContainerElement:: - get_links().add(prox.ptr(), container.get()); - return prox; - } - } - - static void - base_replace_indexes( - Container& container, Index from, - Index to, Index n) - { - ContainerElement::get_links().replace(container, from, to, n); - } - - template - static void - base_erase_index( - Container& container, Index i, NoSlice no_slice) - { - ContainerElement::get_links().erase(container, i, no_slice); - } - - static void - base_erase_indexes( - Container& container, Index from, Index to) - { - ContainerElement::get_links().erase(container, from, to); - } - }; - - template < - class Container - , class DerivedPolicies - , class ProxyHandler - , class Data - , class Index - > - struct slice_helper - { - static object - base_get_slice(Container& container, PySliceObject* slice) - { - Index from, to; - base_get_slice_data(container, slice, from, to); - return DerivedPolicies::get_slice(container, from, to); - } - - static void - base_get_slice_data( - Container& container, PySliceObject* slice, Index& from_, Index& to_) - { - if (Py_None != slice->step) { - PyErr_SetString( PyExc_IndexError, "slice step size not supported."); - throw_error_already_set(); - } - - Index min_index = DerivedPolicies::get_min_index(container); - Index max_index = DerivedPolicies::get_max_index(container); - - if (Py_None == slice->start) { - from_ = min_index; - } - else { - long from = extract( slice->start); - if (from < 0) // Negative slice index - from += max_index; - if (from < 0) // Clip lower bounds to zero - from = 0; - from_ = boost::numeric_cast(from); - if (from_ > max_index) // Clip upper bounds to max_index. - from_ = max_index; - } - - if (Py_None == slice->stop) { - to_ = max_index; - } - else { - long to = extract( slice->stop); - if (to < 0) - to += max_index; - if (to < 0) - to = 0; - to_ = boost::numeric_cast(to); - if (to_ > max_index) - to_ = max_index; - } - } - - static void - base_set_slice(Container& container, PySliceObject* slice, PyObject* v) - { - Index from, to; - base_get_slice_data(container, slice, from, to); - - extract elem(v); - // try if elem is an exact Data - if (elem.check()) - { - ProxyHandler::base_replace_indexes(container, from, to, 1); - DerivedPolicies::set_slice(container, from, to, elem()); - } - else - { - // try to convert elem to Data - extract elem(v); - if (elem.check()) - { - ProxyHandler::base_replace_indexes(container, from, to, 1); - DerivedPolicies::set_slice(container, from, to, elem()); - } - else - { - // Otherwise, it must be a list or some container - handle<> l_(python::borrowed(v)); - object l(l_); - - std::vector temp; - for (int i = 0; i < l.attr("__len__")(); i++) - { - object elem(l[i]); - extract x(elem); - // try if elem is an exact Data type - if (x.check()) - { - temp.push_back(x()); - } - else - { - // try to convert elem to Data type - extract x(elem); - if (x.check()) - { - temp.push_back(x()); - } - else - { - PyErr_SetString(PyExc_TypeError, - "Invalid sequence element"); - throw_error_already_set(); - } - } - } - - ProxyHandler::base_replace_indexes(container, from, to, - temp.end()-temp.begin()); - DerivedPolicies::set_slice(container, from, to, - temp.begin(), temp.end()); - } - } - } - - static void - base_delete_slice(Container& container, PySliceObject* slice) - { - Index from, to; - base_get_slice_data(container, slice, from, to); - ProxyHandler::base_erase_indexes(container, from, to); - DerivedPolicies::delete_slice(container, from, to); - } - }; - - template < - class Container - , class DerivedPolicies - , class ProxyHandler - , class Data - , class Index - > - struct no_slice_helper - { - static void - slicing_not_suported() - { - PyErr_SetString(PyExc_RuntimeError, "Slicing not supported"); - throw_error_already_set(); - } - - static object - base_get_slice(Container& /*container*/, PySliceObject* /*slice*/) - { - slicing_not_suported(); - return object(); - } - - static void - base_set_slice(Container& /*container*/, PySliceObject* /*slice*/, PyObject* /*v*/) - { - slicing_not_suported(); - } - - static void - base_delete_slice(Container& /*container*/, PySliceObject* /*slice*/) - { - slicing_not_suported(); - } - }; - -#ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -}} // namespace python::detail -#endif - - template - inline typename Policies::data_type* - get_pointer( - python::detail::container_element const& p) - { - // Get the pointer of a container_element smart pointer - return p.get(); - } - -#ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP - // Don't hide these other get_pointer overloads - using boost::python::get_pointer; - using boost::get_pointer; -}} // namespace python::detail -#endif - -} // namespace boost - -#endif // INDEXING_SUITE_DETAIL_JDG20036_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/indexing_suite.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/indexing_suite.hpp deleted file mode 100644 index b636b2111c..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/indexing_suite.hpp +++ /dev/null @@ -1,299 +0,0 @@ -// (C) Copyright Joel de Guzman 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef INDEXING_SUITE_JDG20036_HPP -# define INDEXING_SUITE_JDG20036_HPP - -# include -# include -# include -# include -# include -# include -# include -# include -# include - -namespace boost { namespace python { - - // indexing_suite class. This class is the facade class for - // the management of C++ containers intended to be integrated - // to Python. The objective is make a C++ container look and - // feel and behave exactly as we'd expect a Python container. - // By default indexed elements are returned by proxy. This can be - // disabled by supplying *true* in the NoProxy template parameter. - // - // Derived classes provide the hooks needed by the indexing_suite - // to do its job: - // - // static data_type& - // get_item(Container& container, index_type i); - // - // static object - // get_slice(Container& container, index_type from, index_type to); - // - // static void - // set_item(Container& container, index_type i, data_type const& v); - // - // static void - // set_slice( - // Container& container, index_type from, - // index_type to, data_type const& v - // ); - // - // template - // static void - // set_slice(Container& container, index_type from, - // index_type to, Iter first, Iter last - // ); - // - // static void - // delete_item(Container& container, index_type i); - // - // static void - // delete_slice(Container& container, index_type from, index_type to); - // - // static size_t - // size(Container& container); - // - // template - // static bool - // contains(Container& container, T const& val); - // - // static index_type - // convert_index(Container& container, PyObject* i); - // - // static index_type - // adjust_index(index_type current, index_type from, - // index_type to, size_type len - // ); - // - // Most of these policies are self explanatory. convert_index and - // adjust_index, however, deserves some explanation. - // - // convert_index converts an Python index into a C++ index that the - // container can handle. For instance, negative indexes in Python, by - // convention, indexes from the right (e.g. C[-1] indexes the rightmost - // element in C). convert_index should handle the necessary conversion - // for the C++ container (e.g. convert -1 to C.size()-1). convert_index - // should also be able to convert the type of the index (A dynamic Python - // type) to the actual type that the C++ container expects. - // - // When a container expands or contracts, held indexes to its elements - // must be adjusted to follow the movement of data. For instance, if - // we erase 3 elements, starting from index 0 from a 5 element vector, - // what used to be at index 4 will now be at index 1: - // - // [a][b][c][d][e] ---> [d][e] - // ^ ^ - // 4 1 - // - // adjust_index takes care of the adjustment. Given a current index, - // the function should return the adjusted index when data in the - // container at index from..to is replaced by *len* elements. - // - - template < - class Container - , class DerivedPolicies - , bool NoProxy = false - , bool NoSlice = false - , class Data = typename Container::value_type - , class Index = typename Container::size_type - , class Key = typename Container::value_type - > - class indexing_suite - : public def_visitor< - indexing_suite< - Container - , DerivedPolicies - , NoProxy - , NoSlice - , Data - , Index - , Key - > > - { - private: - - typedef mpl::or_< - mpl::bool_ - , mpl::not_ > - , typename mpl::or_< - is_same - , is_same > - , is_same > - , is_same > >::type> - no_proxy; - - typedef detail::container_element - container_element_t; - -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - struct return_policy : return_internal_reference<> {}; -#else - typedef return_internal_reference<> return_policy; -#endif - - typedef typename mpl::if_< - no_proxy - , iterator - , iterator >::type - def_iterator; - - typedef typename mpl::if_< - no_proxy - , detail::no_proxy_helper< - Container - , DerivedPolicies - , container_element_t - , Index> - , detail::proxy_helper< - Container - , DerivedPolicies - , container_element_t - , Index> >::type - proxy_handler; - - typedef typename mpl::if_< - mpl::bool_ - , detail::no_slice_helper< - Container - , DerivedPolicies - , proxy_handler - , Data - , Index> - , detail::slice_helper< - Container - , DerivedPolicies - , proxy_handler - , Data - , Index> >::type - slice_handler; - - public: - - template - void visit(Class& cl) const - { - // Hook into the class_ generic visitation .def function - proxy_handler::register_container_element(); - - cl - .def("__len__", base_size) - .def("__setitem__", &base_set_item) - .def("__delitem__", &base_delete_item) - .def("__getitem__", &base_get_item) - .def("__contains__", &base_contains) - .def("__iter__", def_iterator()) - ; - - DerivedPolicies::extension_def(cl); - } - - template - static void - extension_def(Class& cl) - { - // default. - // no more extensions - } - - private: - - static object - base_get_item(back_reference container, PyObject* i) - { - if (PySlice_Check(i)) - return slice_handler::base_get_slice( - container.get(), static_cast(static_cast(i))); - - return proxy_handler::base_get_item_(container, i); - } - - static void - base_set_item(Container& container, PyObject* i, PyObject* v) - { - if (PySlice_Check(i)) - { - slice_handler::base_set_slice(container, - static_cast(static_cast(i)), v); - } - else - { - extract elem(v); - // try if elem is an exact Data - if (elem.check()) - { - DerivedPolicies:: - set_item(container, - DerivedPolicies:: - convert_index(container, i), elem()); - } - else - { - // try to convert elem to Data - extract elem(v); - if (elem.check()) - { - DerivedPolicies:: - set_item(container, - DerivedPolicies:: - convert_index(container, i), elem()); - } - else - { - PyErr_SetString(PyExc_TypeError, "Invalid assignment"); - throw_error_already_set(); - } - } - } - } - - static void - base_delete_item(Container& container, PyObject* i) - { - if (PySlice_Check(i)) - { - slice_handler::base_delete_slice( - container, static_cast(static_cast(i))); - return; - } - - Index index = DerivedPolicies::convert_index(container, i); - proxy_handler::base_erase_index(container, index, mpl::bool_()); - DerivedPolicies::delete_item(container, index); - } - - static size_t - base_size(Container& container) - { - return DerivedPolicies::size(container); - } - - static bool - base_contains(Container& container, PyObject* key) - { - extract x(key); - // try if key is an exact Key type - if (x.check()) - { - return DerivedPolicies::contains(container, x()); - } - else - { - // try to convert key to Key type - extract x(key); - if (x.check()) - return DerivedPolicies::contains(container, x()); - else - return false; - } - } - }; - -}} // namespace boost::python - -#endif // INDEXING_SUITE_JDG20036_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/map_indexing_suite.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/map_indexing_suite.hpp deleted file mode 100644 index 7fbad4cace..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/map_indexing_suite.hpp +++ /dev/null @@ -1,181 +0,0 @@ -// (C) Copyright Joel de Guzman 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef MAP_INDEXING_SUITE_JDG20038_HPP -# define MAP_INDEXING_SUITE_JDG20038_HPP - -# include -# include -# include -# include - -namespace boost { namespace python { - - // Forward declaration - template - class map_indexing_suite; - - namespace detail - { - template - class final_map_derived_policies - : public map_indexing_suite > {}; - } - - // The map_indexing_suite class is a predefined indexing_suite derived - // class for wrapping std::map (and std::map like) classes. It provides - // all the policies required by the indexing_suite (see indexing_suite). - // Example usage: - // - // class X {...}; - // - // ... - // - // class_ >("XMap") - // .def(map_indexing_suite >()) - // ; - // - // By default indexed elements are returned by proxy. This can be - // disabled by supplying *true* in the NoProxy template parameter. - // - template < - class Container, - bool NoProxy = false, - class DerivedPolicies - = detail::final_map_derived_policies > - class map_indexing_suite - : public indexing_suite< - Container - , DerivedPolicies - , NoProxy - , true - , typename Container::value_type::second_type - , typename Container::key_type - , typename Container::key_type - > - { - public: - - typedef typename Container::value_type value_type; - typedef typename Container::value_type::second_type data_type; - typedef typename Container::key_type key_type; - typedef typename Container::key_type index_type; - typedef typename Container::size_type size_type; - typedef typename Container::difference_type difference_type; - - template - static void - extension_def(Class& cl) - { - // Wrap the map's element (value_type) - std::string elem_name = "map_indexing_suite_"; - object class_name(cl.attr("__name__")); - extract class_name_extractor(class_name); - elem_name += class_name_extractor(); - elem_name += "_entry"; - - typedef typename mpl::if_< - mpl::and_, mpl::bool_ > - , return_internal_reference<> - , default_call_policies - >::type get_data_return_policy; - - class_(elem_name.c_str()) - .def("__repr__", &DerivedPolicies::print_elem) - .def("data", &DerivedPolicies::get_data, get_data_return_policy()) - .def("key", &DerivedPolicies::get_key) - ; - } - - static object - print_elem(typename Container::value_type const& e) - { - return "(%s, %s)" % python::make_tuple(e.first, e.second); - } - - static - typename mpl::if_< - mpl::and_, mpl::bool_ > - , data_type& - , data_type - >::type - get_data(typename Container::value_type& e) - { - return e.second; - } - - static typename Container::key_type - get_key(typename Container::value_type& e) - { - return e.first; - } - - static data_type& - get_item(Container& container, index_type i_) - { - typename Container::iterator i = container.find(i_); - if (i == container.end()) - { - PyErr_SetString(PyExc_KeyError, "Invalid key"); - throw_error_already_set(); - } - return i->second; - } - - static void - set_item(Container& container, index_type i, data_type const& v) - { - container[i] = v; - } - - static void - delete_item(Container& container, index_type i) - { - container.erase(i); - } - - static size_t - size(Container& container) - { - return container.size(); - } - - static bool - contains(Container& container, key_type const& key) - { - return container.find(key) != container.end(); - } - - static bool - compare_index(Container& container, index_type a, index_type b) - { - return container.key_comp()(a, b); - } - - static index_type - convert_index(Container& /*container*/, PyObject* i_) - { - extract i(i_); - if (i.check()) - { - return i(); - } - else - { - extract i(i_); - if (i.check()) - return i(); - } - - PyErr_SetString(PyExc_TypeError, "Invalid index type"); - throw_error_already_set(); - return index_type(); - } - }; - -}} // namespace boost::python - -#endif // MAP_INDEXING_SUITE_JDG20038_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/vector_indexing_suite.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/vector_indexing_suite.hpp deleted file mode 100644 index 34c29ecc6f..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/suite/indexing/vector_indexing_suite.hpp +++ /dev/null @@ -1,242 +0,0 @@ -// (C) Copyright Joel de Guzman 2003. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef VECTOR_INDEXING_SUITE_JDG20036_HPP -# define VECTOR_INDEXING_SUITE_JDG20036_HPP - -# include -# include -# include - -namespace boost { namespace python { - - // Forward declaration - template - class vector_indexing_suite; - - namespace detail - { - template - class final_vector_derived_policies - : public vector_indexing_suite > {}; - } - - // The vector_indexing_suite class is a predefined indexing_suite derived - // class for wrapping std::vector (and std::vector like) classes. It provides - // all the policies required by the indexing_suite (see indexing_suite). - // Example usage: - // - // class X {...}; - // - // ... - // - // class_ >("XVec") - // .def(vector_indexing_suite >()) - // ; - // - // By default indexed elements are returned by proxy. This can be - // disabled by supplying *true* in the NoProxy template parameter. - // - template < - class Container, - bool NoProxy = false, - class DerivedPolicies - = detail::final_vector_derived_policies > - class vector_indexing_suite - : public indexing_suite - { - public: - - typedef typename Container::value_type data_type; - typedef typename Container::value_type key_type; - typedef typename Container::size_type index_type; - typedef typename Container::size_type size_type; - typedef typename Container::difference_type difference_type; - - template - static void - extension_def(Class& cl) - { - cl - .def("append", &base_append) - .def("extend", &base_extend) - ; - } - - static - typename mpl::if_< - is_class - , data_type& - , data_type - >::type - get_item(Container& container, index_type i) - { - return container[i]; - } - - static object - get_slice(Container& container, index_type from, index_type to) - { - if (from > to) - return object(Container()); - return object(Container(container.begin()+from, container.begin()+to)); - } - - static void - set_item(Container& container, index_type i, data_type const& v) - { - container[i] = v; - } - - static void - set_slice(Container& container, index_type from, - index_type to, data_type const& v) - { - if (from > to) { - return; - } - else { - container.erase(container.begin()+from, container.begin()+to); - container.insert(container.begin()+from, v); - } - } - - template - static void - set_slice(Container& container, index_type from, - index_type to, Iter first, Iter last) - { - if (from > to) { - container.insert(container.begin()+from, first, last); - } - else { - container.erase(container.begin()+from, container.begin()+to); - container.insert(container.begin()+from, first, last); - } - } - - static void - delete_item(Container& container, index_type i) - { - container.erase(container.begin()+i); - } - - static void - delete_slice(Container& container, index_type from, index_type to) - { - if (from > to) { - // A null-op. - return; - } - container.erase(container.begin()+from, container.begin()+to); - } - - static size_t - size(Container& container) - { - return container.size(); - } - - static bool - contains(Container& container, key_type const& key) - { - return std::find(container.begin(), container.end(), key) - != container.end(); - } - - static index_type - get_min_index(Container& /*container*/) - { - return 0; - } - - static index_type - get_max_index(Container& container) - { - return container.size(); - } - - static bool - compare_index(Container& /*container*/, index_type a, index_type b) - { - return a < b; - } - - static index_type - convert_index(Container& container, PyObject* i_) - { - extract i(i_); - if (i.check()) - { - long index = i(); - if (index < 0) - index += DerivedPolicies::size(container); - if (index >= long(container.size()) || index < 0) - { - PyErr_SetString(PyExc_IndexError, "Index out of range"); - throw_error_already_set(); - } - return index; - } - - PyErr_SetString(PyExc_TypeError, "Invalid index type"); - throw_error_already_set(); - return index_type(); - } - - static void - append(Container& container, data_type const& v) - { - container.push_back(v); - } - - template - static void - extend(Container& container, Iter first, Iter last) - { - container.insert(container.end(), first, last); - } - - private: - - static void - base_append(Container& container, object v) - { - extract elem(v); - // try if elem is an exact Data - if (elem.check()) - { - DerivedPolicies::append(container, elem()); - } - else - { - // try to convert elem to data_type - extract elem(v); - if (elem.check()) - { - DerivedPolicies::append(container, elem()); - } - else - { - PyErr_SetString(PyExc_TypeError, - "Attempting to append an invalid type"); - throw_error_already_set(); - } - } - } - - static void - base_extend(Container& container, object v) - { - std::vector temp; - container_utils::extend_container(temp, v); - DerivedPolicies::extend(container, temp.begin(), temp.end()); - } - }; - -}} // namespace boost::python - -#endif // VECTOR_INDEXING_SUITE_JDG20036_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/tag.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/tag.hpp deleted file mode 100644 index ccff9f1a17..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/tag.hpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef TAG_DWA2002720_HPP -# define TAG_DWA2002720_HPP - -# include - -namespace boost { namespace python { - -// used only to prevent argument-dependent lookup from finding the -// wrong function in some cases. Cheaper than qualification. -enum tag_t { tag }; - -}} // namespace boost::python - -#endif // TAG_DWA2002720_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/to_python_converter.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/to_python_converter.hpp deleted file mode 100644 index 378d159e97..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/to_python_converter.hpp +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef TO_PYTHON_CONVERTER_DWA200221_HPP -# define TO_PYTHON_CONVERTER_DWA200221_HPP - -# include - -# include -# include -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES -# include -#endif -# include - -namespace boost { namespace python { - -#if 0 //get_pytype member detection -namespace detail -{ - typedef char yes_type; - typedef struct {char a[2]; } no_type; - template struct test_get_pytype1 { }; - template struct test_get_pytype2 { }; - - template yes_type tester(test_get_pytype1<&T::get_pytype>*); - - template yes_type tester(test_get_pytype2<&T::get_pytype>*); - - template no_type tester(...); - - template - struct test_get_pytype_base - { - BOOST_STATIC_CONSTANT(bool, value= (sizeof(detail::tester(0)) == sizeof(yes_type))); - }; - - template - struct test_get_pytype : boost::mpl::bool_::value> - { - }; - -} -#endif - -template < class T, class Conversion, bool has_get_pytype=false > -struct to_python_converter -{ -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES -#if 0 //defined _MSC_VER && _MSC_VER >=1310 - //probably other compilers could come here as well - typedef typename detail::test_get_pytype HasGetPytype; -#else - typedef boost::mpl::bool_ HasGetPytype; -#endif - - static PyTypeObject const* get_pytype_1(boost::mpl::true_ *) - { - return Conversion::get_pytype(); - } - - static PyTypeObject const* get_pytype_1(boost::mpl::false_ *) - { - return 0; - } - static PyTypeObject const* get_pytype_impl() - { - return get_pytype_1((HasGetPytype*)0); - } -#endif - - to_python_converter(); -}; - -// -// implementation -// - -template -to_python_converter::to_python_converter() -{ - typedef converter::as_to_python_function< - T, Conversion - > normalized; - - converter::registry::insert( - &normalized::convert - , type_id() -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - , &get_pytype_impl -#endif - ); -} - -}} // namespace boost::python - -#endif // TO_PYTHON_CONVERTER_DWA200221_HPP - diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/to_python_indirect.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/to_python_indirect.hpp deleted file mode 100644 index 23ad026319..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/to_python_indirect.hpp +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef TO_PYTHON_INDIRECT_DWA200221_HPP -# define TO_PYTHON_INDIRECT_DWA200221_HPP - -# include - -# include -# include - -# include - -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES -# include -#endif - -# include - -# include -# include - -# include - -# if defined(__ICL) && __ICL < 600 -# include -# else -# include -# endif - -namespace boost { namespace python { - -template -struct to_python_indirect -{ - template - inline PyObject* - operator()(U const& ref) const - { - return this->execute(const_cast(ref), is_pointer()); - } -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - inline PyTypeObject const* - get_pytype()const - { - return converter::registered_pytype::get_pytype(); - } -#endif - private: - template - inline PyObject* execute(U* ptr, mpl::true_) const - { - // No special NULL treatment for references - if (ptr == 0) - return python::detail::none(); - else - return this->execute(*ptr, mpl::false_()); - } - - template - inline PyObject* execute(U const& x, mpl::false_) const - { - U* const p = &const_cast(x); - if (is_polymorphic::value) - { - if (PyObject* o = detail::wrapper_base_::owner(p)) - return incref(o); - } - return MakeHolder::execute(p); - } -}; - -// -// implementations -// -namespace detail -{ - struct make_owning_holder - { - template - static PyObject* execute(T* p) - { - // can't use auto_ptr with Intel 5 and VC6 Dinkum library - // for some reason. We get link errors against the auto_ptr - // copy constructor. -# if defined(__ICL) && __ICL < 600 - typedef boost::shared_ptr smart_pointer; -# else - typedef std::auto_ptr smart_pointer; -# endif - typedef objects::pointer_holder holder_t; - - smart_pointer ptr(const_cast(p)); - return objects::make_ptr_instance::execute(ptr); - } - }; - - struct make_reference_holder - { - template - static PyObject* execute(T* p) - { - typedef objects::pointer_holder holder_t; - T* q = const_cast(p); - return objects::make_ptr_instance::execute(q); - } - }; -} - -}} // namespace boost::python - -#endif // TO_PYTHON_INDIRECT_DWA200221_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/to_python_value.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/to_python_value.hpp deleted file mode 100644 index a48948d256..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/to_python_value.hpp +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef TO_PYTHON_VALUE_DWA200221_HPP -# define TO_PYTHON_VALUE_DWA200221_HPP - -# include - -# include -# include -# include - -# include -# include -# include -# include -# include - -# include -# include - -# include - -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - -template -struct object_manager_get_pytype -{ - template - static PyTypeObject const* get( U& (*)() =0) - { - return converter::object_manager_traits::get_pytype(); - } -}; - -template <> -struct object_manager_get_pytype -{ - template - static PyTypeObject const* get( U const& (*)() =0) - { - return converter::object_manager_traits::get_pytype(); - } -}; - -#endif - - template - struct object_manager_to_python_value - { - typedef typename value_arg::type argument_type; - - PyObject* operator()(argument_type) const; -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - typedef boost::mpl::bool_::value> is_t_handle; - typedef boost::detail::indirect_traits::is_reference_to_const is_t_const; - PyTypeObject const* get_pytype() const { - return get_pytype_aux((is_t_handle*)0); - } - - inline static PyTypeObject const* get_pytype_aux(mpl::true_*) {return converter::object_manager_traits::get_pytype();} - - inline static PyTypeObject const* get_pytype_aux(mpl::false_* ) - { - return object_manager_get_pytype::get((T(*)())0); - } - -#endif - - // This information helps make_getter() decide whether to try to - // return an internal reference or not. I don't like it much, - // but it will have to serve for now. - BOOST_STATIC_CONSTANT(bool, uses_registry = false); - }; - - - template - struct registry_to_python_value - { - typedef typename value_arg::type argument_type; - - PyObject* operator()(argument_type) const; -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - PyTypeObject const* get_pytype() const {return converter::registered::converters.to_python_target_type();} -#endif - - // This information helps make_getter() decide whether to try to - // return an internal reference or not. I don't like it much, - // but it will have to serve for now. - BOOST_STATIC_CONSTANT(bool, uses_registry = true); - }; - - template - struct shared_ptr_to_python_value - { - typedef typename value_arg::type argument_type; - - PyObject* operator()(argument_type) const; -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - PyTypeObject const* get_pytype() const {return get_pytype((boost::type*)0);} -#endif - // This information helps make_getter() decide whether to try to - // return an internal reference or not. I don't like it much, - // but it will have to serve for now. - BOOST_STATIC_CONSTANT(bool, uses_registry = false); - private: -#ifndef BOOST_PYTHON_NO_PY_SIGNATURES - template - PyTypeObject const* get_pytype(boost::type &> *) const {return converter::registered::converters.to_python_target_type();} - template - PyTypeObject const* get_pytype(boost::type &> *) const {return converter::registered::converters.to_python_target_type();} -#endif - }; -} - -template -struct to_python_value - : mpl::if_< - detail::value_is_shared_ptr - , detail::shared_ptr_to_python_value - , typename mpl::if_< - mpl::or_< - converter::is_object_manager - , converter::is_reference_to_object_manager - > - , detail::object_manager_to_python_value - , detail::registry_to_python_value - >::type - >::type -{ -}; - -// -// implementation -// -namespace detail -{ - template - inline PyObject* registry_to_python_value::operator()(argument_type x) const - { - typedef converter::registered r; -# if BOOST_WORKAROUND(__GNUC__, < 3) - // suppresses an ICE, somehow - (void)r::converters; -# endif - return converter::registered::converters.to_python(&x); - } - - template - inline PyObject* object_manager_to_python_value::operator()(argument_type x) const - { - return python::upcast( - python::xincref( - get_managed_object(x, tag)) - ); - } - - template - inline PyObject* shared_ptr_to_python_value::operator()(argument_type x) const - { - return converter::shared_ptr_to_python(x); - } -} - -}} // namespace boost::python - -#endif // TO_PYTHON_VALUE_DWA200221_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/tuple.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/tuple.hpp deleted file mode 100644 index babfb63f1e..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/tuple.hpp +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef TUPLE_20020706_HPP -#define TUPLE_20020706_HPP - -# include - -#include -#include -#include -#include - -namespace boost { namespace python { - -namespace detail -{ - struct BOOST_PYTHON_DECL tuple_base : object - { - protected: - tuple_base(); - tuple_base(object_cref sequence); - - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(tuple_base, object) - - private: - static detail::new_reference call(object const&); - }; -} - -class tuple : public detail::tuple_base -{ - typedef detail::tuple_base base; - public: - tuple() {} - - template - explicit tuple(T const& sequence) - : base(object(sequence)) - { - } - - public: // implementation detail -- for internal use only - BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS(tuple, base) -}; - -// -// Converter Specializations // $$$ JDG $$$ moved here to prevent -// // G++ bug complaining specialization - // provided after instantiation -namespace converter -{ - template <> - struct object_manager_traits - : pytype_object_manager_traits<&PyTuple_Type,tuple> - { - }; -} - -// for completeness -inline tuple make_tuple() { return tuple(); } - -# define BOOST_PP_ITERATION_PARAMS_1 (3, (1, BOOST_PYTHON_MAX_ARITY, )) -# include BOOST_PP_ITERATE() - -}} // namespace boost::python - -#endif - diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/type_id.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/type_id.hpp deleted file mode 100644 index 4a5727d514..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/type_id.hpp +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef TYPE_ID_DWA2002517_HPP -# define TYPE_ID_DWA2002517_HPP - -# include - -# include -# include -# include -# include -# include -# include -# include -# include -# include - -# ifndef BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE -# if defined(__GNUC__) \ - && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) \ - && !defined(__EDG_VERSION__) -# define BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE -# endif -# endif - -namespace boost { namespace python { - -// for this compiler at least, cross-shared-library type_info -// comparisons don't work, so use typeid(x).name() instead. It's not -// yet clear what the best default strategy is. -# if (defined(__GNUC__) && __GNUC__ >= 3) \ - || defined(_AIX) \ - || ( defined(__sgi) && defined(__host_mips)) \ - || (defined(__hpux) && defined(__HP_aCC)) \ - || (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC)) -# define BOOST_PYTHON_TYPE_ID_NAME -# endif - -#ifdef BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE -// Runtime detection of broken cxxabi::__cxa_demangle versions, -// to avoid #ifdef clutter. -bool cxxabi_cxa_demangle_is_broken(); -#define BOOST_PYTHON_HAVE_CXXABI_CXA_DEMANGLE_IS_BROKEN -#endif - -// type ids which represent the same information as std::type_info -// (i.e. the top-level reference and cv-qualifiers are stripped), but -// which works across shared libraries. -struct type_info : private totally_ordered -{ - inline type_info(std::type_info const& = typeid(void)); - - inline bool operator<(type_info const& rhs) const; - inline bool operator==(type_info const& rhs) const; - - char const* name() const; - friend BOOST_PYTHON_DECL std::ostream& operator<<( - std::ostream&, type_info const&); - - private: // data members -# ifdef BOOST_PYTHON_TYPE_ID_NAME - typedef char const* base_id_t; -# else - typedef std::type_info const* base_id_t; -# endif - - base_id_t m_base_type; -}; - -# ifdef BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS -# define BOOST_PYTHON_EXPLICIT_TT_DEF(T) ::boost::type* -# else -# define BOOST_PYTHON_EXPLICIT_TT_DEF(T) -# endif - -template -inline type_info type_id(BOOST_EXPLICIT_TEMPLATE_TYPE(T)) -{ - return type_info( -# if !defined(_MSC_VER) \ - || (!BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ - && !BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700)) - typeid(T) -# else // strip the decoration which msvc and Intel mistakenly leave in - python::detail::msvc_typeid((boost::type*)0) -# endif - ); -} - -# if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \ - || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744) -// Older EDG-based compilers seems to mistakenly distinguish "int" from -// "signed int", etc., but only in typeid() expressions. However -// though int == signed int, the "signed" decoration is propagated -// down into template instantiations. Explicit specialization stops -// that from taking hold. - -# define BOOST_PYTHON_SIGNED_INTEGRAL_TYPE_ID(T) \ -template <> \ -inline type_info type_id(BOOST_PYTHON_EXPLICIT_TT_DEF(T)) \ -{ \ - return type_info(typeid(T)); \ -} - -BOOST_PYTHON_SIGNED_INTEGRAL_TYPE_ID(short) -BOOST_PYTHON_SIGNED_INTEGRAL_TYPE_ID(int) -BOOST_PYTHON_SIGNED_INTEGRAL_TYPE_ID(long) -// using Python's macro instead of Boost's - we don't seem to get the -// config right all the time. -# ifdef HAVE_LONG_LONG -BOOST_PYTHON_SIGNED_INTEGRAL_TYPE_ID(long long) -# endif -# undef BOOST_PYTHON_SIGNED_INTEGRAL_TYPE_ID -# endif - -// -inline type_info::type_info(std::type_info const& id) - : m_base_type( -# ifdef BOOST_PYTHON_TYPE_ID_NAME - id.name() -# else - &id -# endif - ) -{ -} - -inline bool type_info::operator<(type_info const& rhs) const -{ -# ifdef BOOST_PYTHON_TYPE_ID_NAME - return std::strcmp(m_base_type, rhs.m_base_type) < 0; -# else - return m_base_type->before(*rhs.m_base_type); -# endif -} - -inline bool type_info::operator==(type_info const& rhs) const -{ -# ifdef BOOST_PYTHON_TYPE_ID_NAME - return !std::strcmp(m_base_type, rhs.m_base_type); -# else - return *m_base_type == *rhs.m_base_type; -# endif -} - -# ifdef BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE -namespace detail -{ - BOOST_PYTHON_DECL char const* gcc_demangle(char const*); -} -# endif - -inline char const* type_info::name() const -{ - char const* raw_name - = m_base_type -# ifndef BOOST_PYTHON_TYPE_ID_NAME - ->name() -# endif - ; - -# ifdef BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE - return detail::gcc_demangle(raw_name); -# else - return raw_name; -# endif -} - - -BOOST_PYTHON_DECL std::ostream& operator<<(std::ostream&, type_info const&); - -# if !BOOST_WORKAROUND(BOOST_MSVC, == 1200) -template<> -inline type_info type_id(BOOST_PYTHON_EXPLICIT_TT_DEF(void)) -{ - return type_info (typeid (void *)); -} -# ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -template<> -inline type_info type_id(BOOST_PYTHON_EXPLICIT_TT_DEF(const volatile void)) -{ - return type_info (typeid (void *)); -} -# endif - -# endif - -}} // namespace boost::python - -#endif // TYPE_ID_DWA2002517_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/with_custodian_and_ward.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/with_custodian_and_ward.hpp deleted file mode 100644 index 9399478f23..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/with_custodian_and_ward.hpp +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef WITH_CUSTODIAN_AND_WARD_DWA2002131_HPP -# define WITH_CUSTODIAN_AND_WARD_DWA2002131_HPP - -# include - -# include -# include -# include - -namespace boost { namespace python { - -namespace detail -{ - template - struct get_prev - { - template - static PyObject* execute(ArgumentPackage const& args, PyObject* = 0) - { - int const pre_n = static_cast(N) - 1; // separate line is gcc-2.96 workaround - return detail::get(mpl::int_(), args); - } - }; - template <> - struct get_prev<0> - { - template - static PyObject* execute(ArgumentPackage const&, PyObject* zeroth) - { - return zeroth; - } - }; -} -template < - std::size_t custodian - , std::size_t ward - , class BasePolicy_ = default_call_policies -> -struct with_custodian_and_ward : BasePolicy_ -{ - BOOST_STATIC_ASSERT(custodian != ward); - BOOST_STATIC_ASSERT(custodian > 0); - BOOST_STATIC_ASSERT(ward > 0); - - template - static bool precall(ArgumentPackage const& args_) - { - unsigned arity_ = detail::arity(args_); - if (custodian > arity_ || ward > arity_) - { - PyErr_SetString( - PyExc_IndexError - , "boost::python::with_custodian_and_ward: argument index out of range" - ); - return false; - } - - PyObject* patient = detail::get_prev::execute(args_); - PyObject* nurse = detail::get_prev::execute(args_); - - PyObject* life_support = python::objects::make_nurse_and_patient(nurse, patient); - if (life_support == 0) - return false; - - bool result = BasePolicy_::precall(args_); - - if (!result) { - Py_DECREF(life_support); - } - - return result; - } -}; - -template -struct with_custodian_and_ward_postcall : BasePolicy_ -{ - BOOST_STATIC_ASSERT(custodian != ward); - - template - static PyObject* postcall(ArgumentPackage const& args_, PyObject* result) - { - std::size_t arity_ = detail::arity(args_); -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - if ( custodian > arity_ || ward > arity_ ) -#else - // check if either custodian or ward exceeds the arity - // (this weird formulation avoids "always false" warnings - // for arity_ = 0) - if ( (std::max)(custodian, ward) > arity_ ) -#endif - { - PyErr_SetString( - PyExc_IndexError - , "boost::python::with_custodian_and_ward_postcall: argument index out of range" - ); - return 0; - } - - PyObject* patient = detail::get_prev::execute(args_, result); - PyObject* nurse = detail::get_prev::execute(args_, result); - - if (nurse == 0) return 0; - - result = BasePolicy_::postcall(args_, result); - if (result == 0) - return 0; - - if (python::objects::make_nurse_and_patient(nurse, patient) == 0) - { - Py_XDECREF(result); - return 0; - } - return result; - } -}; - - -}} // namespace boost::python - -#endif // WITH_CUSTODIAN_AND_WARD_DWA2002131_HPP diff --git a/deal.II/contrib/boost-1.49.0/include/boost/python/wrapper.hpp b/deal.II/contrib/boost-1.49.0/include/boost/python/wrapper.hpp deleted file mode 100644 index 166c8e2327..0000000000 --- a/deal.II/contrib/boost-1.49.0/include/boost/python/wrapper.hpp +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright David Abrahams 2004. Distributed under the Boost -// Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef WRAPPER_DWA2004720_HPP -# define WRAPPER_DWA2004720_HPP - -# include -# include -# include -# include - -namespace boost { namespace python { - -template -class wrapper : public detail::wrapper_base -{ - public: - // Do not touch this implementation detail! - typedef T _wrapper_wrapped_type_; - - protected: - override get_override(char const* name) const - { - typedef detail::wrapper_base base; - converter::registration const& r - = converter::registered::converters; - PyTypeObject* type = r.get_class_object(); - - return this->base::get_override(name, type); - } -}; - -}} // namespace boost::python - -#endif // WRAPPER_DWA2004720_HPP diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/Jamfile.v2 b/deal.II/contrib/boost-1.49.0/libs/serialization/example/Jamfile.v2 deleted file mode 100644 index ab4d258d40..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/Jamfile.v2 +++ /dev/null @@ -1,57 +0,0 @@ -# Boost serialization Library Build Jamfile -# (C) Copyright Robert Ramey 2002-2004. -# Use, modification, and distribution are subject to the -# Boost Software License, Version 1.0. (See accompanying file -# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -# -# See http://www.boost.org/libs/serialization for the library home page. - -project libs/serialization/example - : id serialization_example - : requirements ../build//boost_serialization - ; - -rule demo_bsl_run ( demo-name : othersources * : requirements * ) -{ - return [ run - # sources - $(demo-name).cpp - $(othersources).cpp - : # command - : # input files - : # requirements - # toolset suppress-warnings - gcc:"-Wno-non-virtual-dtor -Wno-ctor-dtor-privacy" - msvc-8.0:"-wd4996" - borland:"-w-8080 -w-8071 -w-8057 -w-8062 -w-8008 -w-0018 -w-8066" - # toolset optimizations - gcc:"-ftemplate-depth-255" - msvc:"-Gy" - # toolset shared library support - como,shared:no - msvc,stlport,shared:no - cw,static:no - $(requirements) - : # test name - $(demo-name) - ] - ; -} - -test-suite "demo-suite" : - # demos - [ demo_bsl_run demo ] - [ demo_bsl_run demo_auto_ptr ] - [ demo_bsl_run demo_exception ] - [ demo_bsl_run demo_log : log_archive ] - [ demo_bsl_run demo_pimpl : demo_pimpl_A ] - [ demo_bsl_run demo_polymorphic : demo_polymorphic_A ] - [ demo_bsl_run demo_portable_archive : portable_binary_iarchive portable_binary_oarchive ] - [ demo_bsl_run demo_shared_ptr ] - [ demo_bsl_run demo_simple_log ] - [ demo_bsl_run demo_trivial_archive ] - [ demo_bsl_run demo_xml ] - [ demo_bsl_run demo_xml_save ] - [ demo_bsl_run demo_xml_load : : demo_xml_save ] -; - diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo.cpp deleted file mode 100644 index 98e987fda9..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo.cpp +++ /dev/null @@ -1,377 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// demo.cpp -// -// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - - -#include // NULL -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include - -///////////////////////////////////////////////////////////// -// The intent of this program is to serve as a tutorial for -// users of the serialization package. An attempt has been made -// to illustrate most of the facilities of the package. -// -// The intent is to create an example suffciently complete to -// illustrate the usage and utility of the package while -// including a minimum of other code. -// -// This illustration models the bus system of a small city. -// This includes, multiple bus stops, bus routes and schedules. -// There are different kinds of stops. Bus stops in general will -// will appear on multiple routes. A schedule will include -// muliple trips on the same route. - -///////////////////////////////////////////////////////////// -// gps coordinate -// -// llustrates serialization for a simple type -// -class gps_position -{ - friend std::ostream & operator<<(std::ostream &os, const gps_position &gp); - friend class boost::serialization::access; - int degrees; - int minutes; - float seconds; - template - void serialize(Archive & ar, const unsigned int /* file_version */){ - ar & degrees & minutes & seconds; - } -public: - // every serializable class needs a constructor - gps_position(){}; - gps_position(int _d, int _m, float _s) : - degrees(_d), minutes(_m), seconds(_s) - {} -}; -std::ostream & operator<<(std::ostream &os, const gps_position &gp) -{ - return os << ' ' << gp.degrees << (unsigned char)186 << gp.minutes << '\'' << gp.seconds << '"'; -} - -///////////////////////////////////////////////////////////// -// One bus stop -// -// illustrates serialization of serializable members -// - -class bus_stop -{ - friend class boost::serialization::access; - friend std::ostream & operator<<(std::ostream &os, const bus_stop &gp); - virtual std::string description() const = 0; - gps_position latitude; - gps_position longitude; - template - void serialize(Archive &ar, const unsigned int version) - { - ar & latitude; - ar & longitude; - } -protected: - bus_stop(const gps_position & _lat, const gps_position & _long) : - latitude(_lat), longitude(_long) - {} -public: - bus_stop(){} - virtual ~bus_stop(){} -}; - -BOOST_SERIALIZATION_ASSUME_ABSTRACT(bus_stop) - -std::ostream & operator<<(std::ostream &os, const bus_stop &bs) -{ - return os << bs.latitude << bs.longitude << ' ' << bs.description(); -} - -///////////////////////////////////////////////////////////// -// Several kinds of bus stops -// -// illustrates serialization of derived types -// -class bus_stop_corner : public bus_stop -{ - friend class boost::serialization::access; - std::string street1; - std::string street2; - virtual std::string description() const - { - return street1 + " and " + street2; - } - template - void serialize(Archive &ar, const unsigned int version) - { - // save/load base class information - ar & boost::serialization::base_object(*this); - ar & street1 & street2; - } - -public: - bus_stop_corner(){} - bus_stop_corner(const gps_position & _lat, const gps_position & _long, - const std::string & _s1, const std::string & _s2 - ) : - bus_stop(_lat, _long), street1(_s1), street2(_s2) - { - } -}; - -class bus_stop_destination : public bus_stop -{ - friend class boost::serialization::access; - std::string name; - virtual std::string description() const - { - return name; - } - template - void serialize(Archive &ar, const unsigned int version) - { - ar & boost::serialization::base_object(*this) & name; - } -public: - - bus_stop_destination(){} - bus_stop_destination( - const gps_position & _lat, const gps_position & _long, const std::string & _name - ) : - bus_stop(_lat, _long), name(_name) - { - } -}; - -///////////////////////////////////////////////////////////// -// a bus route is a collection of bus stops -// -// illustrates serialization of STL collection templates. -// -// illustrates serialzation of polymorphic pointer (bus stop *); -// -// illustrates storage and recovery of shared pointers is correct -// and efficient. That is objects pointed to by more than one -// pointer are stored only once. In such cases only one such -// object is restored and pointers are restored to point to it -// -class bus_route -{ - friend class boost::serialization::access; - friend std::ostream & operator<<(std::ostream &os, const bus_route &br); - typedef bus_stop * bus_stop_pointer; - std::list stops; - template - void serialize(Archive &ar, const unsigned int version) - { - // in this program, these classes are never serialized directly but rather - // through a pointer to the base class bus_stop. So we need a way to be - // sure that the archive contains information about these derived classes. - //ar.template register_type(); - ar.register_type(static_cast(NULL)); - //ar.template register_type(); - ar.register_type(static_cast(NULL)); - // serialization of stl collections is already defined - // in the header - ar & stops; - } -public: - bus_route(){} - void append(bus_stop *_bs) - { - stops.insert(stops.end(), _bs); - } -}; -std::ostream & operator<<(std::ostream &os, const bus_route &br) -{ - std::list::const_iterator it; - // note: we're displaying the pointer to permit verification - // that duplicated pointers are properly restored. - for(it = br.stops.begin(); it != br.stops.end(); it++){ - os << '\n' << std::hex << "0x" << *it << std::dec << ' ' << **it; - } - return os; -} - -///////////////////////////////////////////////////////////// -// a bus schedule is a collection of routes each with a starting time -// -// Illustrates serialization of STL objects(pair) in a non-intrusive way. -// See definition of operator<< >(ar, pair) and others in -// serialization.hpp -// -// illustrates nesting of serializable classes -// -// illustrates use of version number to automatically grandfather older -// versions of the same class. - -class bus_schedule -{ -public: - // note: this structure was made public. because the friend declarations - // didn't seem to work as expected. - struct trip_info - { - template - void serialize(Archive &ar, const unsigned int file_version) - { - // in versions 2 or later - if(file_version >= 2) - // read the drivers name - ar & driver; - // all versions have the follwing info - ar & hour & minute; - } - - // starting time - int hour; - int minute; - // only after system shipped was the driver's name added to the class - std::string driver; - - trip_info(){} - trip_info(int _h, int _m, const std::string &_d) : - hour(_h), minute(_m), driver(_d) - {} - }; -private: - friend class boost::serialization::access; - friend std::ostream & operator<<(std::ostream &os, const bus_schedule &bs); - friend std::ostream & operator<<(std::ostream &os, const bus_schedule::trip_info &ti); - std::list > schedule; - template - void serialize(Archive &ar, const unsigned int version) - { - ar & schedule; - } -public: - void append(const std::string &_d, int _h, int _m, bus_route *_br) - { - schedule.insert(schedule.end(), std::make_pair(trip_info(_h, _m, _d), _br)); - } - bus_schedule(){} -}; -BOOST_CLASS_VERSION(bus_schedule::trip_info, 2) - -std::ostream & operator<<(std::ostream &os, const bus_schedule::trip_info &ti) -{ - return os << '\n' << ti.hour << ':' << ti.minute << ' ' << ti.driver << ' '; -} -std::ostream & operator<<(std::ostream &os, const bus_schedule &bs) -{ - std::list >::const_iterator it; - for(it = bs.schedule.begin(); it != bs.schedule.end(); it++){ - os << it->first << *(it->second); - } - return os; -} - -void save_schedule(const bus_schedule &s, const char * filename){ - // make an archive - std::ofstream ofs(filename); - boost::archive::text_oarchive oa(ofs); - oa << s; -} - -void -restore_schedule(bus_schedule &s, const char * filename) -{ - // open the archive - std::ifstream ifs(filename); - boost::archive::text_iarchive ia(ifs); - - // restore the schedule from the archive - ia >> s; -} - -int main(int argc, char *argv[]) -{ - // make the schedule - bus_schedule original_schedule; - - // fill in the data - // make a few stops - bus_stop *bs0 = new bus_stop_corner( - gps_position(34, 135, 52.560f), - gps_position(134, 22, 78.30f), - "24th Street", "10th Avenue" - ); - bus_stop *bs1 = new bus_stop_corner( - gps_position(35, 137, 23.456f), - gps_position(133, 35, 54.12f), - "State street", "Cathedral Vista Lane" - ); - bus_stop *bs2 = new bus_stop_destination( - gps_position(35, 136, 15.456f), - gps_position(133, 32, 15.300f), - "White House" - ); - bus_stop *bs3 = new bus_stop_destination( - gps_position(35, 134, 48.789f), - gps_position(133, 32, 16.230f), - "Lincoln Memorial" - ); - - // make a routes - bus_route route0; - route0.append(bs0); - route0.append(bs1); - route0.append(bs2); - - // add trips to schedule - original_schedule.append("bob", 6, 24, &route0); - original_schedule.append("bob", 9, 57, &route0); - original_schedule.append("alice", 11, 02, &route0); - - // make aother routes - bus_route route1; - route1.append(bs3); - route1.append(bs2); - route1.append(bs1); - - // add trips to schedule - original_schedule.append("ted", 7, 17, &route1); - original_schedule.append("ted", 9, 38, &route1); - original_schedule.append("alice", 11, 47, &route1); - - // display the complete schedule - std::cout << "original schedule"; - std::cout << original_schedule; - - std::string filename(boost::archive::tmpdir()); - filename += "/demofile.txt"; - - // save the schedule - save_schedule(original_schedule, filename.c_str()); - - // ... some time later - // make a new schedule - bus_schedule new_schedule; - - restore_schedule(new_schedule, filename.c_str()); - - // and display - std::cout << "\nrestored schedule"; - std::cout << new_schedule; - // should be the same as the old one. (except for the pointer values) - - delete bs0; - delete bs1; - delete bs2; - delete bs3; - return 0; -} diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_auto_ptr.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_auto_ptr.cpp deleted file mode 100644 index 0cca0afeba..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_auto_ptr.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// demo_auto_ptr.cpp - -// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include -#include - -#include // remove, std::autoptr inteface wrong in dinkumware -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::remove; -} -#endif - -#include -#include -#include - -#include - -namespace boost { -namespace serialization { - -///////////////////////////////////////////////////////////// -// implement serialization for auto_ptr< T > -// note: this must be added to the boost namespace in order to -// be called by the library -template -inline void save( - Archive & ar, - const std::auto_ptr< T > &t, - const unsigned int file_version -){ - // only the raw pointer has to be saved - // the ref count is rebuilt automatically on load - const T * const tx = t.get(); - ar << tx; -} - -template -inline void load( - Archive & ar, - std::auto_ptr< T > &t, - const unsigned int file_version -){ - T *pTarget; - ar >> pTarget; - // note that the reset automagically maintains the reference count - #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) - t.release(); - t = std::auto_ptr< T >(pTarget); - #else - t.reset(pTarget); - #endif -} - -// split non-intrusive serialization function member into separate -// non intrusive save/load member functions -template -inline void serialize( - Archive & ar, - std::auto_ptr< T > &t, - const unsigned int file_version -){ - boost::serialization::split_free(ar, t, file_version); -} - -} // namespace serialization -} // namespace boost - -///////////////////////////////////////////////////////////// -// test auto_ptr serialization -class A -{ -private: - friend class boost::serialization::access; - int x; - template - void serialize(Archive &ar, const unsigned int /* file_version */){ - ar & x; - } -public: - A(){} // default constructor - ~A(){} // default destructor -}; - -void save(const std::auto_ptr & spa, const char *filename) -{ - std::ofstream ofs(filename); - boost::archive::text_oarchive oa(ofs); - oa << spa; -} - -void load(std::auto_ptr & spa, const char *filename) -{ - // open the archive - std::ifstream ifs(filename); - boost::archive::text_iarchive ia(ifs); - - // restore the schedule from the archive - ia >> spa; -} - -int main(int argc, char *argv[]) -{ - std::string filename = boost::archive::tmpdir(); - filename += "/testfile"; - - // create a new auto pointer to ta new object of type A - std::auto_ptr spa(new A); - // serialize it - save(spa, filename.c_str()); - // reset the auto pointer to NULL - // thereby destroying the object of type A - // note that the reset automagically maintains the reference count - #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) - spa.release(); - #else - spa.reset(); - #endif - // restore state to one equivalent to the original - // creating a new type A object - load(spa, filename.c_str()); - // obj of type A gets destroyed - // as auto_ptr goes out of scope - std::remove(filename.c_str()); - return 0; -} diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll.cpp deleted file mode 100644 index 31556e7cdb..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// test_derived_class.cpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// should pass compilation and execution - -#include // NULL -#include - -#include // remove -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::remove; -} -#endif - -#include "test_tools.hpp" - -#include "B.hpp" -#include "A.ipp" - -int test_main( int argc, char* argv[] ) -{ - const char * testfile = boost::archive::tmpnam(NULL); - - BOOST_REQUIRE(NULL != testfile); - - B b, b1; - - { - test_ostream os(testfile, TEST_STREAM_FLAGS); - test_oarchive oa(os, TEST_ARCHIVE_FLAGS); - oa << boost::serialization::make_nvp("b", b); - } - { - test_istream is(testfile, TEST_STREAM_FLAGS); - test_iarchive ia(is, TEST_ARCHIVE_FLAGS); - ia >> boost::serialization::make_nvp("b1", b1); - } - BOOST_CHECK(b == b1); - std::remove(testfile); - return EXIT_SUCCESS; -} - -// EOF diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_a.hpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_a.hpp deleted file mode 100644 index 222f0b2169..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_a.hpp +++ /dev/null @@ -1,321 +0,0 @@ -#ifndef BOOST_SERIALIZATION_TEST_A_HPP -#define BOOST_SERIALIZATION_TEST_A_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// A.hpp simple class test - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include // for rand() -#include // for fabs() -#include // size_t - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::rand; - using ::fabs; - using ::size_t; -} -#endif - -//#include -#include -#include - -#include -#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) -#include -#endif - -#include -#include -#include - -class A -{ -private: - friend class boost::serialization::access; - // note: from an aesthetic perspective, I would much prefer to have this - // defined out of line. Unfortunately, this trips a bug in the VC 6.0 - // compiler. So hold our nose and put it her to permit running of tests. - template - void serialize( - Archive &ar, - const unsigned int /* file_version */ - ){ - ar & BOOST_SERIALIZATION_NVP(b); - #ifndef BOOST_NO_INT64_T - ar & BOOST_SERIALIZATION_NVP(f); - ar & BOOST_SERIALIZATION_NVP(g); - #endif - #if BOOST_WORKAROUND(__BORLANDC__, <= 0x551 ) - int i; - if(BOOST_DEDUCED_TYPENAME Archive::is_saving::value){ - i = l; - ar & BOOST_SERIALIZATION_NVP(i); - } - else{ - ar & BOOST_SERIALIZATION_NVP(i); - l = i; - } - #else - ar & BOOST_SERIALIZATION_NVP(l); - #endif - ar & BOOST_SERIALIZATION_NVP(m); - ar & BOOST_SERIALIZATION_NVP(n); - ar & BOOST_SERIALIZATION_NVP(o); - ar & BOOST_SERIALIZATION_NVP(p); - ar & BOOST_SERIALIZATION_NVP(q); - #ifndef BOOST_NO_CWCHAR - ar & BOOST_SERIALIZATION_NVP(r); - #endif - ar & BOOST_SERIALIZATION_NVP(c); - ar & BOOST_SERIALIZATION_NVP(s); - ar & BOOST_SERIALIZATION_NVP(t); - ar & BOOST_SERIALIZATION_NVP(u); - ar & BOOST_SERIALIZATION_NVP(v); - ar & BOOST_SERIALIZATION_NVP(w); - ar & BOOST_SERIALIZATION_NVP(x); - ar & BOOST_SERIALIZATION_NVP(y); - #ifndef BOOST_NO_STD_WSTRING - ar & BOOST_SERIALIZATION_NVP(z); - #endif - } - bool b; - #ifndef BOOST_NO_INT64_T - boost::int64_t f; - boost::uint64_t g; - #endif - enum h { - i = 0, - j, - k - } l; - std::size_t m; - signed long n; - unsigned long o; - signed short p; - unsigned short q; - #ifndef BOOST_NO_CWCHAR - wchar_t r; - #endif - char c; - signed char s; - unsigned char t; - signed int u; - unsigned int v; - float w; - double x; - std::string y; - #ifndef BOOST_NO_STD_WSTRING - std::wstring z; - #endif -public: - A(); - bool operator==(const A &rhs) const; - bool operator!=(const A &rhs) const; - bool operator<(const A &rhs) const; // used by less - // hash function for class A - operator std::size_t () const; - friend std::ostream & operator<<(std::ostream & os, A const & a); - friend std::istream & operator>>(std::istream & is, A & a); -}; - -//BOOST_TEST_DONT_PRINT_LOG_VALUE(A); - -template -void randomize(S &x) -{ - assert(0 == x.size()); - for(;;){ - unsigned int i = std::rand() % 27; - if(0 == i) - break; - x += static_cast('a' - 1 + i); - } -} - -template -void accumulate(std::size_t & s, const T & t){ - const char * tptr = (const char *)(& t); - unsigned int count = sizeof(t); - while(count-- > 0){ - s += *tptr++; - } -} - -A::operator std::size_t () const { - std::size_t retval = 0; - accumulate(retval, b); - #ifndef BOOST_NO_INT64_T - accumulate(retval, f); - accumulate(retval, g); - #endif - accumulate(retval, l); - accumulate(retval, m); - accumulate(retval, n); - accumulate(retval, o); - accumulate(retval, p); - accumulate(retval, q); - #ifndef BOOST_NO_CWCHAR - accumulate(retval, r); - #endif - accumulate(retval, c); - accumulate(retval, s); - accumulate(retval, t); - accumulate(retval, u); - accumulate(retval, v); - return retval; -} - -inline A::A() : - b(true), - #ifndef BOOST_NO_INT64_T - f(std::rand() * std::rand()), - g(std::rand() * std::rand()), - #endif - l(static_cast(std::rand() % 3)), - m(std::rand()), - n(std::rand()), - o(std::rand()), - p(std::rand()), - q(std::rand()), - #ifndef BOOST_NO_CWCHAR - r(std::rand()), - #endif - c(std::rand()), - s(std::rand()), - t(std::rand()), - u(std::rand()), - v(std::rand()), - w((float)std::rand()), - x((double)std::rand()) -{ - randomize(y); - #ifndef BOOST_NO_STD_WSTRING - randomize(z); - #endif -} - -inline bool A::operator==(const A &rhs) const -{ - if(b != rhs.b) - return false; - if(l != rhs.l) - return false; - #ifndef BOOST_NO_INT64_T - if(f != rhs.f) - return false; - if(g != rhs.g) - return false; - #endif - if(m != rhs.m) - return false; - if(n != rhs.n) - return false; - if(o != rhs.o) - return false; - if(p != rhs.p) - return false; - if(q != rhs.q) - return false; - #ifndef BOOST_NO_CWCHAR - if(r != rhs.r) - return false; - #endif - if(c != rhs.c) - return false; - if(s != rhs.s) - return false; - if(t != rhs.t) - return false; - if(u != rhs.u) - return false; - if(v != rhs.v) - return false; - if(w == 0 && std::fabs(rhs.w) > std::numeric_limits::epsilon()) - return false; - if(std::fabs(rhs.w/w - 1.0) > std::numeric_limits::epsilon()) - return false; - if(x == 0 && std::fabs(rhs.x - x) > std::numeric_limits::epsilon()) - return false; - if(std::fabs(rhs.x/x - 1.0) > std::numeric_limits::epsilon()) - return false; - if(0 != y.compare(rhs.y)) - return false; - #ifndef BOOST_NO_STD_WSTRING - if(0 != z.compare(rhs.z)) - return false; - #endif - return true; -} - -inline bool A::operator!=(const A &rhs) const -{ - return ! (*this == rhs); -} - -inline bool A::operator<(const A &rhs) const -{ - if(b != rhs.b) - return b < rhs.b; - #ifndef BOOST_NO_INT64_T - if(f != rhs.f) - return f < rhs.f; - if(g != rhs.g) - return g < rhs.g; - #endif - if(l != rhs.l ) - return l < rhs.l; - if(m != rhs.m ) - return m < rhs.m; - if(n != rhs.n ) - return n < rhs.n; - if(o != rhs.o ) - return o < rhs.o; - if(p != rhs.p ) - return p < rhs.p; - if(q != rhs.q ) - return q < rhs.q; - #ifndef BOOST_NO_CWCHAR - if(r != rhs.r ) - return r < rhs.r; - #endif - if(c != rhs.c ) - return c < rhs.c; - if(s != rhs.s ) - return s < rhs.s; - if(t != rhs.t ) - return t < rhs.t; - if(u != rhs.u ) - return u < rhs.u; - if(v != rhs.v ) - return v < rhs.v; - if(w != rhs.w ) - return w < rhs.w; - if(x != rhs.x ) - return x < rhs.x; - int i = y.compare(rhs.y); - if(i != 0 ) - return i < 0; - #ifndef BOOST_NO_STD_WSTRING - int j = z.compare(rhs.z); - if(j != 0 ) - return j < 0; - #endif - return false; -} - -#endif // BOOST_SERIALIZATION_TEST_A_HPP diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_a.ipp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_a.ipp deleted file mode 100644 index 222f0b2169..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_a.ipp +++ /dev/null @@ -1,321 +0,0 @@ -#ifndef BOOST_SERIALIZATION_TEST_A_HPP -#define BOOST_SERIALIZATION_TEST_A_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// A.hpp simple class test - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include // for rand() -#include // for fabs() -#include // size_t - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::rand; - using ::fabs; - using ::size_t; -} -#endif - -//#include -#include -#include - -#include -#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) -#include -#endif - -#include -#include -#include - -class A -{ -private: - friend class boost::serialization::access; - // note: from an aesthetic perspective, I would much prefer to have this - // defined out of line. Unfortunately, this trips a bug in the VC 6.0 - // compiler. So hold our nose and put it her to permit running of tests. - template - void serialize( - Archive &ar, - const unsigned int /* file_version */ - ){ - ar & BOOST_SERIALIZATION_NVP(b); - #ifndef BOOST_NO_INT64_T - ar & BOOST_SERIALIZATION_NVP(f); - ar & BOOST_SERIALIZATION_NVP(g); - #endif - #if BOOST_WORKAROUND(__BORLANDC__, <= 0x551 ) - int i; - if(BOOST_DEDUCED_TYPENAME Archive::is_saving::value){ - i = l; - ar & BOOST_SERIALIZATION_NVP(i); - } - else{ - ar & BOOST_SERIALIZATION_NVP(i); - l = i; - } - #else - ar & BOOST_SERIALIZATION_NVP(l); - #endif - ar & BOOST_SERIALIZATION_NVP(m); - ar & BOOST_SERIALIZATION_NVP(n); - ar & BOOST_SERIALIZATION_NVP(o); - ar & BOOST_SERIALIZATION_NVP(p); - ar & BOOST_SERIALIZATION_NVP(q); - #ifndef BOOST_NO_CWCHAR - ar & BOOST_SERIALIZATION_NVP(r); - #endif - ar & BOOST_SERIALIZATION_NVP(c); - ar & BOOST_SERIALIZATION_NVP(s); - ar & BOOST_SERIALIZATION_NVP(t); - ar & BOOST_SERIALIZATION_NVP(u); - ar & BOOST_SERIALIZATION_NVP(v); - ar & BOOST_SERIALIZATION_NVP(w); - ar & BOOST_SERIALIZATION_NVP(x); - ar & BOOST_SERIALIZATION_NVP(y); - #ifndef BOOST_NO_STD_WSTRING - ar & BOOST_SERIALIZATION_NVP(z); - #endif - } - bool b; - #ifndef BOOST_NO_INT64_T - boost::int64_t f; - boost::uint64_t g; - #endif - enum h { - i = 0, - j, - k - } l; - std::size_t m; - signed long n; - unsigned long o; - signed short p; - unsigned short q; - #ifndef BOOST_NO_CWCHAR - wchar_t r; - #endif - char c; - signed char s; - unsigned char t; - signed int u; - unsigned int v; - float w; - double x; - std::string y; - #ifndef BOOST_NO_STD_WSTRING - std::wstring z; - #endif -public: - A(); - bool operator==(const A &rhs) const; - bool operator!=(const A &rhs) const; - bool operator<(const A &rhs) const; // used by less - // hash function for class A - operator std::size_t () const; - friend std::ostream & operator<<(std::ostream & os, A const & a); - friend std::istream & operator>>(std::istream & is, A & a); -}; - -//BOOST_TEST_DONT_PRINT_LOG_VALUE(A); - -template -void randomize(S &x) -{ - assert(0 == x.size()); - for(;;){ - unsigned int i = std::rand() % 27; - if(0 == i) - break; - x += static_cast('a' - 1 + i); - } -} - -template -void accumulate(std::size_t & s, const T & t){ - const char * tptr = (const char *)(& t); - unsigned int count = sizeof(t); - while(count-- > 0){ - s += *tptr++; - } -} - -A::operator std::size_t () const { - std::size_t retval = 0; - accumulate(retval, b); - #ifndef BOOST_NO_INT64_T - accumulate(retval, f); - accumulate(retval, g); - #endif - accumulate(retval, l); - accumulate(retval, m); - accumulate(retval, n); - accumulate(retval, o); - accumulate(retval, p); - accumulate(retval, q); - #ifndef BOOST_NO_CWCHAR - accumulate(retval, r); - #endif - accumulate(retval, c); - accumulate(retval, s); - accumulate(retval, t); - accumulate(retval, u); - accumulate(retval, v); - return retval; -} - -inline A::A() : - b(true), - #ifndef BOOST_NO_INT64_T - f(std::rand() * std::rand()), - g(std::rand() * std::rand()), - #endif - l(static_cast(std::rand() % 3)), - m(std::rand()), - n(std::rand()), - o(std::rand()), - p(std::rand()), - q(std::rand()), - #ifndef BOOST_NO_CWCHAR - r(std::rand()), - #endif - c(std::rand()), - s(std::rand()), - t(std::rand()), - u(std::rand()), - v(std::rand()), - w((float)std::rand()), - x((double)std::rand()) -{ - randomize(y); - #ifndef BOOST_NO_STD_WSTRING - randomize(z); - #endif -} - -inline bool A::operator==(const A &rhs) const -{ - if(b != rhs.b) - return false; - if(l != rhs.l) - return false; - #ifndef BOOST_NO_INT64_T - if(f != rhs.f) - return false; - if(g != rhs.g) - return false; - #endif - if(m != rhs.m) - return false; - if(n != rhs.n) - return false; - if(o != rhs.o) - return false; - if(p != rhs.p) - return false; - if(q != rhs.q) - return false; - #ifndef BOOST_NO_CWCHAR - if(r != rhs.r) - return false; - #endif - if(c != rhs.c) - return false; - if(s != rhs.s) - return false; - if(t != rhs.t) - return false; - if(u != rhs.u) - return false; - if(v != rhs.v) - return false; - if(w == 0 && std::fabs(rhs.w) > std::numeric_limits::epsilon()) - return false; - if(std::fabs(rhs.w/w - 1.0) > std::numeric_limits::epsilon()) - return false; - if(x == 0 && std::fabs(rhs.x - x) > std::numeric_limits::epsilon()) - return false; - if(std::fabs(rhs.x/x - 1.0) > std::numeric_limits::epsilon()) - return false; - if(0 != y.compare(rhs.y)) - return false; - #ifndef BOOST_NO_STD_WSTRING - if(0 != z.compare(rhs.z)) - return false; - #endif - return true; -} - -inline bool A::operator!=(const A &rhs) const -{ - return ! (*this == rhs); -} - -inline bool A::operator<(const A &rhs) const -{ - if(b != rhs.b) - return b < rhs.b; - #ifndef BOOST_NO_INT64_T - if(f != rhs.f) - return f < rhs.f; - if(g != rhs.g) - return g < rhs.g; - #endif - if(l != rhs.l ) - return l < rhs.l; - if(m != rhs.m ) - return m < rhs.m; - if(n != rhs.n ) - return n < rhs.n; - if(o != rhs.o ) - return o < rhs.o; - if(p != rhs.p ) - return p < rhs.p; - if(q != rhs.q ) - return q < rhs.q; - #ifndef BOOST_NO_CWCHAR - if(r != rhs.r ) - return r < rhs.r; - #endif - if(c != rhs.c ) - return c < rhs.c; - if(s != rhs.s ) - return s < rhs.s; - if(t != rhs.t ) - return t < rhs.t; - if(u != rhs.u ) - return u < rhs.u; - if(v != rhs.v ) - return v < rhs.v; - if(w != rhs.w ) - return w < rhs.w; - if(x != rhs.x ) - return x < rhs.x; - int i = y.compare(rhs.y); - if(i != 0 ) - return i < 0; - #ifndef BOOST_NO_STD_WSTRING - int j = z.compare(rhs.z); - if(j != 0 ) - return j < 0; - #endif - return false; -} - -#endif // BOOST_SERIALIZATION_TEST_A_HPP diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_b.hpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_b.hpp deleted file mode 100644 index 245ce37133..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_b.hpp +++ /dev/null @@ -1,112 +0,0 @@ -#ifndef BOOST_SERIALIZATION_TEST_B_HPP -#define BOOST_SERIALIZATION_TEST_B_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// B.hpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include // for rand() - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::rand; -} -#endif - -#include -#include -#include - -#include "A.hpp" - -/////////////////////////////////////////////////////// -// Derived class test -class B : public A -{ -private: - friend class boost::serialization::access; - template - void save(Archive &ar, const unsigned int /* file_version */) const - { - // write any base class info to the archive - ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); - - // write out members - ar << BOOST_SERIALIZATION_NVP(s); - ar << BOOST_SERIALIZATION_NVP(t); - ar << BOOST_SERIALIZATION_NVP(u); - ar << BOOST_SERIALIZATION_NVP(v); - ar << BOOST_SERIALIZATION_NVP(w); - ar << BOOST_SERIALIZATION_NVP(x); - } - - template - void load(Archive & ar, const unsigned int file_version) - { - // read any base class info to the archive - ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); - switch(file_version){ - case 1: - case 2: - ar >> BOOST_SERIALIZATION_NVP(s); - ar >> BOOST_SERIALIZATION_NVP(t); - ar >> BOOST_SERIALIZATION_NVP(u); - ar >> BOOST_SERIALIZATION_NVP(v); - ar >> BOOST_SERIALIZATION_NVP(w); - ar >> BOOST_SERIALIZATION_NVP(x); - default: - break; - } - } - - BOOST_SERIALIZATION_SPLIT_MEMBER() - signed char s; - unsigned char t; - signed int u; - unsigned int v; - float w; - double x; -public: - B(); - virtual ~B(){}; - bool operator==(const B &rhs) const; -}; - -B::B() : - s(std::rand()), - t(std::rand()), - u(std::rand()), - v(std::rand()), - w((float)std::rand() / std::rand()), - x((double)std::rand() / std::rand()) -{ -} - -BOOST_CLASS_VERSION(B, 2) - -inline bool B::operator==(const B &rhs) const -{ - return - A::operator==(rhs) - && s == rhs.s - && t == rhs.t - && u == rhs.u - && v == rhs.v - && std::fabs(w - rhs.w) <= std::numeric_limits::round_error() - && std::fabs(x - rhs.x) <= std::numeric_limits::round_error() - ; -} - -#endif // BOOST_SERIALIZATION_TEST_B_HPP diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_b.ipp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_b.ipp deleted file mode 100644 index 245ce37133..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_dll_b.ipp +++ /dev/null @@ -1,112 +0,0 @@ -#ifndef BOOST_SERIALIZATION_TEST_B_HPP -#define BOOST_SERIALIZATION_TEST_B_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// B.hpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include // for rand() - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::rand; -} -#endif - -#include -#include -#include - -#include "A.hpp" - -/////////////////////////////////////////////////////// -// Derived class test -class B : public A -{ -private: - friend class boost::serialization::access; - template - void save(Archive &ar, const unsigned int /* file_version */) const - { - // write any base class info to the archive - ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); - - // write out members - ar << BOOST_SERIALIZATION_NVP(s); - ar << BOOST_SERIALIZATION_NVP(t); - ar << BOOST_SERIALIZATION_NVP(u); - ar << BOOST_SERIALIZATION_NVP(v); - ar << BOOST_SERIALIZATION_NVP(w); - ar << BOOST_SERIALIZATION_NVP(x); - } - - template - void load(Archive & ar, const unsigned int file_version) - { - // read any base class info to the archive - ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(A); - switch(file_version){ - case 1: - case 2: - ar >> BOOST_SERIALIZATION_NVP(s); - ar >> BOOST_SERIALIZATION_NVP(t); - ar >> BOOST_SERIALIZATION_NVP(u); - ar >> BOOST_SERIALIZATION_NVP(v); - ar >> BOOST_SERIALIZATION_NVP(w); - ar >> BOOST_SERIALIZATION_NVP(x); - default: - break; - } - } - - BOOST_SERIALIZATION_SPLIT_MEMBER() - signed char s; - unsigned char t; - signed int u; - unsigned int v; - float w; - double x; -public: - B(); - virtual ~B(){}; - bool operator==(const B &rhs) const; -}; - -B::B() : - s(std::rand()), - t(std::rand()), - u(std::rand()), - v(std::rand()), - w((float)std::rand() / std::rand()), - x((double)std::rand() / std::rand()) -{ -} - -BOOST_CLASS_VERSION(B, 2) - -inline bool B::operator==(const B &rhs) const -{ - return - A::operator==(rhs) - && s == rhs.s - && t == rhs.t - && u == rhs.u - && v == rhs.v - && std::fabs(w - rhs.w) <= std::numeric_limits::round_error() - && std::fabs(x - rhs.x) <= std::numeric_limits::round_error() - ; -} - -#endif // BOOST_SERIALIZATION_TEST_B_HPP diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_exception.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_exception.cpp deleted file mode 100644 index 122a05a0bc..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_exception.cpp +++ /dev/null @@ -1,258 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// demo_exception.cpp - -// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// Example of safe exception handling for pointer de-serialization -// -// This example was prepared by Robert Ramey to demonstrate and test -// safe exception handling during the de-serialization of pointers in -// a non-trivial example. -// -// Hopefully, this addresses exception issues raised by -// Vahan Margaryan who spent considerable time and effort -// in the analysis and testing of issues of exception safety -// of the serialization library. - -#include -#include -#include // NULL -#include -#include - -#include // remove -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::remove; -} -#endif - -#include - -#ifndef BOOST_NO_EXCEPTIONS -#include -#endif - -#include -#include - -#include -#include - -template -struct deleter -{ - void operator()(TPTR t){ - delete t; - } -}; - -class Course; -class Student; - -class Student -{ -public: - static int count; - Student(){ - count++; - } - ~Student(){ - some_courses.clear(); - count--; - } - std::list some_courses; -private: - friend class boost::serialization::access; - template - void serialize(Archive & ar, const unsigned int /* file_version */){ - ar & some_courses; - } -}; - -int Student::count = 0; - -class Course -{ -public: - static int count; - Course(){ - count++; - } - ~Course(){ - // doesnt delete pointers in list - // since it doesn't "own" them - some_students.clear(); - count--; - } - std::list some_students; -private: - friend class boost::serialization::access; - template - void serialize(Archive & ar, const unsigned int /* file_version */){ - ar & some_students; - } -}; - -int Course::count = 0; - -class School -{ -public: - ~School(){ - // must delete all the students because - // it "owns" them - std::for_each(all_students.begin(), all_students.end(), deleter()); - all_students.clear(); - // as well as courses - std::for_each(all_courses.begin(), all_courses.end(), deleter()); - all_courses.clear(); - } - std::list all_students; - std::list all_courses; -private: - friend class boost::serialization::access; - BOOST_SERIALIZATION_SPLIT_MEMBER() - template - void save(Archive & ar, const unsigned int file_version) const; - template - void load(Archive & ar, const unsigned int file_version); -}; - -#if 0 -// case 1: -template -void School::serialize(Archive & ar, const unsigned int /* file_version */){ - // if an exeception occurs while loading courses - // the structure courses may have some courses each - // with students - ar & all_courses; - // while all_students will have no members. - ar & all_students; // create students that have no courses - // so ~School() will delete all members of courses - // but this will NOT delete any students - see above - // a memory leak will be the result. -} - -// switching the order of serialization doesn't help in this case -// case 2: -template -void School::serialize(Archive & ar, const unsigned int /* file_version */){ - ar & all_students; - ar >> all_courses; // create any courses that have no students -} -#endif - -template -void School::save(Archive & ar, const unsigned int /* file_version */) const { - ar << all_students; - ar << all_courses; -} - -template -void School::load(Archive & ar, const unsigned int /* file_version */){ - // if an exeception occurs while loading courses - // the structure courses may have some courses each - // with students - try{ - // deserialization of a Course * will in general provoke the - // deserialization of Student * which are added to the list of - // students for a class. That is, this process will result - // in the copying of a pointer. - ar >> all_courses; - ar >> all_students; // create students that have no courses - } - catch(std::exception){ - // elminate any dangling references - all_courses.clear(); - all_students.clear(); - throw; - } -} - -void init(School *school){ - Student *bob = new Student(); - Student *ted = new Student(); - Student *carol = new Student(); - Student *alice = new Student(); - - school->all_students.push_back(bob); - school->all_students.push_back(ted); - school->all_students.push_back(carol); - school->all_students.push_back(alice); - - Course *math = new Course(); - Course *history = new Course(); - Course *literature = new Course(); - Course *gym = new Course(); - - school->all_courses.push_back(math); - school->all_courses.push_back(history); - school->all_courses.push_back(literature); - school->all_courses.push_back(gym); - - bob->some_courses.push_back(math); - math->some_students.push_back(bob); - bob->some_courses.push_back(literature); - literature->some_students.push_back(bob); - - ted->some_courses.push_back(math); - math->some_students.push_back(ted); - ted->some_courses.push_back(history); - history->some_students.push_back(ted); - - alice->some_courses.push_back(literature); - literature->some_students.push_back(alice); - alice->some_courses.push_back(history); - history->some_students.push_back(alice); - - // no students signed up for gym - // carol has no courses -} - -void save(const School * const school, const char *filename){ - std::ofstream ofile(filename); - boost::archive::text_oarchive ar(ofile); - ar << school; -} - -void load(School * & school, const char *filename){ - std::ifstream ifile(filename); - boost::archive::text_iarchive ar(ifile); - try{ - ar >> school; - } - catch(std::exception){ - // eliminate dangling reference - school = NULL; - } -} - -int main(int argc, char *argv[]){ - std::string filename(boost::archive::tmpdir()); - filename += "/demofile.txt"; - - School *school = new School(); - std::cout << "1. student count = " << Student::count << std::endl; - std::cout << "2. class count = " << Course::count << std::endl; - init(school); - std::cout << "3. student count = " << Student::count << std::endl; - std::cout << "4. class count = " << Course::count << std::endl; - save(school, filename.c_str()); - delete school; - school = NULL; - std::cout << "5. student count = " << Student::count << std::endl; - std::cout << "6. class count = " << Course::count << std::endl; - load(school, filename.c_str()); - std::cout << "7. student count = " << Student::count << std::endl; - std::cout << "8. class count = " << Course::count << std::endl; - delete school; - std::cout << "9. student count = " << Student::count << std::endl; - std::cout << "10. class count = " << Course::count << std::endl; - std::remove(filename.c_str()); - return Student::count + Course::count; -} diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_fast_archive.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_fast_archive.cpp deleted file mode 100644 index 0f28ef7baa..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_fast_archive.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// demo_fast_binary_archive.cpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// should pass compilation and execution -#include - -#include -#include -#include - -#define BOOST_ARCHIVE_SOURCE -#include -#include -#include - -// include template definitions for base classes used. Otherwise -// you'll get link failure with undefined symbols -#include -#include -#include -#include - -using namespace boost::archive; - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// "Fast" output binary archive. This is a variation of the native binary -class fast_binary_oarchive : - // don't derive from binary_oarchive !!! - public binary_oarchive_impl< - fast_binary_oarchive, - std::ostream::char_type, - std::ostream::traits_type - > -{ - typedef fast_binary_oarchive derived_t; - typedef binary_oarchive_impl< - fast_binary_oarchive, - std::ostream::char_type, - std::ostream::traits_type - > base_t; -#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else - friend class boost::archive::detail::interface_oarchive; - friend class basic_binary_oarchive; - friend class basic_binary_oprimitive< - derived_t, - std::ostream::char_type, - std::ostream::traits_type - >; - friend class boost::archive::save_access; -#endif - // add base class to the places considered when matching - // save function to a specific set of arguments. Note, this didn't - // work on my MSVC 7.0 system using - // binary_oarchive_impl::load_override; - // so we use the sure-fire method below. This failed to work as well - template - void save_override(T & t, BOOST_PFTO int){ - base_t::save_override(t, 0); - // verify that this program is in fact working by making sure - // that arrays are getting passed here - BOOST_STATIC_ASSERT(! (boost::is_array::value) ); - } - template - void save_override(const int (& t)[N] , int){ - save_binary(t, sizeof(t)); - } - template - void save_override(const unsigned int (& t)[N], int){ - save_binary(t, sizeof(t)); - } - template - void save_override(const long (& t)[N], int){ - save_binary(t, sizeof(t)); - } - template - void save_override(const unsigned long (& t)[N], int){ - save_binary(t, sizeof(t)); - } -public: - fast_binary_oarchive(std::ostream & os, unsigned flags = 0) : - base_t(os, flags) - {} - fast_binary_oarchive(std::streambuf & bsb, unsigned int flags = 0) : - base_t(bsb, flags) - {} -}; - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(fast_binary_oarchive) - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// "Fast" input binary archive. This is a variation of the native binary -class fast_binary_iarchive : - // don't derive from binary_oarchive !!! - public binary_iarchive_impl< - fast_binary_iarchive, - std::istream::char_type, - std::istream::traits_type - > -{ - typedef fast_binary_iarchive derived_t; - typedef binary_iarchive_impl< - fast_binary_iarchive, - std::istream::char_type, - std::istream::traits_type - > base_t; -#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else - friend class boost::archive::detail::interface_iarchive; - friend class basic_binary_iarchive; - friend class basic_binary_iprimitive< - derived_t, - std::ostream::char_type, - std::ostream::traits_type - >; - friend class boost::archive::load_access; -#endif - // add base class to the places considered when matching - // save function to a specific set of arguments. Note, this didn't - // work on my MSVC 7.0 system using - // binary_oarchive_impl::load_override; - // so we use the sure-fire method below. This failed to work as well - template - void load_override(T & t, BOOST_PFTO int){ - base_t::load_override(t, 0); - BOOST_STATIC_ASSERT(! (boost::is_array::value) ); - } - template - void load_override(int (& t)[N], int){ - load_binary(t, sizeof(t)); - } - template - void load_override(unsigned int (& t)[N], int){ - load_binary(t, sizeof(t)); - } - template - void load_override(long (& t)[N], int){ - load_binary(t, sizeof(t)); - } - template - void load_override(unsigned long (& t)[N], int){ - load_binary(t, sizeof(t)); - } -public: - fast_binary_iarchive(std::istream & is, unsigned int flags = 0) : - base_t(is, flags) - {} - fast_binary_iarchive(std::streambuf & bsb, unsigned int flags = 0) : - base_t(bsb, flags) - {} -}; - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(fast_binary_iarchive) - -int main( int argc, char* argv[] ) -{ - const int a[3] = {1, 2, 3}; - int a1[3] = {4, 5, 6}; - - std::stringstream ss; - { - fast_binary_oarchive pboa(ss); - pboa << a; - } - { - fast_binary_iarchive pbia(ss); - pbia >> a1; - } - return (a[0] != a1[0]) || (a[1] != a1[1]) || (a[2] != a1[2]); -} - - diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_gps.hpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_gps.hpp deleted file mode 100644 index 1830db3b8b..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_gps.hpp +++ /dev/null @@ -1,284 +0,0 @@ -#ifndef BOOST_SERIALIZATION_EXAMPLE_DEMO_GPS_HPP -#define BOOST_SERIALIZATION_EXAMPLE_DEMO_GPS_HPP - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// -// demo_gps.hpp -// -// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -// This illustration models the bus system of a small city. -// This includes, multiple bus stops, bus routes and schedules. -// There are different kinds of stops. Bus stops in general will -// will appear on multiple routes. A schedule will include -// muliple trips on the same route. - -///////////////////////////////////////////////////////////// -// gps coordinate -// -// llustrates serialization for a simple type -// -class gps_position -{ - friend class boost::serialization::access; - friend std::ostream & operator<<(std::ostream &os, const gps_position &gp); - - int degrees; - int minutes; - float seconds; - - template - void serialize(Archive & ar, const unsigned int /* file_version */){ - ar & BOOST_SERIALIZATION_NVP(degrees) - & BOOST_SERIALIZATION_NVP(minutes) - & BOOST_SERIALIZATION_NVP(seconds); - } - -public: - // every serializable class needs a constructor - gps_position(){}; - gps_position(int _d, int _m, float _s) : - degrees(_d), minutes(_m), seconds(_s) - {} -}; - -std::ostream & operator<<(std::ostream &os, const gps_position &gp) -{ - return os << ' ' << gp.degrees << (unsigned char)186 << gp.minutes << '\'' << gp.seconds << '"'; -} - -///////////////////////////////////////////////////////////// -// One bus stop -// -// illustrates serialization of serializable members -// - -class bus_stop -{ - friend class boost::serialization::access; - virtual std::string description() const = 0; - gps_position latitude; - gps_position longitude; - - template - void serialize(Archive &ar, const unsigned int version) - { - ar & BOOST_SERIALIZATION_NVP(latitude); - ar & BOOST_SERIALIZATION_NVP(longitude); - } - -protected: - bus_stop(const gps_position & _lat, const gps_position & _long) : - latitude(_lat), longitude(_long) - {} -public: - bus_stop(){} - friend std::ostream & operator<<(std::ostream &os, const bus_stop &gp); - virtual ~bus_stop(){} -}; - -BOOST_SERIALIZATION_ASSUME_ABSTRACT(bus_stop) - -std::ostream & operator<<(std::ostream &os, const bus_stop &bs) -{ - return os << bs.latitude << bs.longitude << ' ' << bs.description(); -} - -///////////////////////////////////////////////////////////// -// Several kinds of bus stops -// -// illustrates serialization of derived types -// -class bus_stop_corner : public bus_stop -{ - friend class boost::serialization::access; - std::string street1; - std::string street2; - virtual std::string description() const - { - return street1 + " and " + street2; - } - template - void serialize(Archive &ar, const unsigned int version) - { - // save/load base class information - ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(bus_stop); - ar & BOOST_SERIALIZATION_NVP(street1); - ar & BOOST_SERIALIZATION_NVP(street2); - } -public: - bus_stop_corner(){} - bus_stop_corner(const gps_position & _lat, const gps_position & _long, - const std::string & _s1, const std::string & _s2 - ) : - bus_stop(_lat, _long), street1(_s1), street2(_s2) - { - } -}; - -class bus_stop_destination : public bus_stop -{ - friend class boost::serialization::access; - std::string name; - virtual std::string description() const - { - return name; - } - template - void serialize(Archive &ar, const unsigned int version) - { - ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(bus_stop) - & BOOST_SERIALIZATION_NVP(name); - } -public: - bus_stop_destination(){} - bus_stop_destination( - const gps_position & _lat, const gps_position & _long, const std::string & _name - ) : - bus_stop(_lat, _long), name(_name) - { - } -}; - -///////////////////////////////////////////////////////////// -// a bus route is a collection of bus stops -// -// illustrates serialization of STL collection templates. -// -// illustrates serialzation of polymorphic pointer (bus stop *); -// -// illustrates storage and recovery of shared pointers is correct -// and efficient. That is objects pointed to by more than one -// pointer are stored only once. In such cases only one such -// object is restored and pointers are restored to point to it -// -class bus_route -{ - friend class boost::serialization::access; - friend std::ostream & operator<<(std::ostream &os, const bus_route &br); - typedef bus_stop * bus_stop_pointer; - std::list stops; - template - void serialize(Archive &ar, const unsigned int version) - { - // in this program, these classes are never serialized directly but rather - // through a pointer to the base class bus_stop. So we need a way to be - // sure that the archive contains information about these derived classes. - //ar.template register_type(); - ar.register_type(static_cast(NULL)); - //ar.template register_type(); - ar.register_type(static_cast(NULL)); - // serialization of stl collections is already defined - // in the header - ar & BOOST_SERIALIZATION_NVP(stops); - } -public: - bus_route(){} - void append(bus_stop *_bs) - { - stops.insert(stops.end(), _bs); - } -}; -std::ostream & operator<<(std::ostream &os, const bus_route &br) -{ - std::list::const_iterator it; - // note: we're displaying the pointer to permit verification - // that duplicated pointers are properly restored. - for(it = br.stops.begin(); it != br.stops.end(); it++){ - os << '\n' << std::hex << "0x" << *it << std::dec << ' ' << **it; - } - return os; -} - -///////////////////////////////////////////////////////////// -// a bus schedule is a collection of routes each with a starting time -// -// Illustrates serialization of STL objects(pair) in a non-intrusive way. -// See definition of operator<< >(ar, pair) -// -// illustrates nesting of serializable classes -// -// illustrates use of version number to automatically grandfather older -// versions of the same class. - -class bus_schedule -{ - friend class boost::serialization::access; - friend std::ostream & operator<<(std::ostream &os, const bus_schedule &bs); - template - void serialize(Archive &ar, const unsigned int version) - { - ar & BOOST_SERIALIZATION_NVP(schedule); - } - // note: this structure was made public. because the friend declarations - // didn't seem to work as expected. -public: - struct trip_info - { - template - void serialize(Archive &ar, const unsigned int file_version) - { - // in versions 2 or later - if(file_version >= 2) - // read the drivers name - ar & BOOST_SERIALIZATION_NVP(driver); - // all versions have the follwing info - ar & BOOST_SERIALIZATION_NVP(hour) - & BOOST_SERIALIZATION_NVP(minute); - } - - // starting time - int hour; - int minute; - // only after system shipped was the driver's name added to the class - std::string driver; - - trip_info(){} - trip_info(int _h, int _m, const std::string &_d) : - hour(_h), minute(_m), driver(_d) - {} - ~trip_info(){ - } - }; -// friend std::ostream & operator<<(std::ostream &os, const trip_info &ti); -private: - std::list > schedule; -public: - void append(const std::string &_d, int _h, int _m, bus_route *_br) - { - schedule.insert(schedule.end(), std::make_pair(trip_info(_h, _m, _d), _br)); - } - bus_schedule(){} -}; - -BOOST_CLASS_VERSION(bus_schedule::trip_info, 3) -BOOST_CLASS_VERSION(bus_schedule, 2) - -std::ostream & operator<<(std::ostream &os, const bus_schedule::trip_info &ti) -{ - return os << '\n' << ti.hour << ':' << ti.minute << ' ' << ti.driver << ' '; -} -std::ostream & operator<<(std::ostream &os, const bus_schedule &bs) -{ - std::list >::const_iterator it; - for(it = bs.schedule.begin(); it != bs.schedule.end(); it++){ - os << it->first << *(it->second); - } - return os; -} - -#endif // BOOST_SERIALIZATION_EXAMPLE_DEMO_GPS_HPP diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_log.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_log.cpp deleted file mode 100644 index 55fc53513e..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_log.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// -// demo_log.cpp -// -// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include - -#include "demo_gps.hpp" -#include "log_archive.hpp" - -int main(int argc, char *argv[]) -{ - // make the schedule - bus_schedule schedule; - - // fill in the data - // make a few stops - bus_stop *bs0 = new bus_stop_corner( - gps_position(34, 135, 52.560f), - gps_position(134, 22, 78.30f), - "24th Street", "10th Avenue" - ); - bus_stop *bs1 = new bus_stop_corner( - gps_position(35, 137, 23.456f), - gps_position(133, 35, 54.12f), - "State street", "Cathedral Vista Lane" - ); - bus_stop *bs2 = new bus_stop_destination( - gps_position(35, 136, 15.456f), - gps_position(133, 32, 15.300f), - "White House" - ); - bus_stop *bs3 = new bus_stop_destination( - gps_position(35, 134, 48.789f), - gps_position(133, 32, 16.230f), - "Lincoln Memorial" - ); - - // make a routes - bus_route route0; - route0.append(bs0); - route0.append(bs1); - route0.append(bs2); - - // add trips to schedule - schedule.append("bob", 6, 24, &route0); - schedule.append("bob", 9, 57, &route0); - schedule.append("alice", 11, 02, &route0); - - // make aother routes - bus_route route1; - route1.append(bs3); - route1.append(bs2); - route1.append(bs1); - - // add trips to schedule - schedule.append("ted", 7, 17, &route1); - schedule.append("ted", 9, 38, &route1); - schedule.append("alice", 11, 47, &route1); - - // display the complete schedule - log_archive oa(std::cout); - //oa << BOOST_SERIALIZATION_NVP(schedule); - oa << schedule; - - delete bs0; - delete bs1; - delete bs2; - delete bs3; - return 0; -} diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_output.txt b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_output.txt deleted file mode 100644 index 306bdbdc2a..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_output.txt +++ /dev/null @@ -1,51 +0,0 @@ -original schedule -6:24 bob -0x003265C8 34º135'52.56" 134º22'78.3" 24th Street and 10th Avenue -0x00326648 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane -0x00326768 35º136'15.456" 133º32'15.3" White House -9:57 bob -0x003265C8 34º135'52.56" 134º22'78.3" 24th Street and 10th Avenue -0x00326648 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane -0x00326768 35º136'15.456" 133º32'15.3" White House -11:2 alice -0x003265C8 34º135'52.56" 134º22'78.3" 24th Street and 10th Avenue -0x00326648 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane -0x00326768 35º136'15.456" 133º32'15.3" White House -7:17 ted -0x003267D0 35º134'48.789" 133º32'16.23" Lincoln Memorial -0x00326768 35º136'15.456" 133º32'15.3" White House -0x00326648 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane -9:38 ted -0x003267D0 35º134'48.789" 133º32'16.23" Lincoln Memorial -0x00326768 35º136'15.456" 133º32'15.3" White House -0x00326648 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane -11:47 alice -0x003267D0 35º134'48.789" 133º32'16.23" Lincoln Memorial -0x00326768 35º136'15.456" 133º32'15.3" White House -0x00326648 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane -restored schedule -6:24 -0x0032A2F8 34º135'52.56" 134º22'78.3" 24th Street and 10th Avenue -0x0032A508 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane -0x0032A628 35º136'15.456" 133º32'15.3" White House -9:57 -0x0032A2F8 34º135'52.56" 134º22'78.3" 24th Street and 10th Avenue -0x0032A508 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane -0x0032A628 35º136'15.456" 133º32'15.3" White House -11:2 -0x0032A2F8 34º135'52.56" 134º22'78.3" 24th Street and 10th Avenue -0x0032A508 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane -0x0032A628 35º136'15.456" 133º32'15.3" White House -7:17 -0x0032A8C0 35º134'48.789" 133º32'16.23" Lincoln Memorial -0x0032A628 35º136'15.456" 133º32'15.3" White House -0x0032A508 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane -9:38 -0x0032A8C0 35º134'48.789" 133º32'16.23" Lincoln Memorial -0x0032A628 35º136'15.456" 133º32'15.3" White House -0x0032A508 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane -11:47 -0x0032A8C0 35º134'48.789" 133º32'16.23" Lincoln Memorial -0x0032A628 35º136'15.456" 133º32'15.3" White House -0x0032A508 35º137'23.456" 133º35'54.12" State street and Cathedral Vista Lane -*** No errors detected diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_pimpl.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_pimpl.cpp deleted file mode 100644 index 2d5446d3ae..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_pimpl.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// demo_pimpl.cpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// should pass compilation and execution - -#include - -#include -#include - -#include "demo_pimpl_A.hpp" - -int main(int argc, char* argv[]) -{ - std::stringstream ss; - - const A a; - { - boost::archive::text_oarchive oa(ss); - oa << a; - } - A a1; - { - boost::archive::text_iarchive ia(ss); - ia >> a1; - } - return 0; -} - diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_pimpl_A.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_pimpl_A.cpp deleted file mode 100644 index 455b71ece3..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_pimpl_A.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// demo_pimpl_A.cpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include - -#include "demo_pimpl_A.hpp" - -// "hidden" definition of class B -struct B { - int b; - template - void serialize(Archive & ar, const unsigned int /* file_version */){ - ar & b; - } -}; - -A::A() : - pimpl(new B) -{} -A::~A(){ - delete pimpl; -} -// now we can define the serialization for class A -template -void A::serialize(Archive & ar, const unsigned int /* file_version */){ - ar & pimpl; -} - -// without the explicit instantiations below, the program will -// fail to link for lack of instantiantiation of the above function -// note: the following failed to fix link errors for vc 7.0 ! -template void A::serialize( - boost::archive::text_iarchive & ar, - const unsigned int file_version -); -template void A::serialize( - boost::archive::text_oarchive & ar, - const unsigned int file_version -); diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_pimpl_A.hpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_pimpl_A.hpp deleted file mode 100644 index 8697de8d1d..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_pimpl_A.hpp +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef BOOST_SERIALIZATION_EXAMPLE_DEMO_PIMPL_A_HPP -#define BOOST_SERIALIZATION_EXAMPLE_DEMO_PIMPL_A_HPP - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// demo_pimpl_A.hpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// class whose declaration is hidden by a pointer -struct B; - -struct A { - // class a contains a pointer to a "hidden" declaration - B *pimpl; - template - void serialize(Archive & ar, const unsigned int file_version); - A(); - ~A(); -}; - -#endif // BOOST_SERIALIZATION_EXAMPLE_DEMO_PIMPL_A_HPP diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_polymorphic.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_polymorphic.cpp deleted file mode 100644 index 3c91745a8d..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_polymorphic.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// demo_polymorphic.cpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// should pass compilation and execution - -#include - -#include -#include - -#include -#include - -#include "demo_polymorphic_A.hpp" - -int main(int argc, char* argv[]) -{ - const A a; - A a1; - { - // test with a text archive - std::stringstream ss; - { - // instantiate archive which inhertis polymorphic interface - // and the normal text archive implementation - boost::archive::polymorphic_text_oarchive oa(ss); - boost::archive::polymorphic_oarchive & oa_interface = oa; - // we can just just the interface for saving - oa_interface << a; - } - { - // or we can use the implementation directly - boost::archive::polymorphic_text_iarchive ia(ss); - ia >> a1; - } - } - if(! (a == a1)) - return 1; - { - //test with a binary archive - std::stringstream ss; - { - // instantiate archive which inhertis polymorphic interface - // and the normal binary archive implementation - boost::archive::polymorphic_binary_oarchive oa(ss); - oa << a; - } - { - // see above - boost::archive::polymorphic_binary_iarchive ia(ss); - boost::archive::polymorphic_iarchive & ia_interface = ia; - // use just the polymorphic interface for loading. - ia_interface >> a1; - } - } - if(! (a == a1)) - return 1; - return 0; -} - diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_polymorphic_A.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_polymorphic_A.cpp deleted file mode 100644 index c32d4a13f2..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_polymorphic_A.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// demo_polymorphic_A.cpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - - -#include -#include - -#include "demo_polymorphic_A.hpp" - -// explicitly instantiate templates for polymorphic archives -// used by this demo. -template -void A::serialize( - boost::archive::polymorphic_iarchive &, - const unsigned int -); -template -void A::serialize( - boost::archive::polymorphic_oarchive &, - const unsigned int -); diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_polymorphic_A.hpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_polymorphic_A.hpp deleted file mode 100644 index 17f9758fb7..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_polymorphic_A.hpp +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef BOOST_SERIALIZATION_EXAMPLE_DEMO_POLYMORPHIC_A_HPP -#define BOOST_SERIALIZATION_EXAMPLE_DEMO_POLYMORPHIC_A_HPP - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// demo_polymorphic_A.hpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -namespace boost { -namespace archive { - -class polymorphic_iarchive; -class polymorphic_oarchive; - -} // namespace archive -} // namespace boost - -struct A { - // class a contains a pointer to a "hidden" declaration - template - void serialize( - Archive & ar, - const unsigned int file_version - ){ - ar & data; - } - int data; - bool operator==(const A & rhs) const { - return data == rhs.data; - } - A() : - data(0) - {} -}; - -#endif // BOOST_SERIALIZATION_EXAMPLE_DEMO_POLYMORPHIC_A_HPP diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_portable_archive.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_portable_archive.cpp deleted file mode 100644 index 6d9fb2bef9..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_portable_archive.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// -// demo_portable_archive.cpp -// -// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// should pass compilation and execution - -// note:: this example can only be built with the static library -// (at least with MSVC - due to conflicts related to import of library -// code and instantiation of templates. -#include - -#include "portable_binary_oarchive.hpp" -#include "portable_binary_iarchive.hpp" - -#include -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ using ::rand; } -#endif - -class A -{ - friend class boost::serialization::access; - char c; - A *pa; - int i; - int i2; // special tricky case to check sign extension - unsigned int ui; - long l; - unsigned long ul; - template - void serialize(Archive & ar, const unsigned int /* version */){ - ar & c & i & i2 & ui & l & ul ; - } -public: - bool operator==(const A & rhs) const { - return - c == rhs.c - && i == rhs.i - && i2 == rhs.i2 - && ui == rhs.ui - && l == rhs.l - && ul == rhs.ul - ; - } - A() : - c(0xFF & std::rand()), - pa(0), - i(std::rand()), - i2(0x80), - ui(std::rand()), - l(std::rand() * std::rand()), - ul(std::rand()) - {} -}; - -int main( int /* argc */, char* /* argv */[] ) -{ - const A a; - A a1; - - std::stringstream ss; - { - portable_binary_oarchive pboa(ss); - pboa << a; - } - { - portable_binary_iarchive pbia(ss); - pbia >> a1; - } - if(! (a == a1)) - return 1; - - ss.clear(); - { - portable_binary_oarchive pboa(ss, endian_big); - pboa << a; - } - { - portable_binary_iarchive pbia(ss, endian_big); - pbia >> a1; - } - if(! (a == a1)) - return 1; - - ss.clear(); - { - portable_binary_oarchive pboa(ss, endian_big); - pboa << a; - } - { - portable_binary_iarchive pbia(ss, endian_big); - pbia >> a1; - } - - return !(a == a1); -} - - diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_save.xml b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_save.xml deleted file mode 100644 index c5a28c8eb2..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_save.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - 6 - - - bob - 6 - 24 - - - - 3 - - - - 34 - 135 - 52.560001 - - - 134 - 22 - 78.300003 - - - 24th Street - 10th Avenue - - - - - 35 - 137 - 23.455999 - - - 133 - 35 - 54.119999 - - - State street - Cathedral Vista Lane - - - - - 35 - 136 - 15.456 - - - 133 - 32 - 15.3 - - - White House - - - - - - - bob - 9 - 57 - - - - - - alice - 11 - 2 - - - - - - ted - 7 - 17 - - - - 3 - - - - 35 - 134 - 48.789001 - - - 133 - 32 - 16.23 - - - Lincoln Memorial - - - - - - - - - ted - 9 - 38 - - - - - - alice - 11 - 47 - - - - - - diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_shared_ptr.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_shared_ptr.cpp deleted file mode 100644 index fb347a7c75..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_shared_ptr.cpp +++ /dev/null @@ -1,164 +0,0 @@ -// demo_shared_ptr.cpp : demonstrates adding serialization to a template - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . Polymorphic -// derived pointer example by David Tonge. - -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include -#include // NULL -#include -#include - -#include // remove -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::remove; -} -#endif - -#include -#include -#include - -#include - -/////////////////////////// -// test shared_ptr serialization -class A -{ -private: - friend class boost::serialization::access; - int x; - template - void serialize(Archive & ar, const unsigned int /* file_version */){ - ar & x; - } -public: - static int count; - A(){++count;} // default constructor - virtual ~A(){--count;} // default destructor -}; - -BOOST_SERIALIZATION_SHARED_PTR(A) - -///////////////// -// ADDITION BY DT -class B : public A -{ -private: - friend class boost::serialization::access; - int x; - template - void serialize(Archive & ar, const unsigned int /* file_version */){ - ar & boost::serialization::base_object(*this); - } -public: - static int count; - B() : A() {}; - virtual ~B() {}; -}; - -BOOST_SERIALIZATION_SHARED_PTR(B) - -///////////////// - -int A::count = 0; - -void display(boost::shared_ptr &spa, boost::shared_ptr &spa1) -{ - std::cout << "a = 0x" << std::hex << spa.get() << " "; - if (spa.get()) std::cout << "is a " << typeid(*(spa.get())).name() << "* "; - std::cout << "use count = " << std::dec << spa.use_count() << std::endl; - std::cout << "a1 = 0x" << std::hex << spa1.get() << " "; - if (spa1.get()) std::cout << "is a " << typeid(*(spa1.get())).name() << "* "; - std::cout << "use count = " << std::dec << spa1.use_count() << std::endl; - std::cout << "unique element count = " << A::count << std::endl; -} - -int main(int /* argc */, char * /*argv*/[]) -{ - std::string filename(boost::archive::tmpdir()); - filename += "/testfile"; - - // create a new shared pointer to ta new object of type A - boost::shared_ptr spa(new A); - boost::shared_ptr spa1; - spa1 = spa; - display(spa, spa1); - // serialize it - { - std::ofstream ofs(filename.c_str()); - boost::archive::text_oarchive oa(ofs); - oa << spa; - oa << spa1; - } - // reset the shared pointer to NULL - // thereby destroying the object of type A - spa.reset(); - spa1.reset(); - display(spa, spa1); - // restore state to one equivalent to the original - // creating a new type A object - { - // open the archive - std::ifstream ifs(filename.c_str()); - boost::archive::text_iarchive ia(ifs); - - // restore the schedule from the archive - ia >> spa; - ia >> spa1; - } - display(spa, spa1); - spa.reset(); - spa1.reset(); - - std::cout << std::endl; - std::cout << std::endl; - std::cout << "New tests" << std::endl; - - ///////////////// - // ADDITION BY DT - // create a new shared pointer to ta new object of type A - spa = boost::shared_ptr(new B); - spa1 = spa; - display(spa, spa1); - // serialize it - { - std::ofstream ofs(filename.c_str()); - boost::archive::text_oarchive oa(ofs); - oa.register_type(static_cast(NULL)); - oa << spa; - oa << spa1; - } - // reset the shared pointer to NULL - // thereby destroying the object of type B - spa.reset(); - spa1.reset(); - display(spa, spa1); - // restore state to one equivalent to the original - // creating a new type B object - { - // open the archive - std::ifstream ifs(filename.c_str()); - boost::archive::text_iarchive ia(ifs); - - // restore the schedule from the archive - ia.register_type(static_cast(NULL)); - ia >> spa; - ia >> spa1; - } - display(spa, spa1); - /////////////// - std::remove(filename.c_str()); - - // obj of type A gets destroyed - // as smart_ptr goes out of scope - return 0; -} diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_simple_log.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_simple_log.cpp deleted file mode 100644 index da80b5a5a6..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_simple_log.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// -// demo_log.cpp -// -// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include - -#include "demo_gps.hpp" -#include "simple_log_archive.hpp" - -int main(int argc, char *argv[]) -{ - // make the schedule - bus_schedule schedule; - - // fill in the data - // make a few stops - bus_stop *bs0 = new bus_stop_corner( - gps_position(34, 135, 52.560f), - gps_position(134, 22, 78.30f), - "24th Street", "10th Avenue" - ); - bus_stop *bs1 = new bus_stop_corner( - gps_position(35, 137, 23.456f), - gps_position(133, 35, 54.12f), - "State street", "Cathedral Vista Lane" - ); - bus_stop *bs2 = new bus_stop_destination( - gps_position(35, 136, 15.456f), - gps_position(133, 32, 15.300f), - "White House" - ); - bus_stop *bs3 = new bus_stop_destination( - gps_position(35, 134, 48.789f), - gps_position(133, 32, 16.230f), - "Lincoln Memorial" - ); - - // make a routes - bus_route route0; - route0.append(bs0); - route0.append(bs1); - route0.append(bs2); - - // add trips to schedule - schedule.append("bob", 6, 24, &route0); - schedule.append("bob", 9, 57, &route0); - schedule.append("alice", 11, 02, &route0); - - // make aother routes - bus_route route1; - route1.append(bs3); - route1.append(bs2); - route1.append(bs1); - - // add trips to schedule - schedule.append("ted", 7, 17, &route1); - schedule.append("ted", 9, 38, &route1); - schedule.append("alice", 11, 47, &route1); - - // display the complete schedule - simple_log_archive log(std::cout); - log << schedule; - - delete bs0; - delete bs1; - delete bs2; - delete bs3; - return 0; -} diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_trivial_archive.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_trivial_archive.cpp deleted file mode 100644 index 21be59630c..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_trivial_archive.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// -// demo_trivial_archive.cpp -// -// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include // std::size_t -#include - -///////////////////////////////////////////////////////////////////////// -// class trivial_oarchive -class trivial_oarchive { - -public: - ////////////////////////////////////////////////////////// - // public interface used by programs that use the - // serialization library - typedef boost::mpl::bool_ is_saving; - typedef boost::mpl::bool_ is_loading; - template void register_type(){} - template trivial_oarchive & operator<<(const T & t){ - return *this; - } - template trivial_oarchive & operator&(const T & t){ - return *this << t; - } - void save_binary(void *address, std::size_t count){}; -}; - -#include "demo_gps.hpp" - -int main(int argc, char *argv[]) -{ - // make the schedule - bus_schedule schedule; - - // fill in the data - // make a few stops - bus_stop *bs0 = new bus_stop_corner( - gps_position(34, 135, 52.560f), - gps_position(134, 22, 78.30f), - "24th Street", "10th Avenue" - ); - bus_stop *bs1 = new bus_stop_corner( - gps_position(35, 137, 23.456f), - gps_position(133, 35, 54.12f), - "State street", "Cathedral Vista Lane" - ); - bus_stop *bs2 = new bus_stop_destination( - gps_position(35, 136, 15.456f), - gps_position(133, 32, 15.300f), - "White House" - ); - bus_stop *bs3 = new bus_stop_destination( - gps_position(35, 134, 48.789f), - gps_position(133, 32, 16.230f), - "Lincoln Memorial" - ); - - // make a routes - bus_route route0; - route0.append(bs0); - route0.append(bs1); - route0.append(bs2); - - // add trips to schedule - schedule.append("bob", 6, 24, &route0); - schedule.append("bob", 9, 57, &route0); - schedule.append("alice", 11, 02, &route0); - - // make aother routes - bus_route route1; - route1.append(bs3); - route1.append(bs2); - route1.append(bs1); - - // add trips to schedule - schedule.append("ted", 7, 17, &route1); - schedule.append("ted", 9, 38, &route1); - schedule.append("alice", 11, 47, &route1); - - // display the complete schedule - trivial_oarchive ta; - ta << schedule; - - delete bs0; - delete bs1; - delete bs2; - delete bs3; - return 0; -} diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml.cpp deleted file mode 100644 index c9524aefa0..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// -// demo_xml.cpp -// -// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include -#include - -#include // remove -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::remove; -} -#endif - -#include -#include -#include - -#include "demo_gps.hpp" - -void save_schedule(const bus_schedule &s, const char * filename){ - // make an archive - std::ofstream ofs(filename); - assert(ofs.good()); - boost::archive::xml_oarchive oa(ofs); - oa << BOOST_SERIALIZATION_NVP(s); -} - -void -restore_schedule(bus_schedule &s, const char * filename) -{ - // open the archive - std::ifstream ifs(filename); - assert(ifs.good()); - boost::archive::xml_iarchive ia(ifs); - - // restore the schedule from the archive - ia >> BOOST_SERIALIZATION_NVP(s); -} - -int main(int argc, char *argv[]) -{ - // make the schedule - bus_schedule original_schedule; - - // fill in the data - // make a few stops - bus_stop *bs0 = new bus_stop_corner( - gps_position(34, 135, 52.560f), - gps_position(134, 22, 78.30f), - "24th Street", "10th Avenue" - ); - bus_stop *bs1 = new bus_stop_corner( - gps_position(35, 137, 23.456f), - gps_position(133, 35, 54.12f), - "State street", "Cathedral Vista Lane" - ); - bus_stop *bs2 = new bus_stop_destination( - gps_position(35, 136, 15.456f), - gps_position(133, 32, 15.300f), - "White House" - ); - bus_stop *bs3 = new bus_stop_destination( - gps_position(35, 134, 48.789f), - gps_position(133, 32, 16.230f), - "Lincoln Memorial" - ); - - // make a routes - bus_route route0; - route0.append(bs0); - route0.append(bs1); - route0.append(bs2); - - // add trips to schedule - original_schedule.append("bob", 6, 24, &route0); - original_schedule.append("bob", 9, 57, &route0); - original_schedule.append("alice", 11, 02, &route0); - - // make aother routes - bus_route route1; - route1.append(bs3); - route1.append(bs2); - route1.append(bs1); - - // add trips to schedule - original_schedule.append("ted", 7, 17, &route1); - original_schedule.append("ted", 9, 38, &route1); - original_schedule.append("alice", 11, 47, &route1); - - // display the complete schedule - std::cout << "original schedule"; - std::cout << original_schedule; - - std::string filename(boost::archive::tmpdir()); - filename += "/demo.xml"; - - // save the schedule - save_schedule(original_schedule, filename.c_str()); - - // ... some time later - // make a new schedule - bus_schedule new_schedule; - - restore_schedule(new_schedule, filename.c_str()); - - // and display - std::cout << "\nrestored schedule"; - std::cout << new_schedule; - // should be the same as the old one. (except for the pointer values) - - std::remove(filename.c_str()); - - delete bs0; - delete bs1; - delete bs2; - delete bs3; - return 0; -} diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml.hpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml.hpp deleted file mode 100644 index 408412a1ea..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml.hpp +++ /dev/null @@ -1,284 +0,0 @@ -#ifndef BOOST_SERIALIZATION_EXAMPLE_DEMO_XML_HPP -#define BOOST_SERIALIZATION_EXAMPLE_DEMO_XML_HPP - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// -// demo_xml.hpp -// -// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - - -#include -#include -#include -#include - -#include -#include -#include -#include - -// This illustration models the bus system of a small city. -// This includes, multiple bus stops, bus routes and schedules. -// There are different kinds of stops. Bus stops in general will -// will appear on multiple routes. A schedule will include -// muliple trips on the same route. - -///////////////////////////////////////////////////////////// -// gps coordinate -// -// llustrates serialization for a simple type -// -class gps_position -{ - friend class boost::serialization::access; - friend std::ostream & operator<<(std::ostream &os, const gps_position &gp); - - int degrees; - int minutes; - float seconds; - - template - void serialize(Archive & ar, const unsigned int /* file_version */){ - ar & BOOST_SERIALIZATION_NVP(degrees) - & BOOST_SERIALIZATION_NVP(minutes) - & BOOST_SERIALIZATION_NVP(seconds); - } - -public: - // every serializable class needs a constructor - gps_position(){}; - gps_position(int _d, int _m, float _s) : - degrees(_d), minutes(_m), seconds(_s) - {} -}; - -std::ostream & operator<<(std::ostream &os, const gps_position &gp) -{ - return os << ' ' << gp.degrees << (unsigned char)186 << gp.minutes << '\'' << gp.seconds << '"'; -} - -///////////////////////////////////////////////////////////// -// One bus stop -// -// illustrates serialization of serializable members -// - -class bus_stop -{ - friend class boost::serialization::access; - virtual std::string description() const = 0; - gps_position latitude; - gps_position longitude; - - template - void serialize(Archive &ar, const unsigned int version) - { - ar & BOOST_SERIALIZATION_NVP(latitude); - ar & BOOST_SERIALIZATION_NVP(longitude); - } - -protected: - bus_stop(const gps_position & _lat, const gps_position & _long) : - latitude(_lat), longitude(_long) - {} -public: - bus_stop(){} - friend std::ostream & operator<<(std::ostream &os, const bus_stop &gp); - virtual ~bus_stop(){} -}; - -BOOST_IS_ABSTRACT(bus_stop) - -std::ostream & operator<<(std::ostream &os, const bus_stop &bs) -{ - return os << bs.latitude << bs.longitude << ' ' << bs.description(); -} - -///////////////////////////////////////////////////////////// -// Several kinds of bus stops -// -// illustrates serialization of derived types -// -class bus_stop_corner : public bus_stop -{ - friend class boost::serialization::access; - std::string street1; - std::string street2; - virtual std::string description() const - { - return street1 + " and " + street2; - } - template - void serialize(Archive &ar, const unsigned int version) - { - // save/load base class information - ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(bus_stop); - ar & BOOST_SERIALIZATION_NVP(street1); - ar & BOOST_SERIALIZATION_NVP(street2); - } -public: - bus_stop_corner(){} - bus_stop_corner(const gps_position & _lat, const gps_position & _long, - const std::string & _s1, const std::string & _s2 - ) : - bus_stop(_lat, _long), street1(_s1), street2(_s2) - { - } -}; - -class bus_stop_destination : public bus_stop -{ - friend class boost::serialization::access; - std::string name; - virtual std::string description() const - { - return name; - } - template - void serialize(Archive &ar, const unsigned int version) - { - ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(bus_stop) - & BOOST_SERIALIZATION_NVP(name); - } -public: - bus_stop_destination(){} - bus_stop_destination( - const gps_position & _lat, const gps_position & _long, const std::string & _name - ) : - bus_stop(_lat, _long), name(_name) - { - } -}; - -///////////////////////////////////////////////////////////// -// a bus route is a collection of bus stops -// -// illustrates serialization of STL collection templates. -// -// illustrates serialzation of polymorphic pointer (bus stop *); -// -// illustrates storage and recovery of shared pointers is correct -// and efficient. That is objects pointed to by more than one -// pointer are stored only once. In such cases only one such -// object is restored and pointers are restored to point to it -// -class bus_route -{ - friend class boost::serialization::access; - friend std::ostream & operator<<(std::ostream &os, const bus_route &br); - typedef bus_stop * bus_stop_pointer; - std::list stops; - template - void serialize(Archive &ar, const unsigned int version) - { - // in this program, these classes are never serialized directly but rather - // through a pointer to the base class bus_stop. So we need a way to be - // sure that the archive contains information about these derived classes. - //ar.template register_type(); - ar.register_type(static_cast(NULL)); - //ar.template register_type(); - ar.register_type(static_cast(NULL)); - // serialization of stl collections is already defined - // in the header - ar & BOOST_SERIALIZATION_NVP(stops); - } -public: - bus_route(){} - void append(bus_stop *_bs) - { - stops.insert(stops.end(), _bs); - } -}; -std::ostream & operator<<(std::ostream &os, const bus_route &br) -{ - std::list::const_iterator it; - // note: we're displaying the pointer to permit verification - // that duplicated pointers are properly restored. - for(it = br.stops.begin(); it != br.stops.end(); it++){ - os << '\n' << std::hex << "0x" << *it << std::dec << ' ' << **it; - } - return os; -} - -///////////////////////////////////////////////////////////// -// a bus schedule is a collection of routes each with a starting time -// -// Illustrates serialization of STL objects(pair) in a non-intrusive way. -// See definition of operator<< >(ar, pair) -// -// illustrates nesting of serializable classes -// -// illustrates use of version number to automatically grandfather older -// versions of the same class. - -class bus_schedule -{ - friend class boost::serialization::access; - friend std::ostream & operator<<(std::ostream &os, const bus_schedule &bs); - template - void serialize(Archive &ar, const unsigned int version) - { - ar & BOOST_SERIALIZATION_NVP(schedule); - } - // note: this structure was made public. because the friend declarations - // didn't seem to work as expected. -public: - struct trip_info - { - template - void serialize(Archive &ar, const unsigned int file_version) - { - // in versions 2 or later - if(file_version >= 2) - // read the drivers name - ar & BOOST_SERIALIZATION_NVP(driver); - // all versions have the follwing info - ar & BOOST_SERIALIZATION_NVP(hour) - & BOOST_SERIALIZATION_NVP(minute); - } - - // starting time - int hour; - int minute; - // only after system shipped was the driver's name added to the class - std::string driver; - - trip_info(){} - trip_info(int _h, int _m, const std::string &_d) : - hour(_h), minute(_m), driver(_d) - {} - ~trip_info(){ - } - }; -// friend std::ostream & operator<<(std::ostream &os, const trip_info &ti); -private: - std::list > schedule; -public: - void append(const std::string &_d, int _h, int _m, bus_route *_br) - { - schedule.insert(schedule.end(), std::make_pair(trip_info(_h, _m, _d), _br)); - } - bus_schedule(){} -}; - -BOOST_CLASS_VERSION(bus_schedule::trip_info, 3) -BOOST_CLASS_VERSION(bus_schedule, 2) - -std::ostream & operator<<(std::ostream &os, const bus_schedule::trip_info &ti) -{ - return os << '\n' << ti.hour << ':' << ti.minute << ' ' << ti.driver << ' '; -} -std::ostream & operator<<(std::ostream &os, const bus_schedule &bs) -{ - std::list >::const_iterator it; - for(it = bs.schedule.begin(); it != bs.schedule.end(); it++){ - os << it->first << *(it->second); - } - return os; -} - -#endif // BOOST_SERIALIZATION_EXAMPLE_DEMO_XML_HPP diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml_load.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml_load.cpp deleted file mode 100644 index cd8e03c119..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml_load.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// -// demo_xml_load.cpp -// -// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include - -#include - -#include "demo_gps.hpp" - -void -restore_schedule(bus_schedule &s, const char * filename) -{ - // open the archive - std::ifstream ifs(filename); - assert(ifs.good()); - boost::archive::xml_iarchive ia(ifs); - - // restore the schedule from the archive - ia >> BOOST_SERIALIZATION_NVP(s); -} - -int main(int argc, char *argv[]) -{ - // make a new schedule - bus_schedule new_schedule; - - std::string filename(boost::archive::tmpdir()); - filename += "/demo_save.xml"; - - restore_schedule(new_schedule, filename.c_str()); - - // and display - std::cout << "\nrestored schedule"; - std::cout << new_schedule; - - return 0; -} diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml_save.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml_save.cpp deleted file mode 100644 index ff03d54ae2..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demo_xml_save.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// -// demo_xml_save.cpp -// -// (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#include -#include -#include - -#include - -#include "demo_gps.hpp" - -void save_schedule(const bus_schedule &s, const char * filename){ - // make an archive - std::ofstream ofs(filename); - assert(ofs.good()); - boost::archive::xml_oarchive oa(ofs); - oa << BOOST_SERIALIZATION_NVP(s); -} - -int main(int argc, char *argv[]) -{ - // make the schedule - bus_schedule original_schedule; - - // fill in the data - // make a few stops - bus_stop *bs0 = new bus_stop_corner( - gps_position(34, 135, 52.560f), - gps_position(134, 22, 78.30f), - "24th Street", "10th Avenue" - ); - bus_stop *bs1 = new bus_stop_corner( - gps_position(35, 137, 23.456f), - gps_position(133, 35, 54.12f), - "State street", "Cathedral Vista Lane" - ); - bus_stop *bs2 = new bus_stop_destination( - gps_position(35, 136, 15.456f), - gps_position(133, 32, 15.300f), - "White House" - ); - bus_stop *bs3 = new bus_stop_destination( - gps_position(35, 134, 48.789f), - gps_position(133, 32, 16.230f), - "Lincoln Memorial" - ); - - // make a routes - bus_route route0; - route0.append(bs0); - route0.append(bs1); - route0.append(bs2); - - // add trips to schedule - original_schedule.append("bob", 6, 24, &route0); - original_schedule.append("bob", 9, 57, &route0); - original_schedule.append("alice", 11, 02, &route0); - - // make aother routes - bus_route route1; - route1.append(bs3); - route1.append(bs2); - route1.append(bs1); - - // add trips to schedule - original_schedule.append("ted", 7, 17, &route1); - original_schedule.append("ted", 9, 38, &route1); - original_schedule.append("alice", 11, 47, &route1); - - // display the complete schedule - std::cout << "original schedule"; - std::cout << original_schedule; - - std::string filename(boost::archive::tmpdir()); - filename += "/demo_save.xml"; - - // save the schedule - save_schedule(original_schedule, filename.c_str()); - - delete bs0; - delete bs1; - delete bs2; - delete bs3; - return 0; -} diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demofile.txt b/deal.II/contrib/boost-1.49.0/libs/serialization/example/demofile.txt deleted file mode 100644 index 59ae12f63c..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/demofile.txt +++ /dev/null @@ -1,13 +0,0 @@ -22 serialization::archive 3 0 2 0 0 6 0 0 0 0 6 24 4 1 0 -0 0 0 3 5 1 0 -1 0 0 0 0 34 135 52.560001 134 22 78.300003 11 24th Street 11 10th Avenue 5 -2 35 137 23.455999 133 35 54.119999 12 State street 20 Cathedral Vista Lane 6 1 0 -3 35 136 15.456 133 32 15.3 11 White House 9 57 4 -0 11 2 4 -0 7 17 4 -4 3 6 -5 35 134 48.789001 133 32 16.23 16 Lincoln Memorial 6 -3 5 -2 9 38 4 -4 11 47 4 -4 \ No newline at end of file diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/fix_six.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/fix_six.cpp deleted file mode 100644 index f18755f071..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/fix_six.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include -#include -#include -#include -#include - -void usage(const char * program_name){ - std::cout << "usage:"; - std::cout << program_name << " filename" << std::endl; -} - -int main(int argc, char *argv[]){ - if(argc != 2){ - std::cout << "invalid number of arguments" << std::endl; - usage(argv[0]); - return 1; - } - std::filebuf fb; - fb.open( - argv[1], - std::ios_base::binary | std::ios_base::in | std::ios_base::out - ); - if(!fb.is_open()){ - std::cout << argv[1] << " failed to open" << std::endl; - return 1; - } - boost::archive::binary_iarchive ia(fb); - boost::archive::library_version_type lvt = ia.get_library_version(); - if(boost::archive::library_version_type(6) != lvt){ - std::cout << "library version not equal to six" << std::endl; - return 1; - } - lvt = boost::archive::library_version_type(7); - fb.pubseekpos(26, std::ios_base::out); - fb.sputn(reinterpret_cast(& lvt), sizeof(lvt)); - fb.close(); -} diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/log_archive.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/log_archive.cpp deleted file mode 100644 index 86c3631e5e..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/log_archive.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// log_archive.cpp: - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#if (defined _MSC_VER) && (_MSC_VER == 1200) -# pragma warning (disable : 4786) // too long name, harmless warning -#endif - -//#define BOOST_ARCHIVE_SOURCE -#include "log_archive.hpp" -#include - -// explicitly instantiate for this type of xml stream -#include -#include -#include - -namespace boost { -namespace archive { - -template class detail::archive_serializer_map; -template class basic_xml_oarchive ; -template class xml_oarchive_impl ; - -} // namespace archive -} // namespace boost diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/log_archive.hpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/log_archive.hpp deleted file mode 100644 index 6587d0ec6e..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/log_archive.hpp +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef LOG_ARCHIVE_HPP -#define LOG_ARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// log_archive.hpp - -// (C) Copyright 2010 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include - -///////////////////////////////////////////////////////////////////////// -// log data to an output stream. This illustrates a simpler implemenation -// of text output which is useful for getting a formatted display of -// any serializable class. Intended to be useful as a debugging aid. -class log_archive : - /* protected ? */ - public boost::archive::xml_oarchive_impl -{ - typedef boost::archive::xml_oarchive_impl base; - // give serialization implementation access to this clas - friend class boost::archive::detail::interface_oarchive; - friend class boost::archive::basic_xml_oarchive; - friend class boost::archive::save_access; - - ///////////////////////////////////////////////////////////////////// - // Override functions defined in basic_xml_oarchive - - // Anything not an attribute and not a name-value pair is an - // error and should be trapped here. Note the usage of - // function argument matching (BOOST_PFTO) to permit usage - // with compilers which fail to properly support - // function template ordering - template - void save_override(T & t, BOOST_PFTO int){ - // make it a name-value pair and pass it on. - // this permits this to be used even with data types which - // are not wrapped with the name - base::save_override(boost::serialization::make_nvp(NULL, t), 0); - } - template - void save_override(const boost::serialization::nvp< T > & t, int){ - // this is here to remove the "const" requirement. Since - // this class is to be used only for output, it's not required. - base::save_override(t, 0); - } - // specific overrides for attributes - not name value pairs so we - // want to trap them before the above "fall through" - // since we don't want to see these in the output - make them no-ops. - void save_override(const boost::archive::object_id_type & t, int){} - void save_override(const boost::archive::object_reference_type & t, int){} - void save_override(const boost::archive::version_type & t, int){} - void save_override(const boost::archive::class_id_type & t, int){} - void save_override(const boost::archive::class_id_optional_type & t, int){} - void save_override(const boost::archive::class_id_reference_type & t, int){} - void save_override(const boost::archive::class_name_type & t, int){} - void save_override(const boost::archive::tracking_type & t, int){} -public: - log_archive(std::ostream & os, unsigned int flags = 0) : - boost::archive::xml_oarchive_impl( - os, - flags | boost::archive::no_header - ) - {} -}; - -#endif // LOG_ARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_iarchive.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_iarchive.cpp deleted file mode 100644 index 7f2f23e4ce..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_iarchive.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_portable_binary_iarchive.cpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include - -#define BOOST_ARCHIVE_SOURCE -#include "polymorphic_portable_binary_iarchive.hpp" - -// explicitly instantiate for this type of text stream -#include -#include -#include - -namespace boost { -namespace archive { - -template class binary_iarchive_impl< - polymorphic_portable_binary_iarchive, - std::istream::char_type, - std::istream::traits_type ->; -template class detail::archive_pointer_iserializer< - polymorphic_portable_binary_iarchive -> ; - -} // namespace archive -} // namespace boost diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_iarchive.hpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_iarchive.hpp deleted file mode 100644 index 95c5469511..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_iarchive.hpp +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef BOOST_ARCHIVE_POLYMORPHIC_PORTABLE_BINARY_IARCHIVE_HPP -#define BOOST_ARCHIVE_POLYMORPHIC_PORTABLE_BINARY_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_portable_binary_iarchive.hpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include "portable_binary_iarchive.hpp" - -typedef boost::archive::detail::polymorphic_iarchive_dispatch< - portable_binary_iarchive -> polymorphic_portable_binary_iarchive; - -#include -#if BOOST_VERSION > 103401 - // required by export - BOOST_SERIALIZATION_REGISTER_ARCHIVE( - polymorphic_portable_binary_iarchive - ) -#endif - -#endif // BOOST_ARCHIVE_POLYMORPHIC_PORTABLE_BINARY_OARCHIVE_HPP - diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_oarchive.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_oarchive.cpp deleted file mode 100644 index f77b902169..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_oarchive.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_portable_binary_oarchive.cpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include - -#define BOOST_ARCHIVE_SOURCE -#include "polymorphic_portable_binary_oarchive.hpp" - -// explicitly instantiate for this type of text stream -#include -#include -#include - -namespace boost { -namespace archive { - -// explicitly instantiate for this type of binary stream -template class binary_oarchive_impl< - polymorphic_portable_binary_oarchive, - std::ostream::char_type, - std::ostream::traits_type ->; -template class detail::archive_pointer_oserializer< - polymorphic_portable_binary_oarchive -> ; - -} // namespace archive -} // namespace boost diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_oarchive.hpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_oarchive.hpp deleted file mode 100644 index d247464054..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/polymorphic_portable_binary_oarchive.hpp +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef BOOST_ARCHIVE_POLYMORPHIC_PORTABLE_BINARY_OARCHIVE_HPP -#define BOOST_ARCHIVE_POLYMORPHIC_PORTABLE_BINARY_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_portable_binary_oarchive.hpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include "portable_binary_oarchive.hpp" - -typedef boost::archive::detail::polymorphic_oarchive_dispatch< - portable_binary_oarchive - > polymorphic_portable_binary_oarchive; - -#include -#if BOOST_VERSION > 103401 - // required by export - BOOST_SERIALIZATION_REGISTER_ARCHIVE( - polymorphic_portable_binary_oarchive - ) -#endif - -#endif // BOOST_ARCHIVE_POLYMORPHIC_PORTABLE_BINARY_OARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_archive.hpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_archive.hpp deleted file mode 100644 index ee23888e0b..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_archive.hpp +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef PORTABLE_BINARY_ARCHIVE_HPP -#define PORTABLE_BINARY_ARCHIVE_HPP - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -#include -#include -#include -#include - -#include -#if CHAR_BIT != 8 -#error This code assumes an eight-bit byte. -#endif - -#include -#include - -enum portable_binary_archive_flags { - endian_big = 0x4000, - endian_little = 0x8000 -}; - -//#if ( endian_big <= boost::archive::flags_last ) -//#error archive flags conflict -//#endif - -inline void -reverse_bytes(char size, char *address){ - char * first = address; - char * last = first + size - 1; - for(;first < last;++first, --last){ - char x = *last; - *last = *first; - *first = x; - } -} - -#endif // PORTABLE_BINARY_ARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_iarchive.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_iarchive.cpp deleted file mode 100644 index 6b8d7ccd5c..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_iarchive.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// portable_binary_iarchive.cpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include - -#include -#include -#include - -#include "portable_binary_iarchive.hpp" - -void -portable_binary_iarchive::load_impl(boost::intmax_t & l, char maxsize){ - char size; - l = 0; - this->primitive_base_t::load(size); - - if(0 == size){ - return; - } - - bool negative = (size < 0); - if(negative) - size = -size; - - if(size > maxsize) - boost::serialization::throw_exception( - portable_binary_iarchive_exception() - ); - - char * cptr = reinterpret_cast(& l); - #ifdef BOOST_BIG_ENDIAN - cptr += (sizeof(boost::intmax_t) - size); - #endif - this->primitive_base_t::load_binary(cptr, size); - - #ifdef BOOST_BIG_ENDIAN - if(m_flags & endian_little) - #else - if(m_flags & endian_big) - #endif - reverse_bytes(size, cptr); - - if(negative) - l = -l; -} - -void -portable_binary_iarchive::load_override( - boost::archive::class_name_type & t, int -){ - std::string cn; - cn.reserve(BOOST_SERIALIZATION_MAX_KEY_SIZE); - load_override(cn, 0); - if(cn.size() > (BOOST_SERIALIZATION_MAX_KEY_SIZE - 1)) - boost::serialization::throw_exception( - boost::archive::archive_exception( - boost::archive::archive_exception::invalid_class_name) - ); - std::memcpy(t, cn.data(), cn.size()); - // borland tweak - t.t[cn.size()] = '\0'; -} - -void -portable_binary_iarchive::init(unsigned int flags){ - if(0 == (flags & boost::archive::no_header)){ - // read signature in an archive version independent manner - std::string file_signature; - * this >> file_signature; - if(file_signature != boost::archive::BOOST_ARCHIVE_SIGNATURE()) - boost::serialization::throw_exception( - boost::archive::archive_exception( - boost::archive::archive_exception::invalid_signature - ) - ); - // make sure the version of the reading archive library can - // support the format of the archive being read - boost::archive::library_version_type input_library_version; - * this >> input_library_version; - - // extra little .t is to get around borland quirk - if(boost::archive::BOOST_ARCHIVE_VERSION() < input_library_version) - boost::serialization::throw_exception( - boost::archive::archive_exception( - boost::archive::archive_exception::unsupported_version - ) - ); - - #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) - this->set_library_version(input_library_version); - //#else - //#if ! BOOST_WORKAROUND(BOOST_MSVC, <= 1200) - //detail:: - //#endif - boost::archive::detail::basic_iarchive::set_library_version( - input_library_version - ); - #endif - } - unsigned char x; - load(x); - m_flags = x << CHAR_BIT; -} - -#include -#include - -namespace boost { -namespace archive { - -namespace detail { - template class archive_serializer_map; -} - -template class basic_binary_iprimitive< - portable_binary_iarchive, - std::istream::char_type, - std::istream::traits_type -> ; - -} // namespace archive -} // namespace boost diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_iarchive.hpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_iarchive.hpp deleted file mode 100644 index 21f7097df9..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_iarchive.hpp +++ /dev/null @@ -1,212 +0,0 @@ -#ifndef PORTABLE_BINARY_IARCHIVE_HPP -#define PORTABLE_BINARY_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -#if defined(_MSC_VER) -#pragma warning( push ) -#pragma warning( disable : 4244 ) -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// portable_binary_iarchive.hpp - -// (C) Copyright 2002-7 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "portable_binary_archive.hpp" - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// exception to be thrown if integer read from archive doesn't fit -// variable being loaded -class portable_binary_iarchive_exception : - public virtual boost::archive::archive_exception -{ -public: - typedef enum { - incompatible_integer_size - } exception_code; - portable_binary_iarchive_exception(exception_code c = incompatible_integer_size ) : - boost::archive::archive_exception(boost::archive::archive_exception::other_exception) - {} - virtual const char *what( ) const throw( ) - { - const char *msg = "programmer error"; - switch(code){ - case incompatible_integer_size: - msg = "integer cannot be represented"; - break; - default: - msg = boost::archive::archive_exception::what(); - assert(false); - break; - } - return msg; - } -}; - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// "Portable" input binary archive. It addresses integer size and endienness so -// that binary archives can be passed across systems. Note:floating point types -// not addressed here -class portable_binary_iarchive : - public boost::archive::basic_binary_iprimitive< - portable_binary_iarchive, - std::istream::char_type, - std::istream::traits_type - >, - public boost::archive::detail::common_iarchive< - portable_binary_iarchive - > - , - public boost::archive::detail::shared_ptr_helper - { - typedef boost::archive::basic_binary_iprimitive< - portable_binary_iarchive, - std::istream::char_type, - std::istream::traits_type - > primitive_base_t; - typedef boost::archive::detail::common_iarchive< - portable_binary_iarchive - > archive_base_t; -#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else - friend archive_base_t; - friend primitive_base_t; // since with override load below - friend class boost::archive::detail::interface_iarchive< - portable_binary_iarchive - >; - friend class boost::archive::load_access; -protected: -#endif - unsigned int m_flags; - void load_impl(boost::intmax_t & l, char maxsize); - - // default fall through for any types not specified here - template - void load(T & t){ - boost::intmax_t l; - load_impl(l, sizeof(T)); - // use cast to avoid compile time warning - //t = static_cast< T >(l); - t = T(l); - } - void load(boost::serialization::item_version_type & t){ - boost::intmax_t l; - load_impl(l, sizeof(boost::serialization::item_version_type)); - // use cast to avoid compile time warning - t = boost::serialization::item_version_type(l); - } - void load(boost::archive::version_type & t){ - boost::intmax_t l; - load_impl(l, sizeof(boost::archive::version_type)); - // use cast to avoid compile time warning - t = boost::archive::version_type(l); - } - void load(boost::archive::class_id_type & t){ - boost::intmax_t l; - load_impl(l, sizeof(boost::archive::class_id_type)); - // use cast to avoid compile time warning - t = boost::archive::class_id_type(static_cast(l)); - } - void load(std::string & t){ - this->primitive_base_t::load(t); - } - #ifndef BOOST_NO_STD_WSTRING - void load(std::wstring & t){ - this->primitive_base_t::load(t); - } - #endif - void load(float & t){ - this->primitive_base_t::load(t); - // floats not supported - //BOOST_STATIC_ASSERT(false); - } - void load(double & t){ - this->primitive_base_t::load(t); - // doubles not supported - //BOOST_STATIC_ASSERT(false); - } - void load(char & t){ - this->primitive_base_t::load(t); - } - void load(unsigned char & t){ - this->primitive_base_t::load(t); - } - // intermediate level to support override of operators - // fot templates in the absence of partial function - // template ordering - typedef boost::archive::detail::common_iarchive - detail_common_iarchive; - template - void load_override(T & t, BOOST_PFTO int){ - this->detail_common_iarchive::load_override(t, 0); - } - void load_override(boost::archive::class_name_type & t, int); - // binary files don't include the optional information - void load_override( - boost::archive::class_id_optional_type & /* t */, - int - ){} - - void init(unsigned int flags); -public: - portable_binary_iarchive(std::istream & is, unsigned flags = 0) : - primitive_base_t( - * is.rdbuf(), - 0 != (flags & boost::archive::no_codecvt) - ), - archive_base_t(flags), - m_flags(0) - { - init(flags); - } - - portable_binary_iarchive( - std::basic_streambuf< - std::istream::char_type, - std::istream::traits_type - > & bsb, - unsigned int flags - ) : - primitive_base_t( - bsb, - 0 != (flags & boost::archive::no_codecvt) - ), - archive_base_t(flags), - m_flags(0) - { - init(flags); - } -}; - -// required by export in boost version > 1.34 -#ifdef BOOST_SERIALIZATION_REGISTER_ARCHIVE - BOOST_SERIALIZATION_REGISTER_ARCHIVE(portable_binary_iarchive) -#endif - -// required by export in boost <= 1.34 -#define BOOST_ARCHIVE_CUSTOM_IARCHIVE_TYPES portable_binary_iarchive - -#if defined(_MSC_VER) -#pragma warning( pop ) -#endif - -#endif // PORTABLE_BINARY_IARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_oarchive.cpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_oarchive.cpp deleted file mode 100644 index 6f94eeb50a..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_oarchive.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// portable_binary_oarchive.cpp - -// (C) Copyright 2002-7 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include -#include "portable_binary_oarchive.hpp" - -void -portable_binary_oarchive::save_impl( - const boost::intmax_t l, - const char maxsize -){ - char size = 0; - - if(l == 0){ - this->primitive_base_t::save(size); - return; - } - - boost::intmax_t ll; - bool negative = (l < 0); - if(negative) - ll = -l; - else - ll = l; - - do{ - ll >>= CHAR_BIT; - ++size; - }while(ll != 0); - - this->primitive_base_t::save( - static_cast(negative ? -size : size) - ); - - if(negative) - ll = -l; - else - ll = l; - char * cptr = reinterpret_cast(& ll); - #ifdef BOOST_BIG_ENDIAN - cptr += (sizeof(boost::intmax_t) - size); - if(m_flags & endian_little) - reverse_bytes(size, cptr); - #else - if(m_flags & endian_big) - reverse_bytes(size, cptr); - #endif - this->primitive_base_t::save_binary(cptr, size); -} - -void -portable_binary_oarchive::init(unsigned int flags) { - if(m_flags == (endian_big | endian_little)){ - boost::serialization::throw_exception( - portable_binary_oarchive_exception() - ); - } - if(0 == (flags & boost::archive::no_header)){ - // write signature in an archive version independent manner - const std::string file_signature( - boost::archive::BOOST_ARCHIVE_SIGNATURE() - ); - * this << file_signature; - // write library version - const boost::archive::library_version_type v( - boost::archive::BOOST_ARCHIVE_VERSION() - ); - * this << v; - } - save(static_cast(m_flags >> CHAR_BIT)); -} - -#include -#include - -namespace boost { -namespace archive { - -namespace detail { - template class archive_serializer_map; -} - -template class basic_binary_oprimitive< - portable_binary_oarchive, - std::ostream::char_type, - std::ostream::traits_type -> ; - -} // namespace archive -} // namespace boost diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_oarchive.hpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_oarchive.hpp deleted file mode 100644 index 05c9f80ba9..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/portable_binary_oarchive.hpp +++ /dev/null @@ -1,192 +0,0 @@ -#ifndef PORTABLE_BINARY_OARCHIVE_HPP -#define PORTABLE_BINARY_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -#if defined(_MSC_VER) -#pragma warning( push ) -#pragma warning( disable : 4244 ) -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// portable_binary_oarchive.hpp - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include -#include -#include -#include -#include - -#include "portable_binary_archive.hpp" - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// exception to be thrown if integer read from archive doesn't fit -// variable being loaded -class portable_binary_oarchive_exception : - public virtual boost::archive::archive_exception -{ -public: - typedef enum { - invalid_flags - } exception_code; - portable_binary_oarchive_exception(exception_code c = invalid_flags ) - {} - virtual const char *what( ) const throw( ) - { - const char *msg = "programmer error"; - switch(code){ - case invalid_flags: - msg = "cannot be both big and little endian"; - default: - boost::archive::archive_exception::what(); - } - return msg; - } -}; - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// "Portable" output binary archive. This is a variation of the native binary -// archive. it addresses integer size and endienness so that binary archives can -// be passed across systems. Note:floating point types not addressed here - -class portable_binary_oarchive : - public boost::archive::basic_binary_oprimitive< - portable_binary_oarchive, - std::ostream::char_type, - std::ostream::traits_type - >, - public boost::archive::detail::common_oarchive< - portable_binary_oarchive - > -{ - typedef boost::archive::basic_binary_oprimitive< - portable_binary_oarchive, - std::ostream::char_type, - std::ostream::traits_type - > primitive_base_t; - typedef boost::archive::detail::common_oarchive< - portable_binary_oarchive - > archive_base_t; -#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else - friend archive_base_t; - friend primitive_base_t; // since with override save below - friend class boost::archive::detail::interface_oarchive< - portable_binary_oarchive - >; - friend class boost::archive::save_access; -protected: -#endif - unsigned int m_flags; - void save_impl(const boost::intmax_t l, const char maxsize); - // add base class to the places considered when matching - // save function to a specific set of arguments. Note, this didn't - // work on my MSVC 7.0 system so we use the sure-fire method below - // using archive_base_t::save; - - // default fall through for any types not specified here - template - void save(const T & t){ - save_impl(t, sizeof(T)); - } - void save(const std::string & t){ - this->primitive_base_t::save(t); - } - #ifndef BOOST_NO_STD_WSTRING - void save(const std::wstring & t){ - this->primitive_base_t::save(t); - } - #endif - void save(const float & t){ - this->primitive_base_t::save(t); - // floats not supported - //BOOST_STATIC_ASSERT(false); - } - void save(const double & t){ - this->primitive_base_t::save(t); - // doubles not supported - //BOOST_STATIC_ASSERT(false); - } - void save(const char & t){ - this->primitive_base_t::save(t); - } - void save(const unsigned char & t){ - this->primitive_base_t::save(t); - } - - // default processing - kick back to base class. Note the - // extra stuff to get it passed borland compilers - typedef boost::archive::detail::common_oarchive - detail_common_oarchive; - template - void save_override(T & t, BOOST_PFTO int){ - this->detail_common_oarchive::save_override(t, 0); - } - // explicitly convert to char * to avoid compile ambiguities - void save_override(const boost::archive::class_name_type & t, int){ - const std::string s(t); - * this << s; - } - // binary files don't include the optional information - void save_override( - const boost::archive::class_id_optional_type & /* t */, - int - ){} - - void init(unsigned int flags); -public: - portable_binary_oarchive(std::ostream & os, unsigned flags = 0) : - primitive_base_t( - * os.rdbuf(), - 0 != (flags & boost::archive::no_codecvt) - ), - archive_base_t(flags), - m_flags(flags & (endian_big | endian_little)) - { - init(flags); - } - - portable_binary_oarchive( - std::basic_streambuf< - std::ostream::char_type, - std::ostream::traits_type - > & bsb, - unsigned int flags - ) : - primitive_base_t( - bsb, - 0 != (flags & boost::archive::no_codecvt) - ), - archive_base_t(flags), - m_flags(0) - { - init(flags); - } -}; - - -// required by export in boost version > 1.34 -#ifdef BOOST_SERIALIZATION_REGISTER_ARCHIVE - BOOST_SERIALIZATION_REGISTER_ARCHIVE(portable_binary_oarchive) -#endif - -// required by export in boost <= 1.34 -#define BOOST_ARCHIVE_CUSTOM_OARCHIVE_TYPES portable_binary_oarchive - -#if defined(_MSC_VER) -#pragma warning( pop ) -#endif - -#endif // PORTABLE_BINARY_OARCHIVE_HPP diff --git a/deal.II/contrib/boost-1.49.0/libs/serialization/example/simple_log_archive.hpp b/deal.II/contrib/boost-1.49.0/libs/serialization/example/simple_log_archive.hpp deleted file mode 100644 index 6ce17d1dfc..0000000000 --- a/deal.II/contrib/boost-1.49.0/libs/serialization/example/simple_log_archive.hpp +++ /dev/null @@ -1,167 +0,0 @@ -#ifndef BOOST_SIMPLE_LOG_ARCHIVE_HPP -#define BOOST_SIMPLE_LOG_ARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// simple_log_archive.hpp - -// (C) Copyright 2010 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include // std::size_t - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -///////////////////////////////////////////////////////////////////////// -// log data to an output stream. This illustrates a simpler implemenation -// of text output which is useful for getting a formatted display of -// any serializable class. Intended to be useful as a debugging aid. -class simple_log_archive { - std::ostream & m_os; - unsigned int m_depth; - - template - struct save_enum_type { - template - static void invoke(Archive &ar, const T &t){ - ar.m_os << static_cast(t); - } - }; - template - struct save_primitive { - template - static void invoke(Archive & ar, const T & t){ - ar.m_os << t; - } - }; - template - struct save_only { - template - static void invoke(Archive & ar, const T & t){ - // make sure call is routed through the highest interface that might - // be specialized by the user. - boost::serialization::serialize_adl( - ar, - const_cast(t), - ::boost::serialization::version< T >::value - ); - } - }; - template - void save(const T &t){ - typedef - BOOST_DEDUCED_TYPENAME boost::mpl::eval_if, - boost::mpl::identity >, - //else - BOOST_DEDUCED_TYPENAME boost::mpl::eval_if< - // if its primitive - boost::mpl::equal_to< - boost::serialization::implementation_level< T >, - boost::mpl::int_ - >, - boost::mpl::identity >, - // else - boost::mpl::identity > - > >::type typex; - typex::invoke(*this, t); - } - #ifndef BOOST_NO_STD_WSTRING - void save(const std::wstring &ws){ - m_os << "wide string types not suported in log archive"; - } - #endif - -public: - /////////////////////////////////////////////////// - // Implement requirements for archive concept - - typedef boost::mpl::bool_ is_loading; - typedef boost::mpl::bool_ is_saving; - - // this can be a no-op since we ignore pointer polymorphism - template - void register_type(const T * = NULL){} - - unsigned int get_library_version(){ - return 0; - } - - void - save_binary(const void *address, std::size_t count){ - m_os << "save_binary not implemented"; - } - - // the << operators - template - simple_log_archive & operator<<(T const & t){ - m_os << ' '; - save(t); - return * this; - } - template - simple_log_archive & operator<<(T * const t){ - m_os << " ->"; - if(NULL == t) - m_os << " null"; - else - *this << * t; - return * this; - } - template - simple_log_archive & operator<<(const T (&t)[N]){ - return *this << boost::serialization::make_array( - static_cast(&t[0]), - N - ); - } - template - simple_log_archive & operator<<(const boost::serialization::nvp< T > & t){ - m_os << '\n'; // start line with each named object - // indent according to object depth - for(unsigned int i = 0; i < m_depth; ++i) - m_os << ' '; - ++m_depth; - m_os << t.name(); // output the name of the object - * this << t.const_value(); - --m_depth; - return * this; - } - - // the & operator - template - simple_log_archive & operator&(const T & t){ - return * this << t; - } - /////////////////////////////////////////////// - - simple_log_archive(std::ostream & os) : - m_os(os), - m_depth(0) - {} -}; - -#endif // BOOST_SIMPLE_LOG_ARCHIVE_HPP diff --git a/deal.II/doc/authors.html b/deal.II/doc/authors.html index 03dbf70f3f..cb7b7df9ec 100644 --- a/deal.II/doc/authors.html +++ b/deal.II/doc/authors.html @@ -1,261 +1,305 @@ + "http://www.w3.org/TR/html4/loose.dtd"> - - - deal.II Credits - - - - - - - - -

deal.II Credits

- -

- The deal.II project was initially started by members - of the Numerical Methods group at the University of Heidelberg, Germany but - has since become a global, open source project. - The current maintainers of the library are: -

-
- -

In order to get in contact with them, send email to authors -at dealii.org. -

- -

Many people have contributed to deal.II over the years, some of them very - substantial parts of the library. Their work - is greatly appreciated: no open source project can survice without a - community. The following people contributed major parts - of the library (in alphabetical order): -

- -
    -
  • Moritz Allmaras: - Step-29 tutorial program. - -
  • Michael Anderson: - Linear complexity grid reordering algorithm in 2d and 3d. - -
  • Andrea Bonito: - Step-38. - -
  • Markus Bürg: - Conical meshes and geometries;   step-45 tutorial program;   - VectorTools::project_boundary_values_curl_conforming;   MUMPS - interface, FE_Nedelec for arbitrary polynomial degrees. - -
  • John Burnell: - Configuration on Microsoft Windows systems. - -
  • Brian Carnes: - Hierarchical finite element classes;   + + + deal.II Credits + + + + + + + + +

    deal.II Credits

    + +

    + The deal.II project was initially started by members + of the Numerical Methods group at the University of Heidelberg, Germany but + has since become a global, open source project. + The current maintainers of the library are: +

    + + +

    In order to get in contact with them, send email to authors + at dealii.org. +

    + +

    Many people have contributed to deal.II over the years, some of them very + substantial parts of the library. Their work + is greatly appreciated: no open source project can survice without a + community. The following people contributed major parts + of the library (in alphabetical order), with many more that have + sent in fixed and small enhancements: +

    + +
      +
    • Moritz Allmaras: + Step-29 tutorial program. + +
    • Michael Anderson: + Linear complexity grid reordering algorithm in 2d and 3d. + +
    • Andrea Bonito: + Step-38. + +
    • Markus Bürg: + Conical meshes and geometries;   step-45 tutorial program;   + VectorTools::project_boundary_values_curl_conforming;   MUMPS + interface, FE_Nedelec for arbitrary polynomial degrees. + +
    • John Burnell: + Configuration on Microsoft Windows systems. + +
    • Brian Carnes: + Hierarchical finite element classes;   random fixes and enhancements. -
    • Ivan Christov: - Step-25 tutorial program. - -
    • Martin Genet: - Make SparseDirectUMFPACK work with block matrices. - -
    • Ralf Hartmann: - Ralf was one of the original developers and maintainers of the library until - 2011. He has written significant chunks of code throughout the library. - -
    • Timo Heister: - CompressedSimpleSparsityPattern class;   a lot of the work for - massively parallel computations;   step-32;   step-40;   many - enhancements all throughout the library. - -
    • Luca Heltai: - Gmsh format mesh reader and writer;   - some of the meshes in the GridGenerator class;   - generalization of FilteredMatrix;   - integration of the function parser library;   - cubit journal file to export to ucd mesh format;   - FEFieldFunction and ParsedFunction classes;   - work on the codimension-one meshes, DoFHandler, and finite - elements;   - singular integration;   - Step-34 tutorial program;   - random bug fixes and enhancements. - -
    • Bärbel Janssen: - Lots of work on multigrid for adaptive meshes;   multigrid in the - MeshWorker framework;   step-16. - -
    • Xing Jin: - step-24 tutorial program. - -
    • Oliver Kayser-Herold: - Lots of work on hp finite elements;   - integration of PETSc's LU decomposition;   - hanging node constraints for higher order elements in 3d. - -
    • Seungil Kim: - Help on the step-16 tutorial program. - -
    • Benjamin Shelton Kirk: - Tecplot output. - -
    • Katharina Kormann: - Support for arbitrary nodes in FE_Q. Matrix-free - framework. step-37 and step-48 tutorial programs. - -
    • Martin Kronbichler: - step-22, step-31, step-32, step-37, step-48, interfaces to - Trilinos, significant parts of ConstraintMatrix, matrix-free - computations, support for massively parallel computations, and - many enhancements in random places. - -
    • Tobias Leicht: - Lots of work on internal data structures: anisotropic refinement - (including step-30), faces - without level, - support for previously unorientable meshes; -   extension of DataOut to higher order mapping functions; DataPostprocessor; -   GridIn::read_tecplot; -   made SolutionTransfer independent of Triangulation::user_pointers; -   random bug fixes and enhancements. - -
    • Yan Li: - step-21 tutorial program. - -
    • Cataldo Manigrasso: - Work on the codimension-one meshes, DoFHandler, and finite - elements. - -
    • Andrew McBride: - FEValues extractors for symmetric tensors. - -
    • Helmut Müller: - Multiprocessor detection on Mac OS X. - -
    • Stefan Nauber: +
    • Ivan Christov: + Step-25 tutorial program. + +
    • Chih-Che Chueh: + Step-43 tutorial program. + +
    • Marco Engelhard: + Better support for output for Paraview. + +
    • Jörg Frohne: + step-41. Fixes in many places. + +
    • Thomas Geenen: + Support for different geometries. + +
    • Martin Genet: + Make SparseDirectUMFPACK work with block matrices. + +
    • Christian Goll: + Abstraction of material and boundary indicators. Enhancements in + various places. + +
    • Ralf Hartmann: + Ralf was one of the original developers and maintainers of the library until + 2011. He has written significant chunks of code throughout the library. + +
    • Eric Heien: + HDF5 output. + +
    • Timo Heister: + CompressedSimpleSparsityPattern class;   a lot of the work for + massively parallel computations;   step-32;   step-40;   many + enhancements all throughout the library. + +
    • Luca Heltai: + Gmsh format mesh reader and writer;   + some of the meshes in the GridGenerator class;   + generalization of FilteredMatrix;   + integration of the function parser library;   + cubit journal file to export to ucd mesh format;   + FEFieldFunction and ParsedFunction classes;   + work on the codimension-one meshes, DoFHandler, and finite + elements;   + singular integration;   + Step-34 tutorial program;   + random bug fixes and enhancements. + +
    • Bärbel Janssen: + Lots of work on multigrid for adaptive meshes;   multigrid in the + MeshWorker framework;   step-16. + +
    • Xing Jin: + step-24 tutorial program. + +
    • Oliver Kayser-Herold: + Lots of work on hp finite elements;   + integration of PETSc's LU decomposition;   + hanging node constraints for higher order elements in 3d. + +
    • Seungil Kim: + Help on the step-16 tutorial program. + +
    • Benjamin Shelton Kirk: + Tecplot output. + +
    • Katharina Kormann: + Support for arbitrary nodes in FE_Q. Matrix-free + framework. step-37 and step-48 tutorial programs. + +
    • Martin Kronbichler: + step-22, step-31, step-32, step-37, step-48, interfaces to + Trilinos, significant parts of ConstraintMatrix, matrix-free + computations, support for massively parallel computations, and + many enhancements in random places. + +
    • Tobias Leicht: + Lots of work on internal data structures: anisotropic refinement + (including step-30), faces + without level, + support for previously unorientable meshes; +   extension of DataOut to higher order mapping functions; DataPostprocessor; +   GridIn::read_tecplot; +   made SolutionTransfer independent of Triangulation::user_pointers; +   random bug fixes and enhancements. + +
    • Yan Li: + step-21 tutorial program. + +
    • Vijay Mahadevan: + Enhancements in the interface to PETSc. Support for reading GMSH + 2.5 format. + +
    • Matthias Maier: + Periodic boundary conditions. Enhancements throughout the library. + +
    • Cataldo Manigrasso: + Work on the codimension-one meshes, DoFHandler, and finite + elements. + +
    • Andrew McBride: + FEValues extractors for symmetric tensors. step-44. + +
    • Scott Miller: + Enhancements to FE_Nothing. + +
    • Helmut Müller: + Multiprocessor detection on Mac OS X. + +
    • Stefan Nauber: Postscript output. -
    • David Neckels: - step-33 tutorial program. +
    • David Neckels: + step-33 tutorial program. + +
    • M. Sebastian Pauletti: + Making meshes embedded in higher space dimensions more usable;   many + bug fixes and enhancements for codimension-one computations and + throughout the library. + +
    • Jean-Paul Pelteret: + step-44. -
    • M. Sebastian Pauletti: - Making meshes embedded in higher space dimensions more usable;   many - bug fixes and enhancements for codimension-one computations. +
    • Jonathan Pitt: + Enhancements to FE_Nothing. Changes in a variety of places. -
    • Adam Powell IV: - Configuration issues, Debian packages. +
    • Adam Powell IV: + Configuration issues, Debian packages. -
    • Florian Prill: +
    • Florian Prill: Gauss Lobatto quadrature, random bug fixes. -
    • Daniel Castanon Quiroz: - Torus domain and boundary. +
    • Daniel Castanon Quiroz: + Torus domain and boundary. -
    • Michael Rapson: - PointValueHistory class. +
    • Michael Rapson: + PointValueHistory class. -
    • Thomas Richter: +
    • Thomas Richter: Povray output;   multi-threading work;   refinement functions; -   MinRes linear solver. +   MinRes linear solver. -
    • Abner Salgado-Gonzalez: +
    • Abner Salgado-Gonzalez: step-35 tutorial program. -
    • Anna Schneebeli: +
    • Anna Schneebeli: Help and advice for Nedelec elements, writing the excellent report on Nedelec elements. -
    • Jan Schrage: +
    • Jan Schrage: Initial parts of the tutorial. -
    • Ralf B. Schulz: +
    • Ralf B. Schulz: Support for DLLs on Windows systems. -
    • Michael Stadler: - Reading 3d data in UCD, accepting boundary data in 3d; +
    • Jason Sheldon: + More generic FESystems. Enhancements in a variety of places. + +
    • Michael Stadler: + Reading 3d data in UCD, accepting boundary data in 3d;   Eulerian mappings. -
    • Martin Steigemann: - Graphical user interface for the ParameterHandler class. +
    • Martin Steigemann: + Graphical user interface for the ParameterHandler class. + +
    • Franz-Theo Suttmeier: + Initial parts of the linear algebra libraries. -
    • Franz-Theo Suttmeier: - Initial parts of the linear algebra libraries. +
    • Habib Talavatifard: + Bug fixes in the Trilinos interfaces. -
    • Habib Talavatifard: - Bug fixes in the Trilinos interfaces. +
    • Christophe Trophime: + Packaging and configuration issues. -
    • Christophe Trophime: - Packaging and configuration issues. +
    • Yaqi Wang: + The step-28 tutorial program; +   + some grid generation functions. -
    • Yaqi Wang: - The step-28 tutorial program; -   - some grid generation functions. +
    • Sven Wetterauer: + Step-15 tutorial program. -
    • Joshua White: - Arbitrary order Eulerian mappings. +
    • Joshua White: + Arbitrary order Eulerian mappings. -
    • Toby D. Young: - Interfaces to SLEPc;   many changes in the interfaces to PETSc; -   MUMPS interface. -
    +
  • Toby D. Young: + Interfaces to SLEPc;   many changes in the interfaces to PETSc; +   MUMPS interface; +   METIS interface. +
-

deal.II mailing list members

+

deal.II mailing list and discussion group members

-

- We thank the numerous people sending questions, suggestions, bug reports, bug - fixes and improvements. deal.II would be much less without their contribution. -

+

+ We thank the numerous people sending questions, suggestions, bug reports, bug + fixes and improvements. deal.II would be much less without their contribution. +

-

History

+

History

- deal.II draws from some ideas which were first implemented in the - predecessor library, - DEAL, developed by Guido Kanschat, Franz-Theo - Suttmeier, and Roland Becker. This library is now being maintained - by Franz-Theo Suttmeier at the University of - Siegen, Germany. + deal.II draws from some ideas which were first implemented in the + predecessor library, + DEAL, developed by Guido Kanschat, Franz-Theo + Suttmeier, and Roland Becker. This library is now being maintained + by Franz-Theo Suttmeier at the University of + Siegen, Germany.

-
- Valid HTML 4.01! - Valid CSS! - -
- - +
+ Valid HTML 4.01! + Valid CSS! + +
+ + diff --git a/deal.II/doc/development/makefiles.2.html b/deal.II/doc/development/makefiles.2.html index f73a697c7c..77e0eae366 100644 --- a/deal.II/doc/development/makefiles.2.html +++ b/deal.II/doc/development/makefiles.2.html @@ -77,7 +77,7 @@
- The deal.II mailing list
+ The deal.II Group

diff --git a/deal.II/doc/development/testsuite.html b/deal.II/doc/development/testsuite.html index 8b6269e237..a9becca692 100644 --- a/deal.II/doc/development/testsuite.html +++ b/deal.II/doc/development/testsuite.html @@ -5,7 +5,7 @@ The deal.II Testsuite - + @@ -270,6 +270,26 @@ tests nightly through a cron-job with this command, to have regular test runs.

+ +

+ To get a quick overview you can run +

+      make report+summary
+    
+ instead. This runs all the tests and outputs a table in the following format + at the end: +
+                Compiling Linking Running   Check      OK     all
+         a-framework	1	1	1	1	1	5	
+                base	0	0	0	2	185	187	
+                 lac	0	0	0	0	117	117	
+                  fe	0	0	0	4	114	118	
+             deal.II	0	0	0	2	291	293	
+         integrators	0	0	0	0	15	15	
+           multigrid	0	0	0	0	35	35	      
+		 ...
+    
+

If a test failed, you have to find out what exactly went @@ -562,15 +582,15 @@ testname/cmp/generic

- If you don't have subversion write access, talk to us on the mailing - list; writing testcases is a worthy and laudable task, and we would + If you don't have subversion write access, talk to us in the discussion group; + writing testcases is a worthy and laudable task, and we would like to encourage it by giving people the opportunity to contribute!

- The deal.II mailing list
+ The deal.II Group

The deal.II Development Page - + @@ -103,7 +103,7 @@


- The deal.II mailing list
+ The deal.II Group

Writing documentation - + @@ -457,7 +457,7 @@


- The deal.II mailing list
+ The deal.II Group

The deal.II Online Documentation - + @@ -42,7 +42,7 @@

Note that along with the rest of the documentation, the local HTML pages - of the tutorials need to be generated first. Please follow the + of the tutorials need to be generated first. Please follow the instructions in the ReadMe file on how to do this. @@ -132,25 +132,6 @@ Bangerth).

-
  • - A report on how - multithreading is implemented and - supported in deal.II (by Wolfgang - Bangerth). This report is also available as preprint - 2000-11 from the - - IWR preprint server. However, this report described a - previous version of the threading scheme. After - deal.II 3.4, this scheme was replaced by - another one that is more flexible and easier to use. While the - general observations of the report are still valid, the syntax - presented there is no longer. There is a short - document describing the new syntax and some considerations we - had in implementing it. -

    -
  • A brief report on mapping functions of higher polynomial @@ -230,12 +211,12 @@

    Contact

    -

    We have a mailing list for discussion +

    We have a discussion group for discussion of issues of general interest to users and developers of deal.II.

    More specific questions may be sent to the authors - immediately at the address firstName.last_name at + immediately at the address firstName.lastname at dealii.org.

    diff --git a/deal.II/doc/doxygen/headers/distributed.h b/deal.II/doc/doxygen/headers/distributed.h index b549dd4c83..93830f4e6a 100644 --- a/deal.II/doc/doxygen/headers/distributed.h +++ b/deal.II/doc/doxygen/headers/distributed.h @@ -52,6 +52,10 @@ * too many details. All the algorithms described below are implement in * classes and functions in namespace parallel::distributed. * + * One important aspect in parallel computations using MPI is that write + * access to matrix and vector elements requires a call to compress() after + * the operation is finished and before the object is used (for example read + * from). Also see @ref GlossCompress. * *

    Other resources

    * @@ -226,6 +230,33 @@ * information is provided by the * DoFTools::extract_locally_relevant_dofs() function. * + *
    Vectors with Ghost-elements
    + * + * A typical parallel application is dealing with two different kinds + * of parallel vectors: vectors with ghost elements (also called + * ghosted vectors) and vectors without ghost elements. Of course + * these might be different flavours (BlockVector, Vector; using + * Trilinos or PETSc, etc.). + * + * In vectors without ghost elements knowledge about a single entry i + * in the vector is only known to a single processor. They are + * constructed with an IndexSet reflecting the + * locally_owned_dofs(). There is no overlap in the IndexSets. + * Ghosted vectors are typically created using locally_active or + * locally_relevant IndexSets and contain elements on processors that + * are owned by a different processor. + * + * One important aspect is that we forbid any modification of ghosted + * vectors. This is because it would create subtle bugs if elements + * are edited on one processor but do not immediately transfer to the + * ghosted entries on the other processors. + * + * The usage is typically split up in the following way: ghosted + * vectors are used for data output, postprocessing, error estimation, + * input in integration. Vectors without ghost entries are used in all + * other places like assembling, solving, or any other form of + * manipulation. You can copy between vectors with and without ghost + * elements (you can see this in step-40 and step-32) using operator=. * *
    Sparsity patterns
    * diff --git a/deal.II/doc/doxygen/headers/glossary.h b/deal.II/doc/doxygen/headers/glossary.h index 008ed4e1e4..f1129b7982 100644 --- a/deal.II/doc/doxygen/headers/glossary.h +++ b/deal.II/doc/doxygen/headers/glossary.h @@ -1,3 +1,4 @@ + //------------------------------------------------------------------------- // $Id$ // Version: $Name$ @@ -356,8 +357,8 @@ * ways: * * - You tell the object that you want to compress what operation is - * intended. The TrilinosWrappers::VectorBase::compress() can take - * such an additional argument. + * intended. This can be done using the VectorOperation argument in + * the various compress() functions. * - You do a fake addition or set operation on the object in question. For * example, you can add a zero to an element of the matrix or vector, * which has no effect other than telling the object that the next diff --git a/deal.II/doc/doxygen/headers/vector_valued.h b/deal.II/doc/doxygen/headers/vector_valued.h index a1642ae729..367b222e5f 100644 --- a/deal.II/doc/doxygen/headers/vector_valued.h +++ b/deal.II/doc/doxygen/headers/vector_valued.h @@ -16,7 +16,8 @@ * @defgroup vector_valued Handling vector valued problems * * - * Vector-valued problems are partial differential equations in which the + * Vector-valued problems are systems of partial differential + * equations. These are problems where the * solution variable is not a scalar function, but a vector-valued function or * a set of functions. This includes, for example: *
      @@ -36,7 +37,9 @@ *
    * * This page gives an overview of how to implement such vector-valued problems - * efficiently in deal.II. + * easily in deal.II. In particular, it explains the usage of the class + * FESystem, which allows us to write code for systems of partial + * differential very much like we write code for single equations. * * * diff --git a/deal.II/doc/external-libs/hdf5.html b/deal.II/doc/external-libs/hdf5.html new file mode 100644 index 0000000000..e9e10181e4 --- /dev/null +++ b/deal.II/doc/external-libs/hdf5.html @@ -0,0 +1,48 @@ + + + + + The deal.II Readme on interfacing to HDF5 + + + + + + + + + + +

    Using and Installing HDF5

    +

    HDF5 + is a library for high-performance parallel data output. Deal.II can use it to write + graphical solutions. They can be displayed using paraview for example. +

    + +

    + This is how you can download, configure, and build hdf5: + +

    +wget http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.9.tar.gz
    +tar xf hdf5-1.8.9.tar.gz
    +cd hdf5-1.8.9/
    +./configure --prefix=`pwd`/build/ -enable-parallel
    +make install
    +    
    + + + You will end up with a script called h5pcc (or h5cc if you + decided to not build the parallel version) in the build/bin directory. + +

    Interfacing deal.II + to HDF5

    + +

    To be able to use the interface of deal.II + for HDF5 we then + configure deal.II with the following + additional option: + --with-hdf5=path/to/hdf5/build/bin/h5pcc +

    + + diff --git a/deal.II/doc/external-libs/hsl.html b/deal.II/doc/external-libs/hsl.html index fc70379a83..1851c620a0 100644 --- a/deal.II/doc/external-libs/hsl.html +++ b/deal.II/doc/external-libs/hsl.html @@ -115,7 +115,7 @@
    - The deal.II mailing list + The deal.II Group $Date$
    diff --git a/deal.II/doc/external-libs/p4est.html b/deal.II/doc/external-libs/p4est.html index 8230fdc550..d6ccafac98 100644 --- a/deal.II/doc/external-libs/p4est.html +++ b/deal.II/doc/external-libs/p4est.html @@ -56,7 +56,7 @@
    - The deal.II mailing list + The deal.II Group
    diff --git a/deal.II/doc/mail.html b/deal.II/doc/mail.html index 3b64eabd91..e1ea0cdc25 100644 --- a/deal.II/doc/mail.html +++ b/deal.II/doc/mail.html @@ -2,85 +2,66 @@ "http://www.w3.org/TR/html4/loose.dtd"> - deal.II Email Portal + deal.II Communications - +

    - deal.II Email Portal + deal.II Communications

    This page summarizes your possibilities of establishing contact to other deal.II users and to the deal.II - authors. We are sorry if all this looks a little complicated, but since - public email addresses are abused too often, we want to protect all - members of our mailing lists. + authors.


    - Users + User Group

    - All deal.II users (and everybody interested) can - enter themselves into the deal.II mailing list. + All deal.II users (and everybody interested) + are encouraged to join the deal.II + Discussion group on Google Groups.

    • - Join the mailing list -

      - If you want to receive comments of other users and react to them, - you should join the mailing list. To do this, don't write to - the list. -

      -

      - Either write an email to join at dealii.org or - go to the list's web site and follow the instructions. -

      + In order to join, go to + the deal.II + Discussion Group web page and register your email address + there. Or click on the membership button below. This is also a + good place to browse through existing discussion + topics. There, you can manage your group membership and email + delivery options.
    • - Unsubscribe from the list -

      - You can decide to leave the mailing list whenever you want. -

      -

      - Write an email to leave at dealii.org from your - registered address or go to the list's web site and follow the instructions. -

      -
    • -
    • - Write to the mailing list -

      - Send an email to dealii at dealii.org. - Please, use a significant subject line, such that everybody - can identify your message. Note that you must be subscribed - to the list before you can send a message! -

      -

      - Remember that you must be subscribed to write to the list. Here, - you means the email address identifying the sender of your mail. -

      -
    • -
    • - Reading archives of the mailing list -

      - All mails that have been sent through the mailing lists are - archived - and can be read from the mailing list archive page. -

      -

      The old archives can also be checked for reference. -

      + In order to post a question or a reply, you can either go to + the + the deal.II + Discussion Group page and click on the corresponding + button (preferred), or you can send email + to dealii@googlegroups.com. Or + just post from the window below. Note that you have to be a + group member with your specific sender address in order to be + allowed to post there.
    + +

    @@ -107,7 +88,7 @@
    - The deal.II mailing list + The deal.II Group

    diff --git a/deal.II/doc/news/7.1.0-vs-7.2.0.h b/deal.II/doc/news/7.1.0-vs-7.2.0.h new file mode 100644 index 0000000000..94f3a16b82 --- /dev/null +++ b/deal.II/doc/news/7.1.0-vs-7.2.0.h @@ -0,0 +1,750 @@ +/** + * @page changes_between_7_1_and_7_2 Changes between Version 7.1 and 7.2 + +

    +This is the list of changes made between the release of +deal.II version 7.1.0 and that of 7.2.0. +All entries are signed with the names of the author. +

    + + + + + + +

    Incompatibilities

    + +

    +Following are a few modifications to the library that unfortunately +are incompatible with previous versions of the library, but which we +deem necessary for the future maintainability of the +library. Unfortunately, some of these changes will require +modifications to application programs. We apologize for the +inconvenience this causes. +

    + +
      +
    1. Changed/fixed: Several operations on Trilinos vectors that change the +elements of these vectors were allowed accidentally for vectors that have +ghost elements. This is a source of errors because a change on one +MPI process will not show up on a different processor. Consequently, we +intended to disallow all functions that modify vectors with ghost elements +but this was not enforced for all of these functions. This is now fixed +but it may lead to errors if your code relied on the existing behavior. The +way to work around this is to only ever modify fully distributed vectors, +and then copy it into a vector with ghost elements. +
      +(Wolfgang Bangerth, 2012/08/06) + +
    2. Changed: The argument material_id of the estimate-functions of +the KellyErrorEstimator class is now of type types::material_id +with default value numbers::invalid_material_id, instead of type +unsigned int with default value numbers::invalid_unsigned_int. This +should not make a difference to most users unless you specified the +argument's default value by hand. +
      +(Wolfgang Bangerth, Christian Goll 2012/02/27) + +
    3. +The member functions Triangulation::set_boundary and +Triangulation::get_boundary now take a types::boundary_id instead of +an unsigned int as argument. This now matches the actual data type +used to store boundary indicators internally. +
      +(Wolfgang Bangerth, Christian Goll 2012/02/27) +
    + + + + + +

    General

    + + +
      +
    1. +New: We now support parallel output using HDF5/xdmf. +
      +(Eric Heien, Timo Heister, 2012/08/28) + +
    2. +New: We are now compatible with Trilinos 10.4.2, 10.8.5, and 10.12.2. See the +readme for more information. +
      +(Timo Heister, 2012/08/24) + +
    3. +Changed: To make the naming of types defined in namespace types +consistent, we have renamed types::subdomain_id_t to +types::subdomain_id. The old name has been retained as a typedef +but is now deprecated. +
      +(Wolfgang Bangerth, 2012/08/22) + +
    4. +Changed: Unify the concept of compress() for all linear algebra +objects. Introduce type VectorOperation to decide between +add and insert. Implement also for serial vectors. Note: +this breaks distributed::vector::compress(bool). See +@ref GlossCompress for more information. +
      +(Timo Heister, 2012/08/13) + +
    5. +Changed: Support for the METIS 4.x has been replaced with support for +METIS 5.x. Use --with-metis=path/to/metis to configure +with METIS 5.x. +
      +(Stefano Zampini, Toby D. Young 2012/08/13) + +
    6. +Changed: numerics/vectors.h is now called numerics/vector_tools.h and +numerics/matrices.h is now called numerics/matrix_tools.h The old files are +deprecated. +
      +(Timo Heister 2012/08/09) + +
    7. +New: officially added support for clang 3.1 or newer. +
      +(Timo Heister and Wolfgang Bangerth, 2012/08/07) + +
    8. +Changed: PETSc linking now prefers to use the libpetsc.so generated +by PETSc starting from version 3.1+. This fixes the problem +of linker errors on recent gcc/ubuntu versions. +
      +(Timo Heister, 2012/08/07) + +
    9. +Fixed: On some 64-bit systems, we build deal.II with the -m64 +flag but forgot to build UMFPACK with this flag as well, leading to +linker errors. This is now fixed. +
      +(Wolfgang Bangerth, 2012/07/31) + +Fixed: The Intel compiler, when using MPI, wants that mpi.h +is included before header files like stdio.h. This can't +be ensured in general because the inclusion might be indirectly, but +we now work around the problem in other ways. +
      +(Timo Heister, Wolfgang Bangerth, Michael Thomadakis, 2012/07/26) + +
    10. +Fixed: On some systems, the p4est library we use for distributed +parallel computations installs its libraries into a lib64/ +directory instead of the usual lib/. deal.II can now deal +with this. +
      +(Wolfgang Bangerth, 2012/07/25) + +
    11. +New: step-43 is an extension of step-21 that shows efficient methods +to solve multi-phase flow. +
      +(Chih-Che Chueh, Wolfgang Bangerth, 2012/06/06) + +
    12. +New: step-15 has been replaced by a program that demonstrates the +solution of nonlinear problem (the minimal surface equation) using +Newton's method. +
      +(Sven Wetterauer, 2012/06/03) + +
    13. +New: step-48 demonstrates the solution of a nonlinear wave equation +with an explicit time stepping method. The usage of Gauss-Lobatto +elements gives diagonal mass matrices, which obviates the solution of +linear systems of equations. The nonlinear right hand side is +evaluated with the matrix-free framework. +
      +(Katharina Kormann and Martin Kronbichler, 2012/05/05) + +
    14. +New: step-37 shows how the matrix-free framework can be utilized to +efficiently solve the Poisson equation without building global +matrices. It combines fast operator evaluation with a multigrid solver +based on polynomial Chebyshev smoother. +
      +(Katharina Kormann and Martin Kronbichler, 2012/05/05) + +
    15. +New: A new matrix-free interface has been implemented. The framework +is parallelized with MPI, TBB, and explicit vectorization instructions +(new data type VectorizedArray). The class MatrixFree caches +cell-based data in an efficient way. Common operations can be +implemented using the FEEvaluation class. +
      +(Katharina Kormann and Martin Kronbichler, 2012/05/05) + +
    16. +New: step-44 demonstrates one approach to modeling large +deformations of nearly-incompressible elastic solids. The +elastic response is governed by a non-linear, hyperelastic +free-energy function. The geometrical response is also +nonlinear, i.e., the program considers finite deformations. +
      +(Andrew McBride and Jean-Paul Pelteret, 2012/04/25) + +
    17. +New: step-41 demonstrates solving the obstacle problem, +a variational inequality. +
      +(Joerg Frohne, 2012/04/22) + +
    18. +Changed: The version of BOOST we ship with deal.II has been upgraded +to 1.49.0. +
      +(Martin Kronbichler, 2012/04/07) + +
    19. +New: We have added a brief section to the step-12 tutorial programs that +compares the DG solution computed there with one that one would obtain by +using a continuous finite element. +
      +(Wolfgang Bangerth, 2012/03/25) + +
    20. +New: Added support for codimension 2, i.e. for dim-dimensional objects +embedded into spacedim=dim+2 dimensional space. +
      +(Sebastian Pauletti, 2012/03/02) + +
    21. Changed: Material and Boundary indicators have been both of the +type unsigned char. Throughout the library, we changed their datatype +to types::material_id +resp. types::boundary_id, both typedefs of unsigned +char. Internal faces are now characterized by +numbers::internal_face_boundary_id(=static_cast@(-1)) +instead of 255, so we get rid of that mysterious number in the source +code. Material_ids are also assumed to lie in the range from 0 to +numbers::invalid_material_id-1 (where numbers::invalid_material_id = +static_cast(-1)). With this change, it is now +much easier to extend the range of boundary or material ids, if +needed. +
      +(Christian Goll 2012/02/27) + +
    22. New: Functions like FEValues::get_function_values have long been +able to extract values from pretty much any vector kind given to it (e.g. +of kind Vector, BlockVector, PETScWrappers::Vector, etc). The list of +allowed "vector" types now also includes IndexSet, which is interpreted +as a vector of elements that are either zero or one, depending on whether +an index is in the IndexSet or not. +
      +As a consequence of this, the DataOut::add_data_vector functions now also +work for such types of vectors, a use demonstrated in step-41. +
      +(Wolfgang Bangerth, 2012/02/14) + +
    23. New: It has long been a nuisance that the deal.II vector classes +could only be accessed using operator() whereas the C++ +std::vector class required operator[]. This +diminished the usefulness of template code. Historically, the reason +was that the deal.II vector classes should use the same operator as +the matrix classes, and C++ does not allow to use operator[] +for matrices since this operator can only take a single argument. +
      +In any case, all deal.II vector classes now support both kinds of +access operators interchangeably. +
      +(Wolfgang Bangerth, 2012/02/12) + +
    24. Fixed: Linking shared libraries on PowerPC systems (e.g. on +BlueGene systems) failed due to a miscommunication between compiler +and linker. This is now worked around. +
      +(Aron Ahmedia, Wolfgang Bangerth, 2012/02/06) + +
    25. New: There is now a distributed deal.II vector class +parallel::distributed::Vector that can be used with MPI. The +vector is based on a contiguous locally owned range and allows easy +access of ghost entries from other processors. The vector interface is +very similar to the non-distributed class Vector. +
      +(Katharina Kormann, Martin Kronbichler, 2012/01/25) + +
    26. Fixed: The common/scripts/make_dependencies program +now behaves like the C++ compiler when +searching include paths for # include "..." directives. +
      +(Timo Heister, 2012/01/10) + +
    27. Fixed: The Intel compiler complains that it can't copy Trilinos vector +reference objects, preventing the compiling of step-32. This is now fixed. +
      +(Wolfgang Bangerth, 2011/11/09) + +
    28. Fixed: Intel ICC 12.1 gets into trouble with BOOST because BOOST +believes that the compiler supports C++0x but one then still has to +specify the corresponding flag on the command line to avoid compiler +errors. This is now fixed. +
      +(Wolfgang Bangerth, 2011/11/06) + +
    29. Fixed: On some systems, mpiCC turns out to alias the +C compiler, not the C++ compiler as expected. Consequently, try to use +mpic++ or mpicxx before mpiCC as +these should really be unambiguous. +
      +(Wolfgang Bangerth, 2011/11/05) + +
    30. Fixed: Intel's ICC compiler identifies itself as icpc version +12.1.0 (gcc version 4.2.1 compatibility) which we mistook as being +GCC version 4.2. The same is true for the Intel C compiler. This is now fixed. +
      +(Wolfgang Bangerth, 2011/11/05) + +
    31. Fixed: deal.II could not be compiled with gcc 4.6.1 when MPI is +enabled due to a missing include file in file +source/base/utilities.cc. This is now fixed. +
      +(Wolfgang Bangerth, 2011/10/25) +
    + + + + + +

    Specific improvements

    + +
      +
    1. Changed: To support Trilinos version 10.12.x we need to cache the +result of has_ghost_elements() in parallel vectors at construction time +of the vector. Starting from 10.12 Trilinos will communicate in this +call, which therefore only works if called from all CPUs. +
      +(Timo Heister, 2012/08/22) + +
    2. New: The copy constructor of FullMatrix from IdentityMatrix +used to be explicit, but that didn't appear to be necessary in hindsight. +Consequently, it is now a regular copy constructor. +
      +(Wolfgang Bangerth, 2012/08/14) + +
    3. New: The Patterns::Map pattern allows to describe maps from keys +to values in input files. +
      +(Wolfgang Bangerth, 2012/08/01) + +
    4. Fixed: DoFTools::make_zero_boundary_constraints now also works for parallel distributed triangulations. +
      +(Wolfgang Bangerth, 2012/07/24) + +
    5. Fixed: GridTools::find_active_cell_around_point() works now also if the cell in which the point we look for lies is not adjacent to the closest vertex of p. The tests bits/find_cell_8 and _9 illustrate this. +
      +(Wolfgang Bangerth, Christian Goll 2012/07/20) + +
    6. Fixed: Using the SolutionTransfer class with hp::DoFHandler +and on meshes where some cells are associated with a FE_Nothing element +could result in an error. This is now fixed. +
      +(Wolfgang Bangerth, 2012/06/29) + +
    7. Fixed: The MappingQ1::transform_real_to_unit_cell function as +well as the equivalent ones in derived classes sometimes get into +trouble if they are asked to compute the preimage of this point +in reference cell coordinates. This is because for points outside +the reference cell, the mapping from unit to real cell is not +necessarily invertible, and consequently the Newton iteration to +find the preimage did not always converge, leading to an exception. +While this is not entirely wrong (we could, after all, not compute +the desired quantity), not all callers of this function were prepared +to accept this result -- in particular, the function +CellAccessor<3>::point_inside should have really just returned false +in such cases but instead let the exception so generated propagate +through. This should now be fixed. +
      +(Wolfgang Bangerth, Eric Heien, Sebastian Pauletti, 2012/06/27) + +
    8. Fixed: The function VectorTools::compute_no_normal_flux_constraints had +a bug that led to an exception whenever we were computing constraints for +vector fields located on edges shared between two faces of a 3d cell if those +faces were not parallel to the axes of the coordinate system. This is now fixed. +
      +(Wolfgang Bangerth, Jennifer Worthen, 2012/06/27) + +
    9. +Fixed: Due to an apparent bug in autoconf, it was not possible to +override the F77 environment variable to select anything +else than gfortran. This is now fixed. +
      +(Wolfgang Bangerth, 2012/06/08) + +
    10. Fixed: TrilinosWrappers::VectorBase::swap() is now working as expected. (thanks Uwe Köcher) +
      +(Timo Heister 2012/07/03) + +
    11. Fixed: Some instantiations for +DerivativeApproximation::approximate_derivative_tensor() were missing. +
      +(Timo Heister 2012/06/07) + +
    12. New: The finite element type FE_DGQArbitraryNodes is now +working also in codimension one spaces. +
      +(Luca Heltai, Andrea Mola 2012/06/06) + +
    13. Fixed: Computing the $W^{1,\infty}$ norm and seminorm in +VectorTools::integrate_difference was not implemented. This is now +fixed. +
      +(Wolfgang Bangerth 2012/06/02) + +
    14. Fixed: A problem in MappingQ::transform_real_to_unit_cell +that sometimes led the algorithm in this function to abort. +
      +(Wolfgang Bangerth 2012/05/30) + +
    15. New: The function DataOutInterface::write_pvd_record can be used +to provide Paraview with metadata that describes which time in a +simulation a particular output file corresponds to. +
      +(Marco Engelhard 2012/05/30) + +
    16. Fixed: A bug in 3d with hanging nodes in GridTools::find_cells_adjacent_to_vertex() +that caused find_active_cell_around_point() to fail in those cases. +
      +(Timo Heister, Wolfgang Bangerth 2012/05/30) + +
    17. New: DoFTools::make_periodicity_constraints implemented which +inserts algebraic constraints due to periodic boundary conditions +into a ConstraintMatrix. +
      +(Matthias Maier, 2012/05/22) + +
    18. New: The GridIn::read_unv function can now read meshes generated +by the Salome framework, see http://www.salome-platform.org/ . +
      +(Valentin Zingan, 2012/04/27) + +
    19. New: There is now a second DoFTools::map_dofs_to_support_points +function that also works for parallel::distributed::Triangulation +triangulations. +
      +(Wolfgang Bangerth, 2012/04/26) + +
    20. New: There is now a second DoFTools::extract_boundary_dofs +function that also works for parallel::distributed::Triangulation +triangulations. +
      +(Wolfgang Bangerth, 2012/04/26) + +
    21. New: The FullMatrix::extract_submatrix_from, FullMatrix::scatter_matrix_to, +FullMatrix::set functions are new. +
      +(Andrew McBride, Jean Paul Pelteret, Wolfgang Bangerth, 2012/04/24) + +
    22. Fixed: +The method FEValues::inverse_jacobian() previously returned the transpose of the +inverse Jacobians instead of just the inverse Jacobian as documented. This is now fixed. +
      +(Sebastian Pauletti, Katharina Kormann, Martin Kronbichler, 2012/03/11) + +
    23. Extended: +SolutionTransfer is now also able to transfer solutions between hp::DoFHandler where +the finite element index changes during refinement. +
      +(Katharina Kormann, Martin Kronbichler, 2012/03/10) + +
    24. Changed: +A new method to determine an initial guess for the Newton method was coded +in MappingQ::transform_real_to_unit_cell. +The code in transform_real_to_unit_cell was cleaned a little bit and a new code +for the @<2,3@> case was added. +
      +(Sebastian Pauletti, 2012/03/02) + +
    25. Changed: +In the context of codim@>0, Mapping::transform would require different inputs +depending on the mapping type. +For mapping_covariant, mapping_contravariant the input is DerivativeForm<1, dim, spacedim> +but for mapping_covariant_gradient, mapping_contravariant_gradient the input is Tensor<2,dim>. +
      +(Sebastian Pauletti, 2012/03/02) + +
    26. New: +A new class DerivativeForm was added. +This class is supposed to represent the derivatives of a mapping. +
      +(Sebastian Pauletti, 2012/03/02) + +
    27. Fixed: TrilinosWrappers::Vector::all_zero() in parallel. +
      +(Timo Heister, Jörg Frohne, 2012/03/06) + +
    28. New: GridGenerator::quarter_hyper_shell() in 3d. +
      +(Thomas Geenen, 2012/03/05) + +
    29. New: DataOut::write_vtu_in_parallel(). This routine uses MPI I/O to write +a big vtu file in parallel. +
      +(Timo Heister, 2012/02/29) + +
    30. Fixed: parallel::distributed::Triangulation::clear() forgot +to update the number cache of this class, leading to wrong results +when calling functions like +parallel::distributed::Triangulation::n_global_active_cells(); +
      +(Wolfgang Bangerth, 2012/02/20) + +
    31. Improved: FEFieldFunction allows now for the computation of Laplacians. +
      +(Christian Goll, 2012/02/16) + +
    32. New: The function IndexSet::fill_binary_vector creates a numerical +representation of an IndexSet containing zeros and ones. +
      +(Wolfgang Bangerth, 2012/02/12) + +
    33. New: The function IndexSet::clear resets an index set to be empty. +
      +(Wolfgang Bangerth, 2012/02/12) + +
    34. New: There are now global functions l1_norm() and linfty_norm() that compute +the respective norms of a rank-2 tensor. +
      +(Wolfgang Bangerth, 2012/02/08) + +
    35. New: VectorTools::interpolate_to_different_mesh implemented which interpolates between + DoFHandlers with different triangulations based on a common coarse grid. +
      +(Matthias Maier, 2012/02/08) + +
    36. Improved: DoFTools::map_dofs_to_support_points() now also works within the hp framework. +
      +(Christian Goll, 2012/02/02) + +
    37. Improved: There is now a constructor for FESystem that allows to +create collections of finite elements of arbitrary length. +
      +(Jason Sheldon, 2012/01/27) + +
    38. Improved: VectorTools::point_value() now also works within the hp framework. +
      +(Christian Goll, 2012/01/26) + +
    39. Fixed: GridTools::find_active_cell_around_point() for the hp-case works now also with MappingCollections containing only one mapping, as is the standard case in other functions using hp. +
      +(Christian Goll, 2012/01/26) + +
    40. Fixed: parallel::distributed::refine_and_coarsen_fixed_fraction() +contained a rounding bug that often produced wrong results. +
      +(Timo Heister, 2012/01/24) + +
    41. Improved: Utilities::break_text_into_lines now also splits the string at '\\n'. +
      +(Timo Heister, 2012/01/17) + +
    42. Fixed: When ./configure does not detect the presence +of zlib, writing output in VTU format failed to produce +a valid output file. +
      +(Timo Heister, 2012/01/03) + +
    43. Improved: PETScWrappers::SolverXXX class was +restricted to using default solver options for the KSP only. It is now +possible to override those by using PETSc command-line options +-ksp_*; giving greater flexibility in controlling PETSc +solvers. (See the class's documentation). +
      +(Vijay S. Mahadevan, 2011/12/22) + +
    44. New: The GridIn class now also reads the GMSH format 2.2 as written by +GMSH 2.5. +
      +(Vijay S. Mahadevan, Wolfgang Bangerth, 2011/12/19) + +
    45. Improved: The GridRefinement::refine_and_coarsen_optimize function +assumed that the expected convergence order was 2. It has now gotten an +argument by which the user can prescribe a different value. A bug has also +been fixed in which the function incorrectly assumed in its algorithm that +the mesh was two-dimensional. +
      +(Christian Goll, 2011/12/16) + +
    46. Fixed: Restriction and prolongation didn't work for elements of +kind FE_Nothing. Consequently, many other parts of the library also +didn't work, such as the SolutionTransfer class. This is now fixed. +
      +(Wolfgang Bangerth, 2011/12/15) + +
    47. Fixed: The DerivativeApproximation class now works for distributed computations. +
      +(Timo Heister, 2011/12/15) + +
    48. Changed: The ExcMessage exception class took an argument of +type char* that was displayed when the exception +was raised. However, character pointers are awkward to work with +because (i) they can not easily be composed to contain things like +file names that are only known at run-time, and (ii) the string +pointed to by the pointer had to live longer than the local expression +in which the exception is generated when using the AssertThrow macro +(because, when we create an exception, the exception object is passed +up the call stack until we find a catch-clause; at that time, however, +the scope in which the exception object was created has long been left). +This restriction made it impossible to construct the message using std::string +and then just do something like (std::string("file: ")+filename).c_str(). +
      +To remedy this flaw, the type of the argument to ExcMessage has been +changed to std::string since objects of this type are readily copyable +and therefore live long enough. +
      +(Wolfgang Bangerth, 2011/12/14) + +
    49. New: Setting up a class derived from DataPostprocessor required some +pretty mechanical steps in which one has to overload four member functions. +For common cases where a postprocessor only computes a single scalar or +a single vector, this is tedious and unnecessary. For these cases, the +new classes DataPostprocessorScalar and DataPostprocessorVector provide +short cuts that make life simpler. +
      +(Wolfgang Bangerth, 2011/12/14) + +
    50. Changed: The DataPostprocessor class previously required users of this +class to overload DataPostprocessor::get_names(), +DataPostprocessor::get_data_component_interpretation() +and DataPostprocessor::n_output_variables(). The latter function is redundant +since its output must equal the length of the arrays returned by the +first two of these functions. It has therefore been removed. +
      +(Wolfgang Bangerth, 2011/12/14) + +
    51. Improved: Objects of the type LogStream::Prefix can now be used +as a safe implementation of the push and pop mechanism for log +prefices. +
      +(Guido Kanschat, 2011/12/09) + +
    52. New: IndexSet::add_indices(IndexSet). +
      +(Timo Heister, 2011/12/09) + +
    53. Fixed: Finite element Hessians get computed for codimension one, +at least for FE_Poly derived classes. +
      +(Guido Kanschat, 2011/12/07) + +
    54. Changed: Output of ParameterHandler::print_parameters with argument +ParameterHandler::LaTeX was not particularly readable. The output has +therefore been rewritten to be more structured and readable. +
      +(Wolfgang Bangerth, 2011/11/28) + +
    55. Fixed: The TimerOutput class set the alignment of output to right-aligned +under some circumstances, but didn't reset this to the previous value at the +end of output. This is now fixed. +
      +(Wolfgang Bangerth, 2011/11/28) + +
    56. New: The copy constructor of the SparseMatrixEZ function now works +(rather than throwing an exception) if the copied matrix has size zero. +This is in accordance to the other matrix classes. +
      +(Wolfgang Bangerth, 2011/11/15) + +
    57. New: The class ScalarFunctionFromFunctionObject provides a quick way to +convert an arbitrary function into a function object that can be passed +to part of the library that require the Function@ interface. +The VectorFunctionFromScalarFunctionObject class does a similar thing. +
      +(Wolfgang Bangerth, 2011/11/15) + +
    58. New: The DoFTools::count_dofs_per_block function now also works +for objects of type hp::DoFHandler. +
      +(Jason Sheldon, 2011/11/13) + +
    59. New: FETools::get_fe_from_name() can now return objects of type FE_Nothing. +
      +(Scott Miller, Jonathan Pitt, 2011/11/10) + +
    60. New: Implementation of an alternative handling of +inhomogeneous constraints in ConstraintMatrix. This is controlled with +a new parameter use_inhomogeneities_for_rhs in +distribute_local_to_global() and determines whether the correct or +zero values (this was the case before and still is the default) are +kept in the linear system during the solution process. +
      +(Jörg Frohne, 2011/11/01) + +
    61. Fixed: SparseMatrix::mmult and SpareMatrix::Tmmult had a number of +issues that are now fixed: (i) rebuilding the sparsity pattern was allowed +even if several of the matrices involved in these operations shared a +sparsity pattern; (ii) the functions had a vector argument that had a default +value but the default value could not be used because it wasn't used in a +template context deducible by the compiler. +
      +(Wolfgang Bangerth, 2011/10/30) + +
    62. New: +parallel::distributed::Triangulation::mesh_reconstruction_after_repartitioning +setting which is necessary for save()/load() to be deterministic. Otherwise +the matrix assembly is done in a different order depending on the order of old +refinements. +
      +(Timo Heister, 2011/10/26) + +
    63. New: TriaAccessor<>::minimum_vertex_distance(). +
      +(Timo Heister, 2011/10/25) + +
    64. New: TableHandler::print_text now supports not only printing column +keys above their own column, but also in a separate header, to make it simpler +for external plotting programs to skip this line. +
      +(Wolfgang Bangerth, 2011/10/22) + +
    65. Fixed: Trying to write a TableHandler object that is empty resulted +in a segmentation fault. This is now fixed. +
      +(Wolfgang Bangerth, 2011/10/21) + +
    66. New: The TableHandler class can now pad columns that have only been +partially filled. See the documentation of the class for a description. +
      +(Wolfgang Bangerth, 2011/10/18) + +
    67. Fixed: In TableHandler::print_text, it can happen that the function +wants to print an empty string as the element of the table to be printed. +This can confuse machine readers of this table, for example for visualization, +since they then do not see this column in that row. To prevent this, we now +print "" in such places. +
      +(Wolfgang Bangerth, 2011/10/18) + +
    68. Fixed: Using Trilinos versions 10.4 and later on Debian failed to +configure due to a different naming scheme of Trilinos libraries on +Debian. This is now fixed. +
      +(Wolfgang Bangerth, 2011/10/17) + +
    69. Changed: The TableHandler class has been changed significantly +internally. It could previously store arbitrary values (though in practice, +only int, unsigned int, double and std::string were implemented). The class is +now restricted to this particular set of types. On the other hand, the +TableHandler class can now be serialized. +
      +(Wolfgang Bangerth, 2011/10/17) + +
    70. Fixed: searching in the doxygen documentation. +
      +(Timo Heister, 2011/10/13) + +
    71. New: parallel::distributed::Triangulation::save()/load() to store +the refinement information to disk. Also supports saving solution vectors +using the SolutionTransfer class. +
      +(Timo Heister, 2011/10/12) + +
    72. Fixed: The DataOut_DoFData::merge_patches did not compile with newer compilers. +This is now fixed. +
      +(Wolfgang Bangerth, 2011/10/11) +
    + + +*/ diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 9fbc5f42bc..649e991a96 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -1,9 +1,9 @@ /** - * @page changes_after_7_1 Changes after Version 7.1 + * @page changes_after_7_2 Changes after Version 7.2

    This is the list of changes made after the release of -deal.II version 7.1.0. +deal.II version 7.2.0. All entries are signed with the names of the author.

    @@ -24,34 +24,12 @@ inconvenience this causes.

      -
    1. Changed/fixed: Several operations on Trilinos vectors that change the -elements of these vectors were allowed accidentally for vectors that have -ghost elements. This is a source of errors because a change on one -MPI process will not show up on a different processor. Consequently, we -intended to disallow all functions that modify vectors with ghost elements -but this was not enforced for all of these functions. This is now fixed -but it may lead to errors if your code relied on the existing behavior. The -way to work around this is to only ever modify fully distributed vectors, -and then copy it into a vector with ghost elements. +
    2. Changed: the optional argument offset got removed from +DoFHandler and MGDoFHandler::distribute_dofs() because it was +never working correctly and it is not used.
      -(Wolfgang Bangerth, 2012/08/06) +(Timo Heister, 2012/09/03) -
    3. Changed: The argument material_id of the estimate-functions of -the KellyErrorEstimator class is now of type types::material_id_type -with default value types::invalid_material_id, instead of type -unsigned int with default value numbers::invalid_unsigned_int. This -should not make a difference to most users unless you specified the -argument's default value by hand. -
      -(Wolfgang Bangerth, Christian Goll 2012/02/27) - -
    4. -The member functions Triangulation::set_boundary and -Triangulation::get_boundary now take a types::boundary_id_t instead of -an unsigned int as argument. This now matches the actual data type -used to store boundary indicators internally. -
      -(Wolfgang Bangerth, Christian Goll 2012/02/27)
    @@ -62,197 +40,7 @@ used to store boundary indicators internally.
      -
    1. -New: officially added support for clang 3.1 or newer. -
      -(Timo Heister and Wolfgang Bangerth, 2012/08/07) - -
    2. -Changed: PETSc linking now prefers to use the libpetsc.so generated -by PETSc starting from version 3.1+. This fixes the problem -of linker errors on recent gcc/ubuntu versions. -
      -(Timo Heister, 2012/08/07) - -
    3. -Fixed: On some 64-bit systems, we build deal.II with the -m64 -flag but forgot to build UMFPACK with this flag as well, leading to -linker errors. This is now fixed. -
      -(Wolfgang Bangerth, 2012/07/31) - -Fixed: The Intel compiler, when using MPI, wants that mpi.h -is included before header files like stdio.h. This can't -be ensured in general because the inclusion might be indirectly, but -we now work around the problem in other ways. -
      -(Timo Heister, Wolfgang Bangerth, Michael Thomadakis, 2012/07/26) - -
    4. -Fixed: On some systems, the p4est library we use for distributed -parallel computations installs its libraries into a lib64/ -directory instead of the usual lib/. deal.II can now deal -with this. -
      -(Wolfgang Bangerth, 2012/07/25) - -
    5. -New: step-43 is an extension of step-21 that shows efficient methods -to solve multi-phase flow. -
      -(Chih-Che Chueh, Wolfgang Bangerth, 2012/06/06) - -
    6. -New: step-15 has been replaced by a program that demonstrates the -solution of nonlinear problem (the minimal surface equation) using -Newton's method. -
      -(Sven Wetterauer, 2012/06/03) - -
    7. -New: step-48 demonstrates the solution of a nonlinear wave equation -with an explicit time stepping method. The usage of Gauss-Lobatto -elements gives diagonal mass matrices, which obviates the solution of -linear systems of equations. The nonlinear right hand side is -evaluated with the matrix-free framework. -
      -(Katharina Kormann and Martin Kronbichler, 2012/05/05) - -
    8. -New: step-37 shows how the matrix-free framework can be utilized to -efficiently solve the Poisson equation without building global -matrices. It combines fast operator evaluation with a multigrid solver -based on polynomial Chebyshev smoother. -
      -(Katharina Kormann and Martin Kronbichler, 2012/05/05) - -
    9. -New: A new matrix-free interface has been implemented. The framework -is parallelized with MPI, TBB, and explicit vectorization instructions -(new data type VectorizedArray). The class MatrixFree caches -cell-based data in an efficient way. Common operations can be -implemented using the FEEvaluation class. -
      -(Katharina Kormann and Martin Kronbichler, 2012/05/05) - -
    10. -New: step-44 demonstrates one approach to modeling large -deformations of nearly-incompressible elastic solids. The -elastic response is governed by a non-linear, hyperelastic -free-energy function. The geometrical response is also -nonlinear, i.e., the program considers finite deformations. -
      -(Andrew McBride and Jean-Paul Pelteret, 2012/04/25) - -
    11. -Changed: The version of BOOST we ship with deal.II has been upgraded -to 1.49.0. -
      -(Martin Kronbichler, 2012/04/07) - -
    12. -New: We have added a brief section to the step-12 tutorial programs that -compares the DG solution computed there with one that one would obtain by -using a continuous finite element. -
      -(Wolfgang Bangerth, 2012/03/25) - -
    13. -New: Added support for codimension 2, i.e. for dim-dimensional objects -embedded into spacedim=dim+2 dimensional space. -
      -(Sebastian Pauletti, 2012/03/02) - -
    14. Changed: Material and Boundary indicators have been both of the -type unsigned char. Throughout the library, we changed their datatype -to types::material_id_t -resp. types::boundary_id_t, both typedefs of unsigned -char. Internal faces are now characterized by -types::internal_face_boundary_id(=static_cast@(-1)) -instead of 255, so we get rid of that mysterious number in the source -code. Material_ids are also assumed to lie in the range from 0 to -types::invalid_material_id-1 (where types::invalid_material_id = -static_cast(-1)). With this change, it is now -much easier to extend the range of boundary or material ids, if -needed. -
      -(Christian Goll 2012/02/27) - -
    15. New: Functions like FEValues::get_function_values have long been -able to extract values from pretty much any vector kind given to it (e.g. -of kind Vector, BlockVector, PETScWrappers::Vector, etc). The list of -allowed "vector" types now also includes IndexSet, which is interpreted -as a vector of elements that are either zero or one, depending on whether -an index is in the IndexSet or not. -
      -As a consequence of this, the DataOut::add_data_vector functions now also -work for such types of vectors, a use demonstrated in step-41. -
      -(Wolfgang Bangerth, 2012/02/14) - -
    16. New: It has long been a nuisance that the deal.II vector classes -could only be accessed using operator() whereas the C++ -std::vector class required operator[]. This -diminished the usefulness of template code. Historically, the reason -was that the deal.II vector classes should use the same operator as -the matrix classes, and C++ does not allow to use operator[] -for matrices since this operator can only take a single argument. -
      -In any case, all deal.II vector classes now support both kinds of -access operators interchangeably. -
      -(Wolfgang Bangerth, 2012/02/12) - -
    17. Fixed: Linking shared libraries on PowerPC systems (e.g. on -BlueGene systems) failed due to a miscommunication between compiler -and linker. This is now worked around. -
      -(Aron Ahmedia, Wolfgang Bangerth, 2012/02/06) - -
    18. New: There is now a distributed deal.II vector class -parallel::distributed::Vector that can be used with MPI. The -vector is based on a contiguous locally owned range and allows easy -access of ghost entries from other processors. The vector interface is -very similar to the non-distributed class Vector. -
      -(Katharina Kormann, Martin Kronbichler, 2012/01/25) - -
    19. Fixed: The common/scripts/make_dependencies program -now behaves like the C++ compiler when -searching include paths for # include "..." directives. -
      -(Timo Heister, 2012/01/10) - -
    20. Fixed: The Intel compiler complains that it can't copy Trilinos vector -reference objects, preventing the compiling of step-32. This is now fixed. -
      -(Wolfgang Bangerth, 2011/11/09) - -
    21. Fixed: Intel ICC 12.1 gets into trouble with BOOST because BOOST -believes that the compiler supports C++0x but one then still has to -specify the corresponding flag on the command line to avoid compiler -errors. This is now fixed. -
      -(Wolfgang Bangerth, 2011/11/06) - -
    22. Fixed: On some systems, mpiCC turns out to alias the -C compiler, not the C++ compiler as expected. Consequently, try to use -mpic++ or mpicxx before mpiCC as -these should really be unambiguous. -
      -(Wolfgang Bangerth, 2011/11/05) - -
    23. Fixed: Intel's ICC compiler identifies itself as icpc version -12.1.0 (gcc version 4.2.1 compatibility) which we mistook as being -GCC version 4.2. The same is true for the Intel C compiler. This is now fixed. -
      -(Wolfgang Bangerth, 2011/11/05) - -
    24. Fixed: deal.II could not be compiled with gcc 4.6.1 when MPI is -enabled due to a missing include file in file -source/base/utilities.cc. This is now fixed. -
      -(Wolfgang Bangerth, 2011/10/25) +
    25. Nothing so far.
    @@ -262,428 +50,22 @@ enabled due to a missing include file in file

    Specific improvements

      -
    1. New: The Patterns::Map pattern allows to describe maps from keys -to values in input files. -
      -(Wolfgang Bangerth, 2012/08/01) - -
        -
      1. Fixed: DoFTools::make_zero_boundary_constraints now also works for parallel distributed triangulations. -
        -(Wolfgang Bangerth, 2012/07/24) - -
      2. Fixed: GridTools::find_active_cell_around_point() works now also if the cell in which the point we look for lies is not adjacent to the closest vertex of p. The tests bits/find_cell_8 and _9 illustrate this. -
        -(Wolfgang Bangerth, Christian Goll 2012/07/20) - -
      3. Fixed: Using the SolutionTransfer class with hp::DoFHandler -and on meshes where some cells are associated with a FE_Nothing element -could result in an error. This is now fixed. -
        -(Wolfgang Bangerth, 2012/06/29) - -
      4. Fixed: The MappingQ1::transform_real_to_unit_cell function as -well as the equivalent ones in derived classes sometimes get into -trouble if they are asked to compute the preimage of this point -in reference cell coordinates. This is because for points outside -the reference cell, the mapping from unit to real cell is not -necessarily invertible, and consequently the Newton iteration to -find the preimage did not always converge, leading to an exception. -While this is not entirely wrong (we could, after all, not compute -the desired quantity), not all callers of this function were prepared -to accept this result -- in particular, the function -CellAccessor<3>::point_inside should have really just returned false -in such cases but instead let the exception so generated propagate -through. This should now be fixed. -
        -(Wolfgang Bangerth, Eric Heien, Sebastian Pauletti, 2012/06/27) - -
      5. Fixed: The function VectorTools::compute_no_normal_flux_constraints had -a bug that led to an exception whenever we were computing constraints for -vector fields located on edges shared between two faces of a 3d cell if those -faces were not parallel to the axes of the coordinate system. This is now fixed. -
        -(Wolfgang Bangerth, Jennifer Worthen, 2012/06/27) - -
      6. -Fixed: Due to an apparent bug in autoconf, it was not possible to -override the F77 environment variable to select anything -else than gfortran. This is now fixed. -
        -(Wolfgang Bangerth, 2012/06/08) - -
      7. Fixed: TrilinosWrappers::VectorBase::swap() is now working as expected. (thanks Uwe Köcher) -
        -(Timo Heister 2012/07/03) - -
      8. Fixed: Some instantiations for -DerivativeApproximation::approximate_derivative_tensor() were missing. -
        -(Timo Heister 2012/06/07) - -
      9. New: The finite element type FE_DGQArbitraryNodes is now -working also in codimension one spaces. -
        -(Luca Heltai, Andrea Mola 2012/06/06) - -
      10. Fixed: Computing the $W^{1,\infty}$ norm and seminorm in -VectorTools::integrate_difference was not implemented. This is now -fixed. -
        -(Wolfgang Bangerth 2012/06/02) - -
      11. Fixed: A problem in MappingQ::transform_real_to_unit_cell -that sometimes led the algorithm in this function to abort. -
        -(Wolfgang Bangerth 2012/05/30) - -
      12. New: The function DataOutInterface::write_pvd_record can be used -to provide Paraview with metadata that describes which time in a -simulation a particular output file corresponds to. -
        -(Marco Engelhard 2012/05/30) - -
      13. Fixed: A bug in 3d with hanging nodes in GridTools::find_cells_adjacent_to_vertex() -that caused find_active_cell_around_point() to fail in those cases. -
        -(Timo Heister, Wolfgang Bangerth 2012/05/30) - -
      14. New: DoFTools::make_periodicity_constraints implemented which -inserts algebraic constraints due to periodic boundary conditions -into a ConstraintMatrix. -
        -(Matthias Maier, 2012/05/22) - -
      15. New: The GridIn::read_unv function can now read meshes generated -by the Salome framework, see http://www.salome-platform.org/ . -
        -(Valentin Zingan, 2012/04/27) - -
      16. New: There is now a second DoFTools::map_dofs_to_support_points -function that also works for parallel::distributed::Triangulation -triangulations. -
        -(Wolfgang Bangerth, 2012/04/26) - -
      17. New: There is now a second DoFTools::extract_boundary_dofs -function that also works for parallel::distributed::Triangulation -triangulations. -
        -(Wolfgang Bangerth, 2012/04/26) - -
      18. New: The FullMatrix::extract_submatrix_from, FullMatrix::scatter_matrix_to, -FullMatrix::set functions are new. -
        -(Andrew McBride, Jean Paul Pelteret, Wolfgang Bangerth, 2012/04/24) - -
      19. Fixed: -The method FEValues::inverse_jacobian() previously returned the transpose of the -inverse Jacobians instead of just the inverse Jacobian as documented. This is now fixed. -
        -(Sebastian Pauletti, Katharina Kormann, Martin Kronbichler, 2012/03/11) - -
      20. Extended: -SolutionTransfer is now also able to transfer solutions between hp::DoFHandler where -the finite element index changes during refinement. -
        -(Katharina Kormann, Martin Kronbichler, 2012/03/10) - -
      21. Changed: -A new method to determine an initial guess for the Newton method was coded -in MappingQ::transform_real_to_unit_cell. -The code in transform_real_to_unit_cell was cleaned a little bit and a new code -for the @<2,3@> case was added. -
        -(Sebastian Pauletti, 2012/03/02) - -
      22. Changed: -In the context of codim@>0, Mapping::transform would require different inputs -depending on the mapping type. -For mapping_covariant, mapping_contravariant the input is DerivativeForm<1, dim, spacedim> -but for mapping_covariant_gradient, mapping_contravariant_gradient the input is Tensor<2,dim>. -
        -(Sebastian Pauletti, 2012/03/02) - -
      23. New: -A new class DerivativeForm was added. -This class is supposed to represent the derivatives of a mapping. -
        -(Sebastian Pauletti, 2012/03/02) - -
      24. Fixed: TrilinosWrappers::Vector::all_zero() in parallel. -
        -(Timo Heister, Jörg Frohne, 2012/03/06) - -
      25. New: GridGenerator::quarter_hyper_shell() in 3d. -
        -(Thomas Geenen, 2012/03/05) - -
      26. New: DataOut::write_vtu_in_parallel(). This routine uses MPI I/O to write -a big vtu file in parallel. -
        -(Timo Heister, 2012/02/29) - -
      27. Fixed: parallel::distributed::Triangulation::clear() forgot -to update the number cache of this class, leading to wrong results -when calling functions like -parallel::distributed::Triangulation::n_global_active_cells(); -
        -(Wolfgang Bangerth, 2012/02/20) - -
      28. Improved: FEFieldFunction allows now for the computation of Laplacians. -
        -(Christian Goll, 2012/02/16) - -
      29. New: The function IndexSet::fill_binary_vector creates a numerical -representation of an IndexSet containing zeros and ones. -
        -(Wolfgang Bangerth, 2012/02/12) - -
      30. New: The function IndexSet::clear resets an index set to be empty. -
        -(Wolfgang Bangerth, 2012/02/12) - -
      31. New: There are now global functions l1_norm() and linfty_norm() that compute -the respective norms of a rank-2 tensor. -
        -(Wolfgang Bangerth, 2012/02/08) - -
      32. New: VectorTools::interpolate_to_different_mesh implemented which interpolates between - DoFHandlers with different triangulations based on a common coarse grid. -
        -(Matthias Maier, 2012/02/08) - -
      33. Improved: DoFTools::map_dofs_to_support_points() now also works within the hp framework. -
        -(Christian Goll, 2012/02/02) - -
      34. Improved: There is now a constructor for FESystem that allows to -create collections of finite elements of arbitrary length. -
        -(Jason Sheldon, 2012/01/27) - -
      35. Improved: VectorTools::point_value() now also works within the hp framework. -
        -(Christian Goll, 2012/01/26) - -
      36. Fixed: GridTools::find_active_cell_around_point() for the hp-case works now also with MappingCollections containing only one mapping, as is the standard case in other functions using hp. -
        -(Christian Goll, 2012/01/26) - -
      37. Fixed: parallel::distributed::refine_and_coarsen_fixed_fraction() -contained a rounding bug that often produced wrong results. -
        -(Timo Heister, 2012/01/24) - -
      38. Improved: Utilities::break_text_into_lines now also splits the string at '\\n'. -
        -(Timo Heister, 2012/01/17) - -
      39. Fixed: When ./configure does not detect the presence -of zlib, writing output in VTU format failed to produce -a valid output file. -
        -(Timo Heister, 2012/01/03) - -
      40. Improved: PETScWrappers::SolverXXX class was -restricted to using default solver options for the KSP only. It is now -possible to override those by using PETSc command-line options --ksp_*; giving greater flexibility in controlling PETSc -solvers. (See the class's documentation). -
        -(Vijay S. Mahadevan, 2011/12/22) - -
      41. New: The GridIn class now also reads the GMSH format 2.2 as written by -GMSH 2.5. -
        -(Vijay S. Mahadevan, Wolfgang Bangerth, 2011/12/19) - -
      42. Improved: The GridRefinement::refine_and_coarsen_optimize function -assumed that the expected convergence order was 2. It has now gotten an -argument by which the user can prescribe a different value. A bug has also -been fixed in which the function incorrectly assumed in its algorithm that -the mesh was two-dimensional. -
        -(Christian Goll, 2011/12/16) - -
      43. Fixed: Restriction and prolongation didn't work for elements of -kind FE_Nothing. Consequently, many other parts of the library also -didn't work, such as the SolutionTransfer class. This is now fixed. -
        -(Wolfgang Bangerth, 2011/12/15) - -
      44. Fixed: The DerivativeApproximation class now works for distributed computations. -
        -(Timo Heister, 2011/12/15) - -
      45. Changed: The ExcMessage exception class took an argument of -type char* that was displayed when the exception -was raised. However, character pointers are awkward to work with -because (i) they can not easily be composed to contain things like -file names that are only known at run-time, and (ii) the string -pointed to by the pointer had to live longer than the local expression -in which the exception is generated when using the AssertThrow macro -(because, when we create an exception, the exception object is passed -up the call stack until we find a catch-clause; at that time, however, -the scope in which the exception object was created has long been left). -This restriction made it impossible to construct the message using std::string -and then just do something like (std::string("file: ")+filename).c_str(). -
        -To remedy this flaw, the type of the argument to ExcMessage has been -changed to std::string since objects of this type are readily copyable -and therefore live long enough. -
        -(Wolfgang Bangerth, 2011/12/14) - -
      46. New: Setting up a class derived from DataPostprocessor required some -pretty mechanical steps in which one has to overload four member functions. -For common cases where a postprocessor only computes a single scalar or -a single vector, this is tedious and unnecessary. For these cases, the -new classes DataPostprocessorScalar and DataPostprocessorVector provide -short cuts that make life simpler. -
        -(Wolfgang Bangerth, 2011/12/14) - -
      47. Changed: The DataPostprocessor class previously required users of this -class to overload DataPostprocessor::get_names(), -DataPostprocessor::get_data_component_interpretation() -and DataPostprocessor::n_output_variables(). The latter function is redundant -since its output must equal the length of the arrays returned by the -first two of these functions. It has therefore been removed. -
        -(Wolfgang Bangerth, 2011/12/14) - -
      48. Improved: Objects of the type LogStream::Prefix can now be used -as a safe implementation of the push and pop mechanism for log -prefices. -
        -(Guido Kanschat, 2011/12/09) - -
      49. New: IndexSet::add_indices(IndexSet). -
        -(Timo Heister, 2011/12/09) - -
      50. Fixed: Finite element Hessians get computed for codimension one, -at least for FE_Poly derived classes. -
        -(Guido Kanschat, 2011/12/07) - -
      51. Changed: Output of ParameterHandler::print_parameters with argument -ParameterHandler::LaTeX was not particularly readable. The output has -therefore been rewritten to be more structured and readable. -
        -(Wolfgang Bangerth, 2011/11/28) - -
      52. Fixed: The TimerOutput class set the alignment of output to right-aligned -under some circumstances, but didn't reset this to the previous value at the -end of output. This is now fixed. -
        -(Wolfgang Bangerth, 2011/11/28) - -
      53. New: The copy constructor of the SparseMatrixEZ function now works -(rather than throwing an exception) if the copied matrix has size zero. -This is in accordance to the other matrix classes. -
        -(Wolfgang Bangerth, 2011/11/15) - -
      54. New: The class ScalarFunctionFromFunctionObject provides a quick way to -convert an arbitrary function into a function object that can be passed -to part of the library that require the Function@ interface. -The VectorFunctionFromScalarFunctionObject class does a similar thing. -
        -(Wolfgang Bangerth, 2011/11/15) - -
      55. New: The DoFTools::count_dofs_per_block function now also works -for objects of type hp::DoFHandler. -
        -(Jason Sheldon, 2011/11/13) - -
      56. New: FETools::get_fe_from_name() can now return objects of type FE_Nothing. -
        -(Scott Miller, Jonathan Pitt, 2011/11/10) - -
      57. New: Implementation of an alternative handling of -inhomogeneous constraints in ConstraintMatrix. This is controlled with -a new parameter use_inhomogeneities_for_rhs in -distribute_local_to_global() and determines whether the correct or -zero values (this was the case before and still is the default) are -kept in the linear system during the solution process. -
        -(Jörg Frohne, 2011/11/01) - -
      58. Fixed: SparseMatrix::mmult and SpareMatrix::Tmmult had a number of -issues that are now fixed: (i) rebuilding the sparsity pattern was allowed -even if several of the matrices involved in these operations shared a -sparsity pattern; (ii) the functions had a vector argument that had a default -value but the default value could not be used because it wasn't used in a -template context deducible by the compiler. -
        -(Wolfgang Bangerth, 2011/10/30) - -
      59. New: -parallel::distributed::Triangulation::mesh_reconstruction_after_repartitioning -setting which is necessary for save()/load() to be deterministic. Otherwise -the matrix assembly is done in a different order depending on the order of old -refinements. -
        -(Timo Heister, 2011/10/26) - -
      60. New: TriaAccessor<>::minimum_vertex_distance(). -
        -(Timo Heister, 2011/10/25) - -
      61. New: TableHandler::print_text now supports not only printing column -keys above their own column, but also in a separate header, to make it simpler -for external plotting programs to skip this line. -
        -(Wolfgang Bangerth, 2011/10/22) - -
      62. Fixed: Trying to write a TableHandler object that is empty resulted -in a segmentation fault. This is now fixed. -
        -(Wolfgang Bangerth, 2011/10/21) - -
      63. New: The TableHandler class can now pad columns that have only been -partially filled. See the documentation of the class for a description. -
        -(Wolfgang Bangerth, 2011/10/18) - -
      64. Fixed: In TableHandler::print_text, it can happen that the function -wants to print an empty string as the element of the table to be printed. -This can confuse machine readers of this table, for example for visualization, -since they then do not see this column in that row. To prevent this, we now -print "" in such places. -
        -(Wolfgang Bangerth, 2011/10/18) - -
      65. Fixed: Using Trilinos versions 10.4 and later on Debian failed to -configure due to a different naming scheme of Trilinos libraries on -Debian. This is now fixed. -
        -(Wolfgang Bangerth, 2011/10/17) - -
      66. Changed: The TableHandler class has been changed significantly -internally. It could previously store arbitrary values (though in practice, -only int, unsigned int, double and std::string were implemented). The class is -now restricted to this particular set of types. On the other hand, the -TableHandler class can now be serialized. -
        -(Wolfgang Bangerth, 2011/10/17) - -
      67. Fixed: searching in the doxygen documentation. +
      68. New: TableHandler TextOutputFormat::simple_table_with_separate_column_description +that skips aligning the columns for increased performance.
        -(Timo Heister, 2011/10/13) +(Timo Heister, 2012/09/10) -
      69. New: parallel::distributed::Triangulation::save()/load() to store -the refinement information to disk. Also supports saving solution vectors -using the SolutionTransfer class. +
      70. Fixed: The Clang C++ compiler had some trouble dealing with obtaining +the return value of a Threads::Task object, due to a compiler bug in +dealing with friend declarations. This is now fixed.
        -(Timo Heister, 2011/10/12) +(Wolfgang Bangerth, 2012/09/04) -
      71. Fixed: The DataOut_DoFData::merge_patches did not compile with newer compilers. +
      72. Fixed: When applying a ConstraintMatrix to a block matrix +where the last few rows are empty, we ran into an unrelated assertion. This is now fixed.
        -(Wolfgang Bangerth, 2011/10/11) +(Jason Sheldon, Wolfgang Bangerth, 2012/09/04)
      diff --git a/deal.II/doc/news/news.html b/deal.II/doc/news/news.html index 4c0b4cc0ee..c8523aeaed 100644 --- a/deal.II/doc/news/news.html +++ b/deal.II/doc/news/news.html @@ -28,10 +28,28 @@ mailing list for additional news.

      -

      Changes in the library since the last major release are - here.

      +

      +

      Recent changes
      +
      + Changes in the library since the last major release are + here. +
      +

      +
      + 2012/09/03: Version 7.2 released +
      +
      + Version 7.2.0 was released today. This release provides four + new tutorial programs, a framework for matrix-free + computations, and a large number of enhancements and bug fixes + throughout the entire library. A complete list of new + features is found here. +
      + +
      2012/06/06: step-43 — an efficient solver for two-phase flow diff --git a/deal.II/doc/porting.html b/deal.II/doc/porting.html index 4c6be0b7c4..b554ad4620 100644 --- a/deal.II/doc/porting.html +++ b/deal.II/doc/porting.html @@ -5,7 +5,7 @@ Porting deal.II - + @@ -152,8 +152,7 @@
      -The deal.II -mailing list +The deal.II Group
      diff --git a/deal.II/doc/publications/index.html b/deal.II/doc/publications/index.html index e10389e24a..d824f9f8d2 100644 --- a/deal.II/doc/publications/index.html +++ b/deal.II/doc/publications/index.html @@ -271,7 +271,7 @@ Preconditioning for Allen-Cahn variational inequalities with non-local constraints
      - Journal of Computational Physics, vol. 231, pp. 5406-5420, 2012. + Journal of Computational Physics, vol. 231, pp. 5406-5402, 2012.
    2. A. Bonito, I. Kyza, R. H. Nochetto @@ -318,7 +318,16 @@ hp-adaptive finite element strategy for Maxwell's equations
      - Preprint 12/04, Karlsruhe Institute of Technology, 2012. + Preprint 12/04, Karlsruhe Institute of Technology (KIT), 2012. +
    3. + +
    4. M. Bürg +
      + A Fully Automatic hp-Adaptive Refinement Strategy + +
      + PhD Thesis, Karlsruhe Institute of Technology (KIT), 2012.
    5. A. Cangiani, J. Chapman, E. Georgoulis, M. Jensen @@ -330,6 +339,30 @@
    6. +
    7. A. Cangiani, J. Chapman, E. Georgoulis, M. Jensen +
      + On Local Super-Penalization of Interior Penalty Discontinuous Galerkin Methods +
      + arXiv:1205.5672v1 [math.NA], 2012. + +
    8. + +
    9. T. Carraro, J. Joos, B. Rüger, A. Weber, E. Ivers-Tiffée +
      + 3D finite element model for reconstructed mixed-conducting + cathodes: I. Performance quantification +
      + Electrochimica Acta, Volume 77, pp. 315-323, 2012. +
    10. + +
    11. T. Carraro, J. Joos, B. Rüger, A. Weber, E. Ivers-Tiffée +
      + 3D finite element model for reconstructed mixed-conducting + cathodes: II. Parameter sensitivity analysis +
      + Electrochimica Acta, Volume 77, pp. 309-314, 2012. +
    12. +
    13. C.-C. Chueh, N. Djilali, W. Bangerth
      An h-adaptive Operator Splitting Method for @@ -356,6 +389,16 @@ arXiv:1202.3583v1 [nlin.PS], 2012.
    14. +
    15. J. J. Gaitero, J. S. Dolado, C. Neuen, F. Heber, E. Koenders +
      + Computational 3d simulation of Calcium leaching in + cement matrices + +
      + Institut für numerische Simulation, Rheinische + Friedrich-Wilhelms-Universität Bonn, INS Preprint 1203, 2012. +
    16. +
    17. T. George, A. Gupta, V. Sarin
      An empirical analysis of the performance of iterative @@ -450,6 +493,26 @@
    18. +
    19. O. Jirousek, P. Zlamal +
      + Large-scale micro-finite element simulation of + compressive behavior of trabecular bone microstructure +
      + Proceedings of the 18th Conference on Engineering Mechanics, + Svratka, Czech Republic, May 14-17, 2012; paper #206, + pp. 543-549, 2012. +
    20. + +
    21. J. Joos, M. Ender, T. Carraro, A. Weber, E. Ivers-Tiffée +
      + Representative Volume Element Size for Accurate Solid Oxide + Fuel Cell Cathode Reconstructions from Focused Ion Beam Tomography + Data +
      + Electrochimica Acta, in press, 2012. + +
    22. +
    23. S. Joshi
      A model for the estimation of residual stresses in @@ -505,14 +568,13 @@ arXiv:1203.3384v1 [math.NA], 2012.
    24. -
    25. - T. Rees, M. Stoll +
    26. M. J. Rapson, J. C. Tapson, D. Karpul
      - A fast solver for an H1 regularized - optimal control problem + Unification and Extension of Monolithic State Space + and Iterative Cochlear Models
      - Preprint 12-06, Max-Planck-Institute Magdeburg, 2012. + Journal of the Acoustical Society of America, vol. 131, pp. 3935-3952, 2012.
    27. N. Richardson @@ -541,22 +603,21 @@ Vol. 28, pp. 111–132, 2012.
    28. -
    29. M. J. Rapson, D. Karpul, J. C. Tapson +
    30. M. Stoll, A. Wathen
      - Unification and extension of monolithic state space and - iterative cochlear models + All-at-once solution of time-dependent PDE-constrained optimization problems
      - J. Acoust. Soc. Am. Volume 131, Issue 5, pp. 3935-3952, 2012. + Preprint, University of Magdeburg, 2012 +
    31. -
    32. M. Stoll, A. Wathen +
    33. M. Thalhammer, J. Abhau
      - All-at-once solution of time-dependent PDE-constrained optimization problems + A numerical study of adaptive space and time discretisations for Gross–Pitaevskii equations
      - Preprint, University of Magdeburg, 2012 - + Journal of Computational Physics, vol. 231, pp. 6665-6681, 2012.
    34. M. Vavalis, M. Mu, G. Sarailidis @@ -571,10 +632,11 @@
    35. M. Wallraff, T. Leicht, M. Lange-Hegermann
      Numerical flux functions for Reynolds-averaged Navier-Stokes - and kω turbulence model computations with a line-preconditioned + and kω turbulence model computations with a line-preconditioned p-multigrid discontinuous Galerkin solver
      Int. J. Numer. Meth. Fluids, published online, 2012. +
    36. M. Wallraff, T. Leicht, M. Lange-Hegermann @@ -592,8 +654,35 @@
      RICAM Report 2012-06, 2012.
    37. -
    +
  • S. Yoon, M. A. Walkley, O. G. Harlen +
    + Two particle interactions in a confined viscoelastic fluid under shear + +
    + Journal of Non-Newtonian Fluid Mechanics, in press, 2012. + +
  • + +
  • T. D. Young, E. Romero, J. E. Roman +
    + Parallel finite element density functional theory exploiting grid refinement and subspace recycling + +
    + Comput. Phys. Commun., accepted, 2012. +
  • + +
  • S. Zhang, X. Lin, H. Zhang, D. A. Yuen, Y. Shi +
    + A new method for calculating displacements from + elastic dislocation over arbitrary 3-D fault surface with + extended FEM and Adaptive Mesh Refinement (AMR) +
    + Proceedings of the International Workshop on Deep Geothermal + Systems, Wuhan, China, June 29-30, 2012. +
  • +

    Publications in 2011

    @@ -862,6 +951,13 @@ +
  • J. Joos, T. Carraro, M. Ender, B. Rüger, A. Weber, E. Ivers-Tiffée +
    + Detailed Microstructure Analysis and 3D Simulations of Porous Electrodes +
    + ECS Trans. 35, pp. 2357-2368, 2011. +
  • +
  • F. Keller, H. Nirschl, W. Dörfler
    Primary charge effects on prolate spheroids with moderate aspect ratios @@ -1037,15 +1133,6 @@ 2011
  • -
  • M. J. Rapson, D. Karpul, J. C. Tapson -
    - Unification and Extension of Monolithic State Space - and Iterative Cochlear Models - -
    - Journal of the Acoustical Society of America, accepted, 2011. -
  • -
  • M. J. Rapson, J. C. Tapson
    Investigations into Time @@ -1105,26 +1192,6 @@ Submitted to Archive of Numerical Software, 2011.
  • -
  • M. Steigemann -
    - Simulation of Quasi-static Crack Propagation in Functionally - Graded Materials - -
    - in: Functionally Graded Materials, N.J. Reynolds, ed., Nova Science - Publishers, pp. 193-248, 2011. -
  • - -
  • - M. Stoll -
    - One-shot solution of a time-dependent time-periodic - PDE-constrained optimization problem - -
    - Preprint 11-04, Max-Planck-Institute Magdeburg, 2011. -
  • -
  • M. Stoll, J. Pearson, A. Wathen
    @@ -1461,7 +1528,8 @@ Reduction of Drift-Diffusion Equations in Electrical Networks

    - Hamburger Beiträge zur Angewandten Mathematik, Nr. 2010-09. + Scientific Computing in Electrical Engineering, SCEE 2010 + Mathematics in Industry, Volume 16, Part 5, 423-431, 2012.
  • M. Hinze, M. Kunkel @@ -1504,6 +1572,14 @@ J. C. F. Pereira and A. Sequeira (eds.), 2010.
  • +
  • J. Joos, B. Rüger, T. Carraro, A. Weber, E. Ivers-Tiffée +
    + Electrode Reconstruction by FIB/SEM and Microstructure + Modeling +
    + ECS Trans. 28, pp. 81-91, 2010. +
  • +
  • G. Kanschat, B. Rivière
    A strongly conservative finite element method for the coupling @@ -1698,15 +1774,6 @@ Engineering Fracture Mechanics, vol. 77, pp. 2145-2157, 2010
  • -
  • - M. Stoll, A. Wathen -
    - All-at-once solution of time-dependent Stokes control - -
    - Preprint 10-03, Max-Planck-Institute Magdeburg, 2010. -
  • -
  • M. Stoll, A. Wathen
    @@ -2098,6 +2165,14 @@ G. Choi and J. Y. Yoo, eds.), pp. 31-45, Springer, 2009.
  • +
  • B. Rüger, J. Joos, T. Carraro, A. Weber, E. Ivers-Tiffée +
    + 3D Electrode Microstructure Reconstruction and + Modelling +
    + ECS Trans. 25, pp. 1211-1220, 2009. +
  • +
  • D. Schötzau, L. Zhu
    @@ -4074,9 +4149,6 @@
    Preprint 2000-11 (SFB 359), IWR Heidelberg, October 1999.
    - This paper is also available - online. -
    (Abstract, BiBTeX entry)
  • @@ -4223,7 +4295,7 @@
    - The deal.II mailing list
    + The deal.II Group diff --git a/deal.II/doc/readme-petsc-trilinos.html b/deal.II/doc/readme-petsc-trilinos.html index d99508a796..fd35d55b3a 100644 --- a/deal.II/doc/readme-petsc-trilinos.html +++ b/deal.II/doc/readme-petsc-trilinos.html @@ -79,17 +79,6 @@ configuration.

    -

    - Note that in order to use PETSc with deal.II - with the current release version of deal.II - you will need to have at least PETSc version 2.3.0 installed, - earlier releases are no longer supported. There is no - correlation between deal.II version numbers - and PETSc version numbers. deal.II version - 7.0 has been tested up to PETSc release 3.1.0-p8, and newer version up - to at least PETSc release 3.2. -

    -

    There is an additional caveat: PETSc appears not to co-operate well when using threads and some programs crash when deal.II is @@ -148,9 +137,10 @@

    Trilinos starting with version 10.0

    - Note: Trilinos versions 10.6.x, 10.8.0, 10.8.1, and 10.10.2 are not compatible with + Note: Trilinos versions 10.6.x, 10.8.0, 10.8.1, 10.10.2, 10.12.1 are not compatible with deal.II. They contain subtle bugs related to (parallel) matrices and vectors. - We recommend staying with 10.4.2 for the time being. + Versions tested to work are 10.4.2, 10.8.5, and 10.12.2. We recommend only using + one of the tested versions for the time being.

    @@ -274,7 +264,7 @@ configure: error: *** Your Trilinos installation is not compatible with the C++


    - The deal.II mailing list + The deal.II Group $Date: 2008-10-14 05:36:48 -0500 (Tue, 14 Oct 2008) $
    diff --git a/deal.II/doc/readme.html b/deal.II/doc/readme.html index 10c07e859a..bbb9dc291b 100644 --- a/deal.II/doc/readme.html +++ b/deal.II/doc/readme.html @@ -533,6 +533,11 @@ at the command line, or, here.

    + +

    + (deal.II) version 7.2 (and higher) support + PETSc 3.x.x only; earlier releases are no longer supported. +

    @@ -556,59 +561,50 @@
    Trilinos

    - deal.II can also interface to Trilinos. The + deal.II can also interface + to Trilinos. The simplest way to use these interfaces is to pass --with-trilinos=/path/to/trilinos - to deal.II's ./configure script. More - configuration options can be found deal.II's ./configure script. Note + that not all versions of Trilinos are compatible + with deal.II. More details about compatibility and + configuration can be found here.

    -
    Metis

    - In order to generate partitionings of triangulations, we have - functions that - call METIS library. METIS is a library that - provides various methods to partition graphs, which we use to - define which cell belongs to which part of a triangulation. The - main point in using METIS is to generate partitions so that the - interfaces between cell blocks are as small as possible. This - data can, in turn, be used to distribute degrees of freedom onto - different processors when using PETSc and/or SLEPc in parallel - mode. -

    - -

    - As with PETSc and SLEPc, the use of METIS is optional. If you - wish to use it, you can do so by having a METIS installation - around at the time of calling - ./configure by either - setting the METIS_DIR environment - variable denoting the path to the METIS library, or using the - --with-metis flag. If METIS was installed as part - of /usr or /opt, instead of local directories - in a home directory for example, you can use configure - switches --with-metis-include, --with-metis-libs. + In order to generate partitionings of triangulations, we have + functions that + call METIS library. METIS is a library that + provides various methods to partition graphs, which we use to + define which cell belongs to which part of a + triangulation. The main point in using METIS is to generate + partitions so that the interfaces between cell blocks are as + small as possible. This data can, in turn, be used to + distribute degrees of freedom onto different processors when + using PETSc and/or SLEPc in parallel mode.

    - On some systems, when using shared libraries for deal.II, you may get - warnings of the kind libmetis.a(pmetis.o): relocation R_X86_64_32 - against `a local symbol' can not be used when making a shared - object; recompile with -fPIC when linking. This can be - avoided by recompiling METIS with -fPIC as a compiler - flag. + As with PETSc and SLEPc, the use of METIS is optional. If you + wish to use it, you can do so by having a METIS installation + around at the time of calling + ./configure by either setting + the METIS_DIR environment variable denoting the + path to the METIS library, or using the + --with-metis flag.

    - METIS is not needed when using p4est to parallelize - programs, see below. + (deal.II) version 7.2 (and higher) support + METIS 5.x.x only; earlier releases are no longer + supported.
    METIS is not needed when + using p4est to parallelize programs, see below.

    @@ -734,7 +730,18 @@ this page. - + +
    HDF5
    +
    + This adds HDF5/XDMF graphical output capabilities to deal.II. You need to + install the HDF5 library + separately. Configure with --with-hdf5= and point it to + the h5pcc or h5cc script inside your hdf5 installation. + + For a detailed description of how to compile HDF5 and linking with + deal.II, see this + page. +
    @@ -823,7 +830,7 @@
    - The deal.II mailing list + The deal.II Group $Date$
    diff --git a/deal.II/doc/reports/multithreading/img1.gif b/deal.II/doc/reports/multithreading/img1.gif deleted file mode 100644 index 4525a58002b4f70375555753e5a0117721126cc3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 90 zcmZ?wbhEHboJ$rV4fB&XUn`~@s3=9lZR8$myvM@3*urTO=RDjev pFw1-F+QV$H&2x1r+pG(IEJsztnjI%zof4FGk)8N2`h diff --git a/deal.II/doc/reports/multithreading/img2.gif b/deal.II/doc/reports/multithreading/img2.gif deleted file mode 100644 index 28505c1000d1e7d0f3bd3fec643c461eb2b92cd7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 137 zcmZ?wbhEHboJ$rV4e}8jxb9s4rc6N4reEgC2nn~#r=gM)*2cXw-RYhPbqva+&NR8&Yv zNIX0|FfcGABqSIZ7z_*yA^8LW000O8EC2ui07(ET06+x(5Xniay*TU5yXOq^jbv$# zf|IOLVm!hrQ|X$tZ;UJeF?)rc+SFG07?r%e106Wsjl{EkW diff --git a/deal.II/doc/reports/multithreading/img4.gif b/deal.II/doc/reports/multithreading/img4.gif deleted file mode 100644 index 1068152d8f135e7335ba252d0051b6adc6276037..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 674 zcmV;T0$u$_Nk%w1VY2`q0OJ4v0001|r>C2nn~#r=gM)*2cXw-RYhPbqva+&NR8&Yv zNIX0|FfcGABqSIZ7z_*yA^8LW000O8EC2ui0J8ue06+x(5Xniay*TU5yZ>M)ZbUMk z;xnLL0SFQStZaQU%vDN5Fby;W!(fsW2$bG0I4n*QND3jBd{mB<0Kr!i91L7z)P}%H z0ssP#%x=5i@OX&epvp&qMflF|e|88000j~a3Lk=m2!=r^V|IOpg?6_=T5e%22#3Wq4E7J!lx2Ueg72JsS*?a7B= zAA)}WU{G)*W!XU|0x2+n;_Ji%MZf~;S-9~@N00skKO)FDvOx`dkHBFFps-9u4lE;a zt1w`hI94~=fo!3zci;Qgf+fu?tkB`laUfPm@Kr%^fdT*QSBL8TD{P{2U&6#%biAemiz z9kr1)x z;ZVhd@0;q16p^h!0S7eTQ%EM5e+B>Vfl;@J1EU1<3j+@*qmow`kT-z>&NaB5Zwn!q zKufw*03jdkA1!5Kq-; - - - -No Title - - - - - - - - - - - -next -up -previous -
    - Next: Background -
    -
    - - -

    -

    -Multi-threading support in deal.II - -

    -
    -
    - -

    -Wolfgang Bangerth -
    -University of Heidelberg -
    -
    -March 2000 -

    -

    - -

    Abstract:

    -
    -In this report, we describe the implementational techniques of - multi-threading support in deal.II, which we use for the - parallelization of independent operations. Writing threaded programs in - C++ is obstructed by two problems: operating system dependent - interfaces and that these interfaces are created for C programs - rather than for C++. We present our solutions to these problems and - describe first experiences using multi-threading in deal.II. -
    -

    -

    -


    - -  - - -

    -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/multithreading/multithreading.css b/deal.II/doc/reports/multithreading/multithreading.css deleted file mode 100644 index 5a961f9951..0000000000 --- a/deal.II/doc/reports/multithreading/multithreading.css +++ /dev/null @@ -1,56 +0,0 @@ - -body { background-image: none; - background-color: white; - } - -frameset { background-color: white; - border-color: white; - border: 0; - frameborder: 0; - } - -td { vertical-align: top; } - -dt { font-weight: bold; } - -.figure { font-weight: bold; - font-size: larger; - } - -.pagetoc {} - -.chapter_title {} - -span.parhead { font-weight: bold; - } - -span.example { font-weight: bold; - font-style: italic; - } -pre.example { padding-left: 2 em; - text-align: left; - text-indent: 0; - } - -table.navbar { } - - - -/* Century Schoolbook font is very similar to Computer Modern Math: cmmi */ -.MATH { font-family: "Century Schoolbook", serif; } -.MATH I { font-family: "Century Schoolbook", serif; font-weight: bold } -.BOLDMATH { font-family: "Century Schoolbook", serif; font-weight: bold } - -/* implement both fixed-size and relative sizes */ -SMALL.XTINY { font-size : xx-small } -SMALL.TINY { font-size : x-small } -SMALL.SCRIPTSIZE { font-size : smaller } -SMALL.FOOTNOTESIZE { font-size : small } -SMALL.SMALL { } -BIG.LARGE { } -BIG.XLARGE { font-size : large } -BIG.XXLARGE { font-size : x-large } -BIG.HUGE { font-size : larger } -BIG.XHUGE { font-size : xx-large } - -/* document-specific styles come next */ diff --git a/deal.II/doc/reports/multithreading/node1.html b/deal.II/doc/reports/multithreading/node1.html deleted file mode 100644 index 9d0c6456f9..0000000000 --- a/deal.II/doc/reports/multithreading/node1.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - -Background - - - - - - - - - - - - - - -next - -up - -previous -
    - Next: Threads - Up: No Title - Previous: No Title -
    -
    - - -

    -Background -

    - -

    -Realistic finite element simulations tend to use enormous amounts of computing -time and memory. Scientists and programmers have therefore long tried to use -the combined power of several processors or computers to tackle these -problems. - -

    -The usual approach is to use physically separated computers (e.g. clusters) or -computing units (e.g. processor nodes in a parallel computer), each of which -is equipped with its own memory, and split the problem at hand into separate -parts which are then solved on these computing units. Unfortunately, this -approach tends to pose significant problems, both for the mathematical -formulation as well as for the application programmer, which make the -development of such programs overly difficult and expensive. - -

    -For these reasons, parallelized implementations and their -mathematical background are still subject to intense research. In recent -years, however, multi-processor machines have been developed, which pose a -reasonable alternative to small parallel computers with the advantage of -simple programming and the possibility to use the same mathematical -formulation that can also be used for single-processor machines. These -computers typically have between two and eight processors that can access the -global memory at equal cost. - -

    -Due to this uniform memory access (UMA) architecture, communication can be -performed in the global memory and is no more costly than access to any other -memory location. Thus, there is also no more need to change the mathematical -formulation to reduce communication, and programs using this architecture look -very much like programs written for single processor machines. - -

    -The purpose of this report is to explain the techniques used in -deal.II (see [1,2]) -by which we try to program these computers. We will first -give a brief introduction in what threads are and what the problems are which -we have to solve when we want to use multi-threading. The third section takes an -in-depth look at the way in which the functionality of the operating system is -represented in a C++ program in order to allow simple and robust -programming; in particular, we describe the design decisions which led us to -implement these parts of the library in the way they are implemented. In the -fourth section, we show several examples of parallelization and explain how -they work. Readers who are more interested in actually using the framework -laid out in this report, rather than the internals, may skip Section 3 and go -directly to the applications in Section 4 (page -[*]). - - -

    -Note (2003-01-11): In this report we frequently make reference to the -ACE -(Adaptive Communications Environment) library. This library has been used -in previous versions of the library to start and control threads, and to -provide other multithreading features in a cross-platform way. We dropped -support for ACE after version 3.4 of the deal.II library -since we found that using POSIX functions instead is much simpler to -support. One of the main problems with ACE was the complicated installation, -while POSIX functions are provided by most modern system's C libraries. - -

    Since the features we used from ACE are limited to the features that POSIX -also provides for multithreading, the impact of this replacement on the -underlying foundations used in this report are minor, and can be ignored. - -

    -


    - - -next - -up - -previous -
    - Next: Threads - Up: No Title - Previous: No Title - -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/multithreading/node10.html b/deal.II/doc/reports/multithreading/node10.html deleted file mode 100644 index 49373d991e..0000000000 --- a/deal.II/doc/reports/multithreading/node10.html +++ /dev/null @@ -1,311 +0,0 @@ - - - - -Assembling the matrix - - - - - - - - - - - - - - -next - -up - -previous -
    - Next: Parallel Jacobi preconditioning - Up: Applications - Previous: Writing output detached to -
    -
    - - -

    -Assembling the matrix -

    - -

    -Setting up the system matrix is usually done by looping over all cells and -computing the contributions of each cell separately. While the computations of -the local contributions is strictly independent, we need to transfer these -contributions to the global matrix afterward. This transfer has to be -synchronized, in order to avoid that one thread overwrites values that another -thread has just written. - -

    -In most cases, building the system matrix in parallel will look like the -following template: -

    -    void MainClass::build_matrix () {
    -      // define how many threads will be used (here: 4)
    -      const unsigned int n_threads = 4;
    -      const unsigned int n_cells_per_thread
    -             = triangulation.n_active_cells () / n_threads;
    -
    -      // define the Mutex that will be used to synchronise
    -      // accesses to the matrix
    -      ACE_Thread_Mutex mutex;
    -
    -      // define thread manager
    -      ACE_Thread_Manager thread_manager;
    -
    -      vector<DoFHandler<dim>::active_cell_iterator>
    -             first_cells (n_threads),
    -             end_cells (n_threads);
    -
    -      DoFHandler<dim>::active_cell_iterator 
    -             present_cell = dof_handler.begin_active ();
    -      for (unsigned int thread=0; thread<n_threads; ++thread)
    -        {
    -          // for each thread: first determine the range of cells on
    -          // which it shall operate:
    -          first_cells[thread] = present_cell;
    -
    -          end_cells[thread] = first_cells[thread];
    -          if (thread != n_threads-1)
    -            for (unsigned int i=0; i<n_cells_per_thread; ++i)
    -              ++end_cells[thread];
    -          else
    -             end_cells[thread] = dof_handler.end();
    -
    -          // now start a new thread that builds the contributions of
    -          // the cells in the given range
    -          Threads::spawn (thread_manager,
    -                   Threads::encapsulate(&MainClass::build_matrix_threaded)
    -                         .collect_args (this,
    -                                        first_cells[thread], 
    -                                        end_cells[thread],
    -                                        mutex));
    -
    -          // set start iterator for next thread
    -          present_cell = end_cells[thread];
    -        };
    -
    -      // wait for the threads to finish
    -      thread_manager.wait ();
    -    };
    -
    -
    -    void MainClass::build_matrix_threaded 
    -         (const DoFHandler<dim>::active_cell_iterator &first_cell,
    -          const DoFHandler<dim>::active_cell_iterator &end_cell,
    -          ACE_Thread_Mutex                            &mutex) 
    -    {
    -      FullMatrix<double>   cell_matrix;
    -      vector<unsigned int> local_dof_indices;
    -
    -      DoFHandler<dim>::active_cell_iterator cell;
    -      for (cell=first_cell; cell!=end_cell; ++cell)
    -        {
    -          // compute the elements of the cell matrix
    -          ...
    -
    -          // get the indices of the DoFs of this cell
    -          cell->get_dof_indices (local_dof_indices);
    -
    -          // now transfer local matrix into the global one.
    -          // synchronise this with the other threads
    -          mutex.acquire ();
    -          for (unsigned int i=0; i<dofs_per_cell; ++i)
    -            for (unsigned int j=0; j<dofs_per_cell; ++j)
    -              global_matrix.add (local_dof_indices[i],
    -                                 local_dof_indices[j],
    -                                 cell_matrix(i,j));
    -          mutex.release ();
    -        };
    -    };
    -
    -

    -Note that since the build_matrix_threaded function takes its -arguments as references, we have to make sure that the variables to which -these references point live at least as long as the spawned threads. It is -thus not possible to use the same variables for start and end iterator for all -threads, as the following example would do: -

    -      ....
    -      DoFHandler<dim>::active_cell_iterator 
    -             first_cell = dof_handler.begin_active ();
    -      for (unsigned int thread=0; thread<n_threads; ++thread)
    -        {
    -          // for each thread: first determine the range of threads on
    -          // which it shall operate:
    -          DoFHandler<dim>::active_cell_iterator end_cell = first_cell;
    -          if (thread != n_threads-1)
    -            for (unsigned int i=0; i<n_cells_per_thread; ++i)
    -              ++end_cell;
    -          else
    -             end_cell = dof_handler.end();
    -
    -          // now start a new thread that builds the contributions of
    -          // the cells in the given range
    -          Threads::spawn (thread_manager,
    -                 Threads::encapsulate(&MainClass::build_matrix_threaded)
    -                       .collect_args (this, first_cell, end_cell, mutex));
    -
    -          // set start iterator for next thread
    -          first_cell = end_cell;
    -        };
    -      ....
    -
    -

    -Since splitting a range of iterators (for example the range -begin_active() to end()) is a very common task when setting -up threads, there is a function -

    -    template <typename ForwardIterator>
    -    vector<pair<ForwardIterator,ForwardIterator> >
    -    split_range (const ForwardIterator &begin, const ForwardIterator &end,
    -                 const unsigned int n_intervals);
    -
    in the Threads namespace that splits the range -[begin,end) into n_intervals subintervals of -approximately the same size. - -

    -Using this function, the thread creation function can now be written as -follows: -

    -    void MainClass::build_matrix () {
    -      const unsigned int n_threads = 4;
    -      ACE_Thread_Mutex   mutex;
    -      ACE_Thread_Manager thread_manager;
    -
    -      // define starting and end point for each thread
    -      typedef DoFHandler<dim>::active_cell_iterator active_cell_iterator;
    -      vector<pair<active_cell_iterator,active_cell_iterator> >
    -           thread_ranges 
    -           = split_range<active_cell_iterator> (dof_handler.begin_active (),
    -                                                dof_handler.end (),
    -                                                n_threads);
    -
    -      for (unsigned int thread=0; thread<n_threads; ++thread)
    -        spawn (thread_manager,
    -               encapsulate(&MainClass::build_matrix_threaded)
    -                    .collect_args (this,
    -                                   thread_ranges[thread].first,
    -                                   thread_ranges[thread].second,
    -                                   mutex));
    -
    -      thread_manager.wait ();
    -    };
    -
    We have here omitted the Threads:: prefix to make things more -readable. Note that we had to explicitly specify the iterator type -active_cell_iterator to the split_range function, since -the two iterators given have different type (dof_handler.end() has -type DoFHandler<dim> :: raw_cell_iterator, which can be converted to -DoFHandler<dim>::active_cell_iterator) and C++ requires that either -the type is explicitly given or the type be unique. - -

    -A word of caution is in place here: since usually in finite element -computations, the system matrix is ill-conditioned, small changes in a data -vector or the matrix can lead to significant changes in the output. -Unfortunately, since the order in which contributions to elements of the -matrix or vector are computed can not be predicted when using multiple -threads, round-off can come into play here. For example, taken from a -real-world program, the following contributions for an element of a right hand -side vector are computed from four cells: - --3.255208333333328815, - - --3.255208333333333694, - --3.255208333333333694, and - --3.255208333333331526; -however, due to round-off the sum of these numbers depends on the order in -which they are summed up, such that the resulting element of the vector -differed depending on the number of threads used, the number of other programs -on the computer, and other random sources. In subsequent runs of exactly the -same programs, the sum was either - --13.02083333333332827 or - - --13.02083333333332610. Although the difference is still only in the range -of round-off error, it caused a change in the fourth digit of a derived, very -ill-conditioned quantity after the matrix was inverted several times (this -accuracy in this quantity was not really needed, but it showed up in the -output and also led to different grid refinement due to comparison with other -values of almost the same size). Tracking down the source of such problems is -extremely difficult and frustrating, since they occur non-deterministically in -subsequent runs of the same program, and it can take several days until the -actual cause is found. - -

    -One possible work-around is to reduce the accuracy of the summands such that -the value of the sum becomes irrespective of the order of the summands. One, -rather crude method is to use a conversion to data type float and -back; the update loop from above would then look as follows: -

    -          for (unsigned int i=0; i<dofs_per_cell; ++i)
    -            for (unsigned int j=0; j<dofs_per_cell; ++j)
    -              global_matrix.add (local_dof_indices[i],
    -                                 local_dof_indices[j],
    -                                 static_cast<float>(cell_matrix(i,j)));
    -
    Note that the cast back to double is performed here implicitly. The -question whether a reduction in accuracy in the order shown here is tolerable, -is problem dependent. There are methods that lose less accuracy than shown -above. - -

    -The other, less computationally costly possibility would be to decrease the -accuracy of the resulting sum, in the hope that all accumulated round-off -error is deleted. However, this is unsafe since the order dependence remains -and may even be amplified if the values of the sum lie around a boundary where -values are rounded up or down when reducing the accuracy. Furthermore, -problems arise if the summands have different signs and the result of -summation consists of round-off error only. - -

    -


    - - -next - -up - -previous -
    - Next: Parallel Jacobi preconditioning - Up: Applications - Previous: Writing output detached to - -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/multithreading/node11.html b/deal.II/doc/reports/multithreading/node11.html deleted file mode 100644 index c169df46e3..0000000000 --- a/deal.II/doc/reports/multithreading/node11.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - -Parallel Jacobi preconditioning - - - - - - - - - - - - - -next - -up - -previous -
    - Next: Conclusions - Up: Applications - Previous: Assembling the matrix -
    -
    - - -

    -Parallel Jacobi preconditioning -

    - -

    -When preconditioning a matrix, for example in a Conjugate Gradients solver, -one may choose the Jacobi scheme for preconditioning. The preconditioned -vector $\tilde v$ -is computed from the vector v using the following -relationship: -

    -
    - - - -\begin{displaymath}\tilde v_i = \frac 1{a_{ii}} v_i,
-\end{displaymath} -
    -
    -

    -where aii are the diagonal elements of the matrix which we are presently -inverting. As is obvious, the result of preconditioning one element of v is -entirely independent of all other elements, so this operation is trivially -parallelizable. In practice, this is done by splitting the interval [0,n)into equal parts - -$[n_i,n_{i+1}), i=0,\dots,p-1$, -where n is the size of the -matrix, and p is the number of processors. Obviously, - -n0=0, np=n, and - - -ni<ni+1. - -

    -Just like for splitting a range of iterators using the function -split_range used above, there is a function -

    -    vector<pair<unsigned int, unsigned int> >
    -    split_interval (const unsigned int &begin, const unsigned int &end,
    -                    const unsigned int n_intervals);
    -
    that splits the interval [begin,end) into n_intervals equal -parts. This function will be used to assign each processor its share of -elements vi. - -

    -Furthermore, we will use some functionality provided by the -MultithreadInfo class in deal.II. Upon start-up of the -library, the static variable multithread_info.n_cpus is set to the -number of processors in the computer the program is presently running on. -multithread_info is a global variable of type -MultithreadInfo available in all parts of the library. Furthermore, -there is a variable multithread_info.n_default_threads, which by -default is set to n_cpus, but which can be changed by the user; it -denotes the default number of threads which the library shall use whenever -multi-threading is implemented for some operation. We will use this variable to -decide how many threads shall be used to precondition the vector. - -

    -The implementation of the preconditioning function then looks like this: -

    -                        // define an abbreviatory data type for an interval
    -    typedef pair<unsigned int, unsigned int> Interval;
    -
    -    void Preconditioner::precondition_jacobi (const Matrix &m,
    -                                              const Vector &v,
    -                                              Vector       &v_tilde) {
    -                            // define an abbreviation to the number
    -                            // of threads which we will use
    -      const unsigned int n_threads = multithread_info.n_default_threads;
    -                            // first split the interval into equal pieces
    -      vector<Interval> intervals = Threads::split_interval (0, m.rows(),
    -                                                            n_threads);
    - 
    -                            // then define a thread manager
    -      ACE_Thread_Manager thread_manager;
    -                            // and finally start all the threads:
    -      for (unsigned int i=0; i<n_threads; ++i)
    -        Threads::spawn (thread_manager,
    -                   Threads::encapsulate (&Preconditioner::threaded_jacobi)
    -                          .collect_args (this, m, v, v_tilde, intervals[i]));
    -  
    -                            // wait for all the threads to finish
    -      thread_manager.wait ();
    -    };
    -
    -
    -    void Preconditioner::threaded_jacobi (const Matrix   &m,
    -                                          const Vector   &v,
    -                                          Vector         &v_tilde,
    -                                          const Interval &interval) {
    -                           // apply the preconditioner in the given interval
    -      for (unsigned int i=interval.first; i<interval.second; ++i)
    -        v_tilde(i) = v(i) / m(i,i);
    -    };
    -
    -

    -It is noted, however, that more practical preconditioners are usually not -easily parallelized. However, matrix-vector and vector-vector operations can -often be reduced to independent parts and can then be implemented using -multiple threads. - -

    -


    - - -next - -up - -previous -
    - Next: Conclusions - Up: Applications - Previous: Assembling the matrix - -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/multithreading/node12.html b/deal.II/doc/reports/multithreading/node12.html deleted file mode 100644 index 5e6fd4cef3..0000000000 --- a/deal.II/doc/reports/multithreading/node12.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - -Conclusions - - - - - - - - - - - - - - -next - -up - -previous -
    - Next: Bibliography - Up: No Title - Previous: Parallel Jacobi preconditioning -
    -
    - - -

    -Conclusions -

    - -

    -We have shown how multi-threading is supported in deal.II and how it -can be used in several examples occurring in common finite element programs. It -was demonstrated that implementing a usable C++ interface poses several -difficulties, both from the aspect of user friendliness as well as program -correctness. In order to overcome these difficulties, first the more simple -framework implemented in deal.II version 3.0 was discussed, followed -by a rather complex scheme which will be the base of implementations in future -versions. - -

    -The second framework features a more complicated hierarchy of classes as well -as intricate use of templates and synchronization mechanisms, which however -led to a design in which threads can be created in a user friendly, system -independent, C++ like way suitable for common programs. The use of this -framework is inherently safe and does not require special knowledge of the -internals by the user, and is simple to use. By using it, the overhead -required for programming multi-threaded applications is reduced to a minimum -and the programmer can concentrate on the task of getting the semantics of -multi-threaded programs right, in particular managing concurrent access to -data and distributing work to different threads. - -

    -The framework has been used in several application programs and has shown that -with only marginally increased programming effort, finite element programs can -be made significantly faster on multi-processor machines. -
    - -

    - -

    -Acknowledgments. -

    The author would like to thank Thomas Richter -for his work in parallelizing several parts of the deal.II library, -and Ralf Hartmann for help in the preparation of this report. - -

    - -


    - - -next - -up - -previous -
    - Next: Bibliography - Up: No Title - Previous: Parallel Jacobi preconditioning - -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/multithreading/node13.html b/deal.II/doc/reports/multithreading/node13.html deleted file mode 100644 index b28522f579..0000000000 --- a/deal.II/doc/reports/multithreading/node13.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - -Bibliography - - - - - - - - - - - - - - -next - -up - -previous -
    - Next: About this document ... - Up: No Title - Previous: Conclusions -

    - -

    Bibliography -

    -

    1 -
    -Wolfgang Bangerth and Guido Kanschat. -
    Concepts for object-oriented finite element software - the - deal.II library. -
    Preprint 99-43, SFB 359, Universität Heidelberg, October 1999. - -

    2 -
    -Wolfgang Bangerth and Guido Kanschat. -
    deal.II Differential Equations Analysis Library, - Technical Reference. -
    IWR Heidelberg, October 1999. -
    http://gaia.iwr.uni-heidelberg.de/~deal/. - -

    3 -
    -H. Custer. -
    Inside Windows NT. -
    Microsoft Press, Redmont, Washington, 1993. - -

    4 -
    -Douglas C. Schmidt et al. -
    WWW homepage of the Adaptive Communications Environment - ACE, http://www.cs.wustl.edu/~schmidt/ACE.html. - -

    5 -
    -J. Eykholt, S. Kleinman, S. Barton, R. Faulkner, A. Shivalingiah, M. Smith, - D. Stein, J. Voll, M. Weeks, and D. Williams. -
    Beyon multiprocessing... Multithreading the SunOS kernel. -
    In Proceedings of the Summer USENIX C++ Technical Conference, - San Antonio, Texas, June 1992. - -

    6 -
    -IEEE. -
    Threads extensions for portable operating systems. -
    Technical report, IEEE, 1995. - -

    7 -
    -Douglas C. Schmidt. -
    ACE: an object-oriented framework for developing distributed - applications. -
    In Proceedings of the Sixth USENIX C++ Technical Conference, - Cambridge, Massachusetts. USENIX Association, April 1994. - -

    8 -
    -Douglas C. Schmidt and Nanbor Wang. -
    An OO encapsulation of lightweight OS concurrency mechanisms - in the ACE toolkit. -
    Technical Report WUCS-95-31, Washington University, St. Louis, 1995. -
    - -

    -


    -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/multithreading/node14.html b/deal.II/doc/reports/multithreading/node14.html deleted file mode 100644 index c93ca784b6..0000000000 --- a/deal.II/doc/reports/multithreading/node14.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - -About this document ... - - - - - - - - - - - -next - -up - -previous -
    - Up: No Title - Previous: Bibliography -
    -
    - - -

    - About this document ... -

    -

    -This document was generated using the -LaTeX2HTML translator Version 98.1p1 release (March 2nd, 1998) -

    -Copyright © 1993, 1994, 1995, 1996, 1997, -Nikos Drakos, -Computer Based Learning Unit, University of Leeds. -

    -The command line arguments were:
    - latex2html -split 5 -antialias multithreading.tex. -

    -The translation was initiated by Wolfgang Bangerth on 2000-04-20 -


    -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/multithreading/node2.html b/deal.II/doc/reports/multithreading/node2.html deleted file mode 100644 index 088d0d77e7..0000000000 --- a/deal.II/doc/reports/multithreading/node2.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - -Threads - - - - - - - - - - - - - - -next - -up - -previous -
    - Next: Creating and managing threads - Up: No Title - Previous: Background -
    -
    - - -

    -Threads -

    - -

    -The basic entity for programming multi-processor machines are -threads. They represent parts of the program which are executed in -parallel. Threads can be considered as separate programs that work on the same -main memory. On single-processor machines, they are simulated by letting each -thread run for some time (usually a few milliseconds) before switching to the -next thread. On multi-processor machines, threads can truly be executed in -parallel. In order to let programs use more than one thread (which would be -the regular sequential program), several aspects need to be covered: -

      -
    • How do we assign operations to different threads? Of course, operations - which depend on each other must not be executed in reverse order. This can - be achieved by only letting independent operations run on different threads, - or by using synchronization methods. this is mostly a question of program - design and thus problem dependent, which is why both aspects will only be - briefly touched below. -
    • How does the operating system and the whole programming environment - support this? -
    As mentioned, only the second aspect can be canonicalized, so we will treat it -first. Some examples of actual parallelized applications are discussed in -Section 4. - -

    -


    - - -next - -up - -previous -
    - Next: Creating and managing threads - Up: No Title - Previous: Background - -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/multithreading/node3.html b/deal.II/doc/reports/multithreading/node3.html deleted file mode 100644 index bbee3591d6..0000000000 --- a/deal.II/doc/reports/multithreading/node3.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - -Creating and managing threads - - - - - - - - - - - - - - -next - -up - -previous -
    - Next: Operating system dependence and - Up: No Title - Previous: Threads -
    -
    - - -

    -Creating and managing threads -

    - -

    -


    - -  - - -

    -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/multithreading/node4.html b/deal.II/doc/reports/multithreading/node4.html deleted file mode 100644 index bbae54ec83..0000000000 --- a/deal.II/doc/reports/multithreading/node4.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - -Operating system dependence and ACE - - - - - - - - - - - - - - -next - -up - -previous -
    - Next: C interface to threads - Up: Creating and managing threads - Previous: Creating and managing threads -
    -
    - - -

    -Operating system dependence and ACE -

    - -

    -While all relevant operating systems now support multi-threaded programs, they -all have different notions on what threads actually are on an operating system -level, how they shall be managed and created. Even on Unix systems, which are -usually well-standardized, there are at least three different and mutually -incompatible interfaces to threads: POSIX threads [6], -Solaris threads [5], and Linux -threads. Some operating systems support more than one interface, but there is -no interface that is supported by all operating systems. Furthermore, other -systems like Microsoft Windows have interfaces that are incompatible to all -Unix systems [3]. - -

    -Writing multi-threaded programs based on the operating system interfaces is -therefore something inherently incompatible unless much effort is spent to -port it to a new system. To avoid this, we chose to use the ACE (Adaptive -Communication Environment, see [7,8,4]) library which encapsulates -the operating system dependence and offers a uniform interface to the user. - -

    -We chose ACE over other libraries, since it runs on almost all relevant -platforms, including most Unix systems and Microsoft Windows, -and since it is to our knowledge the only library which is actively developed by a -large group. Furthermore, -it also is significantly larger than only thread management, offering -interprocess communication and communication between different computers, as -well as many other services. Contrary to most other libraries, it therefore -offers both the ability to support a growing deal.II as well as the -prospect to support independence also with respect to future platforms. - -

    -


    - - -next - -up - -previous -
    - Next: C interface to threads - Up: Creating and managing threads - Previous: Creating and managing threads - -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/multithreading/node5.html b/deal.II/doc/reports/multithreading/node5.html deleted file mode 100644 index 0cc08edd19..0000000000 --- a/deal.II/doc/reports/multithreading/node5.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - -C interface to threads versus C++ - - - - - - - - - - - - - - -next - -up - -previous -
    - Next: First approach - Up: Creating and managing threads - Previous: Operating system dependence and -
    -
    - - -

    -C interface to threads versus C++ -

    - -

    -While ACE encapsulates almost all of the synchronization and interprocess -interface into C++ classes, it for some reason does not do so for -thread creation. Rather it only offers the basic C interface: -when creating a new thread, a function is called which has the following -signature:

    -

    Code sample 1   -
    -    void *  f (void * arg);
    -

    -Thus, only functions which take a single parameter of type void* and -return a void* may be called. Further, these functions must be global -or static member functions, as opposed to true member functions of -classes. This is not in line with the C++ philosophy and in fact does -not fit well into deal.II as well: there is not a single function in -the library that has this signature. - -

    -The task of multi-threading support in deal.II is therefore to -encapsulate member functions, arbitrary types and numbers of parameters, and -return types of functions into mechanisms built atop of ACE. This has been -done twice for deal.II, and we will explain both approaches. At -present, i.e. with version 3.0, only the first approach is distributed with -deal.II, since the second is still experimental and due to the high -complexity. The latter approach, however, has clear advantages over the first -one, and it is planned to switch to it in the next major version of -deal.II. - -

    -


    - - -next - -up - -previous -
    - Next: First approach - Up: Creating and managing threads - Previous: Operating system dependence and - -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/multithreading/node6.html b/deal.II/doc/reports/multithreading/node6.html deleted file mode 100644 index 3e3b4af662..0000000000 --- a/deal.II/doc/reports/multithreading/node6.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - -First approach - - - - - - - - - - - - - - -next - -up - -previous -
    - Next: Second approach - Up: Creating and managing threads - Previous: C interface to threads -
    -
    - - -

    -First approach -

    - -

    -The first idea is the following: assume that we have a class -TestClass

    -

    Code sample 2   -
    -    class TestClass {
    -      public:
    -        void test_function (int i, double d);
    -    };
    -

    -and we would like to call -test_object.test_function(1,3.1415926) on a newly created -thread, where test_object is -an object of type TestClass. We then need an object that encapsulates -the address of the member function, a pointer to the object for which we want -to call the function, and both parameters. This class would be suitable:

    -

    Code sample 3   -
    -    struct MemFunData {
    -        typedef void (TestClass::*MemFunPtr) (int, double);
    -        MemFunPtr  mem_fun_ptr;
    -        TestClass *object;
    -        int        arg1;
    -        double     arg2;
    -    };
    -

    - -

    -We further need a function that satisfies the signature required by the -operating systems (or ACE, respectively), see Code Sample -1, and that can call the member function -if we pass it an object of type MemFunData:

    -

    Code sample 4   -
    -    void * start_thread (void *arg_ptr) {
    -                        // first reinterpret the void* as a
    -                        // pointer to the object which
    -                        // encapsulates the arguments
    -                        // and addresses:
    -      MemFunData *mem_fun_data
    -            = reinterpret_cast<MemFunData *>(arg_ptr);
    -                        // then call the member function:
    -      (mem_fun_data->object)
    -            ->*(mem_fun_data->mem_fun_ptr) (mem_fun_data->arg1,
    -                                            mem_fun_data->arg2);
    -                        // since the function does not return
    -                        // a value, we do so ourselves:
    -      return 0;
    -    };
    -

    -Such functions are called trampoline functions since they only serve -as jump-off point for other functions. - -

    -We can then perform the desired call using the following sequence of commands: -

    -    MemFunData mem_fun_data;
    -    mem_fun_data.mem_fun_ptr = &TestClass::test_function;
    -    mem_fun_data.object      = &test_object;
    -    mem_fun_data.arg1        = 1;
    -    mem_fun_data.arg2        = 3.1415926;
    -    
    -    ACE_Thread_Manager::spawn (&start_thread,
    -                               (void*)&mem_fun_data);
    -
    ACE_Thread_Manager::spawn is the function from ACE that actually -calls the operating system and tells it to create a new thread and call the -function which it is given as first parameter (here: start_thread) -with the parameter which is given as second parameter. start_thread, -when called, will then get the address of the function which we wanted to call -from its parameter, and call it with the values we wanted as arguments. - -

    -In practice, this would mean that we needed a structure like -MemFunData and a function like start_thread for each class -TestClass and all functions test_function with different -signatures. This is clearly not feasible in practice and places an -inappropriate burden on the programmer who wants to use multiple threads in -his program. Fortunately, C++ offers an elegant way for this problem, -in the form of templates: we first define a data type which encapsulates -address and arguments for all binary functions:

    -

    Code sample 5   -
    -    template <typename Class, typename Arg1, typename Arg2>
    -    struct MemFunData {
    -        typedef void (Class::*MemFunPtr) (Arg1, Arg2);
    -        MemFunPtr  mem_fun_ptr;
    -        Class     *object;
    -        Arg1       arg1;
    -        Arg2       arg2;
    -    };
    -

    -Next, we need a function that can process these arguments:

    -

    Code sample 6   -
    -    template <typename Class, typename Arg1, typename Arg2>
    -    void * start_thread (void *arg_ptr) {
    -      MemFunData<Class,Arg1,Arg2> *mem_fun_data
    -            = reinterpret_cast<MemFunData<Class,Arg1,Arg2>*>(arg_ptr);
    -      (mem_fun_data->object)
    -            ->*(mem_fun_data->mem_fun_ptr) (mem_fun_data->arg1,
    -                                            mem_fun_data->arg2);
    -      return 0;
    -    };
    -

    -Then we can start the thread as follows: -
    -    MemFunData<TestClass,int,double>  mem_fun_data;
    -    mem_fun_data.mem_fun_ptr = &TestClass::test_function;
    -    mem_fun_data.object      = &test_object;
    -    mem_fun_data.arg1        = 1;
    -    mem_fun_data.arg2        = 3.1415926;
    -    
    -    ACE_Thread_Manager::spawn (&start_thread<TestClass,int,double>,
    -                               (void*)&mem_fun_data);
    -
    Here we first create an object which is suitable to encapsulate the parameters -of a binary function that is a member function of the TestClass class -and takes an integer and a double. Then we start the thread using the correct -trampoline function. It is the user's responsibility to choose the correct -trampoline function (i.e. to specify the correct template parameters) since -the compiler only sees a void* and cannot do any type checking. - -

    -We can further simplify the process and remove the user responsibility by -defining the following class and function:

    -

    Code sample 7   -
    -    class ThreadManager : public ACE_Thread_Manager {
    -      public:
    -        template <typename Class, typename Arg1, typename Arg2>
    -        static void 
    -        spawn (MemFunData<Class,Arg1,Arg2> &MemFunData) {
    -          ACE_Thread_Manager::spawn (&start_thread<Class,Arg1,Arg2>,
    -                                     (void*)&MemFunData);
    -        };
    -    };
    -

    -This way, we can call -
    -    ThreadManager::spawn (mem_fun_data);
    -
    and the compiler will figure out which the right trampoline function is, since -it knows the data type of mem_fun_data and therefore the values of -the template parameters in the ThreadManager:: spawn function. - -

    -The way described above is basically the way which is used in deal.II -version 3.0. Some care has to be paid to details, however. In particular, -C++ functions often pass references as arguments, which however are -not assignable after initialization. Therefore, the MemFunData class -needs to have a constructor, and arguments must be set through it. Assume, for -example, TestClass had a second member function -

    -        void f (int &i, double &d);
    -
    Then, we would have to use MemFunData<TestClass,int&,doubleSPMamp;>, -which in a form without templates would look like this: -
    -    struct MemFunData {
    -        typedef void (TestClass::*MemFunPtr) (int &, double &);
    -        MemFunPtr  mem_fun_ptr;
    -        TestClass *object;
    -        int       &arg1;
    -        double    &arg2;
    -    };
    -
    The compiler would require us to initialize the references to the two -parameters at construction time of the MemFunData object, since -it is not possible in C++ to change to which object a reference -points to after initialization. Adding a constructor to the -MemFunData class would then enable us to write -
    -    int    i = 1;
    -    double d = 3.1415926;
    -    MemFunData<TestClass,int&,double&>  
    -           mem_fun_data (&test_object, i, d, &TestClass::f);
    -
    Non-reference arguments could then still be changed after construction. For -historical reasons, the pointer to the member function is passed as last -parameter here. - -

    -The last point is that this interface is only usable for functions with two -parameters. Basically, the whole process has to be reiterated for any number -of parameters which we want to support. In deal.II, we therefore have -classes MemFunData0 through MemFunData10, corresponding to -member function that do not take parameters through functions that take ten -parameters. Equivalently, we need the respective number of trampoline -functions. - -

    -Additional thoughts need to be taken on virtual member functions and constant -functions. While the first are handled by the compiler (member function -pointers can also be to virtual functions, without explicitly stating so), the -latter can be achieved by writing -MemFunData<const TestClass,int,double>, which would be the correct -object if we had declared test_function constant. - -

    -Finally we note that it is often the case that one member function starts a -new thread by calling another member function of the same object. Thus, the -declaration most often used is the following: -

    -    MemFunData<TestClass,int&,double&>  
    -           mem_fun_data (this, 1, 3.1415926, &TestClass::f);
    -
    Here, instead of an arbitrary test_object, the present object is -used, which is represented by the this pointer. - -

    -


    - - -next - -up - -previous -
    - Next: Second approach - Up: Creating and managing threads - Previous: C interface to threads - -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/multithreading/node7.html b/deal.II/doc/reports/multithreading/node7.html deleted file mode 100644 index 0d05a9604a..0000000000 --- a/deal.II/doc/reports/multithreading/node7.html +++ /dev/null @@ -1,708 +0,0 @@ - - - - -Second approach - - - - - - - - - - - - - -next - -up - -previous -
    - Next: Applications - Up: Creating and managing threads - Previous: First approach -
    -
    - - -Subsections - - -
    - -

      -  -
    -Second approach -

    - -

    -While the approach outlined above works satisfactorily, it has one serious -drawback: the programmer has to provide the data types of the arguments of the -member function himself. While this seems to be a simple task, in practice it -is often not, as will be explained in the sequel. - -

    -To expose the problem, we take an example from one of our application programs -where we would like to call the function -

    -    template <int dim>
    -    void DoFHandler<dim>::distribute_dofs (const FiniteElement<dim> &,
    -                                           const unsigned int);
    -
    on a new thread. Correspondingly, we would need to use -
    -    MemFunData2<DoFHandler<dim>, const FiniteElement<dim> &, unsigned int>
    -        mem_fun_data (dof_handler, fe, 0,
    -                      &DoFHandler<dim>::distribute_dofs);
    -
    to encapsulate the parameters. However, if one forgets the const -specifier on the second template parameter, one receives the following error -message (using gcc 2.95.2): -
    -  test.cc: In method `void InterstepData<2>::wake_up(unsigned int, Interst
    -  epData<2>::PresentAction)':
    -  test.cc:683:   instantiated from here
    -  test.cc:186: no matching function for call to `ThreadManager::Mem_Fun_Da
    -  ta2<DoFHandler<2>,FiniteElement<2> &,unsigned int>::MemFunData2 (DoFHa
    -  ndler<2> *, const FiniteElement<2> &, int, void (DoFHandler<2>::*)(const
    -   FiniteElement<2> &, unsigned int))'
    -  /home/atlas1/wolf/program/newdeal/deal.II/base/include/base/thread_manag
    -  er.h:470: candidates are: ThreadManager::MemFunData2<DoFHandler<2>,Fin
    -  iteElement<2> &,unsigned int>::MemFunData2(DoFHandler<2> *, FiniteElem
    -  ent<2> &, unsigned int, void * (DoFHandler<2>::*)(FiniteElement<2> &, un
    -  signed int))
    -  /home/atlas1/wolf/program/newdeal/deal.II/base/include/base/thread_manag
    -  er.h:480:                 ThreadManager::MemFunData2<DoFHandler<2>,Fin
    -  iteElement<2> &,unsigned int>::MemFunData2(DoFHandler<2> *, FiniteElem
    -  ent<2> &, unsigned int, void (DoFHandler<2>::*)(FiniteElement<2> &, unsi
    -  gned int))
    -  /home/atlas1/wolf/program/newdeal/deal.II/base/include/base/thread_manag
    -  er.h:486:                 ThreadManager::MemFunData2<DoFHandler<2>,Fin
    -  iteElement<2> &,unsigned int>::MemFunData2(const ThreadManager::Mem_Fu
    -  n_Data2<DoFHandler<2>,FiniteElement<2> &,unsigned int> &)
    -
    -

    -While the compiler is certainly right to complain, the message is not very -helpful. Furthermore, since interfaces to functions sometimes change, for -example by adding additional default parameters that do not show up in usual -code, programs that used to compile do no more so with messages as shown -above. - -

    -Due to the lengthy and complex error messages, even very experienced -programmers usually need between five and ten minutes until they get an -expression like this correct. In most cases, they don't get it right in the -first attempt, so the time used for the right declaration dominates the whole -setup of starting a new thread. To circumvent this bottleneck at least in most -cases, we chose to implement a second strategy at encapsulating the parameters -of member functions. This is done in several steps: first let the compiler -find out about the right template parameters, then encapsulate the parameters, -use the objects, and finally solve some technical problems with virtual -constructors and locking of destruction. We will treat these steps -sequentially in the following. - -

    - -

    -Finding the correct template parameters. -

    -C++ offers the possibility of templatized functions that deduce their -template arguments themselves. In fact, we have used them in the -ThreadManager::spawn function in Code Sample 7 -already. Here, this can be used as follows: assume we have a -function encapsulation class -
    -    template <typename Class, typename Arg1, typename Arg2>
    -    class MemFunData { ... };
    -
    as above, and a function -
    -    template <typename Class, typename Arg1, typename Arg2>
    -    MemFunData<Class,Arg1,Arg2>
    -    encapsulate (void (Class::*mem_fun_ptr)(Arg1, Arg2)) {
    -      return MemFunData<Class,Arg1,Arg2> (mem_fun_ptr);
    -    };
    -
    Then, if we call this function with the test class of Code Sample -2 like this: -
    -    encapsulate (&TestClass::test_function);
    -
    it can unambiguously determine the template parameters to be -Class=TestClass, Arg1=int, Arg2=double. - -

    - -

    -Encapsulating the parameters. -

    -We should not try to include the argument values for the new thread right -away, for example by declaring encapsulate like this: -
    -    template <typename Class, typename Arg1, typename Arg2>
    -    MemFunData<Class,Arg1,Arg2>
    -    encapsulate (void (Class::*mem_fun_ptr)(Arg1, Arg2),
    -                 Arg1  arg1,
    -                 Arg2  arg2,
    -                 Class object) {
    -      return MemFunData<Class,Arg1,Arg2> (mem_fun_ptr, object, arg1, arg2);
    -    };
    -
    The reason is that for template functions, no parameter promotion is -performed. Thus, if we called this function as in -
    -    encapsulate (&TestClass::test_function,
    -                 1, 3,
    -                 test_object);
    -
    then the compiler would refuse this since from the function pointer it must -deduce that Arg2 = double, but from the parameter ``3'' it must assume -that Arg2 = int. The resulting error message would be similarly lengthy -as the one shown above. - -

    -One could instead write MemFunData like this: -

    -    template <typename Class, typename Arg1, typename Arg2>
    -    class MemFunData { 
    -      public:
    -        typedef void (Class::*MemFunPtr)(Arg1, Arg2);
    -
    -        MemFunData (MemFunPtr mem_fun_ptr_) {
    -          mem_fun_ptr = mem_fun_ptr_;
    -        };
    -
    -        void collect_args (Class *object_,
    -                           Arg1   arg1_,
    -                           Arg2   arg2_) {
    -          object = object_;
    -          arg1   = arg1_;
    -          arg2   = arg2_;
    -        };
    -
    -        MemFunPtr  mem_fun_ptr;
    -        Class     *object;
    -        Arg1       arg1;
    -        Arg2       arg2;
    -    };
    -
    One would then create an object of this type including the parameters to be -passed as follows: -
    -    encapsulate(&TestClass::test_function).collect_args(test_object, 1, 3);
    -
    Here, the first function call creates an object with the right template -parameters and storing the member function pointer, and the second one, -calling a member function, fills in the function arguments. - -

    -Unfortunately, this way does not work: if one or more of the parameter types -is a reference, then the respective reference variable needs to be initialized -by the constructor, not by collect_args. It needs to be known which -object the reference references at construction time, since later on only the -referenced object can be assigned, not the reference itself anymore. - -

    -Since we feel that we are close to a solution, we introduce one more -indirection, which indeed will be the last one:

    -

    Code sample 8   -
    -    template <typename Class, typename Arg1, typename Arg2>
    -    class MemFunData { 
    -      public:
    -        typedef void (Class::*MemFunPtr)(Arg1, Arg2);
    -
    -        MemFunData (MemFunPtr mem_fun_ptr_,
    -                      Class *object_,
    -                      Arg1   arg1_,
    -                      Arg2   arg2_) :
    -             mem_fun_ptr (mem_fun_ptr_),
    -             object      (object_),
    -             arg1        (arg1_),
    -             arg2        (arg2_)            {};
    -
    -        MemFunPtr  mem_fun_ptr;
    -        Class     *object;
    -        Arg1       arg1;
    -        Arg2       arg2;
    -    };
    -
    -
    -    template <typename Class, typename Arg1, typename Arg2>
    -    struct ArgCollector { 
    -        typedef void (Class::*MemFunPtr)(Arg1, Arg2);
    -
    -        ArgCollector (MemFunPtr mem_fun_ptr_) {
    -          mem_fun_ptr = mem_fun_ptr_;
    -        };
    -
    -        
    -        MemFunData<Class,Arg1,Arg2>
    -        collect_args (Class *object_,
    -                      Arg1   arg1_,
    -                      Arg2   arg2_) {
    -          return MemFunData<Class,Arg1,Arg2> (mem_fun_ptr, object,
    -                                              arg1, arg2);
    -        };
    -
    -        MemFunPtr  mem_fun_ptr;
    -    };
    -
    -
    -    template <typename Class, typename Arg1, typename Arg2>
    -    ArgCollector<Class,Arg1,Arg2>
    -    encapsulate (void (Class::*mem_fun_ptr)(Arg1, Arg2)) {
    -      return ArgCollector<Class,Arg1,Arg2> (mem_fun_ptr);
    -    };
    -

    - -

    -Now we can indeed write for the test class of Code Sample 2: -

    -    encapsulate(&TestClass::test_function).collect_args(test_object, 1, 3);
    -
    The first call creates an object of type ArgCollector<...> with the -right parameters and storing the member function pointer, while the second -call, a call to a member function of that -intermediate class, generates the final object we are interested in, including -the member function pointer and all necessary parameters. Since -collect_args already has its template parameters fixed from -encapsulate, it can convert between data types. - -

    - -

    -Using these objects. -

    -Now we have an object of the correct type -automatically generated, without the need to type in any template parameters -by hand. What can we do with that? First, we can't assign it to a variable of -that type, e.g. for use in several spawn commands: -
    -  MemFunData mem_fun_data = encapsulate(...).collect_args(...);
    -
    Why? Since we would then have to write the data type of that variable by hand: -the correct data type is not MemFunData as written above, but -MemFunData<TestClass,int,double>. Specifying all these template -arguments was exactly what we wanted to avoid. However, we can do some such -thing if the variable to which we assign the result is of a type which is a -base class of MemFunData<...>. Unfortunately, the data values that -MemFunData<...> encapsulates depend on the template parameters, so -the respective variables in which we store the values can only be placed in -the derived class and could not be copied when we assign the variable to a -base class object, since that does not have these variables. - -

    -What can we do here? Assume we have the following class structure:

    -

    Code sample 9   -
    -    class FunDataBase {};
    -
    -    template <...> class MemFunData : public FunDataBase 
    -    {  /* as above */ };
    -
    -    class FunEncapsulation {
    -      public:
    -        FunEncapsulation (FunDataBase *f)
    -                   : fun_data_base (f) {};
    -        FunDataBase *fun_data_base;
    -    };
    -
    -
    -    template <typename Class, typename Arg1, typename Arg2>
    -    FunEncapsulation
    -    ArgCollector<Class,Arg1,Arg2>::collect_args (Class *object_,
    -                                                 Arg1   arg1_,
    -                                                 Arg2   arg2_) {
    -      return new MemFunData<Class,Arg1,Arg2> (mem_fun_ptr, object,
    -                                              arg1, arg2);
    -    };
    -

    -Note that in the return statement of the collect_args function, -first a cast from MemFunData* to FunDataBase*, and then a -constructor call to FunEncapsulation :: FunEncapsulation (FunDataBase*) -was performed. - -

    -In the example above, the call to encapsulate(...).collect_args(...) -generates an object of type FunEncapsulation, which in turn stores a -pointer to an object of type FunDataBase, here to -MemFunData<...> with the correct template parameters. We can assign -the result to a variable the type of which does not contain any template -parameters any more, as desired: -

    -    FunEncapsulation 
    -        fun_encapsulation = encapsulate (&TestClass::test_function)
    -                                          .collect_args(test_object, 1, 3);
    -
    -

    -But how can we start a thread with this object if we have lost the full -information about the data types? This can be done as follows: add a variable -to FunDataBase which contains the address of a function that knows -what to do. This function is usually implemented in the derived classes, and -its address is passed to the constructor:

    -

    Code sample 10   -
    -    class FunDataBase {
    -      public:
    -        typedef void * (*ThreadEntryPoint) (void *);
    -
    -        FunDataBase (ThreadEntryPoint t) :
    -                 thread_entry_point (t) {};
    -
    -        ThreadEntryPoint thread_entry_point;
    -    };
    -
    -    template <...>
    -    class MemFunData : public FunDataBase {
    -      public:
    -                 // among other things, the constructor now does this:
    -        MemFunData () :
    -                 FunDataBase (&start_thread) {};
    -
    -        static void * start_thread (void *args) {
    -          // do the same as in Code Sample 4 above
    -        }
    -    };
    -
    -
    -    void spawn (ACE_Thread_Manager &thread_manager,
    -                FunEncapsulation   &fun_encapsulation) {
    -      thread_manager.spawn (*fun_encapsulation.fun_data_base
    -                                      ->thread_entry_point,
    -                            &fun_data_base);
    -    };
    -

    -fun_encapsulation.fun_data_base->thread_entry_point is given -by the derived class as that function that knows how to handle objects of the -type which we are presently using. Thus, we can now write the whole sequence -of function calls (assuming we have an object thread_manager of type -ACE_Thread_Manager): -
    -    FunEncapsulation 
    -        fun_encapsulation = encapsulate (&TestClass::test_function)
    -                                          .collect_args(test_object, 1, 3);
    -    spawn (thread_manager, fun_encapsulation);
    -
    This solves our problem in that no template parameters need to be specified by -hand any more. The only source for lengthy compiler error messages is if the -parameters to collect_args are in the wrong order or can not be -casted to the parameters of the member function which we want to call. These -problems, however, are much more unlikely in our experience, and are also much -quicker sorted out. - -

    - -

    -Virtual constructors. -

    While the basic techniques have been fully -developed now, there are some aspects which we still have to take care of. The -basic problem here is that the FunEncapsulation objects store a -pointer to an object that was created using the new operator. To -prevent a memory leak, we need to destroy this object at some time, preferably -in the destructor of FunEncapsulation: -
    -    FunEncapsulation::~FunEncapsulation () {
    -      delete fun_data_base;
    -    };
    -
    However, what happens if we have copied the object before? In particular, this -is always the case using the functions above: collect_args generates -a temporary object of type FunEncapsulation, but there could be other -sources of copies as well. If we do not take special precautions, only the -pointer to the object is copied around, and we end up with stale pointers -pointing to invalid locations in memory once the first object has been -destroyed. What we obviously need to do when copying objects of type -FunEncapsulation is to not copy the pointer but to copy the object -which it points to. Unfortunately, the following copy constructor is not -possible: -
    -    FunEncapsulation::FunEncapsulation (const FunEncapsulation &m) {
    -      fun_data_base = new FunDataBase (*m.fun_data_base);
    -    };
    -
    The reason, of course, is that we do not want to copy that part of the object -belonging to the abstract base class. But we can emulate something like this -in the following way (this programming idiom is called ``virtual -constructors''):

    -

    Code sample 11   -
    -    class FunDataBase {
    -      public:
    -        // as above
    -
    -        virtual FunDataBase * clone () const = 0;
    -    };
    -
    -    template <...>
    -    class MemFunData : public FunDataBase {
    -      public:
    -        // as above
    -
    -                          // copy constructor:
    -        MemFunData (const MemFunData<...> &mem_fun_data) {...};
    -
    -                          // clone the present object, i.e.
    -                          // create an exact copy:
    -        virtual FunDataBase * clone () const {
    -          return new MemFunData<...>(*this);
    -        };
    -    };
    -
    -
    -    FunEncapsulation::FunEncapsulation (const FunEncapsulation &m) {
    -      fun_data_base = m.fun_data_base->clone ();
    -    };
    -

    -Thus, whenever the FunEncapsulation object is copied, it creates a -copy of the object it harbors (the MemFunData<...> object), and -therefore always owns its copy. When the destructor is called, it is free to -delete its copy without affecting other objects (from which it may have been -copied, or to which it was copied). Similar to the copy constructor, we have -to modify the copy operator, as well. - -

    - -

    -Spawning independent threads. -

    - -

    -Often, one wants to spawn a thread which will have its own existence until it -finishes, but is in no way linked to the creating thread any more. An example -would be the following, assuming a function -TestClass::compress_file(const string file_name) exists and that -there is an object thread_manager not local to this function: -

    -  
    -    ...
    -    string file_name;
    -    ...    // write some output to a file
    -
    -    // now create a thread which runs `gzip' on that output file to reduce
    -    // disk space requirements. don't care about that thread any more
    -    // after creation, i.e. don't wait for its return
    -    FunEncapsulation 
    -        fun_encapsulation = encapsulate (&TestClass::compress_file)
    -                                  .collect_args(test_object, file_name);
    -    spawn (thread_manager, fun_encapsulation);
    -
    -    // quit the present function
    -    return;
    -
    The problem here is that the object fun_encapsulation goes out -of scope when we quit the present function, and therefore also deletes its -pointer to the data which we need to start the new thread. If in this case the -operating system was a bit lazy in creating the new thread, the function -start_thread would at best find a pointer pointing to an object -which is already deleted. Further, but this is obvious, if the function is -taking references or pointers to other objects, it is to be made sure that -these objects persist at least as long as the spawned thread runs. - -

    -What one would need to do here at least, is wait until the thread is started -for sure, before deletion of the FunEncapsulation is allowed. To -this end, we need to use a ``Mutex'', to allow for exclusive operations. A -Mutex (short for mutually exclusive) is an object managed by -the operating system and which can only be ``owned'' by one thread at a -time. You can try to ``acquire'' a Mutex, and you can later ``release'' it. If -you try to acquire it, but the Mutex is owned by another thread, then your -thread is blocked until the present owner releases it. Mutices (plural of -``Mutex'') are therefore most often used to guarantee that only one thread is -presently accessing some object: a thread that wants to access that object -acquires a Mutex related to that object and only releases it once the access -if finished; if in the meantime another thread wants to access that object as -well, it has to acquire the Mutex, but since the Mutex is presently owned -already, the second thread is blocked until the first one has finished its -access. - -

    -Alternatively, one can use Mutices to synchronize things. We will use it for -the following purpose: the Mutex is acquired by the starting thread; when -later the destructor of the FunEncapsulation class (running on the -same thread) is called, it tries to acquire the lock again; it will thus only -continue its operations once the Mutex has been released by someone, which we -do on the spawned thread once we don't need the data of the -FunEncapsulation object any more and destruction is safe. - -

    -All this can then be done in the following way:

    -

    Code sample 12   -
    -    class FunEncapsulation {
    -      public:
    -        ...       // as before
    -        ~FunEncapsulation ();
    -    };
    -
    -
    -    class FunDataBase {
    -      public:
    -        ...       // as before
    -        Mutex       lock;
    -    };
    -
    -    template <typename Class, typename Arg1, typename Arg2>
    -    void * start_thread (void *arg_ptr) {
    -      MemFunData<Class,Arg1,Arg2> *mem_fun_data
    -            = reinterpret_cast<MemFunData *>(arg_ptr);
    -
    -      // copy the data arguments:
    -      MemFunData<Class,Arg1,Arg2>::MemFunPtr
    -              mem_fun_ptr = mem_fun_data->mem_fun_ptr;
    -      Class * object      = mem_fun_data->object;
    -      Arg1    arg1        = mem_fun_data->arg1;
    -      Arg2    arg2        = mem_fun_data->arg2;
    -
    -      // data is now copied, so the original object may be deleted:
    -      mem_fun_data->lock.release ();
    -
    -      // now call the thread function:
    -      object->*mem_fun_ptr (arg1, arg2);
    -
    -      return 0;
    -    };
    -
    -
    -    FunEncapsulation::~FunEncapsulation () {
    -      // wait until the data is copied by the new thread and
    -      // `release' is called by `start_thread':
    -      fun_data_base->lock.acquire ();
    -      // now delete the object which is no more needed
    -      delete fun_data_base;
    -    };
    -
    -
    -    void spawn (ACE_Thread_Manager  &thread_manager,
    -                FunEncapsulation &fun_encapsulation) {
    -      // lock the fun_encapsulation object
    -      fun_encapsulation.fun_data_base->lock.acquire ();
    -      thread_manager.spawn (*fun_encapsulation.fun_data_base
    -                                      ->thread_entry_point,
    -                            &fun_data_base);
    -    };
    -

    -When we call spawn, we set a lock -on the destruction of the FunEncapsulation object just before we -start the new thread. This lock is only released when inside the new thread -(i.e. inside the start_thread function) all arguments have been -copied to a safe place. Now we have local copies and don't need the ones from the -fun_encapsulation object any more, which we indicate by -releasing the lock. Inside the destructor of that object, we wait until we can -obtain the lock, which is only after it has been released by the newly started -thread; after having waited till this moment, the destruction can go on -safely, and we can exit the function from which the thread was started, if we -like so. - -

    -The scheme just described also works if we start multiple threads using only -one object of type FunEncapsulation: -

    -    FunEncapsulation 
    -        fun_encapsulation = encapsulate (&TestClass::test_function)
    -                                  .collect_args(test_object, arg_value);
    -    spawn (thread_manager, fun_encapsulation);
    -    spawn (thread_manager, fun_encapsulation);
    -
    -    // quit the present function
    -    return;
    -
    Here, when starting the second thread the spawn function has to wait until the -newly started first thread has released its lock on the object; however, this -delay is small and should not pose a noticeable problem. Thus, no special -treatment of this case is necessary, and we can in a simple way emulate the -spawn_n function provided by most operating systems, which spawns -several new threads at once: -
    -    void spawn_n (ACE_Thread_Manager &thread_manager,
    -                  FunEncapsulation   &fun_encapsulation,
    -                  const unsigned int  n_threads) {
    -      for (unsigned int i=0; i<n_threads; ++i)
    -        spawn (thread_manager, fun_encapsulation);
    -    };
    -
    A direct support of the spawn_n function of the operating system -would be difficult, though, since each of the new threads would call -lock.release(), even though the lock was only acquired once. - -

    -Since we have now made sure that objects are not deleted too early, even the -following sequence is possible, which does not involve any named variables at -all, only a temporary one, which immediately released after the call to -spawn:

    -

    Code sample 13   -
    -    spawn (thread_manager, 
    -           encapsulate (&TestClass::test_function)
    -              .collect_args(test_object, arg_value));
    -

    -We most often use this very short idiom in the applications in Section -4 and in our own programs. - -

    - -

    -Number of parameters. Non-member functions. -

    -Above, we have explained how we can define classes for a binary member -function. This approach is easily extended to member functions taking any -number of parameters. We simply have to write classes MemFunData0, -MemFunData1, and so on, which encapsulate member functions that take -zero, one, etc parameters. Likewise, we have to have classes -ArgCollectorN for each number of parameters, and functions -encapsulate that return an object of type -ArgCollectorN. Since functions can be overloaded on their argument -types, we need not call the encapsulate functions differently. - -

    -All of which has been said above can also easily be adopted to global -functions or static member functions. Instead of the classes -MemFunDataN we can then use classes FunDataN that are also -derived from FunDataBase. The respective ArgCollector -classes then collect only the arguments, not the object on which we will -operate. The class, FunEncapsulation is not affected by this, nor is -FunDataBase. - -

    -


    - - -next - -up - -previous -
    - Next: Applications - Up: Creating and managing threads - Previous: First approach - -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/multithreading/node8.html b/deal.II/doc/reports/multithreading/node8.html deleted file mode 100644 index 95cdde1e4f..0000000000 --- a/deal.II/doc/reports/multithreading/node8.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - -Applications - - - - - - - - - - - - - - -next - -up - -previous -
    - Next: Writing output detached to - Up: No Title - Previous: Second approach -
    -
    - - -

      -  -
    -Applications -

    - -

    -In the next few subsections, we will show usual applications of multi-threading -in the deal.II library. The programs already use the new scheme -discussed in Section 3.4. - -

    -


    - -  - - -

    -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/multithreading/node9.html b/deal.II/doc/reports/multithreading/node9.html deleted file mode 100644 index 16c029dc59..0000000000 --- a/deal.II/doc/reports/multithreading/node9.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - -Writing output detached to disk - - - - - - - - - - - - - - -next - -up - -previous -
    - Next: Assembling the matrix - Up: Applications - Previous: Applications -
    -
    - - -

    -Writing output detached to disk -

    - -

    -The output classes, i.e. basically the classes DataOut and -DataOutStack and their base classes, follow a strictly hierarchical -model of data flow. The two terminal classes know about such things as -triangulations, degrees of freedom, or finite elements, but they translate -this structured information into a rather simple intermediate format. This -conversion is done in the build_patches functions of these -classes. The actual output routines only convert this intermediate format into -one of the supported graphics formats, which is then a relatively simple task. - -

    -This separation of processing of structured data and actual output of the -intermediate format was chosen since the actual output routines became rather -complex with growing scope of the whole library. For example, we had to update -all output functions when vector-valued finite elements were supported, and we -had to do so again when discontinuous elements were developed. This became an -unmanageable burden with the growing number of output formats, and we decided -that an intermediate format would be more appropriate, which is created by -only one function, but can be written to output formats by a number of -different functions. - -

    -In the present context, this has the following implications: once the -intermediate data is created by the build_patches function, we need -no more preserve the data from which it was made (i.e. the grid which it was -computed on, or the vector holding the actual solution values) and we can go -on with computing on the next finer grid, or the next time step, while the -intermediate data is converted to a graphics format file detached from the -main process. The only thing which we must make sure is that the program only -terminates after all detached output threads are finished. This can be done in -the following way: -

    -    // somewhere define a thread manager that keeps track of all
    -    // detached (`global') threads
    -    ACE_Thread_Manager global_thread_manager;
    -
    -    // This is the class which does the computations:
    -    class MainClass {
    -        ...
    -
    -        // now two functions, the first is called from the main program
    -        // for output, the second will manage detached output
    -        void write_solution ();
    -        void write_detached (DataOut<dim> *data_out);
    -    };
    -
    -
    -    void MainClass::write_solution () {
    -      DataOut<dim> *data_out = new DataOut<dim>();
    -
    -      // attach DoFHandler, add data vectors, ...
    -     
    -      data_out->build_patches ();
    -
    -      // now everything is in place, and we can write the data detached
    -      // Note that we transfer ownership of `data_out' to the other thread
    -      Threads::spawn (global_thread_manager,
    -                      Threads::encapsulate(&MainClass<dim>::write_detached)
    -                          .collect_args(this, data_out));
    -    };
    -
    -    
    -    void MainClass::write_detached (DataOut<dim> *data_out) {
    -      ofstream output_file ("abc");
    -      data_out->write_gnuplot (output_file); 
    -
    -      // now delete the object which we got from the starting thread
    -      delete data_out;
    -    };
    -
    -
    -    int main () {
    -      ...  // do all the work
    -   
    -      // now wait for all detached threads to finish
    -      global_thread_manager.wait ();
    -    };
    -
    -

    -Note that the functions spawn and encapsulate are prefixed -by Threads:: since in the actual implementation in deal.II -they are declared within a namespace of that name. - -

    -It should be noted that if you want to write output detached from the main -thread, and from the main thread at the same time, you need a version of the -C++ standard library delivered with your compiler that supports parallel -output. For the GCC compiler, this can be obtained by configuring it with the -flag -enable-threads at build time, or by using GCC version 3.0 or -later. - -

    -


    - - -next - -up - -previous -
    - Next: Assembling the matrix - Up: Applications - Previous: Applications - -
    -Wolfgang Bangerth -
    2000-04-20 -
    - - diff --git a/deal.II/doc/reports/new-threads/index.html b/deal.II/doc/reports/new-threads/index.html index bff69d0e9e..b146117901 100644 --- a/deal.II/doc/reports/new-threads/index.html +++ b/deal.II/doc/reports/new-threads/index.html @@ -10,8 +10,10 @@ A short description of the new threading scheme

    -Since the report on -multithreading was written in 2000, we have put in place a new +Since the first deal.II report on +multithreading was written in 2000 (see the list of deal.II +publications), +we have put in place a new implementation of the threading scheme (the first release to contain it is 4.0). The new scheme can do all that you could do before, so the report is in a sense still valid, but it describes a syntax that is no more used. We will here @@ -21,6 +23,14 @@ that use it must look like, and for pitfalls to watch out for, please still refer to the report mentioned above.

    +

    +We note that since this report was written, there has been another +incarnation of support for multicore machines, namely by using the +Threading Building Blocks and tasks. The documentation module on +parallel computing, available through the modules page of the deal.II +manual, explains this new direction in more detail. +

    +

    1. Rationale and Introduction

    @@ -75,7 +85,7 @@ Regarding the last point, note that any other function is called by obj.f(arg1, arg2); Ideally, the following syntax for starting any function on a new -thread would be nice: +thread would be nice:
         spawn f(arg1, arg2);
         spawn obj.f(arg1,arg2);
    @@ -97,7 +107,7 @@ this syntax, as well as the following points:
     
    • Overloading spawn() so as to take unbound functions and member functions, whether virtual or static. Of course, every call needs to be type -safe, i.e. the exact +safe, i.e. the exact same conversions of arguments need to be performed as in a usual call (except for two additional copies that are necessary).
    • spawn() needs to return a value that allows us to identify, @@ -123,7 +133,7 @@ we want to be able to retrieve it once the thread has finished: collectively, rather than one-by-one.

    - +

    Basically, the syntax above is all you need to know. It is as simple as that. The rest of this text, in comparison is very much of technical nature. I @@ -154,7 +164,7 @@ in the library; all entities that are not to be used by the user are placed into a namespace internal, those to be used are in a namespace Threads. The implementation uses Boost's shared_ptr. Some parts of -the implementation parallel the +the implementation parallel the boost::function library, but they are small and taylored to the particular purpose at hand; in particular, they make heavy use of the boost::tuple library. We note that the code has in some places already evolved @@ -185,11 +195,11 @@ threads. For POSIX threads, this class looks as follows: mutable volatile bool was_joined; mutable boost::mutex join_mutex; mutable boost::condition join_condition; - + public: thread_description_base () : was_joined (false) {}; virtual ~thread_description_base () { /* ... */ }; - + void create (void * (*p) (void *), void *d) { pthread_create (&pt, 0, p, d); }; @@ -201,7 +211,7 @@ threads. For POSIX threads, this class looks as follows: if (!was_joined) pthread_join (pt, 0); was_joined = true; - }; + }; };

    @@ -247,7 +257,7 @@ called. As mentioned, there is exactly one thread_description<RT> object per created thread. It is accessed using boost::shared_ptr objects, and references are held from each Thread<RT> object -for this thread as +for this thread as well as from a wrapper function on the new thread. The object is thus deleted, when all Thread<RT> objects for this thread have gone out of scope (or point to different threads) and the thread itself has @@ -272,19 +282,19 @@ implementation: public: Thread () {}; Thread (const boost::shared_ptr<thread_description<RT> > &td) - : thread_description (td) {}; - + : thread_description (td) {}; + void join () const { thread_description->join (); }; - + RT return_value () { join (); return thread_description->ret_val.get(); }; - + bool operator == (const thread &t) { return thread_description == t.thread_description; }; - + private: boost::shared_ptr<thread_description<RT> > thread_description; }; @@ -313,20 +323,20 @@ template argument:
         template <typename RT = void>
    -    class ThreadGroup 
    +    class ThreadGroup
         {
           public:
             ThreadGroup & operator += (const Thread<RT> &t) {
               threads.push_back (t);
     	  return *this;
             };
    -    
    +
             void join_all () const {
               for (typename std::vector<Thread<RT> >::const_iterator
                      t=threads.begin(); t!=threads.end(); ++t)
                 t->join ();
             };
    -        
    +
           private:
             std::vector<Thread<RT> > threads;
         };
    @@ -334,7 +344,7 @@ template argument:
     
     

    Since objects of type Thread<RT> are freely copyable, there -is no need +is no need to provide an index operator for ThreadGroup; if you need to index its elements (for example to get at the return value), use std::vector<Thread<RT> >. @@ -350,7 +360,7 @@ functions. We only show them for unary member functions: spawn (C &c, RT (C::*fun_ptr)(Arg1)) { return mem_fun_encapsulator<RT, C, boost::tuple<Arg1> > (c,fun_ptr); } - + template <typename RT, typename C, typename Arg1> mem_fun_encapsulator<RT,const C,boost::tuple<Arg1> > spawn (const C &c, RT (C::*fun_ptr)(Arg1) const) { @@ -361,9 +371,9 @@ functions. We only show them for unary member functions:

    Note that we need two overloaded versions, for const and -non-const +non-const member functions. Both create an intermediate object (in the -internal +internal namespace) that will accept arguments in place of the function being called on the new thread, make sure a new thread is created, copy the arguments to the new thread's stack, and only then return. The exact @@ -377,7 +387,7 @@ functions. One would really like to have something also for objects other than pointers to (member-)functions that provide an operator(). However, this doesn't seem to be possible if operator() returns something other than void or takes -arguments. This +arguments. This would need some kind of typeof-operator which is not standard C++. See the discussion in the Open Problems section.

    @@ -407,18 +417,18 @@ looks like this: template <typename RT, typename C, typename ArgList> class mem_fun_encapsulator<RT,C,ArgList,1> { - typedef typename mem_fun_ptr<RT,C,ArgList>::type MemFunPtr; - + typedef typename mem_fun_ptr<RT,C,ArgList>::type MemFunPtr; + public: mem_fun_encapsulator (C &c, MemFunPtr mem_fun_ptr) : c (c), mem_fun_ptr(mem_fun_ptr) {}; - - Thread<RT> + + Thread<RT> operator() (typename boost::tuples::element<0,ArgList>::type arg1) { return mem_fun_wrapper<RT,C,ArgList> (mem_fun_ptr, c, boost::tie(arg1)).fire_up (); }; - + private: C &c; MemFunPtr mem_fun_ptr; @@ -433,7 +443,7 @@ template is never used.)

    -The constructor stores the two addresses. If one calls +The constructor stores the two addresses. If one calls

         spawn(obj, &C::f) (42);
     
    @@ -446,7 +456,7 @@ arguments, but bind them all together with boost::tie, so that we n not have different versions of the mem_fun_wrapper class for different numbers of arguments. (However, we need a separate partial specialization of the mem_fun_encapsulator class for each number of -function arguments.) The tie_args template is used to make a version +function arguments.) The tie_args template is used to make a version of the ArgList type with all reference types; it is described below.

    @@ -460,22 +470,22 @@ us first consider the base class that it has in common with Thread<RT> fire_up () { thread_descriptor = DescriptionPointer(new typename thread_description<RT>()); - - boost::mutex::scoped_lock lock (mutex); + + boost::mutex::scoped_lock lock (mutex); thread_descriptor->create (&EntryPointClass::entry_point, (void *)this); condition.wait (lock); - + return thread_descriptor; } - + protected: typedef boost::shared_ptr<thread_description<RT> > DescriptionPointer; - + DescriptionPointer thread_descriptor; - - mutable boost::mutex mutex; + + mutable boost::mutex mutex; mutable boost::condition condition; };
    @@ -485,11 +495,11 @@ object, and calls it with a pointer to the present object, and the address of the starting point is EntryPointClass::entry_point, where EntryPoint is the name of a class that implements this thread starting function and is passed as a template argument to -wrapper_base. +wrapper_base. Before it starts the new thread, it acquires a mutex and afterwards wait until a condition is signalled before it finishes by using the thread descriptor object to generate a Thread<RT> -object. +object.

    @@ -497,9 +507,9 @@ The magic happens in the derived class:

         template <typename RT, class C, typename ArgList>
         struct mem_fun_wrapper
    -       : public wrapper_base<RT, mem_fun_wrapper<RT,C,ArgList> > 
    +       : public wrapper_base<RT, mem_fun_wrapper<RT,C,ArgList> >
         {
    -        typedef typename mem_fun_ptr<RT,C,ArgList>::type MemFunPtr;      
    +        typedef typename mem_fun_ptr<RT,C,ArgList>::type MemFunPtr;
             typedef typename tie_args<ArgList>::type ArgReferences;
             mem_fun_wrapper (MemFunPtr            mem_fun_ptr,
                              C                   &c,
    @@ -510,11 +520,11 @@ The magic happens in the derived class:
           private:
             mem_fun_wrapper ();
             mem_fun_wrapper (const mem_fun_wrapper &);
    -        
    +
             C            &c;
             MemFunPtr     mem_fun_ptr;
             ArgReferences args;
    -        
    +
             static void * entry_point (void *arg)
               {
                 const wrapper_base<RT> *w
    @@ -524,17 +534,17 @@ The magic happens in the derived class:
                 MemFunPtr mem_fun_ptr = wrapper->mem_fun_ptr;
                 C        &c           = wrapper->c;
                 ArgList   args        = wrapper->args;
    -  
    +
                 boost::shared_ptr<thread_description<RT> >
                   thread_descriptor  = wrapper->thread_descriptor;
    -            
    +
                 {
                   boost::mutex::scoped_lock lock (wrapper->mutex);
                   wrapper->condition.notify_one ();
                 }
    -            
    +
                 call (mem_fun_ptr, c, args, thread_descriptor->ret_val);
    -            
    +
                 return 0;
               };
         };
    @@ -591,7 +601,7 @@ a get() function that returns void.
     

    -    template <typename RT> struct return_value 
    +    template <typename RT> struct return_value
         {
           private:
             RT value;
    @@ -600,7 +610,7 @@ a get() function that returns void.
             void set (RT v) { value = v; }
         };
     
    -    template <typename RT> struct return_value<RT &> 
    +    template <typename RT> struct return_value<RT &>
         {
           private:
             RT * value;
    @@ -642,7 +652,7 @@ number of arguments, in the usual way:
     The Caller class has the following member functions:
     
     
    -    template <typename RT> struct Caller 
    +    template <typename RT> struct Caller
         {
             template <typename PFun, typename ArgList>
             static void do_call (PFun     fun_ptr,
    @@ -727,13 +737,13 @@ this, but I couldn't locate this.
         template <typename Tuple>
         struct tie_args_helper<Tuple,1>
         {
    -        typedef 
    +        typedef
             boost::tuple<typename add_reference_to_Nth<0,Tuple>::type>
             type;
         };
     
         template <typename Tuple>
    -    struct tie_args 
    +    struct tie_args
         {
             typedef typename tie_args_helper<Tuple>::type type;
         };
    @@ -795,7 +805,7 @@ This only works if operator() satisfies the signature
     

    We could add another overload if operator() is -const. However, what one +const. However, what one would like is an overload for more general signatures. Unfortunately, this requires that we can infer type and number of arguments and return type of operator() at the time we declare the return type of @@ -834,7 +844,7 @@ The calling thread would then not have to copy the arguments onto its local stack and signal to the calling thread. It would only have to delete the memory after the call to the user-supplied function returns. Apart from replacing ArgReferences by -ArgList in some places, +ArgList in some places, the scheme would basically just replace *_encapsulator::operator(), fire_up, and thread_entry_point:

    @@ -904,7 +914,7 @@ legal:
    The question, then, would be: do we want to allow conversions between Thread<double> and Thread<int> objects? -And do we want to allow a +And do we want to allow a conversion from Thread<T> to Thread<void> (i.e.: casting away the return value)?

    @@ -919,7 +929,7 @@ different return value types into a ThreadGroup:
         double f1 ();
         int    f2 ();
    - 
    +
         ThreadTroup<double> tg;
         tg += spawn(f1)();
         tg += spawn(f2)();    // convert Thread<int> to Thread<double>
    @@ -950,7 +960,7 @@ types in the chain into a boost::tuple of growing length, and writi
     a function that converts a value of the first type of this tuple to
     the second, to the third, ..., to the last type in the tuple. However,
     a plethora of internal compiler errors has scared me off doing more
    -experiments in this direction. 
    +experiments in this direction.
     

    diff --git a/deal.II/doc/screen.css b/deal.II/doc/screen.css index edeebac807..83ed8ce46b 100644 --- a/deal.II/doc/screen.css +++ b/deal.II/doc/screen.css @@ -205,6 +205,7 @@ code.global { color: #005030; } td.build { text-align: center; vertical-align: middle; + font-size: small; } diff --git a/deal.II/examples/step-11/step-11.cc b/deal.II/examples/step-11/step-11.cc index 55615a90ee..627fcdbbcf 100644 --- a/deal.II/examples/step-11/step-11.cc +++ b/deal.II/examples/step-11/step-11.cc @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include // Just this one is new: it declares // a class diff --git a/deal.II/examples/step-13/step-13.cc b/deal.II/examples/step-13/step-13.cc index 9c911d6d37..e8182e5bd0 100644 --- a/deal.II/examples/step-13/step-13.cc +++ b/deal.II/examples/step-13/step-13.cc @@ -40,8 +40,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-14/step-14.cc b/deal.II/examples/step-14/step-14.cc index e3167db652..4a6185ee26 100644 --- a/deal.II/examples/step-14/step-14.cc +++ b/deal.II/examples/step-14/step-14.cc @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-15/step-15.cc b/deal.II/examples/step-15/step-15.cc index a3375ddf0e..c1bf2328bc 100644 --- a/deal.II/examples/step-15/step-15.cc +++ b/deal.II/examples/step-15/step-15.cc @@ -43,8 +43,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-16/step-16.cc b/deal.II/examples/step-16/step-16.cc index 1e84f87815..ce5053886f 100644 --- a/deal.II/examples/step-16/step-16.cc +++ b/deal.II/examples/step-16/step-16.cc @@ -55,7 +55,7 @@ #include #include -#include +#include #include #include diff --git a/deal.II/examples/step-17/doc/results.dox b/deal.II/examples/step-17/doc/results.dox index 1fdc303d36..3c01f39891 100644 --- a/deal.II/examples/step-17/doc/results.dox +++ b/deal.II/examples/step-17/doc/results.dox @@ -9,7 +9,10 @@ have different calling syntaxes - on my system, I have to use the command bsub with a whole host of options to run a job in parallel - so that the exact command line syntax varies. If you have found out how to run a job on your system, you should get output like this for a job on 8 processors, -and with a few more refinement cycles than in the code above: +and with a few more refinement cycles than in the code above (these +results were generated in 2004 with older versions of deal.II and a +version of METIS that generated different partitionings; consequently, +the numbers you get today are slightly different): @code Cycle 0: Number of active cells: 64 @@ -90,12 +93,12 @@ cycle 14, and 14 minutes including the second to last step. I lost the timing information for the last step, though, but you get the idea. All this is if the debug flag in the Makefile was changed to "off", i.e. "optimized", and with the generation of graphical output switched off for the reasons stated in -the program comments above. The biggest 2d computations we did had roughly 7.1 +the program comments above. The biggest 2d computations we did had roughly 7.1 million unknowns, and were done on 32 processes. It took about 40 minutes. Not surprisingly, the limiting factor for how far one can go is how much memory -one has, since every process has to hold the entire mesh and DoFHandler objects, +one has, since every process has to hold the entire mesh and DoFHandler objects, although matrices and vectors are split up. For the 7.1M computation, the memory -consumption was about 600 bytes per unknown, which is not bad, but one has to +consumption was about 600 bytes per unknown, which is not bad, but one has to consider that this is for every unknown, whether we store the matrix and vector entries locally or not. @@ -195,7 +198,7 @@ Cycle 6: The last step, going up to 1.5 million unknowns, takes about 55 minutes with 16 processes on 8 dual-processor machines (of the kind available in 2003). The -graphical output generated by +graphical output generated by this job is rather large (cycle 5 already prints around 82 MB of GMV data), so we contend ourselves with showing output from cycle 4: diff --git a/deal.II/examples/step-17/step-17.cc b/deal.II/examples/step-17/step-17.cc index 03d0f2422d..ae10f61ebd 100644 --- a/deal.II/examples/step-17/step-17.cc +++ b/deal.II/examples/step-17/step-17.cc @@ -31,8 +31,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-18/step-18.cc b/deal.II/examples/step-18/step-18.cc index 0297cdfab8..5860756716 100644 --- a/deal.II/examples/step-18/step-18.cc +++ b/deal.II/examples/step-18/step-18.cc @@ -41,8 +41,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-20/step-20.cc b/deal.II/examples/step-20/step-20.cc index b0553e0126..8a3e1093f3 100644 --- a/deal.II/examples/step-20/step-20.cc +++ b/deal.II/examples/step-20/step-20.cc @@ -45,8 +45,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-21/step-21.cc b/deal.II/examples/step-21/step-21.cc index ac1853b7c8..a4d9e6148a 100644 --- a/deal.II/examples/step-21/step-21.cc +++ b/deal.II/examples/step-21/step-21.cc @@ -48,8 +48,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-22/step-22.cc b/deal.II/examples/step-22/step-22.cc index 4911471547..5829d34fbf 100644 --- a/deal.II/examples/step-22/step-22.cc +++ b/deal.II/examples/step-22/step-22.cc @@ -43,8 +43,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-23/doc/intro.dox b/deal.II/examples/step-23/doc/intro.dox index c8feb1dba8..c7b70487af 100644 --- a/deal.II/examples/step-23/doc/intro.dox +++ b/deal.II/examples/step-23/doc/intro.dox @@ -403,9 +403,12 @@ a square $[-1,1]^2$ and \\ u_1 &=& 0, \\ - g &=& \left\{\begin{matrix}\sin (4\pi t) \\ 0\end{matrix} - \qquad {\textrm{for}\ t\le \frac 12, x=-1, -\frac 13 +#include // In a very similar vein, we are // also too lazy to write the code to @@ -84,7 +84,7 @@ // and // MatrixTools::create_laplace_matrix // functions. They are declared here: -#include +#include // Finally, here is an include file // that contains all sorts of tool diff --git a/deal.II/examples/step-24/step-24.cc b/deal.II/examples/step-24/step-24.cc index f959cadbba..742205e70d 100644 --- a/deal.II/examples/step-24/step-24.cc +++ b/deal.II/examples/step-24/step-24.cc @@ -39,8 +39,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-25/step-25.cc b/deal.II/examples/step-25/step-25.cc index 19f401aad8..eb57fcd4b4 100644 --- a/deal.II/examples/step-25/step-25.cc +++ b/deal.II/examples/step-25/step-25.cc @@ -45,8 +45,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-26/step-26.cc b/deal.II/examples/step-26/step-26.cc index 2597a72ae2..29b1620855 100644 --- a/deal.II/examples/step-26/step-26.cc +++ b/deal.II/examples/step-26/step-26.cc @@ -28,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/deal.II/examples/step-27/step-27.cc b/deal.II/examples/step-27/step-27.cc index 5d917cf626..e5c5d798bd 100644 --- a/deal.II/examples/step-27/step-27.cc +++ b/deal.II/examples/step-27/step-27.cc @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-28/step-28.cc b/deal.II/examples/step-28/step-28.cc index c74b2c4e2f..64b0276c58 100644 --- a/deal.II/examples/step-28/step-28.cc +++ b/deal.II/examples/step-28/step-28.cc @@ -40,8 +40,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-29/step-29.cc b/deal.II/examples/step-29/step-29.cc index cd369dd70b..0c2bfeb3a9 100644 --- a/deal.II/examples/step-29/step-29.cc +++ b/deal.II/examples/step-29/step-29.cc @@ -36,9 +36,9 @@ #include #include -#include +#include #include -#include +#include #include diff --git a/deal.II/examples/step-3/step-3.cc b/deal.II/examples/step-3/step-3.cc index 1e9fa84ff9..5b4976d421 100644 --- a/deal.II/examples/step-3/step-3.cc +++ b/deal.II/examples/step-3/step-3.cc @@ -58,8 +58,8 @@ // we need for the treatment of // boundary values: #include -#include -#include +#include +#include // We're now almost to the end. The second to // last group of include files is for the diff --git a/deal.II/examples/step-31/step-31.cc b/deal.II/examples/step-31/step-31.cc index e294cf2016..0d78aa9046 100644 --- a/deal.II/examples/step-31/step-31.cc +++ b/deal.II/examples/step-31/step-31.cc @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include #include @@ -1085,7 +1085,7 @@ namespace Step31 stokes_constraints.clear (); DoFTools::make_hanging_node_constraints (stokes_dof_handler, stokes_constraints); - std::set no_normal_flux_boundaries; + std::set no_normal_flux_boundaries; no_normal_flux_boundaries.insert (0); VectorTools::compute_no_normal_flux_constraints (stokes_dof_handler, 0, no_normal_flux_boundaries, diff --git a/deal.II/examples/step-32/step-32.cc b/deal.II/examples/step-32/step-32.cc index 386b9b1aff..e01eb034f4 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -57,8 +57,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -2554,7 +2554,7 @@ namespace Step32 stokes_constraints, velocity_mask); - std::set no_normal_flux_boundaries; + std::set no_normal_flux_boundaries; no_normal_flux_boundaries.insert (1); VectorTools::compute_no_normal_flux_constraints (stokes_dof_handler, 0, no_normal_flux_boundaries, @@ -4343,11 +4343,25 @@ namespace Step32 old_temperature_solution = temperature_solution; if (old_time_step > 0) { - stokes_solution.sadd (1.+time_step/old_time_step, -time_step/old_time_step, - old_old_stokes_solution); - temperature_solution.sadd (1.+time_step/old_time_step, - -time_step/old_time_step, - old_old_temperature_solution); + //Trilinos sadd does not like ghost vectors even as input. Copy into distributed vectors for now: + { + TrilinosWrappers::MPI::BlockVector distr_solution (stokes_rhs); + distr_solution = stokes_solution; + TrilinosWrappers::MPI::BlockVector distr_old_solution (stokes_rhs); + distr_old_solution = old_old_stokes_solution; + distr_solution .sadd (1.+time_step/old_time_step, -time_step/old_time_step, + distr_old_solution); + stokes_solution = distr_solution; + } + { + TrilinosWrappers::MPI::Vector distr_solution (temperature_rhs); + distr_solution = temperature_solution; + TrilinosWrappers::MPI::Vector distr_old_solution (temperature_rhs); + distr_old_solution = old_old_temperature_solution; + distr_solution .sadd (1.+time_step/old_time_step, -time_step/old_time_step, + distr_old_solution); + temperature_solution = distr_solution; + } } if ((timestep_number > 0) && (timestep_number % 100 == 0)) diff --git a/deal.II/examples/step-33/step-33.cc b/deal.II/examples/step-33/step-33.cc index 9394797e20..dccad4abe0 100644 --- a/deal.II/examples/step-33/step-33.cc +++ b/deal.II/examples/step-33/step-33.cc @@ -42,7 +42,7 @@ #include #include -#include +#include #include // Then, as mentioned in the introduction, we diff --git a/deal.II/examples/step-34/step-34.cc b/deal.II/examples/step-34/step-34.cc index cc27622beb..30e12e7997 100644 --- a/deal.II/examples/step-34/step-34.cc +++ b/deal.II/examples/step-34/step-34.cc @@ -46,7 +46,7 @@ #include #include -#include +#include // And here are a few C++ standard header // files that we will need: diff --git a/deal.II/examples/step-35/step-35.cc b/deal.II/examples/step-35/step-35.cc index 92674e08e9..cd57ab99b7 100644 --- a/deal.II/examples/step-35/step-35.cc +++ b/deal.II/examples/step-35/step-35.cc @@ -55,8 +55,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -433,7 +433,7 @@ namespace Step35 EquationData::Velocity vel_exact; std::map boundary_values; - std::vector boundary_indicators; + std::vector boundary_indicators; Triangulation triangulation; @@ -1118,7 +1118,7 @@ namespace Step35 vel_exact.set_component(d); boundary_values.clear(); - for (std::vector::const_iterator + for (std::vector::const_iterator boundaries = boundary_indicators.begin(); boundaries != boundary_indicators.end(); ++boundaries) diff --git a/deal.II/examples/step-36/step-36.cc b/deal.II/examples/step-36/step-36.cc index 40862d2aee..932c5990ae 100644 --- a/deal.II/examples/step-36/step-36.cc +++ b/deal.II/examples/step-36/step-36.cc @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-37/step-37.cc b/deal.II/examples/step-37/step-37.cc index 9f6e4b8987..a664f42dcc 100644 --- a/deal.II/examples/step-37/step-37.cc +++ b/deal.II/examples/step-37/step-37.cc @@ -41,7 +41,7 @@ #include #include -#include +#include // This includes the data structures for the // efficient implementation of matrix-free diff --git a/deal.II/examples/step-38/step-38.cc b/deal.II/examples/step-38/step-38.cc index dd89748fa8..b26b6b8db1 100644 --- a/deal.II/examples/step-38/step-38.cc +++ b/deal.II/examples/step-38/step-38.cc @@ -36,8 +36,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -381,7 +381,7 @@ namespace Step38 Triangulation volume_mesh; GridGenerator::half_hyper_ball(volume_mesh); - std::set boundary_ids; + std::set boundary_ids; boundary_ids.insert (0); GridTools::extract_boundary_mesh (volume_mesh, triangulation, diff --git a/deal.II/examples/step-39/output.reference.dat b/deal.II/examples/step-39/output.reference.dat new file mode 100644 index 0000000000..35de96d7f0 --- /dev/null +++ b/deal.II/examples/step-39/output.reference.dat @@ -0,0 +1,13 @@ +#step dofs error estimate l2error iterations efficiency order l2order +0 256 2.974190e-01 9.904600e-01 4.524470e-03 14 0.300284 0.000000 0.000000 +1 400 2.585590e-01 7.386240e-01 2.885100e-03 16 0.350055 0.627480 2.016374 +2 544 1.892340e-01 6.575070e-01 1.479540e-03 16 0.287805 2.030277 4.343815 +3 688 1.503620e-01 4.547120e-01 9.005740e-04 16 0.330675 1.958261 4.228028 +4 832 1.053170e-01 3.548790e-01 4.750150e-04 17 0.296769 3.747254 6.731991 +5 1024 7.459510e-02 2.539050e-01 2.362060e-04 17 0.293791 3.322106 6.729380 +6 1216 5.291920e-02 1.836100e-01 1.224410e-04 17 0.288215 3.995439 7.647065 +7 1504 3.756820e-02 1.335280e-01 6.804430e-05 17 0.281351 3.223616 5.527534 +8 1984 2.657860e-02 9.576030e-02 3.998000e-05 17 0.277553 2.498686 3.839747 +9 2608 1.880990e-02 6.816520e-02 1.951950e-05 17 0.275946 2.528429 5.243492 +10 3472 1.328020e-02 4.780300e-02 1.006070e-05 17 0.277811 2.433078 4.632422 +11 4672 9.367220e-03 3.336360e-02 5.766390e-06 17 0.280762 2.351695 3.749897 diff --git a/deal.II/examples/step-39/step-39.cc b/deal.II/examples/step-39/step-39.cc index e29c8ff782..5672cb156f 100644 --- a/deal.II/examples/step-39/step-39.cc +++ b/deal.II/examples/step-39/step-39.cc @@ -59,7 +59,7 @@ // as quadrature and additional tools. #include #include -#include +#include #include #include diff --git a/deal.II/examples/step-4/step-4.cc b/deal.II/examples/step-4/step-4.cc index 40bf96d41c..30a9ce595b 100644 --- a/deal.II/examples/step-4/step-4.cc +++ b/deal.II/examples/step-4/step-4.cc @@ -27,8 +27,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/deal.II/examples/step-40/step-40.cc b/deal.II/examples/step-40/step-40.cc index bc536fc339..3b201990e5 100644 --- a/deal.II/examples/step-40/step-40.cc +++ b/deal.II/examples/step-40/step-40.cc @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include diff --git a/deal.II/examples/step-41/Makefile b/deal.II/examples/step-41/Makefile index 74459bdba8..150d91c19f 100644 --- a/deal.II/examples/step-41/Makefile +++ b/deal.II/examples/step-41/Makefile @@ -45,6 +45,22 @@ clean-up-files = *gmv *gnuplot *gpl *eps *pov *vtk *ucd *.d2 # settings include $D/common/Make.global_options +################################################################ +# This example program will only work if Trilinos is installed. If this +# is not the case, then simply redefine the main targets to do nothing +ifneq ($(USE_CONTRIB_TRILINOS),yes) +default run clean: + @echo + @echo "===========================================================" + @echo "= This program cannot be compiled without Trilinos. Make=" + @echo "= sure you have Trilinos installed and detected during =" + @echo "= configuration of deal.II =" + @echo "===========================================================" + @echo + +else +# +################################################################ # Since the whole project consists of only one file, we need not # consider difficult dependencies. We only have to declare the @@ -141,4 +157,4 @@ Makefile.dep: $(target).cc Makefile \ # them: include Makefile.dep - +endif # CONTRIB_USE_TRILINOS diff --git a/deal.II/examples/step-41/doc/intro.dox b/deal.II/examples/step-41/doc/intro.dox index 42dec00a16..0014f3fd56 100644 --- a/deal.II/examples/step-41/doc/intro.dox +++ b/deal.II/examples/step-41/doc/intro.dox @@ -7,6 +7,7 @@ This material is based upon work partly supported by ThyssenKrupp Steel Europe. +

    Introduction

    This example is based on the Laplace equation in 2d and deals with the @@ -91,7 +92,7 @@ obstacle). An obvious way to obtain the variational formulation of the obstacle problem is to consider the total potential energy: @f{equation*} - E(u):=\dfrac{1}{2}\int\limits_{\Omega} \nabla u \cdot \nabla - \int\limits_{\Omega} fu. + E(u):=\dfrac{1}{2}\int\limits_{\Omega} \nabla u \cdot \nabla u - \int\limits_{\Omega} fu. @f} We have to find a solution $u\in G$ of the following minimization problem: @f{equation*} @@ -157,7 +158,7 @@ This yields: with @f{align*} a(u,v) &:= \left(\nabla u, \nabla v\right),\quad &&u,v\in V\\ - b(u,\mu) &:= \langle g-u,\mu\rangle,\quad &&u\in V,\quad\mu\in V'. + b(u,\mu) &:= \langle u,\mu\rangle,\quad &&u\in V,\quad\mu\in V'. @f} In other words, we can consider $\lambda$ as the negative of the additional, positive force that the obstacle exerts on the membrane. The inequality in the second line of the @@ -165,9 +166,8 @@ statement above only appears to have the wrong sign because we have $\mu-\lambda<0$ at points where $\lambda=0$, given the definition of $K$. The existence and uniqueness of $(u,\lambda)\in V\times K$ of this saddle -point problem has been stated in Grossmann and Roos: Numerical treatment of -partial differential equations, Springer-Verlag, Heidelberg-Berlin, 2007, 596 -pages, ISBN 978-3-540-71582-5. +point problem has been stated in Glowinski, Lions and Tr\'{e}moli\`{e}res: Numerical Analysis of Variational +Inequalities, North-Holland, 1981. diff --git a/deal.II/examples/step-41/step-41.cc b/deal.II/examples/step-41/step-41.cc index e5639e8a4e..a3d015cb24 100644 --- a/deal.II/examples/step-41/step-41.cc +++ b/deal.II/examples/step-41/step-41.cc @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include diff --git a/deal.II/examples/step-42/doc/intro-step-42.tex b/deal.II/examples/step-42/doc/intro-step-42.tex index a7e1fce28d..68f3e495d1 100644 --- a/deal.II/examples/step-42/doc/intro-step-42.tex +++ b/deal.II/examples/step-42/doc/intro-step-42.tex @@ -62,39 +62,42 @@ vanishes, because we consider a frictionless situation and the normal stress is As a starting point we want to minimise an energy functional: $$E(\tau) := \dfrac{1}{2}\int\limits_{\Omega}\tau A \tau d\tau,\quad \tau\in \Pi W^{div}$$ with -$$W^{div}:=\lbrace \tau\in L^2(\Omega,\mathbb{R}^{dim\times\dim}_{sym}),div(\tau)\in L^2(\Omega,\mathbb{R}^{dim})\rbrace$$ -and +$$W^{div}:=\lbrace \tau\in +L^2(\Omega,\mathbb{R}^{dim\times\dim}_{sym}):div(\tau)\in L^2(\Omega,\mathbb{R}^{dim})\rbrace$$ and $$\Pi \Sigma:=\lbrace \tau\in \Sigma, \mathcal{F}(\tau)\leq 0\rbrace$$ as the set of admissible stresses which is defined by a continious, convex flow function $\mathcal{F}$. With the goal to derive the dual formulation of the minimisation problem, we define a lagrange function: -$$L(\tau,\varphi) := E(\tau) + (\varphi, div(\tau)),\quad \lbrace\tau,\varphi\rbrace\in\Pi W^{div}\times U$$ -with $U := \lbrace u\in H^1(\Omega), u = g \text{ on } \Gamma_D,u_n\leq 0 \text{ on } \Gamma_C \rbrace$.\\ +$$L(\tau,\varphi) := E(\tau) + (\varphi, div(\tau)),\quad \lbrace\tau,\varphi\rbrace\in\Pi W^{div}\times V^+$$ +with +$$V^+ := \lbrace u\in V: u_n\leq g \text{ on } \Gamma_C \rbrace$$ +$$V:=\left[ H_0^1 \right]^{dim}:=\lbrace u\in \left[H^1(\Omega)\right]^{dim}: u += 0 \text{ on } \Gamma_D\rbrace$$ By building the fr\'echet derivatives of $L$ for both components we obtain the dual formulation for the stationary case which is known as \textbf{Hencky-Type-Model}:\\ -Find a pair $\lbrace\sigma,u\rbrace\in \Pi W\times U$ with +Find a pair $\lbrace\sigma,u\rbrace\in \Pi W\times V^+$ with $$\left(A\sigma,\tau - \sigma\right) + \left(u, div(\tau) - div(\sigma)\right) \geq 0,\quad \forall \tau\in \Pi W^{div}$$ -$$-\left(div(\sigma),\varphi - u\right) \geq 0,\quad \forall \varphi\in U.$$ +$$-\left(div(\sigma),\varphi - u\right) \geq 0,\quad \forall \varphi\in V^+.$$ By integrating by parts and multiplying the first inequality by $C=A^{-1}$ we achieve the primal-mixed version of our problem:\\ -Find a pair $\lbrace\sigma,u\rbrace\in \Pi W\times U$ with +Find a pair $\lbrace\sigma,u\rbrace\in \Pi W\times V^+$ with $$\left(\sigma,\tau - \sigma\right) - \left(C\varepsilon(u), \tau - \sigma\right) \geq 0,\quad \forall \tau\in \Pi W$$ -$$\left(\sigma,\varepsilon(\varphi) - \varepsilon(u)\right) \geq 0,\quad \forall \varphi\in U.$$ +$$\left(\sigma,\varepsilon(\varphi) - \varepsilon(u)\right) \geq 0,\quad \forall \varphi\in V^+.$$ Therein $\varepsilon$ denotes the linearised deformation tensor with $\varepsilon(u) := \dfrac{1}{2}\left(\nabla u + \nabla u^T\right)$ for small deformations.\\ Most materials - especially metals - have the property that they show some hardening effects during the forming process. There are different constitutive laws to describe those material behaviour. The most simple one is called linear isotropic hardening with the flow function $\mathcal{F}(\tau,\eta) = \vert\tau^D\vert - (\sigma_0 + \gamma\eta)$. It can be considered by establishing an additional term in our primal-mixed formulation:\\ -Find a pair $\lbrace(\sigma,\xi),u\rbrace\in \Pi (W\times L^2(\Omega,\mathbb{R}))\times U$ with +Find a pair $\lbrace(\sigma,\xi),u\rbrace\in \Pi (W\times L^2(\Omega,\mathbb{R}))\times V^+$ with $$\left(\sigma,\tau - \sigma\right) - \left(C\varepsilon(u), \tau - \sigma\right) + \gamma\left( \xi, \eta - \xi\right) \geq 0,\quad \forall (\tau,\eta)\in \Pi (W,L^2(\Omega,\mathbb{R}))$$ -$$\left(\sigma,\varepsilon(\varphi) - \varepsilon(u)\right) \geq 0,\quad \forall \varphi\in U,$$ +$$\left(\sigma,\varepsilon(\varphi) - \varepsilon(u)\right) \geq 0,\quad \forall \varphi\in V^+,$$ with the hardening parameter $\gamma > 0$.\\ Now we want to derive a primal problem which only depends on the displacement $u$. For that purpose we set $\eta = \xi$ and eliminate the stress $\sigma$ by applying the projection theorem on\\ $$\left(\sigma - C\varepsilon(u), \tau - \sigma\right) \geq 0,\quad \forall \tau\in \Pi W,$$ which yields with the second inequality:\\ -Find the displacement $u\in U$ with -$$\left(P_{\Pi}(C\varepsilon(u)),\varepsilon(\varphi) - \varepsilon(u)\right) \geq 0,\quad \forall \varphi\in U,$$ +Find the displacement $u\in V^+$ with +$$\left(P_{\Pi}(C\varepsilon(u)),\varepsilon(\varphi) - \varepsilon(u)\right) \geq 0,\quad \forall \varphi\in V^+,$$ with the projection: $$P_{\Pi}(\tau):=\begin{cases} \tau, & \text{if }\vert\tau^D\vert \leq \sigma_0 + \gamma\xi,\\ @@ -111,7 +114,7 @@ $$\alpha := \sigma_0 + \dfrac{\gamma}{2\mu+\gamma}\left(\vert\tau^D\vert - \sigm with a further material parameter $\mu>0$ called shear modulus.\\ So what we do is to calculate the stresses by using Hooke's law for linear elastic, isotropic materials $$\sigma = C \varepsilon(u) = 2\mu \varepsilon^D(u) + \kappa tr(\varepsilon(u))I = \left[2\mu\left(\mathbb{I} -\dfrac{1}{3} I\otimes I\right) + \kappa I\otimes I\right]\varepsilon(u)$$ -with the new material parameter $\kappa>0$ (bulk modulus). The variables $I$ and $\mathbb{I}$ denote the identity tensors of second and forth order.\\ +with the material parameter $\kappa>0$ (bulk modulus). The variables $I$ and $\mathbb{I}$ denote the identity tensors of second and forth order.\\ In the next step we test in a pointwise sense where the deviator part of the stress in a norm is bigger as the yield stress. If there are such points we project the deviator stress in those points back to the yield surface. Methods of this kind are called projections algorithm or radial-return-algorithm.\\ @@ -126,25 +129,28 @@ method - inexact since we use an iterative solver for the linearised problems in For the newton method we have to linearise the following semi-linearform $$a(\psi;\varphi) := \left(P_{\Pi}(C\varepsilon(\varphi)),\varepsilon(\varphi)\right).$$ -Becaus we have to find the solution $u$ in the convex set $U$, we have to apply an SQP-method (SQP: sequential quadratic +Becaus we have to find the solution $u$ in the convex set $V^+$, we have to apply an SQP-method (SQP: sequential quadratic programming). That means we have to solve a minimisation problem for a known $u^i$ in every SQP-step of the form \begin{eqnarray*} & & a(u^{i};u^{i+1} - u^i) + \dfrac{1}{2}a'(u^i;u^{i+1} - u^i,u^{i+1} - u^i)\\ &=& a(u^i;u^{i+1}) - a(u^i;u^i) +\\ & & \dfrac{1}{2}\left( a'(u^i;u^{i+1},u^{i+1}) - 2a'(u^i;u^i,u^{i+1}) - a'(u^i;u^i,u^i)\right)\\ - &\rightarrow& min,\quad u^{i+1}\in U. + &\rightarrow& min,\quad u^{i+1}\in V^+. \end{eqnarray*} Neglecting the constant terms $ a(u^i;u^i)$ and $ a'(u^i;u^i,u^i)$ we obtain the following minimisation problem -$$\dfrac{1}{2} a'(u^i;u^{i+1},u^{i+1}) - F(u^i)\rightarrow min,\quad u^{i+1}\in U$$ +$$\dfrac{1}{2} a'(u^i;u^{i+1},u^{i+1}) - F(u^i)\rightarrow min,\quad u^{i+1}\in V^+$$ with $$F(\varphi) := \left(a'(\varphi;\varphi,u^{i+1}) - a(\varphi;u^{i+1}) \right).$$ -In the case of our constitutive law the derivitive of the semi-linearform $a(.;.)$ at the point $u^i$ is +In the case of our constitutive law the derivative of the semi-linearform $a(.;.)$ at the point $u^i$ is $$a'(u^i;\psi,\varphi) =$$ $$ \begin{cases} -\left(\left[2\mu\left(\mathbb{I} - \dfrac{1}{3} I\otimes I\right) + \kappa I\otimes I\right]\varepsilon(\psi),\varepsilon(\varphi)\right), & \quad \vert\tau^D\vert \leq \sigma_0\\ -\left(\left[\dfrac{\alpha}{\vert\tau^D\vert}2\mu\left(\mathbb{I} - \dfrac{1}{3} I\otimes I - \dfrac{\tau^D\otimes\tau^D}{\vert\tau^D\vert}\right) + \kappa I\otimes I\right]\varepsilon(\psi),\varepsilon(\varphi) \right), & \quad \vert\tau^D\vert > \sigma_0 +\left(\left[2\mu\left(\mathbb{I} - \dfrac{1}{3} I\otimes I\right) + \kappa I\otimes I\right]\varepsilon(\psi),\varepsilon(\varphi)\right), & \quad + \vert \tau^D \vert \leq \sigma_0\\ +\left(\left[\dfrac{\alpha}{\vert\tau^D\vert}2\mu\left(\mathbb{I} - \dfrac{1}{3} I\otimes I - \dfrac{\tau^D\otimes\tau^D}{\vert\tau^D\vert}\right) + + \kappa I\otimes I\right]\varepsilon(\psi),\varepsilon(\varphi) \right), & + \quad \vert \tau^D \vert > \sigma_0 \end{cases} $$ with @@ -154,13 +160,59 @@ Again the first case is for elastic and the second for plastic deformation. \section{Formulation as a saddle point problem} On the line of step-41 we compose a saddle point problem out of the minimisation problem. Again we do so to gain a formulation -that allows us to solve a linear system of equations finally. +that allows us to solve a linear system of equations finally.\\ +We introduce a Lagrange multiplier $\lambda$ and the convex cone $K\subset W'$, +$W'$ dual space of the trace space $W$ of $V$ restricted to $\Gamma_C$, +$$K:=\{\mu\in W':\mu_T = 0,\quad\langle\mu n,v\rangle_{\Gamma_C}\geq 0,\quad +\forall v\in W, v \ge 0\text{ on }\Gamma_C \}$$ +of Lagrange multipliers, where $\langle\cdot,\cdot\rangle$ +denotes the duality pairing between $W'$ and $W$. Intuitively, $K$ is the cone +of all "non-positive functions", except that $ K\subset +\left( \left[ H_0^{\frac{1}{2}} \right]^{dim} \right)' $ and so contains other +objects besides regular functions as well. This yields:\\ + +\noindent +\textit{Find $u\in V$ and $\lambda\in K$ such that} +\begin{align*} + \hat{a}(u,v) + b(v,\lambda) &= f(v),\quad &&v\in V\\ + b(u,\mu - \lambda) &\leq \langle g,(\mu - + \lambda)n\rangle_{\Gamma_C},\quad&&\mu\in K, +\end{align*} +\textit{with} +\begin{align*} + \hat{a}(u,v) &:= a'(u^i;u,v)\\ + b(u,\mu) &:= \langle un,\mu n\rangle_{\Gamma_C},\quad &&u\in V,\quad\mu\in W'. +\end{align*} +As in the section before $u^i$ denotes the linearization point for the +semi-linearform $a(.;.)$. In contrast to step-41 we directly consider $\lambda$ +as the additional, positive force $\sigma(u)n$ that the obstacle +exerts on the boundary $\Gamma_C$ of the body.\\ + +\noindent +The existence and uniqueness of $(u,\lambda)\in V\times K$ of this saddle point +problem has been stated in Glowinski, Lions and Tr\'{e}moli\`{e}res: Numerical +Analysis of Variational Inequalities, North-Holland, 1981.\\ + +\noindent +NOTE: In this example as well as in the further documentation we make the +assumption that the normal vector $n$ equals to $(0,0,1)$. This comes up with +the starting condition of our deformable body. \section{Active Set methods to solve the saddle point problem} -\section{The primal-dual active set algorithm combined with the inexact semi smooth newton method} +The linearized problem is essentially like a pure elastic problem with contact like +in step-41. The only difference consists in the fact that the contact area +adjudges at the boundary instead of in the domain. But this has no further consequence +so that we refer to the documentation of step-41 with the only hint that +$\mathcal{S}$ containts all the vertices at the contact boundary $\Gamma_C$ this +time. + +\section{The primal-dual active set algorithm combined with the inexact semi smooth +newton method} -The inexact newton method works as follows: +Now we describe an algorithm that combines the newton-method, which we use for +the nonlinear constitutive law, with the semismooth newton method for the contact. It +works as follows: \begin{itemize} \item[(0)] Initialize $\mathcal{A}_k$ and $\mathcal{F}_k$, such that $\mathcal{S} = \mathcal{A}_k \cup \mathcal{F}_k$ and $\mathcal{A}_k \cap \mathcal{F}_k = \emptyset$ and set $k = 1$. \item[(1)] Assembel the newton matrix $a'(U^k;\varphi_i,\varphi_j)$ and the right-hand-side $F(U^k)$. @@ -172,11 +224,15 @@ The inexact newton method works as follows: \end{align*} % Note that $\mathcal{S}$ contains only dofs related to the boundary $\Gamma_C$. So in contrast to step-41 there are much more than $\vert \mathcal{S}\vert$ equations necessary to determine $U$ and $\Lambda$. \item[(3)] Define the new active and inactive sets by - $$\mathcal{A}_{k+1}:=\lbrace i\in\mathcal{S}:\Lambda^k_i + c\left(\left[BU^k\right]_i - G_i\left) < 0\rbrace,$$ - $$\mathcal{F}_{k+1}:=\lbrace i\in\mathcal{S}:\Lambda^k_i + c\left(\left[BU^k\right]_i - G_i\left) \geq 0\rbrace.$$ - \item[(4)] If $\mathcal{A}_{k+1} = \mathcal{A}_k$ and $\vert F(U^{k+1}\vert < \delta$ then stop, else set $k=k+1$ and go to step (1). + $$\mathcal{A}_{k+1}:=\lbrace i\in\mathcal{S}:\Lambda^k_i + + c\left(\left[BU^k\right]_i - G_i\right) > 0\rbrace,$$ + $$\mathcal{F}_{k+1}:=\lbrace i\in\mathcal{S}:\Lambda^k_i + + c\left(\left[BU^k\right]_i - G_i\right) \leq 0\rbrace.$$ + \item[(4)] If $\mathcal{A}_{k+1} = \mathcal{A}_k$ and $\vert + F\left(U^{k+1}\right) \vert < \delta$ then stop, else set $k=k+1$ and go to + step (1). \end{itemize} \section{Implementation} -\end{document} \ No newline at end of file +\end{document} diff --git a/deal.II/examples/step-42/step-42.cc b/deal.II/examples/step-42/step-42.cc index 1f434510dd..3085e6a0ce 100644 --- a/deal.II/examples/step-42/step-42.cc +++ b/deal.II/examples/step-42/step-42.cc @@ -12,11 +12,8 @@ // @sect3{Include files} - // The first few (many?) include - // files have already been used in - // the previous example, so we will - // not explain their meaning here - // again. + // We are using the the same + // include files as in step-42: #include #include @@ -31,8 +28,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -57,1429 +54,1356 @@ #include #include +#include #include #include #include #include #include - // This is new, however: in the previous - // example we got some unwanted output from - // the linear solvers. If we want to suppress - // it, we have to include this file and add a - // single line somewhere to the program (see - // the main() function below for that): -#include - - // The final step, as in previous - // programs, is to import all the - // deal.II class and function names - // into the global namespace: -using namespace dealii; - // @sect3{The Step4 class template} - -template class ConstitutiveLaw; +#include -template -class Step4 +namespace Step42 { -public: - Step4 (int _n_refinements_global, int _n_refinements_local); - void run (); - -private: - void make_grid (); - void setup_system(); - void assemble_mass_matrix (); - void assemble_nl_system (TrilinosWrappers::MPI::Vector &u); - void residual_nl_system (TrilinosWrappers::MPI::Vector &u, - Vector &sigma_eff_vector); - void projection_active_set (); - void dirichlet_constraints (); - void solve (); - void solve_newton (); - void output_results (const std::string& title) const; - void move_mesh (const TrilinosWrappers::MPI::Vector &_complete_displacement) const; - void output_results (TrilinosWrappers::MPI::Vector vector, const std::string& title) const; - void output_results (Vector vector, const std::string& title) const; - - MPI_Comm mpi_communicator; - - parallel::distributed::Triangulation triangulation; - - FESystem fe; - DoFHandler dof_handler; - - IndexSet locally_owned_dofs; - IndexSet locally_relevant_dofs; - - int n_refinements_global; - int n_refinements_local; - unsigned int number_iterations; - std::vector run_time; - - ConstraintMatrix constraints; - ConstraintMatrix constraints_hanging_nodes; - ConstraintMatrix constraints_dirichlet_hanging_nodes; - - TrilinosWrappers::SparseMatrix system_matrix_newton; - TrilinosWrappers::SparseMatrix mass_matrix; - - TrilinosWrappers::MPI::Vector solution; - TrilinosWrappers::MPI::Vector old_solution; - TrilinosWrappers::MPI::Vector system_rhs_newton; - TrilinosWrappers::MPI::Vector resid_vector; - TrilinosWrappers::MPI::Vector diag_mass_matrix_vector; - IndexSet active_set; - - ConditionalOStream pcout; - - TrilinosWrappers::PreconditionAMG::AdditionalData additional_data; - TrilinosWrappers::PreconditionAMG preconditioner_u; - TrilinosWrappers::PreconditionAMG preconditioner_t; - - std::auto_ptr > plast_lin_hard; - - double sigma_0; // Yield stress - double gamma; // Parameter for the linear isotropic hardening - double e_modul; // E-Modul - double nu; // Poisson ratio - - std_cxx1x::shared_ptr Mp_preconditioner; -}; - -template -class ConstitutiveLaw -{ -public: - ConstitutiveLaw (double _E, double _nu, double _sigma_0, double _gamma, MPI_Comm _mpi_communicator, ConditionalOStream _pcout); - // ConstitutiveLaw (double mu, double kappa); - void plast_linear_hardening (SymmetricTensor<4,dim> &stress_strain_tensor, - SymmetricTensor<2,dim> &strain_tensor, - unsigned int &elast_points, - unsigned int &plast_points, - double &sigma_eff, - double &yield); - void linearized_plast_linear_hardening (SymmetricTensor<4,dim> &stress_strain_tensor_linearized, - SymmetricTensor<4,dim> &stress_strain_tensor, - SymmetricTensor<2,dim> &strain_tensor); - inline SymmetricTensor<2,dim> get_strain (const FEValues &fe_values, - const unsigned int shape_func, - const unsigned int q_point) const; - -private: - SymmetricTensor<4,dim> stress_strain_tensor_mu; - SymmetricTensor<4,dim> stress_strain_tensor_kappa; - double E; - double nu; - double sigma_0; - double gamma; - double mu; - double kappa; - MPI_Comm mpi_communicator; - ConditionalOStream pcout; -}; - -template -ConstitutiveLaw::ConstitutiveLaw(double _E, double _nu, double _sigma_0, double _gamma, MPI_Comm _mpi_communicator, ConditionalOStream _pcout) - :E (_E), - nu (_nu), - sigma_0 (_sigma_0), - gamma (_gamma), - mpi_communicator (_mpi_communicator), - pcout (_pcout) -{ - mu = E/(2*(1+nu)); - kappa = E/(3*(1-2*nu)); - pcout<< "-----> mu = " << mu << ", kappa = " << kappa <(), unit_symmetric_tensor()); - stress_strain_tensor_mu = 2*mu*(identity_tensor() - outer_product(unit_symmetric_tensor(), unit_symmetric_tensor())/3.0); -} + using namespace dealii; + + // @sect3{The PlasticityContactProblem class template} + + // This class provides an interface + // for a constitutive law. In this + // example we are using an elastic + // plastic material with linear, + // isotropic hardening. + + template class ConstitutiveLaw; + + // @sect3{The PlasticityContactProblem class template} + + // This class supplies all function + // and variables needed to describe + // the nonlinear contact problem. It is + // close to step-41 but with some additional + // features like: handling hanging nodes, + // a newton method, using Trilinos and p4est + // for parallel distributed computing. + // To deal with hanging nodes makes + // life a bit more complicated since + // we need an other ConstraintMatrix now. + // We create a newton method for the + // active set method for the contact + // situation and to handle the nonlinear + // operator for the constitutive law. -template -inline -SymmetricTensor<2,dim> ConstitutiveLaw::get_strain (const FEValues &fe_values, - const unsigned int shape_func, - const unsigned int q_point) const -{ - const FEValuesExtractors::Vector displacement (0); - SymmetricTensor<2,dim> tmp; + template + class PlasticityContactProblem + { + public: + PlasticityContactProblem (int _n_refinements_global, int _n_refinements_local); + void run (); - tmp = fe_values[displacement].symmetric_gradient (shape_func,q_point); + private: + void make_grid (); + void setup_system(); + void assemble_nl_system (TrilinosWrappers::MPI::Vector &u); + void residual_nl_system (TrilinosWrappers::MPI::Vector &u); + void assemble_mass_matrix_diagonal (TrilinosWrappers::SparseMatrix &mass_matrix); + void update_solution_and_constraints (); + void dirichlet_constraints (); + void solve (); + void solve_newton (); + void refine_grid (); + void move_mesh (const TrilinosWrappers::MPI::Vector &_complete_displacement) const; + void output_results (const std::string& title) const; - return tmp; -} + int n_refinements_global; + int n_refinements_local; -template -void ConstitutiveLaw::plast_linear_hardening (SymmetricTensor<4,dim> &stress_strain_tensor, - SymmetricTensor<2,dim> &strain_tensor, - unsigned int &elast_points, - unsigned int &plast_points, - double &sigma_eff, - double &yield) -{ - if (dim == 3) - { - SymmetricTensor<2,dim> stress_tensor; - stress_tensor = (stress_strain_tensor_kappa + stress_strain_tensor_mu)*strain_tensor; - double tmp = E/((1+nu)*(1-2*nu)); + MPI_Comm mpi_communicator; - SymmetricTensor<2,dim> deviator_stress_tensor = deviator(stress_tensor); + parallel::distributed::Triangulation triangulation; - double deviator_stress_tensor_norm = deviator_stress_tensor.norm (); + FESystem fe; + DoFHandler dof_handler; - yield = 0; - stress_strain_tensor = stress_strain_tensor_mu; - double beta = 1.0; - if (deviator_stress_tensor_norm >= sigma_0) - { - beta = (sigma_0 + gamma)/deviator_stress_tensor_norm; - stress_strain_tensor *= beta; - yield = 1; - plast_points += 1; - } - else - elast_points += 1; + IndexSet locally_owned_dofs; + IndexSet locally_relevant_dofs; -// std::cout<< beta < run_time; - sigma_eff = beta * deviator_stress_tensor_norm; - } -} + ConstraintMatrix constraints; + ConstraintMatrix constraints_hanging_nodes; + ConstraintMatrix constraints_dirichlet_hanging_nodes; -template -void ConstitutiveLaw::linearized_plast_linear_hardening (SymmetricTensor<4,dim> &stress_strain_tensor_linearized, - SymmetricTensor<4,dim> &stress_strain_tensor, - SymmetricTensor<2,dim> &strain_tensor) -{ - if (dim == 3) - { - SymmetricTensor<2,dim> stress_tensor; - stress_tensor = (stress_strain_tensor_kappa + stress_strain_tensor_mu)*strain_tensor; - double tmp = E/((1+nu)*(1-2*nu)); + TrilinosWrappers::SparseMatrix system_matrix_newton; - stress_strain_tensor = stress_strain_tensor_mu; - stress_strain_tensor_linearized = stress_strain_tensor_mu; + TrilinosWrappers::MPI::Vector solution; + TrilinosWrappers::MPI::Vector old_solution; + TrilinosWrappers::MPI::Vector system_rhs_newton; + TrilinosWrappers::MPI::Vector resid_vector; + TrilinosWrappers::MPI::Vector diag_mass_matrix_vector; + IndexSet active_set; - SymmetricTensor<2,dim> deviator_stress_tensor = deviator(stress_tensor); + ConditionalOStream pcout; - double deviator_stress_tensor_norm = deviator_stress_tensor.norm (); + TrilinosWrappers::PreconditionAMG::AdditionalData additional_data; + TrilinosWrappers::PreconditionAMG preconditioner_u; + TrilinosWrappers::PreconditionAMG preconditioner_t; - double beta = 1.0; - if (deviator_stress_tensor_norm >= sigma_0) - { - beta = (sigma_0 + gamma)/deviator_stress_tensor_norm; - stress_strain_tensor *= beta; - stress_strain_tensor_linearized *= beta; - deviator_stress_tensor /= deviator_stress_tensor_norm; - stress_strain_tensor_linearized -= beta*2*mu*outer_product(deviator_stress_tensor, deviator_stress_tensor); - } + std::auto_ptr > plast_lin_hard; - stress_strain_tensor += stress_strain_tensor_kappa; - stress_strain_tensor_linearized += stress_strain_tensor_kappa; - } -} + double sigma_0; // Yield stress + double gamma; // Parameter for the linear isotropic hardening + double e_modul; // E-Modul + double nu; // Poisson ratio + }; -namespace EquationData -{ template - class RightHandSide : public Function + class ConstitutiveLaw { public: - RightHandSide () : Function(dim) {} - - virtual double value (const Point &p, - const unsigned int component = 0) const; - - virtual void vector_value (const Point &p, - Vector &values) const; + ConstitutiveLaw (double _E, + double _nu, + double _sigma_0, + double _gamma, + MPI_Comm _mpi_communicator, + ConditionalOStream _pcout); + + void plast_linear_hardening (SymmetricTensor<4,dim> &stress_strain_tensor, + SymmetricTensor<2,dim> &strain_tensor, + unsigned int &elast_points, + unsigned int &plast_points, + double &yield); + void linearized_plast_linear_hardening (SymmetricTensor<4,dim> &stress_strain_tensor_linearized, + SymmetricTensor<4,dim> &stress_strain_tensor, + SymmetricTensor<2,dim> &strain_tensor); + inline SymmetricTensor<2,dim> get_strain (const FEValues &fe_values, + const unsigned int shape_func, + const unsigned int q_point) const; + + private: + SymmetricTensor<4,dim> stress_strain_tensor_mu; + SymmetricTensor<4,dim> stress_strain_tensor_kappa; + double E; + double nu; + double sigma_0; + double gamma; + double mu; + double kappa; + MPI_Comm mpi_communicator; + ConditionalOStream pcout; }; template - double RightHandSide::value (const Point &p, - const unsigned int component) const + ConstitutiveLaw::ConstitutiveLaw(double _E, double _nu, double _sigma_0, double _gamma, MPI_Comm _mpi_communicator, ConditionalOStream _pcout) + :E (_E), + nu (_nu), + sigma_0 (_sigma_0), + gamma (_gamma), + mpi_communicator (_mpi_communicator), + pcout (_pcout) { - double return_value = 0.0; - - if (component == 0) - return_value = 0.0; - if (component == 1) - return_value = 0.0; - if (component == 2) - // if ((p(0)-0.5)*(p(0)-0.5)+(p(1)-0.5)*(p(1)-0.5) < 0.2) - // return_value = -5000; - // else - return_value = 0.0; - // for (unsigned int i=0; i mu = " << mu << ", kappa = " << kappa <(), unit_symmetric_tensor()); + stress_strain_tensor_mu = 2*mu*(identity_tensor() - outer_product(unit_symmetric_tensor(), unit_symmetric_tensor())/3.0); } template - void RightHandSide::vector_value (const Point &p, - Vector &values) const + inline + SymmetricTensor<2,dim> ConstitutiveLaw::get_strain (const FEValues &fe_values, + const unsigned int shape_func, + const unsigned int q_point) const { - for (unsigned int c=0; cn_components; ++c) - values(c) = RightHandSide::value (p, c); - } + const FEValuesExtractors::Vector displacement (0); + SymmetricTensor<2,dim> tmp; + tmp = fe_values[displacement].symmetric_gradient (shape_func,q_point); + + return tmp; + } template - class BoundaryValues : public Function + void ConstitutiveLaw::plast_linear_hardening (SymmetricTensor<4,dim> &stress_strain_tensor, + SymmetricTensor<2,dim> &strain_tensor, + unsigned int &elast_points, + unsigned int &plast_points, + double &yield) { - public: - BoundaryValues () : Function(dim) {}; - - virtual double value (const Point &p, - const unsigned int component = 0) const; + if (dim == 3) + { + SymmetricTensor<2,dim> stress_tensor; + stress_tensor = (stress_strain_tensor_kappa + stress_strain_tensor_mu)*strain_tensor; + double tmp = E/((1+nu)*(1-2*nu)); - virtual void vector_value (const Point &p, - Vector &values) const; - }; + SymmetricTensor<2,dim> deviator_stress_tensor = deviator(stress_tensor); - template - double BoundaryValues::value (const Point &p, - const unsigned int component) const - { - double return_value = 0; + double deviator_stress_tensor_norm = deviator_stress_tensor.norm (); - if (component == 0) - return_value = 0.0; - if (component == 1) - return_value = 0.0; - if (component == 2) - return_value = 0.0; + yield = 0; + stress_strain_tensor = stress_strain_tensor_mu; + double beta = 1.0; + if (deviator_stress_tensor_norm >= sigma_0) + { + beta = (sigma_0 + gamma)/deviator_stress_tensor_norm; + stress_strain_tensor *= beta; + yield = 1; + plast_points += 1; + } + else + elast_points += 1; - return return_value; + stress_strain_tensor += stress_strain_tensor_kappa; + } } template - void BoundaryValues::vector_value (const Point &p, - Vector &values) const + void ConstitutiveLaw::linearized_plast_linear_hardening (SymmetricTensor<4,dim> &stress_strain_tensor_linearized, + SymmetricTensor<4,dim> &stress_strain_tensor, + SymmetricTensor<2,dim> &strain_tensor) { - for (unsigned int c=0; cn_components; ++c) - values(c) = BoundaryValues::value (p, c); - } - + if (dim == 3) + { + SymmetricTensor<2,dim> stress_tensor; + stress_tensor = (stress_strain_tensor_kappa + stress_strain_tensor_mu)*strain_tensor; + double tmp = E/((1+nu)*(1-2*nu)); - template - class Obstacle : public Function - { - public: - Obstacle () : Function(dim) {}; + stress_strain_tensor = stress_strain_tensor_mu; + stress_strain_tensor_linearized = stress_strain_tensor_mu; - virtual double value (const Point &p, - const unsigned int component = 0) const; + SymmetricTensor<2,dim> deviator_stress_tensor = deviator(stress_tensor); - virtual void vector_value (const Point &p, - Vector &values) const; - }; + double deviator_stress_tensor_norm = deviator_stress_tensor.norm (); - template - double Obstacle::value (const Point &p, - const unsigned int component) const - { - double R = 0.03; - double return_value = 0.0; - if (component == 0) - return_value = p(0); - if (component == 1) - return_value = p(1); - if (component == 2) + double beta = 1.0; + if (deviator_stress_tensor_norm >= sigma_0) { - // double hz = 0.98; - // double position_x = 0.5; - // double alpha = 12.0; - // double s_x = 0.5039649116; - // double s_y = hz + 0.00026316298; - // if (p(0) > position_x - R && p(0) < s_x) - // { - // return_value = -sqrt(R*R - (p(0)-position_x)*(p(0)-position_x)) + hz + R; - // } - // else if (p(0) >= s_x) - // { - // return_value = 12.0/90.0*p(0) + (s_y - alpha/90.0*s_x); - // } - // else - // return_value = 1e+10; - - // Hindernis Dortmund - double x1 = p(0); - double x2 = p(1); - if (((x2-0.5)*(x2-0.5)+(x1-0.5)*(x1-0.5)<=0.3*0.3)&&((x2-0.5)*(x2-0.5)+(x1-1.0)*(x1-1.0)>=0.4*0.4)&&((x2-0.5)*(x2-0.5)+x1*x1>=0.4*0.4)) - return_value = 0.999; - else - return_value = 1e+10; - - // Hindernis Werkzeug TKSE - // double shift_walze_x = 0.0; - // double shift_walze_y = 0.0; - // return_value = 0.032 + data->dicke - input_copy->mikro_height (p(0) + shift_walze_x, p(1) + shift_walze_y, p(2)); - - // Ball with radius R - // double R = 0.5; - // if (std::pow ((p(0)-1.0/2.0), 2) + std::pow ((p(1)-1.0/2.0), 2) < R*R) - // return_value = 1.0 + R - 0.001 - sqrt (R*R - std::pow ((p(0)-1.0/2.0), 2) - // - std::pow ((p(1)-1.0/2.0), 2)); - // else - // return_value = 1e+5; + beta = (sigma_0 + gamma)/deviator_stress_tensor_norm; + stress_strain_tensor *= beta; + stress_strain_tensor_linearized *= beta; + deviator_stress_tensor /= deviator_stress_tensor_norm; + stress_strain_tensor_linearized -= beta*2*mu*outer_product(deviator_stress_tensor, deviator_stress_tensor); } - return return_value; - // return 1e+10;//0.98; + stress_strain_tensor += stress_strain_tensor_kappa; + stress_strain_tensor_linearized += stress_strain_tensor_kappa; + } } - template - void Obstacle::vector_value (const Point &p, - Vector &values) const + namespace EquationData { - for (unsigned int c=0; cn_components; ++c) - values(c) = Obstacle::value (p, c); - } -} + template + class RightHandSide : public Function + { + public: + RightHandSide () : Function(dim) {} + virtual double value (const Point &p, + const unsigned int component = 0) const; - // @sect3{Implementation of the Step4 class} - - // Next for the implementation of the class - // template that makes use of the functions - // above. As before, we will write everything - -template -Step4::Step4 (int _n_refinements_global, int _n_refinements_local) - : - n_refinements_global (_n_refinements_global), - n_refinements_local (_n_refinements_local), - mpi_communicator (MPI_COMM_WORLD), - triangulation (mpi_communicator), - fe (FE_Q(1), dim), - dof_handler (triangulation), - pcout (std::cout, - (Utilities::MPI::this_mpi_process(mpi_communicator) == 0)), - sigma_0 (400), - gamma (1.e-2), - e_modul (2.0e5), - nu (0.3) -{ - // double _E, double _nu, double _sigma_0, double _gamma - plast_lin_hard.reset (new ConstitutiveLaw (e_modul, nu, sigma_0, gamma, mpi_communicator, pcout)); -} + virtual void vector_value (const Point &p, + Vector &values) const; + }; -template -void Step4::make_grid () -{ - std::vector repet(3); - repet[0] = 1;//20; - repet[1] = 1; - repet[2] = 1; - - Point p1 (0,0,0); - Point p2 (1.0, 1.0, 1.0); - GridGenerator::subdivided_hyper_rectangle (triangulation, repet, p1, p2); - - Triangulation<3>::active_cell_iterator - cell = triangulation.begin_active(), - endc = triangulation.end(); - - /* boundary_indicators: - _______ - / 9 /| - /______ / | - 8| | 8| - | 8 | / - |_______|/ - 6 - */ - - for (; cell!=endc; ++cell) - for (unsigned int face=0; face::faces_per_cell; ++face) - { - if (cell->face (face)->center ()[2] == p2(2)) - cell->face (face)->set_boundary_indicator (9); - if (cell->face (face)->center ()[0] == p1(0) || - cell->face (face)->center ()[0] == p2(0) || - cell->face (face)->center ()[1] == p1(1) || - cell->face (face)->center ()[1] == p2(1)) - cell->face (face)->set_boundary_indicator (8); - if (cell->face (face)->center ()[2] == p1(2)) - cell->face (face)->set_boundary_indicator (6); - } + template + double RightHandSide::value (const Point &p, + const unsigned int component) const + { + double return_value = 0.0; + + if (component == 0) + return_value = 0.0; + if (component == 1) + return_value = 0.0; + if (component == 2) + // if ((p(0)-0.5)*(p(0)-0.5)+(p(1)-0.5)*(p(1)-0.5) < 0.2) + // return_value = -5000; + // else + return_value = 0.0; + // for (unsigned int i=0; i + void RightHandSide::vector_value (const Point &p, + Vector &values) const + { + for (unsigned int c=0; cn_components; ++c) + values(c) = RightHandSide::value (p, c); + } - triangulation.refine_global (n_refinements_global); - // Lokale Verfeinerung des Gitters - for (int step=0; step + class BoundaryValues : public Function { - cell = triangulation.begin_active(); // Iterator ueber alle Zellen - - for (; cell!=endc; ++cell) - for (unsigned int face=0; face::faces_per_cell; ++face) - { -// if (cell->face (face)->at_boundary() -// && cell->face (face)->boundary_indicator () == 9) -// { -// cell->set_refine_flag (); -// break; -// } -// else if (cell->level () == n_refinements + n_refinements_local - 1) -// { -// cell->set_refine_flag (); -// break; -// } - -// if (cell->face (face)->at_boundary() -// && cell->face (face)->boundary_indicator () == 9) -// { -// if (cell->face (face)->vertex (0)(0) <= 0.7 && -// cell->face (face)->vertex (1)(0) >= 0.3 && -// cell->face (face)->vertex (0)(1) <= 0.875 && -// cell->face (face)->vertex (2)(1) >= 0.125) -// { -// cell->set_refine_flag (); -// break; -// } -// } - - if (step == 0 && - cell->center ()(2) < n_refinements_local*9.0/64.0) - { - cell->set_refine_flag (); - break; - } - }; - triangulation.execute_coarsening_and_refinement (); + public: + BoundaryValues () : Function(dim) {}; + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + virtual void vector_value (const Point &p, + Vector &values) const; }; -} -template -void Step4::setup_system () -{ - // setup dofs - { - dof_handler.distribute_dofs (fe); + template + double BoundaryValues::value (const Point &p, + const unsigned int component) const + { + double return_value = 0; + + if (component == 0) + return_value = 0.0; + if (component == 1) + return_value = 0.0; + if (component == 2) + return_value = 0.0; + + return return_value; + } - locally_owned_dofs = dof_handler.locally_owned_dofs (); - locally_relevant_dofs.clear(); - DoFTools::extract_locally_relevant_dofs (dof_handler, - locally_relevant_dofs); + template + void BoundaryValues::vector_value (const Point &p, + Vector &values) const + { + for (unsigned int c=0; cn_components; ++c) + values(c) = BoundaryValues::value (p, c); + } + + + template + class Obstacle : public Function + { + public: + Obstacle () : Function(dim) {}; + + virtual double value (const Point &p, + const unsigned int component = 0) const; + + virtual void vector_value (const Point &p, + Vector &values) const; + }; + + template + double Obstacle::value (const Point &p, + const unsigned int component) const + { + double R = 0.03; + double return_value = 0.0; + if (component == 0) + return_value = p(0); + if (component == 1) + return_value = p(1); + if (component == 2) + { + // double hz = 0.98; + // double position_x = 0.5; + // double alpha = 12.0; + // double s_x = 0.5039649116; + // double s_y = hz + 0.00026316298; + // if (p(0) > position_x - R && p(0) < s_x) + // { + // return_value = -sqrt(R*R - (p(0)-position_x)*(p(0)-position_x)) + hz + R; + // } + // else if (p(0) >= s_x) + // { + // return_value = 12.0/90.0*p(0) + (s_y - alpha/90.0*s_x); + // } + // else + // return_value = 1e+10; + + // Hindernis Dortmund + double x1 = p(0); + double x2 = p(1); + if (((x2-0.5)*(x2-0.5)+(x1-0.5)*(x1-0.5)<=0.3*0.3)&&((x2-0.5)*(x2-0.5)+(x1-1.0)*(x1-1.0)>=0.4*0.4)&&((x2-0.5)*(x2-0.5)+x1*x1>=0.4*0.4)) + return_value = 0.999; + else + return_value = 1e+10; + + // Hindernis Werkzeug TKSE + // double shift_walze_x = 0.0; + // double shift_walze_y = 0.0; + // return_value = 0.032 + data->dicke - input_copy->mikro_height (p(0) + shift_walze_x, p(1) + shift_walze_y, p(2)); + + // Ball with radius R + // double R = 0.5; + // if (std::pow ((p(0)-1.0/2.0), 2) + std::pow ((p(1)-1.0/2.0), 2) < R*R) + // return_value = 1.0 + R - 0.001 - sqrt (R*R - std::pow ((p(0)-1.0/2.0), 2) + // - std::pow ((p(1)-1.0/2.0), 2)); + // else + // return_value = 1e+5; + } + return return_value; + } + + template + void Obstacle::vector_value (const Point &p, + Vector &values) const + { + for (unsigned int c=0; cn_components; ++c) + values(c) = Obstacle::value (p, c); + } } - // setup hanging nodes and dirichlet constraints + + // @sect3{Implementation of the PlasticityContactProblem class} + + // Next for the implementation of the class + // template that makes use of the functions + // above. As before, we will write everything + + template + PlasticityContactProblem::PlasticityContactProblem (int _n_refinements_global, int _n_refinements_local) + : + n_refinements_global (_n_refinements_global), + n_refinements_local (_n_refinements_local), + mpi_communicator (MPI_COMM_WORLD), + triangulation (mpi_communicator), + fe (FE_Q(1), dim), + dof_handler (triangulation), + pcout (std::cout, + (Utilities::MPI::this_mpi_process(mpi_communicator) == 0)), + sigma_0 (400), + gamma (1.e-2), + e_modul (2.0e5), + nu (0.3) { - // constraints_hanging_nodes.clear (); - constraints_hanging_nodes.reinit (locally_relevant_dofs); - DoFTools::make_hanging_node_constraints (dof_handler, - constraints_hanging_nodes); - constraints_hanging_nodes.close (); - - pcout << "Number of active cells: " - << triangulation.n_active_cells() - << std::endl - << "Total number of cells: " - << triangulation.n_cells() - << std::endl - << "Number of degrees of freedom: " - << dof_handler.n_dofs () - << std::endl; - - dirichlet_constraints (); + // double _E, double _nu, double _sigma_0, double _gamma + plast_lin_hard.reset (new ConstitutiveLaw (e_modul, nu, sigma_0, gamma, mpi_communicator, pcout)); } - // Initialzation for matrices and vectors + template + void PlasticityContactProblem::make_grid () { - solution.reinit (locally_relevant_dofs, mpi_communicator); - system_rhs_newton.reinit (locally_owned_dofs, mpi_communicator); - old_solution.reinit (system_rhs_newton); - resid_vector.reinit (system_rhs_newton); - diag_mass_matrix_vector.reinit (system_rhs_newton); - active_set.set_size (locally_relevant_dofs.size ()); + std::vector repet(3); + repet[0] = 1;//20; + repet[1] = 1; + repet[2] = 1; + + Point p1 (0,0,0); + Point p2 (1.0, 1.0, 1.0); + GridGenerator::subdivided_hyper_rectangle (triangulation, repet, p1, p2); + + Triangulation<3>::active_cell_iterator + cell = triangulation.begin_active(), + endc = triangulation.end(); + + /* boundary_indicators: + _______ + / 9 /| + /______ / | + 8| | 8| + | 8 | / + |_______|/ + 6 + */ + + for (; cell!=endc; ++cell) + for (unsigned int face=0; face::faces_per_cell; ++face) + { + if (cell->face (face)->center ()[2] == p2(2)) + cell->face (face)->set_boundary_indicator (9); + if (cell->face (face)->center ()[0] == p1(0) || + cell->face (face)->center ()[0] == p2(0) || + cell->face (face)->center ()[1] == p1(1) || + cell->face (face)->center ()[1] == p2(1)) + cell->face (face)->set_boundary_indicator (8); + if (cell->face (face)->center ()[2] == p1(2)) + cell->face (face)->set_boundary_indicator (6); + } + + triangulation.refine_global (n_refinements_global); + + // Lokale Verfeinerung des Gitters +// for (int step=0; step::faces_per_cell; ++face) +// { +// // if (cell->face (face)->at_boundary() +// // && cell->face (face)->boundary_indicator () == 9) +// // { +// // cell->set_refine_flag (); +// // break; +// // } +// // else if (cell->level () == n_refinements + n_refinements_local - 1) +// // { +// // cell->set_refine_flag (); +// // break; +// // } +// +// // if (cell->face (face)->at_boundary() +// // && cell->face (face)->boundary_indicator () == 9) +// // { +// // if (cell->face (face)->vertex (0)(0) <= 0.7 && +// // cell->face (face)->vertex (1)(0) >= 0.3 && +// // cell->face (face)->vertex (0)(1) <= 0.875 && +// // cell->face (face)->vertex (2)(1) >= 0.125) +// // { +// // cell->set_refine_flag (); +// // break; +// // } +// // } +// +// if (step == 0 && +// cell->center ()(2) < n_refinements_local*9.0/64.0) +// { +// cell->set_refine_flag (); +// break; +// } +// }; +// triangulation.execute_coarsening_and_refinement (); +// }; } - // setup sparsity pattern + template + void PlasticityContactProblem::setup_system () { - TrilinosWrappers::SparsityPattern sp (locally_owned_dofs, - mpi_communicator); + // setup dofs + { + dof_handler.distribute_dofs (fe); + + locally_owned_dofs = dof_handler.locally_owned_dofs (); + locally_relevant_dofs.clear(); + DoFTools::extract_locally_relevant_dofs (dof_handler, + locally_relevant_dofs); + } + + // setup hanging nodes and dirichlet constraints + { + constraints_hanging_nodes.clear (); + constraints_hanging_nodes.reinit (locally_relevant_dofs); + DoFTools::make_hanging_node_constraints (dof_handler, + constraints_hanging_nodes); + constraints_hanging_nodes.close (); + + pcout << "Number of active cells: " + << triangulation.n_active_cells() + << std::endl + << "Total number of cells: " + << triangulation.n_cells() + << std::endl + << "Number of degrees of freedom: " + << dof_handler.n_dofs () + << std::endl; + + dirichlet_constraints (); + } - DoFTools::make_sparsity_pattern (dof_handler, sp, constraints_dirichlet_hanging_nodes, false, - Utilities::MPI::this_mpi_process(mpi_communicator)); + // Initialzation for matrices and vectors + { + solution.reinit (locally_relevant_dofs, mpi_communicator); + system_rhs_newton.reinit (locally_owned_dofs, mpi_communicator); + old_solution.reinit (system_rhs_newton); + resid_vector.reinit (system_rhs_newton); + diag_mass_matrix_vector.reinit (system_rhs_newton); + active_set.clear (); + active_set.set_size (locally_relevant_dofs.size ()); + } - sp.compress(); + // setup sparsity pattern + { + TrilinosWrappers::SparsityPattern sp (locally_owned_dofs, + mpi_communicator); - system_matrix_newton.reinit (sp); + DoFTools::make_sparsity_pattern (dof_handler, sp, constraints_dirichlet_hanging_nodes, false, + Utilities::MPI::this_mpi_process(mpi_communicator)); - mass_matrix.reinit (sp); - } + sp.compress(); - assemble_mass_matrix (); - const unsigned int - start = (system_rhs_newton.local_range().first), - end = (system_rhs_newton.local_range().second); - for (unsigned int j=start; j -void Step4::assemble_mass_matrix () -{ - QTrapez face_quadrature_formula; + TrilinosWrappers::SparseMatrix mass_matrix; + mass_matrix.reinit (sp); + assemble_mass_matrix_diagonal (mass_matrix); + const unsigned int + start = (system_rhs_newton.local_range().first), + end = (system_rhs_newton.local_range().second); + for (unsigned int j=start; j fe_values_face (fe, face_quadrature_formula, - update_values | update_quadrature_points | update_JxW_values); + diag_mass_matrix_vector.compress (); + } + } - const unsigned int dofs_per_cell = fe.dofs_per_cell; - const unsigned int dofs_per_face = fe.dofs_per_face; - const unsigned int n_face_q_points = face_quadrature_formula.size(); + template + void PlasticityContactProblem::assemble_nl_system (TrilinosWrappers::MPI::Vector &u) + { + QGauss quadrature_formula(2); + QGauss face_quadrature_formula(2); + + FEValues fe_values (fe, quadrature_formula, + UpdateFlags(update_values | + update_gradients | + update_q_points | + update_JxW_values)); + + FEFaceValues fe_values_face (fe, face_quadrature_formula, + update_values | update_quadrature_points | + update_JxW_values); + + const unsigned int dofs_per_cell = fe.dofs_per_cell; + const unsigned int n_q_points = quadrature_formula.size (); + const unsigned int n_face_q_points = face_quadrature_formula.size(); + + const EquationData::RightHandSide right_hand_side; + std::vector > right_hand_side_values (n_q_points, + Vector(dim)); + std::vector > right_hand_side_values_face (n_face_q_points, + Vector(dim)); + + FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); + Vector cell_rhs (dofs_per_cell); + + std::vector local_dof_indices (dofs_per_cell); + + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), + endc = dof_handler.end(); + + const FEValuesExtractors::Vector displacement (0); + + TrilinosWrappers::MPI::Vector test_rhs(solution); + const double kappa = 1.0; + for (; cell!=endc; ++cell) + if (cell->is_locally_owned()) + { + fe_values.reinit (cell); + cell_matrix = 0; + cell_rhs = 0; + + right_hand_side.vector_value_list (fe_values.get_quadrature_points(), + right_hand_side_values); + + std::vector > strain_tensor (n_q_points); + fe_values[displacement].get_function_symmetric_gradients (u, strain_tensor); + + for (unsigned int q_point=0; q_point stress_strain_tensor_linearized; + SymmetricTensor<4,dim> stress_strain_tensor; + SymmetricTensor<2,dim> stress_tensor; + + plast_lin_hard->linearized_plast_linear_hardening (stress_strain_tensor_linearized, + stress_strain_tensor, + strain_tensor[q_point]); + + // if (q_point == 0) + // std::cout<< stress_strain_tensor_linearized <get_strain(fe_values, i, q_point); + + for (unsigned int j=0; jget_strain(fe_values, j, q_point) * + fe_values.JxW (q_point)); + } + + // the linearized part a(v^i;v^i,v) of the rhs + cell_rhs(i) += (stress_tensor * + strain_tensor[q_point] * + fe_values.JxW (q_point)); + + // the residual part a(v^i;v) of the rhs + cell_rhs(i) -= (strain_tensor[q_point] * stress_strain_tensor * + plast_lin_hard->get_strain(fe_values, i, q_point) * + fe_values.JxW (q_point)); + + // the residual part F(v) of the rhs + Tensor<1,dim> rhs_values; + rhs_values = 0; + cell_rhs(i) += (fe_values[displacement].value (i, q_point) * + rhs_values * + fe_values.JxW (q_point)); + } + } + + for (unsigned int face=0; face::faces_per_cell; ++face) + { + if (cell->face (face)->at_boundary() + && cell->face (face)->boundary_indicator () == 9) + { + fe_values_face.reinit (cell, face); + + right_hand_side.vector_value_list (fe_values_face.get_quadrature_points(), + right_hand_side_values_face); + + for (unsigned int q_point=0; q_point rhs_values; + rhs_values = 0; + for (unsigned int i=0; iget_dof_indices (local_dof_indices); + constraints.distribute_local_to_global (cell_matrix, cell_rhs, + local_dof_indices, + system_matrix_newton, system_rhs_newton, true); + }; - FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); + system_matrix_newton.compress (); + system_rhs_newton.compress (Add); + } - std::vector local_dof_indices (dofs_per_cell); + template + void PlasticityContactProblem::residual_nl_system (TrilinosWrappers::MPI::Vector &u) + { + QGauss quadrature_formula(2); + QGauss face_quadrature_formula(2); + + FEValues fe_values (fe, quadrature_formula, + UpdateFlags(update_values | + update_gradients | + update_q_points | + update_JxW_values)); + + FEFaceValues fe_values_face (fe, face_quadrature_formula, + update_values | update_quadrature_points | + update_JxW_values); + + const unsigned int dofs_per_cell = fe.dofs_per_cell; + const unsigned int n_q_points = quadrature_formula.size (); + const unsigned int n_face_q_points = face_quadrature_formula.size(); + + const EquationData::RightHandSide right_hand_side; + std::vector > right_hand_side_values (n_q_points, + Vector(dim)); + std::vector > right_hand_side_values_face (n_face_q_points, + Vector(dim)); + + Vector cell_rhs (dofs_per_cell); + + std::vector local_dof_indices (dofs_per_cell); + + const FEValuesExtractors::Vector displacement (0); + + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), + endc = dof_handler.end(); + + unsigned int elast_points = 0; + unsigned int plast_points = 0; + double yield = 0; + unsigned int cell_number = 0; + for (; cell!=endc; ++cell) + if (cell->is_locally_owned()) + { + fe_values.reinit (cell); + cell_rhs = 0; + + right_hand_side.vector_value_list (fe_values.get_quadrature_points(), + right_hand_side_values); + + std::vector > strain_tensor (n_q_points); + fe_values[displacement].get_function_symmetric_gradients (u, strain_tensor); + + for (unsigned int q_point=0; q_point stress_strain_tensor; + SymmetricTensor<2,dim> stress_tensor; + + plast_lin_hard->plast_linear_hardening (stress_strain_tensor, strain_tensor[q_point], + elast_points, plast_points, yield); + + for (unsigned int i=0; iget_strain(fe_values, i, q_point) * + fe_values.JxW (q_point)); + + Tensor<1,dim> rhs_values; + rhs_values = 0; + cell_rhs(i) += ((fe_values[displacement].value (i, q_point) * + rhs_values) * + fe_values.JxW (q_point)); + }; + }; + + for (unsigned int face=0; face::faces_per_cell; ++face) + { + if (cell->face (face)->at_boundary() + && cell->face (face)->boundary_indicator () == 9) + { + fe_values_face.reinit (cell, face); + + right_hand_side.vector_value_list (fe_values_face.get_quadrature_points(), + right_hand_side_values_face); + + for (unsigned int q_point=0; q_point rhs_values; + rhs_values = 0; + for (unsigned int i=0; iget_dof_indices (local_dof_indices); + constraints_dirichlet_hanging_nodes.distribute_local_to_global (cell_rhs, + local_dof_indices, + system_rhs_newton); + + cell_number += 1; + }; - const FEValuesExtractors::Vector displacement (0); + system_rhs_newton.compress (); - typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active(), - endc = dof_handler.end(); + unsigned int sum_elast_points = Utilities::MPI::sum(elast_points, mpi_communicator); + unsigned int sum_plast_points = Utilities::MPI::sum(plast_points, mpi_communicator); + pcout<< "Elast-Points = " << sum_elast_points < + void PlasticityContactProblem::update_solution_and_constraints () + { + clock_t start_proj, end_proj; -template -void Step4::dirichlet_constraints () -{ - /* boundary_indicators: - _______ - / 9 /| - /______ / | - 8| | 8| - | 8 | / - |_______|/ - 6 - */ - - constraints_dirichlet_hanging_nodes.reinit (locally_relevant_dofs); - constraints_dirichlet_hanging_nodes.merge (constraints_hanging_nodes); - - std::vector component_mask (dim, true); - component_mask[0] = true; - component_mask[1] = true; - component_mask[2] = true; - VectorTools::interpolate_boundary_values (dof_handler, - 6, - EquationData::BoundaryValues(), - constraints_dirichlet_hanging_nodes, - component_mask); - - component_mask[0] = true; - component_mask[1] = true; - component_mask[2] = false; - VectorTools::interpolate_boundary_values (dof_handler, - 8, - EquationData::BoundaryValues(), - constraints_dirichlet_hanging_nodes, - component_mask); - constraints_dirichlet_hanging_nodes.close (); -} + const EquationData::Obstacle obstacle; + std::vector vertex_touched (dof_handler.n_dofs (), false); -template -void Step4::solve () -{ - pcout << "Solving ..." << std::endl; - Timer t; + typename DoFHandler::active_cell_iterator + cell = dof_handler.begin_active(), + endc = dof_handler.end(); - TrilinosWrappers::MPI::Vector distributed_solution (system_rhs_newton); - distributed_solution = solution; - - constraints_hanging_nodes.set_zero (distributed_solution); + TrilinosWrappers::MPI::Vector distributed_solution (system_rhs_newton); + distributed_solution = solution; + TrilinosWrappers::MPI::Vector lambda (solution); + lambda = resid_vector; + TrilinosWrappers::MPI::Vector diag_mass_matrix_vector_relevant (solution); + diag_mass_matrix_vector_relevant = diag_mass_matrix_vector; + + constraints.reinit(locally_relevant_dofs); + active_set.clear (); + IndexSet active_set_locally_owned; + active_set_locally_owned.set_size (locally_owned_dofs.size ()); + const double c = 100.0*e_modul; + + for (; cell!=endc; ++cell) + if (cell->is_locally_owned()) + for (unsigned int face=0; face::faces_per_cell; ++face) + if (cell->face (face)->at_boundary() + && cell->face (face)->boundary_indicator () == 9) + for (unsigned int v=0; v::vertices_per_cell; ++v) + { + unsigned int index_z = cell->face (face)->vertex_dof_index (v,2); + + if (vertex_touched[cell->face (face)->vertex_index(v)] == false) + vertex_touched[cell->face (face)->vertex_index(v)] = true; + else + continue; + + // the local row where + Point point (cell->face (face)->vertex (v)[0],/* + solution (index_x),*/ + cell->face (face)->vertex (v)[1], + cell->face (face)->vertex (v)[2]); + + double obstacle_value = obstacle.value (point, 2); + double solution_index_z = solution (index_z); + double gap = obstacle_value - point (2); + + if (lambda (index_z) + + c * + diag_mass_matrix_vector_relevant (index_z) * + (solution_index_z - gap) + > 0) + { + constraints.add_line (index_z); + constraints.set_inhomogeneity (index_z, gap); + + distributed_solution (index_z) = gap; + + if (locally_relevant_dofs.is_element (index_z)) + active_set.add_index (index_z); + + if (locally_owned_dofs.is_element (index_z)) + active_set_locally_owned.add_index (index_z); + + // std::cout<< index_z << ", " + // << "Error: " << lambda (index_z) + + // diag_mass_matrix_vector_relevant (index_z)*c*(solution_index_z - gap) + // << ", " << lambda (index_z) + // << ", " << diag_mass_matrix_vector_relevant (index_z) + // << ", " << obstacle_value + // << ", " << solution_index_z + // < + void PlasticityContactProblem::dirichlet_constraints () + { + /* boundary_indicators: + _______ + / 9 /| + /______ / | + 8| | 8| + | 8 | / + |_______|/ + 6 + */ + + constraints_dirichlet_hanging_nodes.reinit (locally_relevant_dofs); + constraints_dirichlet_hanging_nodes.merge (constraints_hanging_nodes); + + std::vector component_mask (dim, true); + component_mask[0] = true; + component_mask[1] = true; + component_mask[2] = true; + VectorTools::interpolate_boundary_values (dof_handler, + 6, + EquationData::BoundaryValues(), + constraints_dirichlet_hanging_nodes, + component_mask); + + component_mask[0] = true; + component_mask[1] = true; + component_mask[2] = false; + VectorTools::interpolate_boundary_values (dof_handler, + 8, + EquationData::BoundaryValues(), + constraints_dirichlet_hanging_nodes, + component_mask); + constraints_dirichlet_hanging_nodes.close (); + } + + template + void PlasticityContactProblem::solve () + { + pcout << "Solving ..." << std::endl; + Timer t; - // Solving iterative + TrilinosWrappers::MPI::Vector distributed_solution (system_rhs_newton); + distributed_solution = solution; - MPI_Barrier (mpi_communicator); - t.restart(); + constraints_hanging_nodes.set_zero (distributed_solution); - preconditioner_u.initialize (system_matrix_newton, additional_data); - - MPI_Barrier (mpi_communicator); - t.stop(); - if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0) - run_time[6] += t.wall_time(); - - MPI_Barrier (mpi_communicator); - t.restart(); - -// ReductionControl reduction_control (10000, 1e-15, 1e-4); -// SolverCG -// solver (reduction_control, mpi_communicator); -// solver.solve (system_matrix_newton, distributed_solution, system_rhs_newton, preconditioner_u); - - PrimitiveVectorMemory mem; - TrilinosWrappers::MPI::Vector tmp (system_rhs_newton); - const double solver_tolerance = 1e-4 * - system_matrix_newton.residual (tmp, distributed_solution, system_rhs_newton); - SolverControl solver_control (system_matrix_newton.m(), solver_tolerance); - SolverFGMRES - solver(solver_control, mem, - SolverFGMRES:: - AdditionalData(30, true)); - solver.solve(system_matrix_newton, distributed_solution, system_rhs_newton, preconditioner_u); - - pcout << "Initial error: " << solver_control.initial_value() < -void Step4::solve_newton () -{ - double resid=0; - double resid_old=100000; - TrilinosWrappers::MPI::Vector res (system_rhs_newton); - TrilinosWrappers::MPI::Vector tmp_vector (system_rhs_newton); - Timer t; - - std::vector > constant_modes; - std::vector components (dim,true); - components[dim] = false; - DoFTools::extract_constant_modes (dof_handler, components, - constant_modes); - - additional_data.elliptic = true; - additional_data.n_cycles = 1; - additional_data.w_cycle = false; - additional_data.output_details = false; - additional_data.smoother_sweeps = 2; - additional_data.aggregation_threshold = 1e-2; - - IndexSet active_set_old (active_set); - Vector sigma_eff_vector; - sigma_eff_vector.reinit (triangulation.n_active_cells()); - unsigned int j = 0; - unsigned int number_assemble_system = 0; - for (; j<=100;j++) - { - pcout<< " " <(i)); - old_solution = tmp_vector; - old_solution.sadd(1-a,a, distributed_solution); - - MPI_Barrier (mpi_communicator); - t.restart(); - system_rhs_newton = 0; - sigma_eff_vector = 0; - solution = old_solution; - residual_nl_system (solution, sigma_eff_vector); - res = system_rhs_newton; - - const unsigned int - start_res = (res.local_range().first), - end_res = (res.local_range().second); - for (unsigned int n=start_res; n::type_dof_data, - data_component_interpretation); - data_out.add_data_vector (lambda, std::vector(dim, "Residual"), - DataOut::type_dof_data, - data_component_interpretation); - data_out.add_data_vector (active_set, std::vector(dim, "ActiveSet"), - DataOut::type_dof_data, - data_component_interpretation); + pcout << "Initial error: " << solver_control.initial_value() < subdomain (triangulation.n_active_cells()); - for (unsigned int i=0; i filenames; - for (unsigned int i=0; - i + void PlasticityContactProblem::solve_newton () + { + double resid=0; + double resid_old=100000; + TrilinosWrappers::MPI::Vector res (system_rhs_newton); + TrilinosWrappers::MPI::Vector tmp_vector (system_rhs_newton); + Timer t; + + std::vector > constant_modes; + std::vector components (dim,true); + components[dim] = false; + DoFTools::extract_constant_modes (dof_handler, components, + constant_modes); + + additional_data.elliptic = true; + additional_data.n_cycles = 1; + additional_data.w_cycle = false; + additional_data.output_details = false; + additional_data.smoother_sweeps = 2; + additional_data.aggregation_threshold = 1e-2; + + IndexSet active_set_old (active_set); + unsigned int j = 0; + unsigned int number_assemble_system = 0; + for (; j<=100;j++) + { + pcout<< " " <(i)); + old_solution = tmp_vector; + old_solution.sadd(1-a,a, distributed_solution); + + MPI_Barrier (mpi_communicator); + t.restart(); + system_rhs_newton = 0; + solution = old_solution; + residual_nl_system (solution); + res = system_rhs_newton; + + const unsigned int + start_res = (res.local_range().first), + end_res = (res.local_range().second); + for (unsigned int n=start_res; n vertex_touched (triangulation.n_vertices(), - false); - - for (typename DoFHandler::active_cell_iterator - cell = dof_handler.begin_active (); - cell != dof_handler.end(); ++cell) - if (cell->is_locally_owned()) - for (unsigned int v=0; v::vertices_per_cell; ++v) - { - if (vertex_touched[cell->vertex_index(v)] == false) - { - vertex_touched[cell->vertex_index(v)] = true; - - Point vertex_displacement; - for (unsigned int d=0; dvertex_dof_index(v,d)) != 0) - vertex_displacement[d] - = _complete_displacement(cell->vertex_dof_index(v,d)); - } - - cell->vertex(v) += vertex_displacement; - } - } -} + } -template -void Step4::output_results (TrilinosWrappers::MPI::Vector vector, - const std::string& title) const -{ - DataOut data_out; + template + void PlasticityContactProblem::move_mesh (const TrilinosWrappers::MPI::Vector &_complete_displacement) const + { + pcout<< "Moving mesh." < vertex_touched (triangulation.n_vertices(), + false); + + for (typename DoFHandler::active_cell_iterator + cell = dof_handler.begin_active (); + cell != dof_handler.end(); ++cell) + if (cell->is_locally_owned()) + for (unsigned int v=0; v::vertices_per_cell; ++v) + { + if (vertex_touched[cell->vertex_index(v)] == false) + { + vertex_touched[cell->vertex_index(v)] = true; + + Point vertex_displacement; + for (unsigned int d=0; dvertex_dof_index(v,d)) != 0) + vertex_displacement[d] + = _complete_displacement(cell->vertex_dof_index(v,d)); + } + + cell->vertex(v) += vertex_displacement; + } + } + } - data_out.attach_dof_handler (dof_handler); - data_out.add_data_vector (vector, "vector_to_plot"); + template + void PlasticityContactProblem::output_results (const std::string& title) const + { + move_mesh (solution); - data_out.build_patches (); + TrilinosWrappers::MPI::Vector lambda (solution); + lambda = resid_vector; - std::ofstream output_vtk (dim == 2 ? - (title + ".vtk").c_str () : - (title + ".vtk").c_str ()); - data_out.write_vtk (output_vtk); -} + DataOut data_out; -template -void Step4::output_results (Vector vector, const std::string& title) const -{ - DataOut data_out; + data_out.attach_dof_handler (dof_handler); - data_out.attach_dof_handler (dof_handler); - data_out.add_data_vector (vector, "vector_to_plot"); + const std::vector + data_component_interpretation + (dim, DataComponentInterpretation::component_is_part_of_vector); + data_out.add_data_vector (solution, std::vector(dim, "Displacement"), + DataOut::type_dof_data, + data_component_interpretation); + data_out.add_data_vector (lambda, std::vector(dim, "Residual"), + DataOut::type_dof_data, + data_component_interpretation); + data_out.add_data_vector (active_set, std::vector(dim, "ActiveSet"), + DataOut::type_dof_data, + data_component_interpretation); - data_out.build_patches (); + Vector subdomain (triangulation.n_active_cells()); + for (unsigned int i=0; i -void Step4::run () -{ - pcout << "Solving problem in " << dim << " space dimensions." << std::endl; + const std::string filename = (title + "-" + + Utilities::int_to_string + (triangulation.locally_owned_subdomain(), 4)); - run_time.resize (8); + std::ofstream output_vtu ((filename + ".vtu").c_str ()); + data_out.write_vtu (output_vtu); - clock_t start, end; + if (Utilities::MPI::this_mpi_process(mpi_communicator) == 0) + { + std::vector filenames; + for (unsigned int i=0; + i + void PlasticityContactProblem::run () + { + pcout << "Solving problem in " << dim << " space dimensions." << std::endl; - end = clock(); - run_time[0] = (double)(end-start)/CLOCKS_PER_SEC; + Timer t; + run_time.resize (8); - solve_newton (); + const unsigned int n_cycles = 5; + for (unsigned int cycle=0; cyclemain
    function} - // And this is the main function. It also - // looks mostly like in step-3, but if you - // look at the code below, note how we first - // create a variable of type - // Step4@<2@> (forcing - // the compiler to compile the class template - // with dim replaced by - // 2) and run a 2d simulation, - // and then we do the whole thing over in 3d. - // - // In practice, this is probably not what you - // would do very frequently (you probably - // either want to solve a 2d problem, or one - // in 3d, but not both at the same - // time). However, it demonstrates the - // mechanism by which we can simply change - // which dimension we want in a single place, - // and thereby force the compiler to - // recompile the dimension independent class - // templates for the dimension we - // request. The emphasis here lies on the - // fact that we only need to change a single - // place. This makes it rather trivial to - // debug the program in 2d where computations - // are fast, and then switch a single place - // to a 3 to run the much more computing - // intensive program in 3d for `real' - // computations. - // - // Each of the two blocks is enclosed in - // braces to make sure that the - // laplace_problem_2d variable - // goes out of scope (and releases the memory - // it holds) before we move on to allocate - // memory for the 3d case. Without the - // additional braces, the - // laplace_problem_2d variable - // would only be destroyed at the end of the - // function, i.e. after running the 3d - // problem, and would needlessly hog memory - // while the 3d run could actually use it. - // - // Finally, the first line of the function is - // used to suppress some output. Remember - // that in the previous example, we had the - // output from the linear solvers about the - // starting residual and the number of the - // iteration where convergence was - // detected. This can be suppressed through - // the deallog.depth_console(0) - // call. - // - // The rationale here is the following: the - // deallog (i.e. deal-log, not de-allog) - // variable represents a stream to which some - // parts of the library write output. It - // redirects this output to the console and - // if required to a file. The output is - // nested in a way so that each function can - // use a prefix string (separated by colons) - // for each line of output; if it calls - // another function, that may also use its - // prefix which is then printed after the one - // of the calling function. Since output from - // functions which are nested deep below is - // usually not as important as top-level - // output, you can give the deallog variable - // a maximal depth of nested output for - // output to console and file. The depth zero - // which we gave here means that no output is - // written. By changing it you can get more - // information about the innards of the - // library. int main (int argc, char *argv[]) { + using namespace dealii; + using namespace Step42; + deallog.depth_console (0); clock_t start, end; @@ -1488,16 +1412,16 @@ int main (int argc, char *argv[]) Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv); { - int _n_refinements_global = 1; + int _n_refinements_global = 2; int _n_refinements_local = 1; - + if (argc == 3) { _n_refinements_global = atoi(argv[1]); _n_refinements_local = atoi(argv[2]); } - - Step4<3> laplace_problem_3d (_n_refinements_global, _n_refinements_local); + + PlasticityContactProblem<3> laplace_problem_3d (_n_refinements_global, _n_refinements_local); laplace_problem_3d.run (); } diff --git a/deal.II/examples/step-43/step-43.cc b/deal.II/examples/step-43/step-43.cc index 0410e92663..551453329d 100644 --- a/deal.II/examples/step-43/step-43.cc +++ b/deal.II/examples/step-43/step-43.cc @@ -53,7 +53,7 @@ #include #include -#include +#include #include #include diff --git a/deal.II/examples/step-44/step-44.cc b/deal.II/examples/step-44/step-44.cc index ee3bfd05e4..a60ee65ff4 100644 --- a/deal.II/examples/step-44/step-44.cc +++ b/deal.II/examples/step-44/step-44.cc @@ -49,7 +49,7 @@ #include #include -#include +#include #include #include diff --git a/deal.II/examples/step-45/step-45.cc b/deal.II/examples/step-45/step-45.cc index 9a01ff0c5b..1374b9708a 100644 --- a/deal.II/examples/step-45/step-45.cc +++ b/deal.II/examples/step-45/step-45.cc @@ -38,7 +38,7 @@ #include #include -#include +#include #include diff --git a/deal.II/examples/step-46/step-46.cc b/deal.II/examples/step-46/step-46.cc index dbef54992b..54a7383279 100644 --- a/deal.II/examples/step-46/step-46.cc +++ b/deal.II/examples/step-46/step-46.cc @@ -48,7 +48,7 @@ #include #include -#include +#include #include #include diff --git a/deal.II/examples/step-47/step-47.cc b/deal.II/examples/step-47/step-47.cc index cb905c9c48..4bcd524b5f 100644 --- a/deal.II/examples/step-47/step-47.cc +++ b/deal.II/examples/step-47/step-47.cc @@ -31,8 +31,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-48/step-48.cc b/deal.II/examples/step-48/step-48.cc index 451281dc28..7a4259e428 100644 --- a/deal.II/examples/step-48/step-48.cc +++ b/deal.II/examples/step-48/step-48.cc @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/deal.II/examples/step-5/step-5.cc b/deal.II/examples/step-5/step-5.cc index c5bd15aedf..9231a64bf4 100644 --- a/deal.II/examples/step-5/step-5.cc +++ b/deal.II/examples/step-5/step-5.cc @@ -31,8 +31,8 @@ #include #include #include -#include -#include +#include +#include #include // This one is new. We want to read a diff --git a/deal.II/examples/step-6/step-6.cc b/deal.II/examples/step-6/step-6.cc index fca0d404aa..caf09197cd 100644 --- a/deal.II/examples/step-6/step-6.cc +++ b/deal.II/examples/step-6/step-6.cc @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-7/step-7.cc b/deal.II/examples/step-7/step-7.cc index c6e3cce6ce..6b2e40229e 100644 --- a/deal.II/examples/step-7/step-7.cc +++ b/deal.II/examples/step-7/step-7.cc @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include @@ -61,7 +61,7 @@ // collects all important data during a run // and prints it at the end as a table. These // comes from the following two files: -#include +#include #include // And finally, we need to use the // FEFaceValues class, which is diff --git a/deal.II/examples/step-8/step-8.cc b/deal.II/examples/step-8/step-8.cc index 37c3d8bdf7..34beba20e0 100644 --- a/deal.II/examples/step-8/step-8.cc +++ b/deal.II/examples/step-8/step-8.cc @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/deal.II/examples/step-9/step-9.cc b/deal.II/examples/step-9/step-9.cc index 53374f6cb7..40d12c9b88 100644 --- a/deal.II/examples/step-9/step-9.cc +++ b/deal.II/examples/step-9/step-9.cc @@ -32,8 +32,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/deal.II/include/deal.II/base/data_out_base.h b/deal.II/include/deal.II/base/data_out_base.h index d126f615aa..7a0523028a 100644 --- a/deal.II/include/deal.II/base/data_out_base.h +++ b/deal.II/include/deal.II/base/data_out_base.h @@ -43,7 +43,7 @@ DEAL_II_NAMESPACE_OPEN class ParameterHandler; - +class XDMFEntry; /** * This is a base class for output of data on meshes of very general @@ -1407,7 +1407,13 @@ class DataOutBase * Output in deal.II * intermediate format. */ - deal_II_intermediate + deal_II_intermediate, + + /** + * Output in + * HDF5 format. + */ + hdf5 }; @@ -1808,7 +1814,29 @@ class DataOutBase const Deal_II_IntermediateFlags &flags, std::ostream &out); + template + static void write_hdf5_parallel ( + const std::vector > &patches, + const std::vector &data_names, + const std::vector > &vector_data_ranges, + const char* filename, + MPI_Comm comm); + + template + static XDMFEntry create_xdmf_entry (const std::vector > &patches, + const std::vector &data_names, + const std::vector > &vector_data_ranges, + const char* h5_filename, + const double cur_time, + MPI_Comm comm); + template + static void write_xdmf_file ( + const std::vector > &patches, + const std::vector &entries, + const char *filename, + MPI_Comm comm); + /** * Given an input stream that contains * data written by @@ -2462,6 +2490,15 @@ class DataOutInterface : private DataOutBase */ void write_deal_II_intermediate (std::ostream &out) const; + XDMFEntry create_xdmf_entry (const char *h5_filename, + const double cur_time, + MPI_Comm comm) const; + + void write_xdmf_file (const std::vector &entries, + const char *filename, + MPI_Comm comm) const; + + void write_hdf5_parallel (const char* filename, MPI_Comm comm) const; /** * Write data and grid to out * according to the given data @@ -3012,6 +3049,45 @@ class DataOutReader : public DataOutInterface +// A class to store relevant data to use when writing the light data XDMF file +// This should only contain valid data on the root node which writes the files, +// the rest of the nodes will have valid set to false +class XDMFEntry { +private: + // Whether this entry is valid and contains data to be written + bool valid; + // The name of the HDF5 heavy data file this entry references + std::string h5_filename; + // The simulation time associated with this entry + double entry_time; + // The number of nodes, cells and dimensionality associated with the data + unsigned int num_nodes, num_cells, dimension; + // The attributes associated with this entry and their dimension + std::map attribute_dims; + + // Small function to create indentation for XML file + std::string indent(const unsigned int indent_level) const { + std::string res = ""; + for (unsigned int i=0;iswitch * (subface_case)... case - * SubfaceCase@::case_x: + * SubfaceCase::case_x: * ...
    , which can be * written as switch * (static_cast@x + * direction, the second in + * y direction, and so on. */ static const unsigned int vertex_to_face[vertices_per_cell][dim]; @@ -1598,7 +1605,7 @@ struct GeometryInfo * area(=1) of the face. * * E.g. for - * internal::SubfaceCase@<3@>::cut_xy + * internal::SubfaceCase::cut_xy * the ratio is 1/4 for each of * the subfaces. */ diff --git a/deal.II/include/deal.II/base/numbers.h b/deal.II/include/deal.II/base/numbers.h index 0a51cea75f..05cdce2e96 100644 --- a/deal.II/include/deal.II/base/numbers.h +++ b/deal.II/include/deal.II/base/numbers.h @@ -14,6 +14,7 @@ #include +#include #include DEAL_II_NAMESPACE_OPEN @@ -35,24 +36,6 @@ DEAL_II_NAMESPACE_OPEN */ namespace numbers { - /** - * Representation of the - * largest number that - * can be put into an - * unsigned integer. This - * value is widely used - * throughout the library - * as a marker for an - * invalid unsigned - * integer value, such as - * an invalid array - * index, an invalid - * array size, and the - * like. - */ - static const unsigned int - invalid_unsigned_int = static_cast (-1); - /** * e */ diff --git a/deal.II/include/deal.II/base/parameter_handler.h b/deal.II/include/deal.II/base/parameter_handler.h index e7643d852d..9a81d2a33a 100644 --- a/deal.II/include/deal.II/base/parameter_handler.h +++ b/deal.II/include/deal.II/base/parameter_handler.h @@ -2866,7 +2866,7 @@ ParameterHandler::load (Archive & ar, const unsigned int) patterns.clear (); for (unsigned int j=0; j(Patterns::pattern_factory(descriptions[j]))); + patterns.push_back (std_cxx1x::shared_ptr(Patterns::pattern_factory(descriptions[j]))); } diff --git a/deal.II/include/deal.II/base/table.h b/deal.II/include/deal.II/base/table.h index 7d1f7d4658..531226662a 100644 --- a/deal.II/include/deal.II/base/table.h +++ b/deal.II/include/deal.II/base/table.h @@ -2055,7 +2055,7 @@ inline unsigned int TableBase::n_elements () const { - unsigned s = 1; + unsigned int s = 1; for (unsigned int n=0; nsimple_table_with_separate_column_description: This format + * is very similar to table_with_separate_column_description, + * but it skips aligning the columns with additional white space. This + * increases the performance o fwrite_text() for large tables. Example output: + * @code + * # 1: key1 + * # 2: key2 + * # 3: key3 + * 0 0 "" + * 1 0 "" + * 2 13 a + * 1 0 "" + * @endcode + * **/ enum TextOutputFormat { table_with_headers, - table_with_separate_column_description + table_with_separate_column_description, + simple_table_with_separate_column_description, }; /** diff --git a/deal.II/include/deal.II/base/table_indices.h b/deal.II/include/deal.II/base/table_indices.h index a5b99fc594..00cb35584f 100644 --- a/deal.II/include/deal.II/base/table_indices.h +++ b/deal.II/include/deal.II/base/table_indices.h @@ -79,7 +79,7 @@ class TableIndicesBase /** * Store the indices in an array. */ - unsigned indices[N]; + unsigned int indices[N]; }; @@ -99,7 +99,7 @@ class TableIndicesBase * @author Wolfgang Bangerth, 2002 */ template -class TableIndices +class TableIndices : public TableIndicesBase { /** * Standard constructor, setting @@ -147,7 +147,8 @@ class TableIndices<1> : public TableIndicesBase<1> TableIndices (const unsigned int index1); }; - +//TODO: Remove the default arguments and trickery below and put all +//the constructors into the class demplate /** * Array of indices of fixed size used for the TableBase diff --git a/deal.II/include/deal.II/base/tensor.h b/deal.II/include/deal.II/base/tensor.h index c5a5bf1216..e95edccfbf 100644 --- a/deal.II/include/deal.II/base/tensor.h +++ b/deal.II/include/deal.II/base/tensor.h @@ -555,7 +555,7 @@ Tensor::unroll (Vector &result) const { AssertDimension (result.size(),(Utilities::fixed_power(dim))); - unsigned index = 0; + unsigned int index = 0; unroll_recursion (result, index); } @@ -568,7 +568,7 @@ void Tensor::unroll_recursion (Vector &result, unsigned int &index) const { - for (unsigned i=0; i &src1, * inner product sumi,j src1[i][j]*src2[i][j]. * * @relates Tensor - * @author Guido Kanschat, 2000 + * @author Guido Kanschat, 2000 */ template inline @@ -706,7 +706,7 @@ Number double_contract (const Tensor<2, dim, Number> &src1, Number res = 0.; for (unsigned int i=0; i::unroll (Vector &result) const Assert (result.size()==dim, ExcDimensionMismatch(dim, result.size())); - unsigned index = 0; + unsigned int index = 0; unroll_recursion (result,index); } @@ -1211,7 +1211,7 @@ void Tensor<1,dim,Number>::unroll_recursion (Vector &result, unsigned int &index) const { - for (unsigned i=0; i struct TaskDescriptor; - /** * The task class for TBB that is * used by the TaskDescriptor @@ -3910,7 +3909,7 @@ namespace Threads template friend struct TaskEntryPoint; - template friend struct Task; + friend class dealii::Threads::Task; }; diff --git a/deal.II/include/deal.II/base/types.h b/deal.II/include/deal.II/base/types.h index a1d59a4418..e0a7aac194 100644 --- a/deal.II/include/deal.II/base/types.h +++ b/deal.II/include/deal.II/base/types.h @@ -29,8 +29,120 @@ namespace types * * See the @ref GlossSubdomainId * "glossary" for more information. + * + * There is a special value, + * numbers::invalid_subdomain_id + * that is used to indicate an + * invalid value of this type. */ - typedef unsigned int subdomain_id_t; + typedef unsigned int subdomain_id; + + /** + * @deprecated Old name for the typedef above. + */ + typedef subdomain_id subdomain_id_t; + + /** + * @deprecated Use numbers::invalid_subdomain_id + */ + const unsigned int invalid_subdomain_id = static_cast(-1); + + /** + * @deprecated Use numbers::artificial_subdomain_id + */ + const unsigned int artificial_subdomain_id = static_cast(-2); + + /** + * The type used to denote global dof + * indices. + */ + typedef unsigned int global_dof_index; + + /** + * @deprecated Use numbers::invalid_dof_index + */ + const global_dof_index invalid_dof_index = static_cast(-1); + + /** + * The type used to denote boundary indicators associated with every + * piece of the boundary and, in the case of meshes that describe + * manifolds in higher dimensions, associated with every cell. + * + * There is a special value, numbers::internal_face_boundary_id + * that is used to indicate an invalid value of this type and that + * is used as the boundary indicator for faces that are in the interior + * of the domain and therefore not part of any addressable boundary + * component. + */ + typedef unsigned char boundary_id; + + /** + * @deprecated Old name for the typedef above. + */ + typedef boundary_id boundary_id_t; + + /** + * The type used to denote material indicators associated with every + * cell. + * + * There is a special value, numbers::invalid_material_id + * that is used to indicate an invalid value of this type. + */ + typedef unsigned char material_id; + + /** + * @deprecated Old name for the typedef above. + */ + typedef material_id material_id_t; + +} + +// this part of the namespace numbers got moved to the bottom types.h file, +// because otherwise we get a circular inclusion of config.h, types.h, and +// numbers.h +namespace numbers +{ + /** + * Representation of the + * largest number that + * can be put into an + * unsigned integer. This + * value is widely used + * throughout the library + * as a marker for an + * invalid unsigned + * integer value, such as + * an invalid array + * index, an invalid + * array size, and the + * like. + */ + static const unsigned int + invalid_unsigned_int = static_cast (-1); + + /** + * An invalid value for indices of degrees + * of freedom. + */ + const types::global_dof_index invalid_dof_index = static_cast(-1); + + /** + * Invalid material_id which we + * need in several places as a + * default value. We assume that + * all material_ids lie in the + * range [0, invalid_material_id). + */ + const types::material_id invalid_material_id = static_cast(-1); + + /** + * The number which we reserve for + * internal faces. We assume that + * all boundary_ids lie in the + * range [0, + * internal_face_boundary_id). + */ + const types::boundary_id internal_face_boundary_id = static_cast(-1); /** * A special id for an invalid @@ -44,7 +156,7 @@ namespace types * See the @ref GlossSubdomainId * "glossary" for more information. */ - const unsigned int invalid_subdomain_id = static_cast(-1); + const types::subdomain_id invalid_subdomain_id = static_cast(-1); /** * The subdomain id assigned to a @@ -63,44 +175,7 @@ namespace types * the @ref distributed module for * more information. */ - const unsigned int artificial_subdomain_id = static_cast(-2); - - /** - * The type used to denote global dof - * indices. - */ - typedef unsigned int global_dof_index; - - /** - * An invalid value for indices of degrees - * of freedom. - */ - const global_dof_index invalid_dof_index = static_cast(-1); - - /** - * The type used to denote boundary indicators associated with every - * piece of the boundary and, in the case of meshes that describe - * manifolds in higher dimensions, associated with every cell. - */ - typedef unsigned char boundary_id_t; - - /** - * The number which we reserve for internal faces. - * We assume that all boundary_ids lie in the range [0, internal_face_boundary_id). - */ - const boundary_id_t internal_face_boundary_id = static_cast(-1); - - /** - * The type used to denote material indicators associated with every - * cell. - */ - typedef unsigned char material_id_t; - - /** - * Invalid material_id which we need in several places as a default value. - * We assume that all material_ids lie in the range [0, invalid_material_id). - */ - const material_id_t invalid_material_id = static_cast(-1); + const types::subdomain_id artificial_subdomain_id = static_cast(-2); } diff --git a/deal.II/include/deal.II/distributed/tria.h b/deal.II/include/deal.II/distributed/tria.h index 333216b6d3..c91de99454 100644 --- a/deal.II/include/deal.II/distributed/tria.h +++ b/deal.II/include/deal.II/distributed/tria.h @@ -174,6 +174,42 @@ namespace parallel * it relies on the p4est library that does not support this. Attempts * to refine cells anisotropically will result in errors. * + * + *

    Interaction with boundary description

    + * + * Refining and coarsening a distributed triangulation is a complicated + * process because cells may have to be migrated from one processor to + * another. On a single processor, materializing that part of the global + * mesh that we want to store here from what we have stored before therefore + * may involve several cycles of refining and coarsening the locally stored + * set of cells until we have finally gotten from the previous to the next + * triangulation. (This process is described in more detail in the + * @ref distributed_paper.) Unfortunately, in this process, some information + * can get lost relating to flags that are set by user code and that are + * inherited from mother to child cell but that are not moved along with + * a cell if that cell is migrated from one processor to another. + * + * An example are boundary indicators. Assume, for example, that you start + * with a single cell that is refined once globally, yielding four children. + * If you have four processors, each one owns one cell. Assume now that processor + * 1 sets the boundary indicators of the external boundaries of the cell it owns + * to 42. Since processor 0 does not own this cell, it doesn't set the boundary + * indicators of its ghost cell copy of this cell. Now, assume we do several mesh + * refinement cycles and end up with a configuration where suddenly finds itself + * as the owner of this cell. If boundary indicator 42 means that we need to + * integrate Neumann boundary conditions along this boundary, then processor 0 + * will forget to do so because it has never set the boundary indicator along + * this cell's boundary to 42. + * + * The way to avoid this dilemma is to make sure that things like setting + * boundary indicators or material ids is done immediately + * every time a parallel triangulation is refined. This is not necessary + * for sequential triangulations because, there, these flags are inherited + * from mother to child cell and remain with a cell even if it is refined + * and the children are later coarsened again, but this does not hold for + * distributed triangulations. + * + * * @author Wolfgang Bangerth, Timo Heister 2008, 2009, 2010, 2011 * @ingroup distributed */ @@ -356,7 +392,7 @@ namespace parallel * children that only exist * on other processors. */ - types::subdomain_id_t locally_owned_subdomain () const; + types::subdomain_id locally_owned_subdomain () const; /** * Return the number of @@ -575,7 +611,7 @@ namespace parallel * used for the current * processor. */ - types::subdomain_id_t my_subdomain; + types::subdomain_id my_subdomain; /** * A flag that indicates whether the @@ -813,7 +849,7 @@ namespace parallel * children that only exist * on other processors. */ - types::subdomain_id_t locally_owned_subdomain () const; + types::subdomain_id locally_owned_subdomain () const; /** * Dummy arrays. This class @@ -878,7 +914,7 @@ namespace parallel * children that only exist * on other processors. */ - types::subdomain_id_t locally_owned_subdomain () const; + types::subdomain_id locally_owned_subdomain () const; /** * Return the MPI diff --git a/deal.II/include/deal.II/dofs/dof_accessor.templates.h b/deal.II/include/deal.II/dofs/dof_accessor.templates.h index dedeae9968..3db0ddefe8 100644 --- a/deal.II/include/deal.II/dofs/dof_accessor.templates.h +++ b/deal.II/include/deal.II/dofs/dof_accessor.templates.h @@ -226,7 +226,7 @@ namespace internal const unsigned int local_index, dealii::internal::int2type<1>) { - return dof_handler.levels[obj_level]->lines. + return dof_handler.levels[obj_level]->dof_object. get_dof_index (dof_handler, obj_index, fe_index, @@ -245,7 +245,7 @@ namespace internal dealii::internal::int2type<1>, const unsigned int global_index) { - dof_handler.levels[obj_level]->lines. + dof_handler.levels[obj_level]->dof_object. set_dof_index (dof_handler, obj_index, fe_index, @@ -306,7 +306,7 @@ namespace internal const unsigned int local_index, dealii::internal::int2type<2>) { - return dof_handler.levels[obj_level]->quads. + return dof_handler.levels[obj_level]->dof_object. get_dof_index (dof_handler, obj_index, fe_index, @@ -325,7 +325,7 @@ namespace internal dealii::internal::int2type<2>, const unsigned int global_index) { - dof_handler.levels[obj_level]->quads. + dof_handler.levels[obj_level]->dof_object. set_dof_index (dof_handler, obj_index, fe_index, @@ -430,7 +430,7 @@ namespace internal const unsigned int local_index, dealii::internal::int2type<3>) { - return dof_handler.levels[obj_level]->hexes. + return dof_handler.levels[obj_level]->dof_object. get_dof_index (dof_handler, obj_index, fe_index, @@ -449,7 +449,7 @@ namespace internal dealii::internal::int2type<3>, const unsigned int global_index) { - dof_handler.levels[obj_level]->hexes. + dof_handler.levels[obj_level]->dof_object. set_dof_index (dof_handler, obj_index, fe_index, @@ -468,7 +468,7 @@ namespace internal const unsigned int local_index, const dealii::internal::int2type<1> &) { - return dof_handler.levels[obj_level]->lines. + return dof_handler.levels[obj_level]->dof_object. get_dof_index (dof_handler, obj_index, fe_index, @@ -488,7 +488,7 @@ namespace internal const dealii::internal::int2type<1> &, const unsigned int global_index) { - dof_handler.levels[obj_level]->lines. + dof_handler.levels[obj_level]->dof_object. set_dof_index (dof_handler, obj_index, fe_index, @@ -548,7 +548,7 @@ namespace internal const unsigned int local_index, const dealii::internal::int2type<2> &) { - return dof_handler.levels[obj_level]->quads. + return dof_handler.levels[obj_level]->dof_object. get_dof_index (dof_handler, obj_index, fe_index, @@ -568,7 +568,7 @@ namespace internal const dealii::internal::int2type<2> &, const unsigned int global_index) { - dof_handler.levels[obj_level]->quads. + dof_handler.levels[obj_level]->dof_object. set_dof_index (dof_handler, obj_index, fe_index, @@ -668,7 +668,7 @@ namespace internal const unsigned int local_index, const dealii::internal::int2type<3> &) { - return dof_handler.levels[obj_level]->hexes. + return dof_handler.levels[obj_level]->dof_object. get_dof_index (dof_handler, obj_index, fe_index, @@ -688,7 +688,7 @@ namespace internal const dealii::internal::int2type<3> &, const unsigned int global_index) { - dof_handler.levels[obj_level]->hexes. + dof_handler.levels[obj_level]->dof_object. set_dof_index (dof_handler, obj_index, fe_index, @@ -821,7 +821,7 @@ namespace internal const unsigned int fe_index, const dealii::internal::int2type<1> &) { - return dof_handler.levels[obj_level]->lines.fe_index_is_active(dof_handler, + return dof_handler.levels[obj_level]->dof_object.fe_index_is_active(dof_handler, obj_index, fe_index, obj_level); @@ -836,7 +836,7 @@ namespace internal const unsigned int obj_index, const dealii::internal::int2type<1> &) { - return dof_handler.levels[obj_level]->lines.n_active_fe_indices (dof_handler, + return dof_handler.levels[obj_level]->dof_object.n_active_fe_indices (dof_handler, obj_index); } @@ -851,7 +851,7 @@ namespace internal const unsigned int n, const dealii::internal::int2type<1> &) { - return dof_handler.levels[obj_level]->lines.nth_active_fe_index (dof_handler, + return dof_handler.levels[obj_level]->dof_object.nth_active_fe_index (dof_handler, obj_level, obj_index, n); @@ -913,7 +913,7 @@ namespace internal const unsigned int fe_index, const dealii::internal::int2type<2> &) { - return dof_handler.levels[obj_level]->quads.fe_index_is_active(dof_handler, + return dof_handler.levels[obj_level]->dof_object.fe_index_is_active(dof_handler, obj_index, fe_index, obj_level); @@ -928,7 +928,7 @@ namespace internal const unsigned int obj_index, const dealii::internal::int2type<2> &) { - return dof_handler.levels[obj_level]->quads.n_active_fe_indices (dof_handler, + return dof_handler.levels[obj_level]->dof_object.n_active_fe_indices (dof_handler, obj_index); } @@ -943,7 +943,7 @@ namespace internal const unsigned int n, const dealii::internal::int2type<2> &) { - return dof_handler.levels[obj_level]->quads.nth_active_fe_index (dof_handler, + return dof_handler.levels[obj_level]->dof_object.nth_active_fe_index (dof_handler, obj_level, obj_index, n); @@ -1022,7 +1022,7 @@ namespace internal const unsigned int fe_index, const dealii::internal::int2type<3> &) { - return dof_handler.levels[obj_level]->hexes.fe_index_is_active(dof_handler, + return dof_handler.levels[obj_level]->dof_object.fe_index_is_active(dof_handler, obj_index, fe_index, obj_level); @@ -1068,7 +1068,7 @@ namespace internal const unsigned int obj_index, const dealii::internal::int2type<3> &) { - return dof_handler.levels[obj_level]->hexes.n_active_fe_indices (dof_handler, + return dof_handler.levels[obj_level]->dof_object.n_active_fe_indices (dof_handler, obj_index); } @@ -1083,7 +1083,7 @@ namespace internal const unsigned int n, const dealii::internal::int2type<3> &) { - return dof_handler.levels[obj_level]->hexes.nth_active_fe_index (dof_handler, + return dof_handler.levels[obj_level]->dof_object.nth_active_fe_index (dof_handler, obj_level, obj_index, n); diff --git a/deal.II/include/deal.II/dofs/dof_handler.h b/deal.II/include/deal.II/dofs/dof_handler.h index 86fd9cbbe0..68fdcc45d8 100644 --- a/deal.II/include/deal.II/dofs/dof_handler.h +++ b/deal.II/include/deal.II/dofs/dof_handler.h @@ -293,18 +293,6 @@ class DoFHandler : public Subscriptor * is first discussed in the introduction * to the step-2 tutorial program. * - * The additional optional - * parameter @p offset allows you - * to reserve space for a finite - * number of additional vector - * entries in the beginning of - * all discretization vectors, by - * starting the enumeration of - * degrees of freedom on the grid - * at a nonzero value. By - * default, this value is of - * course zero. - * * A pointer of the transferred * finite element is * stored. Therefore, the @@ -317,8 +305,7 @@ class DoFHandler : public Subscriptor * releases the lock of this * object to the finite element. */ - virtual void distribute_dofs (const FiniteElement &fe, - const unsigned int offset = 0); + virtual void distribute_dofs (const FiniteElement &fe); /** * After distribute_dofs() with @@ -1073,7 +1060,7 @@ class DoFHandler : public Subscriptor * consideration. */ unsigned int - n_boundary_dofs (const std::set &boundary_indicators) const; + n_boundary_dofs (const std::set &boundary_indicators) const; /** * Access to an object informing @@ -1419,7 +1406,7 @@ class DoFHandler : public Subscriptor template <> unsigned int DoFHandler<1>::n_boundary_dofs () const; template <> unsigned int DoFHandler<1>::n_boundary_dofs (const FunctionMap &) const; -template <> unsigned int DoFHandler<1>::n_boundary_dofs (const std::set &) const; +template <> unsigned int DoFHandler<1>::n_boundary_dofs (const std::set &) const; /* ----------------------- Inline functions ---------------------------------- */ diff --git a/deal.II/include/deal.II/dofs/dof_handler_policy.h b/deal.II/include/deal.II/dofs/dof_handler_policy.h index 65c9044016..c5c0f80d84 100644 --- a/deal.II/include/deal.II/dofs/dof_handler_policy.h +++ b/deal.II/include/deal.II/dofs/dof_handler_policy.h @@ -65,8 +65,7 @@ namespace internal */ virtual NumberCache - distribute_dofs (const unsigned int offset, - dealii::DoFHandler &dof_handler) const = 0; + distribute_dofs (dealii::DoFHandler &dof_handler) const = 0; /** * Renumber degrees of freedom as @@ -95,8 +94,7 @@ namespace internal */ virtual NumberCache - distribute_dofs (const unsigned int offset, - dealii::DoFHandler &dof_handler) const; + distribute_dofs (dealii::DoFHandler &dof_handler) const; /** * Renumber degrees of freedom as @@ -126,8 +124,7 @@ namespace internal */ virtual NumberCache - distribute_dofs (const unsigned int offset, - dealii::DoFHandler &dof_handler) const; + distribute_dofs (dealii::DoFHandler &dof_handler) const; /** * Renumber degrees of freedom as diff --git a/deal.II/include/deal.II/dofs/dof_levels.h b/deal.II/include/deal.II/dofs/dof_levels.h index cb9c40d733..5e9875551f 100644 --- a/deal.II/include/deal.II/dofs/dof_levels.h +++ b/deal.II/include/deal.II/dofs/dof_levels.h @@ -141,7 +141,7 @@ namespace internal * The object containing dof-indices * and related access-functions */ - DoFObjects<1> lines; + DoFObjects<1> dof_object; /** * Determine an estimate for the @@ -174,7 +174,7 @@ namespace internal * The object containing dof-indices * and related access-functions */ - internal::DoFHandler::DoFObjects<2> quads; + internal::DoFHandler::DoFObjects<2> dof_object; /** * Determine an estimate for the @@ -207,7 +207,7 @@ namespace internal * The object containing dof-indices * and related access-functions */ - internal::DoFHandler::DoFObjects<3> hexes; + internal::DoFHandler::DoFObjects<3> dof_object; /** * Determine an estimate for the @@ -241,7 +241,7 @@ namespace internal const unsigned int version) { this->DoFLevel<0>::serialize (ar, version); - ar & lines; + ar & dof_object; } @@ -250,7 +250,7 @@ namespace internal const unsigned int version) { this->DoFLevel<0>::serialize (ar, version); - ar & quads; + ar & dof_object; } @@ -259,7 +259,7 @@ namespace internal const unsigned int version) { this->DoFLevel<0>::serialize (ar, version); - ar & hexes; + ar & dof_object; } } } diff --git a/deal.II/include/deal.II/dofs/dof_renumbering.h b/deal.II/include/deal.II/dofs/dof_renumbering.h index f760b6d86c..8316bd811f 100644 --- a/deal.II/include/deal.II/dofs/dof_renumbering.h +++ b/deal.II/include/deal.II/dofs/dof_renumbering.h @@ -1149,12 +1149,42 @@ namespace DoFRenumbering * preserved, as is the relative * order within the untagged * ones. + * + * @pre The @p selected_dofs + * array must have as many elements as + * the @p dof_handler has degrees of + * freedom. */ template void sort_selected_dofs_back (DH& dof_handler, const std::vector& selected_dofs); + /** + * Sort those degrees of freedom + * which are tagged with @p true + * in the @p selected_dofs array + * on the level #level + * to the back of the DoF + * numbers. The sorting is + * stable, i.e. the relative + * order within the tagged + * degrees of freedom is + * preserved, as is the relative + * order within the untagged + * ones. + * + * @pre The @p selected_dofs + * array must have as many elements as + * the @p dof_handler has degrees of + * freedom on the given level. + */ + template + void + sort_selected_dofs_back (DH& dof_handler, + const std::vector& selected_dofs, + const unsigned int level); + /** * Computes the renumbering * vector needed by the @@ -1163,6 +1193,11 @@ namespace DoFRenumbering * renumbering on the DoFHandler * dofs but returns the * renumbering vector. + * + * @pre The @p selected_dofs + * array must have as many elements as + * the @p dof_handler has degrees of + * freedom. */ template void @@ -1170,6 +1205,28 @@ namespace DoFRenumbering const DH& dof_handler, const std::vector& selected_dofs); + /** + * Computes the renumbering + * vector on each level + * needed by the + * sort_selected_dofs_back() + * function. Does not perform the + * renumbering on the MGDoFHandler + * dofs but returns the + * renumbering vector. + * + * @pre The @p selected_dofs + * array must have as many elements as + * the @p dof_handler has degrees of + * freedom on the given level. + */ + template + void + compute_sort_selected_dofs_back (std::vector& new_dof_indices, + const DH& dof_handler, + const std::vector& selected_dofs, + const unsigned int level); + /** * Renumber the degrees of * freedom in a random way. diff --git a/deal.II/include/deal.II/dofs/dof_tools.h b/deal.II/include/deal.II/dofs/dof_tools.h index 0f6212e786..22a9d90963 100644 --- a/deal.II/include/deal.II/dofs/dof_tools.h +++ b/deal.II/include/deal.II/dofs/dof_tools.h @@ -496,7 +496,7 @@ namespace DoFTools SparsityPattern &sparsity_pattern, const ConstraintMatrix &constraints = ConstraintMatrix(), const bool keep_constrained_dofs = true, - const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id); + const types::subdomain_id subdomain_id = types::invalid_subdomain_id); /** * Locate non-zero entries for @@ -658,7 +658,7 @@ namespace DoFTools SparsityPattern &sparsity_pattern, const ConstraintMatrix &constraints = ConstraintMatrix(), const bool keep_constrained_dofs = true, - const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id); + const types::subdomain_id subdomain_id = types::invalid_subdomain_id); /** * @deprecated This is the old @@ -815,7 +815,7 @@ namespace DoFTools SparsityPattern &sparsity_pattern, const ConstraintMatrix &constraints, const bool keep_constrained_dofs = true, - const types::subdomain_id_t subdomain_id = numbers::invalid_unsigned_int); + const types::subdomain_id subdomain_id = numbers::invalid_unsigned_int); /** * This function does the same as @@ -1084,7 +1084,7 @@ namespace DoFTools template void make_periodicity_constraints (const DH &dof_handler, - const types::boundary_id_t boundary_component, + const types::boundary_id boundary_component, const int direction, dealii::ConstraintMatrix &constraint_matrix, const std::vector &component_mask = std::vector()); @@ -1104,7 +1104,7 @@ namespace DoFTools template void make_periodicity_constraints (const DH &dof_handler, - const types::boundary_id_t boundary_component, + const types::boundary_id boundary_component, const int direction, dealii::Tensor<1,DH::space_dimension> &offset, @@ -1335,7 +1335,7 @@ namespace DoFTools extract_boundary_dofs (const DH &dof_handler, const std::vector &component_mask, std::vector &selected_dofs, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_indicators = std::set()); /** * This function does the same as the previous one but it @@ -1371,7 +1371,7 @@ namespace DoFTools extract_boundary_dofs (const DH &dof_handler, const std::vector &component_mask, IndexSet &selected_dofs, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_indicators = std::set()); /** * This function is similar to @@ -1408,7 +1408,7 @@ namespace DoFTools extract_dofs_with_support_on_boundary (const DH &dof_handler, const std::vector &component_mask, std::vector &selected_dofs, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_indicators = std::set()); /** * @name Hanging Nodes @@ -1458,7 +1458,7 @@ namespace DoFTools template void extract_subdomain_dofs (const DH &dof_handler, - const types::subdomain_id_t subdomain_id, + const types::subdomain_id subdomain_id, std::vector &selected_dofs); @@ -1589,7 +1589,7 @@ namespace DoFTools template void get_subdomain_association (const DH &dof_handler, - std::vector &subdomain); + std::vector &subdomain); /** * Count how many degrees of freedom are @@ -1633,7 +1633,7 @@ namespace DoFTools template unsigned int count_dofs_with_subdomain_association (const DH &dof_handler, - const types::subdomain_id_t subdomain); + const types::subdomain_id subdomain); /** * Count how many degrees of freedom are @@ -1670,7 +1670,7 @@ namespace DoFTools template void count_dofs_with_subdomain_association (const DH &dof_handler, - const types::subdomain_id_t subdomain, + const types::subdomain_id subdomain, std::vector &n_dofs_on_subdomain); /** @@ -1712,7 +1712,7 @@ namespace DoFTools template IndexSet dof_indices_with_subdomain_association (const DH &dof_handler, - const types::subdomain_id_t subdomain); + const types::subdomain_id subdomain); // @} /** @@ -2054,7 +2054,7 @@ namespace DoFTools * target_component. If this is * not the case, an assertion is * thrown. The indices not - * targetted by target_components + * targeted by target_components * are left untouched. */ template @@ -2100,7 +2100,7 @@ namespace DoFTools void count_dofs_per_block (const DH &dof, std::vector &dofs_per_block, - std::vector target_block + const std::vector &target_block = std::vector()); /** @@ -2419,7 +2419,7 @@ namespace DoFTools template void map_dof_to_boundary_indices (const DH &dof_handler, - const std::set &boundary_indicators, + const std::set &boundary_indicators, std::vector &mapping); /** diff --git a/deal.II/include/deal.II/dofs/function_map.h b/deal.II/include/deal.II/dofs/function_map.h index da45ed52fc..40b3635e4f 100644 --- a/deal.II/include/deal.II/dofs/function_map.h +++ b/deal.II/include/deal.II/dofs/function_map.h @@ -48,7 +48,7 @@ struct FunctionMap * name it in the fashion of the * STL local typedefs. */ - typedef std::map*> type; + typedef std::map*> type; }; DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/include/deal.II/fe/fe.h b/deal.II/include/deal.II/fe/fe.h index 63ebb18a03..d27e5a514d 100644 --- a/deal.II/include/deal.II/fe/fe.h +++ b/deal.II/include/deal.II/fe/fe.h @@ -1344,12 +1344,13 @@ class FiniteElement : public Subscriptor, * system_to_component_index() * returns. * - * Only for those - * spaces that couple the - * components, for example to - * make a shape function - * divergence free, will there be - * more than one @p true entry. + * Only for those spaces that couple the + * components, for example to make a + * shape function divergence free, will + * there be more than one @p true entry. + * Elements for which this is true are + * called non-primitive (see + * @ref GlossPrimitive). */ const std::vector & get_nonzero_components (const unsigned int i) const; diff --git a/deal.II/include/deal.II/fe/fe_base.h b/deal.II/include/deal.II/fe/fe_base.h index f2ccd8d29a..865bd7f33f 100644 --- a/deal.II/include/deal.II/fe/fe_base.h +++ b/deal.II/include/deal.II/fe/fe_base.h @@ -518,17 +518,21 @@ class FiniteElementData unsigned int n_dofs_per_object () const; /** - * Number of components. + * Number of components. See + * @ref GlossComponent "the glossary" + * for more information. */ unsigned int n_components () const; /** - * Number of blocks. + * Number of blocks. See + * @ref GlossBlock "the glossary" + * for more information. */ unsigned int n_blocks () const; /** - * Detailed infromation on block sizes. + * Detailed information on block sizes. */ const BlockIndices& block_indices() const; diff --git a/deal.II/include/deal.II/fe/mapping_q1.h b/deal.II/include/deal.II/fe/mapping_q1.h index 5c319e3839..b13c46cb67 100644 --- a/deal.II/include/deal.II/fe/mapping_q1.h +++ b/deal.II/include/deal.II/fe/mapping_q1.h @@ -313,13 +313,13 @@ class MappingQ1 : public Mapping * vectors. * * This vector has - * (dim-1)*GeometryInfo::faces_per_cell + * (dim-1)GeometryInfo::faces_per_cell * entries. The first - * GeometryInfo::faces_per_cell + * GeometryInfo::faces_per_cell * contain the vectors in the first * tangential direction for each * face; the second set of - * GeometryInfo::faces_per_cell + * GeometryInfo::faces_per_cell * entries contain the vectors in the * second tangential direction (only * in 3d, since there we have 2 diff --git a/deal.II/include/deal.II/grid/filtered_iterator.h b/deal.II/include/deal.II/grid/filtered_iterator.h index 6ddbcb3a05..895c407bd0 100644 --- a/deal.II/include/deal.II/grid/filtered_iterator.h +++ b/deal.II/include/deal.II/grid/filtered_iterator.h @@ -169,7 +169,7 @@ namespace IteratorFilters * shall have to be evaluated * to true. */ - SubdomainEqualTo (const types::subdomain_id_t subdomain_id); + SubdomainEqualTo (const types::subdomain_id subdomain_id); /** * Evaluation operator. Returns @@ -187,7 +187,7 @@ namespace IteratorFilters * Stored value to compare the * subdomain with. */ - const types::subdomain_id_t subdomain_id; + const types::subdomain_id subdomain_id; }; @@ -296,7 +296,7 @@ namespace IteratorFilters * class SubdomainEqualTo * { * public: - * SubdomainEqualTo (const types::subdomain_id_t subdomain_id) + * SubdomainEqualTo (const types::subdomain_id subdomain_id) * : subdomain_id (subdomain_id) {}; * * template @@ -305,7 +305,7 @@ namespace IteratorFilters * } * * private: - * const types::subdomain_id_t subdomain_id; + * const types::subdomain_id subdomain_id; * }; * @endcode * Objects like SubdomainEqualTo(3) can then be used as predicates. @@ -402,7 +402,7 @@ namespace IteratorFilters * Since comparison between filtered and unfiltered iterators is * defined, we could as well have let the @p endc variable in the * last example be of type - * Triangulation@::active_cell_iterator since it is unchanged + * Triangulation::active_cell_iterator since it is unchanged * and its value does not depend on the filter. * * @ingroup grid @@ -1124,7 +1124,7 @@ namespace IteratorFilters // ---------------- IteratorFilters::SubdomainEqualTo --------- inline - SubdomainEqualTo::SubdomainEqualTo (const types::subdomain_id_t subdomain_id) + SubdomainEqualTo::SubdomainEqualTo (const types::subdomain_id subdomain_id) : subdomain_id (subdomain_id) {} diff --git a/deal.II/include/deal.II/grid/grid_generator.h b/deal.II/include/deal.II/grid/grid_generator.h index 500f5e8624..044daec674 100644 --- a/deal.II/include/deal.II/grid/grid_generator.h +++ b/deal.II/include/deal.II/grid/grid_generator.h @@ -280,7 +280,7 @@ class GridGenerator subdivided_hyper_rectangle (Triangulation &tria, const std::vector< std::vector > &spacing, const Point &p, - const Table &material_id, + const Table &material_id, const bool colorize=false); /** diff --git a/deal.II/include/deal.II/grid/grid_out.h b/deal.II/include/deal.II/grid/grid_out.h index 824d896e5f..4fdc09c942 100644 --- a/deal.II/include/deal.II/grid/grid_out.h +++ b/deal.II/include/deal.II/grid/grid_out.h @@ -1545,7 +1545,7 @@ class GridOut * these faces are explicitly printed * in the write_* functions; * all faces with indicator - * types::internal_face_boundary_id are + * numbers::internal_face_boundary_id are * interior ones and an indicator with * value zero for faces at the boundary * are considered default. @@ -1580,7 +1580,7 @@ class GridOut * these lines are explicitly printed * in the write_* functions; * all lines with indicator - * types::internal_face_boundary_id are + * numbers::internal_face_boundary_id are * interior ones and an indicator with * value zero for faces at the boundary * are considered default. diff --git a/deal.II/include/deal.II/grid/grid_tools.h b/deal.II/include/deal.II/grid/grid_tools.h index 31d9e344c3..08a74019f5 100644 --- a/deal.II/include/deal.II/grid/grid_tools.h +++ b/deal.II/include/deal.II/grid/grid_tools.h @@ -266,6 +266,19 @@ namespace GridTools const Point &p); /** + * @deprecated This function might + * be acceptable to find a patch + * around a single vertex, but it + * wastes resources creating + * patches around all vertices. The + * function mail fail on + * anisotropic meshes, and an easy + * fix is not obvious. Therefore, + * it should be replaced by a + * function which computes all + * active vertex patches by looping + * over cells. + * * Find and return a vector of * iterators to active cells that * surround a given vertex @p vertex. @@ -575,7 +588,7 @@ namespace GridTools template void get_subdomain_association (const Triangulation &triangulation, - std::vector &subdomain); + std::vector &subdomain); /** * Count how many cells are uniquely @@ -602,7 +615,7 @@ namespace GridTools template unsigned int count_cells_with_subdomain_association (const Triangulation &triangulation, - const types::subdomain_id_t subdomain); + const types::subdomain_id subdomain); /** * Given two mesh containers @@ -897,8 +910,8 @@ namespace GridTools typename Container::face_iterator> extract_boundary_mesh (const Container &volume_mesh, Container &surface_mesh, - const std::set &boundary_ids - = std::set()); + const std::set &boundary_ids + = std::set()); /** @@ -945,7 +958,7 @@ namespace GridTools std::map collect_periodic_cell_pairs (const CellIterator &begin, const typename identity::type &end, - const types::boundary_id_t boundary_component, + const types::boundary_id boundary_component, int direction, const dealii::Tensor<1,CellIterator::AccessorType::space_dimension> &offset = dealii::Tensor<1,CellIterator::AccessorType::space_dimension>()); @@ -962,7 +975,7 @@ namespace GridTools template std::map collect_periodic_cell_pairs (const DH &dof_handler, - const types::boundary_id_t boundary_component, + const types::boundary_id boundary_component, int direction, const dealii::Tensor<1,DH::space_dimension> &offset = Tensor<1,DH::space_dimension>()); diff --git a/deal.II/include/deal.II/grid/tria.h b/deal.II/include/deal.II/grid/tria.h index d6daa52fa2..366b45cdbd 100644 --- a/deal.II/include/deal.II/grid/tria.h +++ b/deal.II/include/deal.II/grid/tria.h @@ -110,8 +110,8 @@ struct CellData */ union { - types::boundary_id_t boundary_id; - types::material_id_t material_id; + types::boundary_id boundary_id; + types::material_id material_id; }; }; @@ -136,8 +136,8 @@ struct CellData * number describing the boundary condition to hold on this part of the * boundary. The triangulation creation function gives lines not in this * list either the boundary indicator zero (if on the boundary) or - * types::internal_face_boundary_id (if in the interior). Explicitely giving a - * line the indicator types::internal_face_boundary_id will result in an error, as well as giving + * numbers::internal_face_boundary_id (if in the interior). Explicitely giving a + * line the indicator numbers::internal_face_boundary_id will result in an error, as well as giving * an interior line a boundary indicator. * * @ingroup grid @@ -440,57 +440,41 @@ namespace internal * data is spread over quite a lot of arrays and other places. However, * there are ways powerful enough to work on these data structures * without knowing their exact relations. This is done through the - * concept of iterators (see the STL documentation and TriaRawIterator). + * concept of iterators (see the STL documentation and TriaIterator). * In order to make things as easy and dimension independent as possible, * use of class local typedefs is made, see below. * * The Triangulation class provides iterator which enable looping over all - * lines, cells, etc without knowing the exact representation used to + * cells without knowing the exact representation used to * describe them. Their names are typedefs imported from the Iterators * class (thus making them local types to this class) and are as follows: * *
      - *
    • @p raw_line_iterator: loop over all lines, used or not (declared for - * all dimensions). - * - *
    • @p line_iterator: loop over all used lines (declared for all dimensions). - * - *
    • @p active_line_iterator: loop over all active lines (declared for all - * dimensions). - * - *
    • @p raw_quad_iterator: loop over all quads, used or not (declared only - * for dim>=2). - * - *
    • @p quad_iterator: loop over all quads (declared only for @p dim>=2). - * - *
    • @p active_quad_iterator: loop over all active quads (declared only for - * @p dim>=2). + *
    • cell_iterator: loop over all cells used in the Triangulation + *
    • active_cell_iterator: loop over all active cells *
    * - * Additionaly, for @p dim==1, the following identities hold: + * For dim==1, these iterators are mapped as follows: * @verbatim - * typedef raw_line_iterator raw_cell_iterator; * typedef line_iterator cell_iterator; * typedef active_line_iterator active_cell_iterator; * @endverbatim - * while for @p dim==2 + * while for @p dim==2 we have the additional face iterator: * @verbatim - * typedef quad_line_iterator raw_cell_iterator; * typedef quad_iterator cell_iterator; * typedef active_quad_iterator active_cell_iterator; * - * typedef raw_line_iterator raw_face_iterator; - * typedef line_iterator face_iterator; +* typedef line_iterator face_iterator; * typedef active_line_iterator active_face_iterator; * @endverbatim * - * By using the cell iterators, you can write code nearly independent of + * By using the cell iterators, you can write code independent of * the spatial dimension. The same applies for substructure iterators, * where a substructure is defined as a face of a cell. The face of a * cell is a vertex in 1D and a line in 2D; however, vertices are * handled in a different way and therefore lines have no faces. * - * The Triangulation class offers functions like @p begin_active which gives + * The Triangulation class offers functions like begin_active() which gives * you an iterator to the first active cell. There are quite a lot of functions * returning iterators. Take a look at the class doc to get an overview. * @@ -600,7 +584,7 @@ namespace internal * more information. The mentioned class uses the interface described * directly below to transfer the data into the triangulation. * - *
  • Explicitely creating a triangulation: you can create a triangulation + *
  • Explicitly creating a triangulation: you can create a triangulation * by providing a list of vertices and a list of cells. Each such cell * consists of a vector storing the indices of the vertices of this cell * in the vertex list. To see how this works, you can take a look at the @@ -612,7 +596,7 @@ namespace internal * quite a complex task. For example in 2D, we have to create * lines between vertices (but only once, though there are two * cells which link these two vertices) and we have to create - * neighborship information. Grids being read in should + * neighborhood information. Grids being read in should * therefore not be too large, reading refined grids would be * inefficient (although there is technically no problem in * reading grids with several 10.000 or 100.000 cells; the @@ -627,7 +611,7 @@ namespace internal * vertex indices for each cell have to be in a defined order, see the * documentation of GeometryInfo. In one dimension, the first vertex * index must refer to that vertex with the lower coordinate value. In 2D - * and 3D, the correspondoing conditions are not easy to verify and no + * and 3D, the corresponding conditions are not easy to verify and no * full attempt to do so is made. * If you violate this condition, you may end up with matrix entries * having the wrong sign (clockwise vertex numbering, which results in @@ -638,9 +622,8 @@ namespace internal * There are more subtle conditions which must be imposed upon * the vertex numbering within cells. They do not only hold for * the data read from an UCD or any other input file, but also - * for the data passed to the - * Triangulation::create_triangulation () - * function. See the documentation for the GridIn class + * for the data passed to create_triangulation(). + * See the documentation for the GridIn class * for more details on this, and above all to the * GridReordering class that explains many of the * problems and an algorithm to reorder cells such that they @@ -657,13 +640,13 @@ namespace internal * parallel. It may be conceivable to implement a clean-up in the copy * operation, which eliminates holes of unused memory, re-joins * scattered data and so on. In principle this would be a useful - * operation but guaranteeing some parallelity in the two triangulations + * operation but guaranteeing some parallelism in the two triangulations * seems more important since usually data will have to be transferred * between the grids. * * * Finally, there is a special function for folks who like bad grids: - * Triangulation::distort_random. It moves all the vertices in the + * distort_random(). It moves all the vertices in the * grid a bit around by a random value, leaving behind a distorted mesh. * Note that you should apply this function to the final mesh, since * refinement smoothes the mesh a bit. @@ -693,8 +676,8 @@ namespace internal * function call i->set_refine_flag() marks the respective cell for * refinement. Marking non-active cells results in an error. * - * After all the cells you wanted to mark for refinement, call the - * @p execute_coarsening_and_refinement function to actually perform + * After all the cells you wanted to mark for refinement, call + * execute_coarsening_and_refinement() to actually perform * the refinement. This function itself first calls the * @p prepare_coarsening_and_refinement function to regularize the resulting * triangulation: since a face between two adjacent cells may only @@ -709,7 +692,7 @@ namespace internal * step than one needed by the finite element method. * * To coarsen a grid, the same way as above is possible by using - * i->set_coarsen_flag and calling @p execute_coarsening_and_refinement. + * i->set_coarsen_flag and calling execute_coarsening_and_refinement(). * * The reason for first coarsening, then refining is that the * refinement usually adds some additional cells to keep the triangulation @@ -725,20 +708,20 @@ namespace internal * towards the boundary or always at the center (see the example programs, * they do exactly these things). There are more advanced functions, * however, which are more suitable for automatic generation of hierarchical - * grids in the context of a-posteriori error estimation and adaptive finite + * grids in the context of a posteriori error estimation and adaptive finite * elements. These functions can be found in the GridRefinement class. * * *

    Smoothing of a triangulation

    * * Some degradation of approximation properties has been observed - * for grids which are too unstructured. Therefore, the - * @p prepare_coarsening_and_refinement function which is automatically called - * by the @p execute_coarsening_and_refinement function can do some + * for grids which are too unstructured. Therefore, + * prepare_coarsening_and_refinement() which is automatically called + * by execute_coarsening_and_refinement() can do some * smoothing of the triangulation. Note that mesh smoothing is only * done for two or more space dimensions, no smoothing is available * at present for one spatial dimension. In the following, let - * execute_* stand for @p execute_coarsening_and_refinement. + * execute_* stand for execute_coarsening_and_refinement(). * * For the purpose of smoothing, the * Triangulation constructor takes an argument specifying whether a @@ -755,188 +738,11 @@ namespace internal * and once with smoothing, since then in some refinement steps would need * to be refined twice. * - * The parameter taken by the constructor is an integer which may be composed - * bitwise by the constants defined in the enum MeshSmoothing. The meaning - * of these constants is explained in the following: - *
      - *
    • @p limit_level_difference_at_vertices: - * It can be shown, that degradation of approximation occurs if the - * triangulation contains vertices which are member of cells with levels - * differing by more than one. One such example is the following: - * - * @image html limit_level_difference_at_vertices.png "" - * - * It would seem that in two space dimensions, the maximum jump in levels - * between cells sharing a common vertex is two (as in the example - * above). However, this is not true if more than four cells meet at a - * vertex. It is not uncommon that a coarse (initial) mesh contains - * vertices at which six or even eight cells meet, when small features of - * the domain have to be resolved even on the coarsest mesh. In that case, - * the maximum difference in levels is three or four, respectively. The - * problem gets even worse in three space dimensions. - * - * Looking at an interpolation of the second derivative of the finite - * element solution (assuming bilinear finite elements), one sees that the - * numerical solution is almost totally wrong, compared with the true - * second derivative. Indeed, on regular meshes, there exist sharp - * estimations that the $H^2$-error is only $O(1)$, so we should not be - * surprised; however, the numerical solution may show a value for the - * second derivative which may be a factor of ten away from the true - * value. These problems are located on the small cell adjacent to the - * center vertex, where cells of non-subsequent levels meet, as well as on - * the upper and right neighbor of this cell (but with a less degree of - * deviation from the true value). - * - * If the smoothing indicator given to the constructor contains the bit for - * @p limit_level_difference_at_vertices, situations as the above one are - * eliminated by also marking the lower left cell for refinement. - * - * In case of anisotropic refinement, the level of a cell is not linked to - * the refinement of a cell as directly as in case of isotropic - * refinement. Furthermore, a cell can be strongly refined in one - * direction and not or at least much less refined in another. Therefore, - * it is very difficult to decide, which cases should be excluded from the - * refinement process. As a consequence, when using anisotropic - * refinement, the @p limit_level_difference_at_vertices flag must not be - * set. On the other hand, the implementation of multigrid methods in - * deal.II requires that this bit be set. - * - *
    • @p eliminate_unrefined_islands: - * Single cells which are not refined and are surrounded by cells which are - * refined usually also lead to a sharp decline in approximation properties - * locally. The reason is that the nodes on the faces between unrefined and - * refined cells are not real degrees of freedom but carry constraints. The - * patch without additional degrees of freedom is thus significantly larger - * then the unrefined cell itself. If in the parameter passed to the - * constructor the bit for @p eliminate_unrefined_islands is set, all cells - * which are not flagged for refinement but which are surrounded by more - * refined cells than unrefined cells are flagged for refinement. Cells - * which are not yet refined but flagged for that are accounted for the - * number of refined neighbors. Cells on the boundary are not accounted for - * at all. An unrefined island is, by this definition - * also a cell which (in 2D) is surrounded by three refined cells and one - * unrefined one, or one surrounded by two refined cells, one unrefined one - * and is at the boundary on one side. It is thus not a true island, as the - * name of the flag may indicate. However, no better name came to mind to - * the author by now. - * - *
    • eliminate_refined_*_islands: - * This algorithm seeks for isolated cells which are refined or flagged - * for refinement. This definition is unlike that for - * @p eliminate_unrefined_islands, which would mean that an island is - * defined as a cell which - * is refined but more of its neighbors are not refined than are refined. - * For example, in 2D, a cell's refinement would be reverted if at most - * one of its neighbors is also refined (or refined but flagged for - * coarsening). - * - * The reason for the change in definition of an island is, that this - * option would be a bit dangerous, since if you consider a - * chain of refined cells (e.g. along a kink in the solution), the cells - * at the two ends would be coarsened, after which the next outermost cells - * would need to be coarsened. Therefore, only one loop of flagging cells - * like this could be done to avoid eating up the whole chain of refined - * cells (`chain reaction'...). - * - * This algorithm also takes into account cells which are not actually - * refined but are flagged for refinement. If necessary, it takes away the - * refinement flag. - * - * Actually there are two versions of this flag, - * @p eliminate_refined_inner_islands and @p eliminate_refined_boundary_islands. - * There first eliminates islands defined by the definition above which are - * in the interior of the domain, while the second eliminates only those - * islands if the cell is at the boundary. The reason for this split of - * flags is that one often wants to eliminate such islands in the interior - * while those at the boundary may well be wanted, for example if one - * refines the mesh according to a criterion associated with a boundary - * integral or if one has rough boundary data. - * - *
    • @p do_not_produce_unrefined_islands: - * This flag prevents the occurrence of unrefined islands. In more detail: - * It prohibits the coarsening of a cell if 'most of the neighbors' will - * be refined after the step. - * - *
    • @p patch_level_1: - * A triangulation of patch level 1 consists of patches, i.e. of - * cells that are refined once. This flag ensures that a mesh of - * patch level 1 is still of patch level 1 after coarsening and - * refinement. It is, however, the user's responsibility to ensure - * that the mesh is of patch level 1 before calling - * execute_coarsening_and_refinement the first time. The easiest - * way to achieve this is by calling global_refine(1) straight - * after creation of the triangulation. It follows that if at - * least one of the children of a cell is or will be refined than - * all children need to be refined. If the @p patch_level_1 flag - * is set, than the flags @p eliminate_unrefined_islands, @p - * eliminate_refined_inner_islands and @p - * eliminate_refined_boundary_islands will be ignored as they will - * be fulfilled automatically. - * - *
    • @p coarsest_level_1: - * Each coarse grid cell is refined at least once, i.e. the - * triangulation might have active cells on level 1 but not on - * level 0. This flag ensures that a mesh which has - * coarsest_level_1 has still coarsest_level_1 after coarsening - * and refinement. It is, however, the user's responsibility to - * ensure that the mesh has coarsest_level_1 before calling - * execute_coarsening_and_refinement the first time. The easiest - * way to achieve this is by calling global_refine(1) straight - * after creation of the triangulation. It follows that active - * cells on level 1 may not be coarsenend. - * - * The main use of this flag is to ensure that each cell has at least one - * neighbor in each coordinate direction (i.e. each cell has at least a - * left or right, and at least an upper or lower neighbor in 2d). This is - * a necessary precondition for some algorihms that compute finite - * differences between cells. The DerivativeApproximation class is one of - * these algorithms that require that a triangulation is coarsest_level_1 - * unless all cells already have at least one neighbor in each coordinate - * direction on the coarsest level. + * The parameter taken by the constructor is an integer which may be + * composed bitwise by the constants defined in the enum + * #MeshSmoothing (see there for the possibilities). * - *
    • @p smoothing_on_refinement: - * This flag sums up all smoothing algorithms which may be performed upon - * refinement by flagging some more cells for refinement. - * - *
    • @p smoothing_on_coarsening: - * This flag sums up all smoothing algorithms which may be performed upon - * coarsening by flagging some more cells for coarsening. - * - *
    • @p maximum_smoothing: - * This flag includes all the above ones and therefore combines all - * smoothing algorithms implemented. - * - *
    • @p allow_anisotropic_smoothing: - * This flag is not included in @p maximum_smoothing. The flag is - * concerned with the following case: consider the case that an - * unrefined and a refined cell share a common face and that one - * of the children of the refined cell along the common face is - * flagged for further refinement. In that case, the resulting - * mesh would have more than one hanging node along one or more of - * the edges of the triangulation, a situation that is not - * allowed. Consequently, in order to perform the refinement, the - * coarser of the two original cells is also going to be refined. - * - * However, in many cases it is sufficient to refine the coarser - * of the two original cells in an anisotropic way to avoid the - * case of multiple hanging vertices on a single edge. Doing only - * the minimal anisotropic refinement can save cells and degrees - * of freedom. By specifying this flag, the library can produce - * these anisotropic refinements. - * - * The flag is not included by default since it may lead to - * anisotropically refined meshes even though no cell has ever - * been refined anisotropically explicitly by a user command. This - * surprising fact may lead to programs that do the wrong thing - * since they are not written for the additional cases that can - * happen with anisotropic meshes, see the discussion in the - * introduction to step-30. - * - *
    • @p none: - * Select no smoothing at all. - *
    - * - * @note While it is possible to pass all of the flags discussed above to + * @note While it is possible to pass all of the flags in #MeshSmoothing to * objects of type parallel::distributed::Triangulation, it is not always * possible to honor all of these smoothing options if they would require * knowledge of refinement/coarsening flags on cells not locally owned by @@ -977,12 +783,12 @@ namespace internal * use is like the material id of cells). * Boundary indicators may be in the range from zero to - * types::internal_face_boundary_id-1. The value - * types::internal_face_boundary_id is reserved to denote interior lines (in 2D) + * numbers::internal_face_boundary_id-1. The value + * numbers::internal_face_boundary_id is reserved to denote interior lines (in 2D) * and interior lines and quads (in 3D), which do not have a * boundary indicator. This way, a program can easily * determine, whether such an object is at the boundary or not. - * Material indicators may be in the range from zero to types::invalid_material_id-1. + * Material indicators may be in the range from zero to numbers::invalid_material_id-1. * * Lines in two dimensions and quads in three dimensions inherit their * boundary indicator to their children upon refinement. You should therefore @@ -1458,45 +1264,238 @@ class Triangulation : public Subscriptor */ enum MeshSmoothing { +/** + * No mesh smoothing at all, except that meshes have to remain one-irregular. + */ none = 0x0, +/** + * It can be shown, that degradation of approximation occurs if the + * triangulation contains vertices which are member of cells with levels + * differing by more than one. One such example is the following: + * + * @image html limit_level_difference_at_vertices.png "" + * + * It would seem that in two space dimensions, the maximum jump in levels + * between cells sharing a common vertex is two (as in the example + * above). However, this is not true if more than four cells meet at a + * vertex. It is not uncommon that a coarse (initial) mesh contains + * vertices at which six or even eight cells meet, when small features of + * the domain have to be resolved even on the coarsest mesh. In that case, + * the maximum difference in levels is three or four, respectively. The + * problem gets even worse in three space dimensions. + * + * Looking at an interpolation of the second derivative of the finite + * element solution (assuming bilinear finite elements), one sees that the + * numerical solution is almost totally wrong, compared with the true + * second derivative. Indeed, on regular meshes, there exist sharp + * estimations that the H2-error is only of order one, so we should not be + * surprised; however, the numerical solution may show a value for the + * second derivative which may be a factor of ten away from the true + * value. These problems are located on the small cell adjacent to the + * center vertex, where cells of non-subsequent levels meet, as well as on + * the upper and right neighbor of this cell (but with a less degree of + * deviation from the true value). + * + * If the smoothing indicator given to the constructor contains the bit for + * #limit_level_difference_at_vertices, situations as the above one are + * eliminated by also marking the lower left cell for refinement. + * + * In case of anisotropic refinement, the level of a cell is not linked to + * the refinement of a cell as directly as in case of isotropic + * refinement. Furthermore, a cell can be strongly refined in one + * direction and not or at least much less refined in another. Therefore, + * it is very difficult to decide, which cases should be excluded from the + * refinement process. As a consequence, when using anisotropic + * refinement, the #limit_level_difference_at_vertices flag must not be + * set. On the other hand, the implementation of multigrid methods in + * deal.II requires that this bit be set. + */ limit_level_difference_at_vertices = 0x1, - eliminate_unrefined_islands = 0x2, +/** + * Single cells which are not refined and are surrounded by cells which are + * refined usually also lead to a sharp decline in approximation properties + * locally. The reason is that the nodes on the faces between unrefined and + * refined cells are not real degrees of freedom but carry constraints. The + * patch without additional degrees of freedom is thus significantly larger + * then the unrefined cell itself. If in the parameter passed to the + * constructor the bit for #eliminate_unrefined_islands is set, all cells + * which are not flagged for refinement but which are surrounded by more + * refined cells than unrefined cells are flagged for refinement. Cells + * which are not yet refined but flagged for that are accounted for the + * number of refined neighbors. Cells on the boundary are not accounted for + * at all. An unrefined island is, by this definition + * also a cell which (in 2D) is surrounded by three refined cells and one + * unrefined one, or one surrounded by two refined cells, one unrefined one + * and is at the boundary on one side. It is thus not a true island, as the + * name of the flag may indicate. However, no better name came to mind to + * the author by now. + */ + eliminate_unrefined_islands = 0x2, +/** + * A triangulation of patch level 1 consists of patches, i.e. of + * cells that are refined once. This flag ensures that a mesh of + * patch level 1 is still of patch level 1 after coarsening and + * refinement. It is, however, the user's responsibility to ensure + * that the mesh is of patch level 1 before calling + * Triangulation::execute_coarsening_and_refinement() the first time. The easiest + * way to achieve this is by calling global_refine(1) straight + * after creation of the triangulation. It follows that if at + * least one of the children of a cell is or will be refined than + * all children need to be refined. If the #patch_level_1 flag + * is set, than the flags #eliminate_unrefined_islands, + * #eliminate_refined_inner_islands and + * #eliminate_refined_boundary_islands will be ignored as they will + * be fulfilled automatically. + */ patch_level_1 = 0x4, +/** + * Each coarse grid cell is refined at least once, i.e. the + * triangulation might have active cells on level 1 but not on + * level 0. This flag ensures that a mesh which has + * coarsest_level_1 has still coarsest_level_1 after coarsening + * and refinement. It is, however, the user's responsibility to + * ensure that the mesh has coarsest_level_1 before calling + * execute_coarsening_and_refinement the first time. The easiest + * way to achieve this is by calling global_refine(1) straight + * after creation of the triangulation. It follows that active + * cells on level 1 may not be coarsenend. + * + * The main use of this flag is to ensure that each cell has at least one + * neighbor in each coordinate direction (i.e. each cell has at least a + * left or right, and at least an upper or lower neighbor in 2d). This is + * a necessary precondition for some algorihms that compute finite + * differences between cells. The DerivativeApproximation class is one of + * these algorithms that require that a triangulation is coarsest_level_1 + * unless all cells already have at least one neighbor in each coordinate + * direction on the coarsest level. + */ coarsest_level_1 = 0x8, - +/** + * This flag is not included in @p maximum_smoothing. The flag is + * concerned with the following case: consider the case that an + * unrefined and a refined cell share a common face and that one + * of the children of the refined cell along the common face is + * flagged for further refinement. In that case, the resulting + * mesh would have more than one hanging node along one or more of + * the edges of the triangulation, a situation that is not + * allowed. Consequently, in order to perform the refinement, the + * coarser of the two original cells is also going to be refined. + * + * However, in many cases it is sufficient to refine the coarser + * of the two original cells in an anisotropic way to avoid the + * case of multiple hanging vertices on a single edge. Doing only + * the minimal anisotropic refinement can save cells and degrees + * of freedom. By specifying this flag, the library can produce + * these anisotropic refinements. + * + * The flag is not included by default since it may lead to + * anisotropically refined meshes even though no cell has ever + * been refined anisotropically explicitly by a user command. This + * surprising fact may lead to programs that do the wrong thing + * since they are not written for the additional cases that can + * happen with anisotropic meshes, see the discussion in the + * introduction to step-30. + */ allow_anisotropic_smoothing = 0x10, - +/** + * This algorithm seeks for isolated cells which are refined or flagged + * for refinement. This definition is unlike that for + * #eliminate_unrefined_islands, which would mean that an island is + * defined as a cell which + * is refined but more of its neighbors are not refined than are refined. + * For example, in 2D, a cell's refinement would be reverted if at most + * one of its neighbors is also refined (or refined but flagged for + * coarsening). + * + * The reason for the change in definition of an island is, that this + * option would be a bit dangerous, since if you consider a + * chain of refined cells (e.g. along a kink in the solution), the cells + * at the two ends would be coarsened, after which the next outermost cells + * would need to be coarsened. Therefore, only one loop of flagging cells + * like this could be done to avoid eating up the whole chain of refined + * cells (`chain reaction'...). + * + * This algorithm also takes into account cells which are not actually + * refined but are flagged for refinement. If necessary, it takes away the + * refinement flag. + * + * Actually there are two versions of this flag, + * #eliminate_refined_inner_islands and #eliminate_refined_boundary_islands. + * There first eliminates islands defined by the definition above which are + * in the interior of the domain, while the second eliminates only those + * islands if the cell is at the boundary. The reason for this split of + * flags is that one often wants to eliminate such islands in the interior + * while those at the boundary may well be wanted, for example if one + * refines the mesh according to a criterion associated with a boundary + * integral or if one has rough boundary data. + */ eliminate_refined_inner_islands = 0x100, +/** + * The result of this flag is very similar to + * #eliminate_refined_inner_islands. See the documentation there. + */ eliminate_refined_boundary_islands = 0x200, +/** + * This flag prevents the occurrence of unrefined islands. In more detail: + * It prohibits the coarsening of a cell if 'most of the neighbors' will + * be refined after the step. + */ do_not_produce_unrefined_islands = 0x400, +/** + * This flag sums up all smoothing algorithms which may be performed upon + * refinement by flagging some more cells for refinement. + */ smoothing_on_refinement = (limit_level_difference_at_vertices | eliminate_unrefined_islands), +/** + * This flag sums up all smoothing algorithms which may be performed upon + * coarsening by flagging some more cells for coarsening. + */ smoothing_on_coarsening = (eliminate_refined_inner_islands | eliminate_refined_boundary_islands | do_not_produce_unrefined_islands), +/** + * This flag includes all the above ones and therefore combines all + * smoothing algorithms implemented with the exception of + * anisotropic smoothening. + */ maximum_smoothing = 0xffff ^ allow_anisotropic_smoothing }; - + /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + */ typedef TriaRawIterator > raw_cell_iterator; typedef TriaIterator > cell_iterator; typedef TriaActiveIterator > active_cell_iterator; + /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + */ typedef TriaRawIterator > raw_face_iterator; typedef TriaIterator > face_iterator; typedef TriaActiveIterator > active_face_iterator; + /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + */ typedef typename IteratorSelector::raw_line_iterator raw_line_iterator; typedef typename IteratorSelector::line_iterator line_iterator; typedef typename IteratorSelector::active_line_iterator active_line_iterator; + /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + */ typedef typename IteratorSelector::raw_quad_iterator raw_quad_iterator; typedef typename IteratorSelector::quad_iterator quad_iterator; typedef typename IteratorSelector::active_quad_iterator active_quad_iterator; - typedef typename IteratorSelector::raw_hex_iterator raw_hex_iterator; + /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + */ + typedef typename IteratorSelector::raw_hex_iterator raw_hex_iterator; typedef typename IteratorSelector::hex_iterator hex_iterator; typedef typename IteratorSelector::active_hex_iterator active_hex_iterator; @@ -1806,7 +1805,7 @@ class Triangulation : public Subscriptor * boundary, for instance the material id * in a UCD input file. They are not * necessarily consecutive but must be in - * the range 0-(types::boundary_id_t-1). + * the range 0-(types::boundary_id-1). * Material IDs on boundaries are also * called boundary indicators and are * accessed with accessor functions @@ -1835,7 +1834,7 @@ class Triangulation : public Subscriptor * * @ingroup boundary */ - void set_boundary (const types::boundary_id_t number, + void set_boundary (const types::boundary_id number, const Boundary &boundary_object); /** @@ -1849,7 +1848,7 @@ class Triangulation : public Subscriptor * * @ingroup boundary */ - void set_boundary (const types::boundary_id_t number); + void set_boundary (const types::boundary_id number); /** * Return a constant reference to @@ -1860,7 +1859,7 @@ class Triangulation : public Subscriptor * * @ingroup boundary */ - const Boundary & get_boundary (const types::boundary_id_t number) const; + const Boundary & get_boundary (const types::boundary_id number) const; /** * Returns a vector containing @@ -1877,7 +1876,7 @@ class Triangulation : public Subscriptor * * @ingroup boundary */ - std::vector get_boundary_indicators() const; + std::vector get_boundary_indicators() const; /** * Copy a triangulation. This @@ -2605,6 +2604,8 @@ class Triangulation : public Subscriptor */ /*@{*/ /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Iterator to the first cell, used * or not, on level @p level. If a level * has no cells, a past-the-end iterator @@ -2654,6 +2655,8 @@ class Triangulation : public Subscriptor cell_iterator end (const unsigned int level) const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return a raw iterator which is the first * iterator not on level. If @p level is * the last level, then this returns @@ -2671,6 +2674,8 @@ class Triangulation : public Subscriptor /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return an iterator pointing to the * last cell, used or not. * @@ -2680,6 +2685,8 @@ class Triangulation : public Subscriptor raw_cell_iterator last_raw () const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return an iterator pointing to the * last cell of the level @p level, used * or not. @@ -2735,6 +2742,8 @@ class Triangulation : public Subscriptor */ /*@{*/ /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Iterator to the first face, used * or not. As faces have no level, * no argument can be given. @@ -2774,6 +2783,8 @@ class Triangulation : public Subscriptor raw_face_iterator end_face () const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return a raw iterator which is past * the end. This is the same as * end() and is only for @@ -2790,6 +2801,8 @@ class Triangulation : public Subscriptor active_face_iterator end_active_face () const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return an iterator pointing to the * last face, used or not. * @@ -2827,6 +2840,8 @@ class Triangulation : public Subscriptor */ /*@{*/ /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Iterator to the first line, used or * not, on level @p level. If a level * has no lines, a past-the-end iterator @@ -2871,6 +2886,8 @@ class Triangulation : public Subscriptor line_iterator end_line (const unsigned int level) const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return a raw iterator which is the * first iterator not on level. If @p * level is the last level, then this @@ -2887,6 +2904,8 @@ class Triangulation : public Subscriptor active_line_iterator end_active_line (const unsigned int level) const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return an iterator pointing to the * last line, used or not. */ @@ -2894,6 +2913,8 @@ class Triangulation : public Subscriptor last_raw_line () const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return an iterator pointing to the * last line of the level @p level, used * or not. @@ -2938,6 +2959,8 @@ class Triangulation : public Subscriptor /*@{ */ /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Iterator to the first quad, used or * not, on the given level. If a level * has no quads, a past-the-end iterator @@ -2980,6 +3003,8 @@ class Triangulation : public Subscriptor quad_iterator end_quad (const unsigned int level) const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return a raw iterator which is the * first iterator not on level. If @p * level is the last level, then this @@ -2996,6 +3021,8 @@ class Triangulation : public Subscriptor active_quad_iterator end_active_quad (const unsigned int level) const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return an iterator pointing to the * last quad, used or not. */ @@ -3003,6 +3030,8 @@ class Triangulation : public Subscriptor last_raw_quad () const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return an iterator pointing to the * last quad of the level @p level, used * or not. @@ -3048,6 +3077,8 @@ class Triangulation : public Subscriptor /*@{ */ /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Iterator to the first hex, used * or not, on level @p level. If a level * has no hexs, a past-the-end iterator @@ -3087,6 +3118,8 @@ class Triangulation : public Subscriptor hex_iterator end_hex (const unsigned int level) const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return a raw iterator which is the first * iterator not on level. If @p level is * the last level, then this returns @@ -3103,12 +3136,16 @@ class Triangulation : public Subscriptor active_hex_iterator end_active_hex (const unsigned int level) const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return an iterator pointing to the * last hex, used or not. */ raw_hex_iterator last_raw_hex () const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return an iterator pointing to the * last hex of the level @p level, used * or not. @@ -3171,12 +3208,16 @@ class Triangulation : public Subscriptor */ /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Total Number of lines, used or * unused. */ unsigned int n_raw_lines () const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Number of lines, used or * unused, on the given level. */ @@ -3206,12 +3247,16 @@ class Triangulation : public Subscriptor unsigned int n_active_lines (const unsigned int level) const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Total number of quads, used or * unused. */ unsigned int n_raw_quads () const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Number of quads, used or * unused, on the given level. */ @@ -3242,12 +3287,16 @@ class Triangulation : public Subscriptor unsigned int n_active_quads (const unsigned int level) const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Total number of hexs, used or * unused. */ unsigned int n_raw_hexs () const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Number of hexs, used or * unused, on the given level. */ @@ -3280,6 +3329,8 @@ class Triangulation : public Subscriptor unsigned int n_active_hexs(const unsigned int level) const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Number of cells, used or * unused, on the given level. */ @@ -3317,6 +3368,8 @@ class Triangulation : public Subscriptor unsigned int n_active_cells (const unsigned int level) const; /** + * @deprecated The use of raw iterators is highly disencouraged and they might go away in future releases + * * Return total number of faces, * used or not. In 2d, the result * equals n_raw_lines(), while in 3d it @@ -3452,7 +3505,7 @@ class Triangulation : public Subscriptor * of those cells that are owned * by the current processor. */ - virtual types::subdomain_id_t locally_owned_subdomain () const; + virtual types::subdomain_id locally_owned_subdomain () const; /*@}*/ /** @@ -3712,7 +3765,7 @@ class Triangulation : public Subscriptor * objects, which are not * of type StraightBoundary. */ - std::map , Triangulation > > boundary; + std::map , Triangulation > > boundary; /** * Flag indicating whether @@ -3771,7 +3824,7 @@ class Triangulation : public Subscriptor * TriaAccessor::set_boundary_indicator) * were not a pointer. */ - std::map *vertex_to_boundary_id_map_1d; + std::map *vertex_to_boundary_id_map_1d; /** * A map that correlates each refinement listener that has been added diff --git a/deal.II/include/deal.II/grid/tria_accessor.h b/deal.II/include/deal.II/grid/tria_accessor.h index 25f0a3e24d..b12710e3f5 100644 --- a/deal.II/include/deal.II/grid/tria_accessor.h +++ b/deal.II/include/deal.II/grid/tria_accessor.h @@ -1019,11 +1019,11 @@ class TriaAccessor : public TriaAccessorBase * object. * * If the return value is the special - * value types::internal_face_boundary_id, + * value numbers::internal_face_boundary_id, * then this object is in the * interior of the domain. */ - types::boundary_id_t boundary_indicator () const; + types::boundary_id boundary_indicator () const; /** * Set the boundary indicator. @@ -1052,14 +1052,14 @@ class TriaAccessor : public TriaAccessorBase * (a face not at the boundary of the * domain), or set set the boundary * indicator of an exterior face to - * types::internal_face_boundary_id + * numbers::internal_face_boundary_id * (this value is reserved for another * purpose). Algorithms may not work or * produce very confusing results if * boundary cells have a boundary - * indicator of types::internal_face_boundary_id + * indicator of numbers::internal_face_boundary_id * or if interior cells have boundary - * indicators other than types::internal_face_boundary_id. + * indicators other than numbers::internal_face_boundary_id. * Unfortunately, the current object * has no means of finding out whether it * really is at the boundary of the @@ -1069,7 +1069,7 @@ class TriaAccessor : public TriaAccessorBase * * @ingroup boundary */ - void set_boundary_indicator (const types::boundary_id_t) const; + void set_boundary_indicator (const types::boundary_id) const; /** * Do as set_boundary_indicator() @@ -1089,7 +1089,7 @@ class TriaAccessor : public TriaAccessorBase * * @ingroup boundary */ - void set_all_boundary_indicators (const types::boundary_id_t) const; + void set_all_boundary_indicators (const types::boundary_id) const; /** * Return whether this object is at the @@ -1930,11 +1930,11 @@ class TriaAccessor<0, 1, spacedim> * boundary indicator one. * * If the return value is the special - * value types::internal_face_boundary_id, + * value numbers::internal_face_boundary_id, * then this object is in the * interior of the domain. */ - types::boundary_id_t boundary_indicator () const; + types::boundary_id boundary_indicator () const; /** * @name Orientation of sub-objects @@ -2054,14 +2054,14 @@ class TriaAccessor<0, 1, spacedim> * (a face not at the boundary of the * domain), or set set the boundary * indicator of an exterior face to - * types::internal_face_boundary_id + * numbers::internal_face_boundary_id * (this value is reserved for another * purpose). Algorithms may not work or * produce very confusing results if * boundary cells have a boundary - * indicator of types::internal_face_boundary_id + * indicator of numbers::internal_face_boundary_id * or if interior cells have boundary - * indicators other than types::internal_face_boundary_id. + * indicators other than numbers::internal_face_boundary_id. * Unfortunately, the current object * has no means of finding out whether it * really is at the boundary of the @@ -2072,7 +2072,7 @@ class TriaAccessor<0, 1, spacedim> * @ingroup boundary */ void - set_boundary_indicator (const types::boundary_id_t); + set_boundary_indicator (const types::boundary_id); /** * Since this object only represents a @@ -2083,7 +2083,7 @@ class TriaAccessor<0, 1, spacedim> * @ingroup boundary */ void - set_all_boundary_indicators (const types::boundary_id_t); + set_all_boundary_indicators (const types::boundary_id); /** * @} */ @@ -2621,7 +2621,7 @@ class CellAccessor : public TriaAccessor * "glossary" for more * information. */ - types::material_id_t material_id () const; + types::material_id material_id () const; /** * Set the material id of this @@ -2635,7 +2635,7 @@ class CellAccessor : public TriaAccessor * "glossary" for more * information. */ - void set_material_id (const types::material_id_t new_material_id) const; + void set_material_id (const types::material_id new_material_id) const; /** * Set the material id of this @@ -2647,7 +2647,7 @@ class CellAccessor : public TriaAccessor * "glossary" for more * information. */ - void recursively_set_material_id (const types::material_id_t new_material_id) const; + void recursively_set_material_id (const types::material_id new_material_id) const; /** * @} */ @@ -2671,7 +2671,7 @@ class CellAccessor : public TriaAccessor * parallel::distributed::Triangulation * object. */ - types::subdomain_id_t subdomain_id () const; + types::subdomain_id subdomain_id () const; /** * Set the subdomain id of this @@ -2685,7 +2685,7 @@ class CellAccessor : public TriaAccessor * parallel::distributed::Triangulation * object. */ - void set_subdomain_id (const types::subdomain_id_t new_subdomain_id) const; + void set_subdomain_id (const types::subdomain_id new_subdomain_id) const; /** * Set the subdomain id of this @@ -2701,7 +2701,7 @@ class CellAccessor : public TriaAccessor * parallel::distributed::Triangulation * object. */ - void recursively_set_subdomain_id (const types::subdomain_id_t new_subdomain_id) const; + void recursively_set_subdomain_id (const types::subdomain_id new_subdomain_id) const; /** * @} */ diff --git a/deal.II/include/deal.II/grid/tria_accessor.templates.h b/deal.II/include/deal.II/grid/tria_accessor.templates.h index e15a341ac3..fd90e894a4 100644 --- a/deal.II/include/deal.II/grid/tria_accessor.templates.h +++ b/deal.II/include/deal.II/grid/tria_accessor.templates.h @@ -1820,7 +1820,7 @@ TriaAccessor::number_of_children () const template -types::boundary_id_t +types::boundary_id TriaAccessor::boundary_indicator () const { Assert (structdim::boundary_indicator () const template void TriaAccessor:: -set_boundary_indicator (const types::boundary_id_t boundary_ind) const +set_boundary_indicator (const types::boundary_id boundary_ind) const { Assert (structdimused(), TriaAccessorExceptions::ExcCellNotUsed()); @@ -1847,7 +1847,7 @@ set_boundary_indicator (const types::boundary_id_t boundary_ind) const template void TriaAccessor:: -set_all_boundary_indicators (const types::boundary_id_t boundary_ind) const +set_all_boundary_indicators (const types::boundary_id boundary_ind) const { set_boundary_indicator (boundary_ind); @@ -1878,7 +1878,7 @@ TriaAccessor::at_boundary () const { // error checking is done // in boundary_indicator() - return (boundary_indicator() != types::internal_face_boundary_id); + return (boundary_indicator() != numbers::internal_face_boundary_id); } @@ -2236,7 +2236,7 @@ TriaAccessor<0, 1, spacedim>::at_boundary () const template inline -types::boundary_id_t +types::boundary_id TriaAccessor<0, 1, spacedim>::boundary_indicator () const { switch (vertex_kind) @@ -2252,7 +2252,7 @@ TriaAccessor<0, 1, spacedim>::boundary_indicator () const } default: - return types::internal_face_boundary_id; + return numbers::internal_face_boundary_id; } } @@ -2373,7 +2373,7 @@ int TriaAccessor<0, 1, spacedim>::isotropic_child_index (const unsigned int) template inline void -TriaAccessor<0, 1, spacedim>::set_boundary_indicator (const types::boundary_id_t b) +TriaAccessor<0, 1, spacedim>::set_boundary_indicator (const types::boundary_id b) { Assert (tria->vertex_to_boundary_id_map_1d->find (this->vertex_index()) != tria->vertex_to_boundary_id_map_1d->end(), @@ -2386,7 +2386,7 @@ TriaAccessor<0, 1, spacedim>::set_boundary_indicator (const types::boundary_id_t template inline -void TriaAccessor<0, 1, spacedim>::set_all_boundary_indicators (const types::boundary_id_t b) +void TriaAccessor<0, 1, spacedim>::set_all_boundary_indicators (const types::boundary_id b) { set_boundary_indicator (b); } @@ -2856,7 +2856,7 @@ CellAccessor::is_locally_owned () const #ifndef DEAL_II_USE_P4EST return true; #else - const types::subdomain_id_t subdomain = this->subdomain_id(); + const types::subdomain_id subdomain = this->subdomain_id(); if (subdomain == types::artificial_subdomain_id) return false; @@ -2879,7 +2879,7 @@ CellAccessor::is_ghost () const #ifndef DEAL_II_USE_P4EST return false; #else - const types::subdomain_id_t subdomain = this->subdomain_id(); + const types::subdomain_id subdomain = this->subdomain_id(); if (subdomain == types::artificial_subdomain_id) return false; diff --git a/deal.II/include/deal.II/grid/tria_iterator.h b/deal.II/include/deal.II/grid/tria_iterator.h index e24919e9a0..0c32918742 100644 --- a/deal.II/include/deal.II/grid/tria_iterator.h +++ b/deal.II/include/deal.II/grid/tria_iterator.h @@ -231,12 +231,7 @@ template class TriaActiveIterator; * @author documentation update Guido Kanschat, 2004 */ template -class TriaRawIterator : -#ifdef HAVE_STD_ITERATOR_CLASS - public std::iterator -#else - public bidirectional_iterator -#endif +class TriaRawIterator : public std::iterator { public: /** diff --git a/deal.II/include/deal.II/grid/tria_levels.h b/deal.II/include/deal.II/grid/tria_levels.h index 37b0bac873..24bf5a87a7 100644 --- a/deal.II/include/deal.II/grid/tria_levels.h +++ b/deal.II/include/deal.II/grid/tria_levels.h @@ -138,7 +138,7 @@ namespace internal * cells with a given subdomain * number. */ - std::vector subdomain_ids; + std::vector subdomain_ids; /** * One integer for every consecutive @@ -242,7 +242,7 @@ namespace internal std::vector refine_flags; std::vector coarsen_flags; std::vector > neighbors; - std::vector subdomain_ids; + std::vector subdomain_ids; std::vector parents; // The following is not used diff --git a/deal.II/include/deal.II/grid/tria_objects.h b/deal.II/include/deal.II/grid/tria_objects.h index 23d6bda87f..f64e7fd589 100644 --- a/deal.II/include/deal.II/grid/tria_objects.h +++ b/deal.II/include/deal.II/grid/tria_objects.h @@ -141,8 +141,8 @@ namespace internal { union { - types::boundary_id_t boundary_id; - types::material_id_t material_id; + types::boundary_id boundary_id; + types::material_id material_id; }; @@ -174,7 +174,7 @@ namespace internal * example, in one dimension, this field * stores the material id of a line, which * is a number between 0 and - * types::invalid_material_id-1. In more + * numbers::invalid_material_id-1. In more * than one dimension, lines have no * material id, but they may be at the * boundary; then, we store the @@ -184,8 +184,8 @@ namespace internal * boundary conditions hold on this * part. The boundary indicator also * is a number between zero and - * types::internal_face_boundary_id-1; - * the id types::internal_face_boundary_id + * numbers::internal_face_boundary_id-1; + * the id numbers::internal_face_boundary_id * is reserved for lines * in the interior and may be used * to check whether a line is at the @@ -712,7 +712,7 @@ namespace internal inline TriaObjects::BoundaryOrMaterialId::BoundaryOrMaterialId () { - material_id = types::invalid_material_id; + material_id = numbers::invalid_material_id; } diff --git a/deal.II/include/deal.II/hp/dof_handler.h b/deal.II/include/deal.II/hp/dof_handler.h index e26959fca6..a493349218 100644 --- a/deal.II/include/deal.II/hp/dof_handler.h +++ b/deal.II/include/deal.II/hp/dof_handler.h @@ -863,7 +863,7 @@ namespace hp * consideration. */ unsigned int - n_boundary_dofs (const std::set &boundary_indicators) const; + n_boundary_dofs (const std::set &boundary_indicators) const; /** * Return the number of @@ -1107,7 +1107,7 @@ namespace hp * Create default tables for * the active_fe_indices in * the - * dealii::internal::hp::DoFLevels. They + * dealii::internal::hp::DoFLevel. They * are initialized with the a * zero indicator, meaning * that fe[0] is going to be @@ -1239,7 +1239,7 @@ namespace hp * form of a linked list, is * the same as used for the * arrays used in the - * hp::DoFLevel + * internal::hp::DoFLevel * hierarchy. Starting indices * into this array are provided * by the vertex_dofs_offsets diff --git a/deal.II/include/deal.II/hp/dof_levels.h b/deal.II/include/deal.II/hp/dof_levels.h index f526ccab2a..7fc4b81bed 100644 --- a/deal.II/include/deal.II/hp/dof_levels.h +++ b/deal.II/include/deal.II/hp/dof_levels.h @@ -164,7 +164,7 @@ namespace internal * store the dof-indices and related functions of * lines */ - internal::hp::DoFObjects<1> lines; + internal::hp::DoFObjects<1> dof_object; /** * Determine an estimate for the @@ -190,7 +190,7 @@ namespace internal * store the dof-indices and related functions of * quads */ - internal::hp::DoFObjects<2> quads; + internal::hp::DoFObjects<2> dof_object; /** * Determine an estimate for the @@ -217,7 +217,7 @@ namespace internal * store the dof-indices and related functions of * hexes */ - internal::hp::DoFObjects<3> hexes; + internal::hp::DoFObjects<3> dof_object; /** * Determine an estimate for the diff --git a/deal.II/include/deal.II/hp/fe_collection.h b/deal.II/include/deal.II/hp/fe_collection.h index 1255ea88ca..cfe2769964 100644 --- a/deal.II/include/deal.II/hp/fe_collection.h +++ b/deal.II/include/deal.II/hp/fe_collection.h @@ -116,6 +116,11 @@ namespace hp * this collection. This number must * be the same for all elements in the * collection. + * + * This function calls + * FiniteElement::n_components. See + * @ref GlossComponent "the glossary" + * for more information. */ unsigned int n_components () const; @@ -236,6 +241,15 @@ namespace hp FECollection::n_components () const { Assert (finite_elements.size () > 0, ExcNoFiniteElements()); + + // note that there is no need + // here to enforce that indeed + // all elements have the same + // number of components since we + // have already done this when + // adding a new element to the + // collection. + return finite_elements[0]->n_components (); } diff --git a/deal.II/include/deal.II/integrators/advection.h b/deal.II/include/deal.II/integrators/advection.h new file mode 100644 index 0000000000..56cdbbcdd4 --- /dev/null +++ b/deal.II/include/deal.II/integrators/advection.h @@ -0,0 +1,390 @@ +//--------------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 2010, 2011, 2012 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__integrators_advection_h +#define __deal2__integrators_advection_h + + +#include +#include +#include +#include +#include +#include +#include + +DEAL_II_NAMESPACE_OPEN + +namespace LocalIntegrators +{ +/** + * @brief Local integrators related to advection along a vector field and its DG formulations + * + * All advection operators depend on an advection velocity denoted by + * w in the formulas below. It is denoted as velocity + * in the parameter lists. + * + * The functions cell_matrix() and both upwind_value_matrix() are + * taking the equation in weak form, that is, the directional + * derivative is on the test function. + * + * @ingroup Integrators + * @author Guido Kanschat + * @date 2012 + */ + namespace Advection + { +/** + * Advection along the direction w in weak form + * with derivative on the test function + * \f[ + * m_{ij} = \int_Z u_j\,(\mathbf w \cdot \nabla) v_i \, dx. + * \f] + * + * The FiniteElement in fe may be scalar or vector valued. In + * the latter case, the advection operator is applied to each component + * separately. + * + * @param M: The advection matrix obtained as result + * @param fe: The FEValues object describing the local trial function + * space. #update_values and #update_gradients, and #update_JxW_values + * must be set. + * @param fetest: The FEValues object describing the local test + * function space. #update_values and #update_gradients must be set. + * @param velocity: The advection velocity, a vector of dimension + * dim. Each component may either contain a vector of length + * one, in which case a constant velocity is assumed, or a vector with + * as many entries as quadrature points if the velocity is not constant. + * @param factor is an optional multiplication factor for the result. + * + * @ingroup Integrators + * @author Guido Kanschat + * @date 2012 + */ + template + void cell_matrix ( + FullMatrix& M, + const FEValuesBase& fe, + const FEValuesBase& fetest, + const VectorSlice > >& velocity, + const double factor = 1.) + { + const unsigned int n_dofs = fe.dofs_per_cell; + const unsigned int t_dofs = fetest.dofs_per_cell; + const unsigned int n_components = fe.get_fe().n_components(); + + AssertDimension(velocity.size(), dim); + // If the size of the + // velocity vectors is one, + // then do not increment + // between quadrature points. + const unsigned int v_increment = (velocity[0].size() == 1) ? 0 : 1; + + if (v_increment == 1) + { + AssertVectorVectorDimension(velocity, dim, fe.n_quadrature_points); + } + + AssertDimension(M.n(), n_dofs); + AssertDimension(M.m(), t_dofs); + + for (unsigned k=0;k + inline void + cell_residual ( + Vector& result, + const FEValuesBase& fe, + const std::vector >& input, + const VectorSlice > >& velocity, + double factor = 1.) + { + const unsigned int nq = fe.n_quadrature_points; + const unsigned int n_dofs = fe.dofs_per_cell; + Assert(input.size() == nq, ExcDimensionMismatch(input.size(), nq)); + Assert(result.size() == n_dofs, ExcDimensionMismatch(result.size(), n_dofs)); + + AssertDimension(velocity.size(), dim); + const unsigned int v_increment = (velocity[0].size() == 1) ? 0 : 1; + if (v_increment == 1) + { + AssertVectorVectorDimension(velocity, dim, fe.n_quadrature_points); + } + + for (unsigned k=0;k + inline void + cell_residual ( + Vector& result, + const FEValuesBase& fe, + const VectorSlice > > >& input, + const VectorSlice > >& velocity, + double factor = 1.) + { + const unsigned int nq = fe.n_quadrature_points; + const unsigned int n_dofs = fe.dofs_per_cell; + const unsigned int n_comp = fe.get_fe().n_components(); + + AssertVectorVectorDimension(input, n_comp, fe.n_quadrature_points); + Assert(result.size() == n_dofs, ExcDimensionMismatch(result.size(), n_dofs)); + + AssertDimension(velocity.size(), dim); + const unsigned int v_increment = (velocity[0].size() == 1) ? 0 : 1; + if (v_increment == 1) + { + AssertVectorVectorDimension(velocity, dim, fe.n_quadrature_points); + } + + for (unsigned k=0;kvelocity is + * provided as a VectorSlice, + * having dim vectors, + * one for each velocity + * component. Each of the + * vectors must either have only + * a single entry, if t he + * advection velocity is + * constant, or have an entry + * for each quadrature point. + * + * The finite element can have + * several components, in which + * case each component is + * advected by the same velocity. + */ + template + void upwind_value_matrix( + FullMatrix& M, + const FEValuesBase& fe, + const FEValuesBase& fetest, + const VectorSlice > >& velocity, + double factor = 1.) + { + const unsigned int n_dofs = fe.dofs_per_cell; + const unsigned int t_dofs = fetest.dofs_per_cell; + unsigned int n_components = fe.get_fe().n_components(); + AssertDimension (M.m(), n_dofs); + AssertDimension (M.n(), n_dofs); + + AssertDimension(velocity.size(), dim); + const unsigned int v_increment = (velocity[0].size() == 1) ? 0 : 1; + if (v_increment == 1) + { + AssertVectorVectorDimension(velocity, dim, fe.n_quadrature_points); + } + + for (unsigned k=0;k 0) + { + for (unsigned i=0;ivelocity is + * provided as a VectorSlice, + * having dim vectors, + * one for each velocity + * component. Each of the + * vectors must either have only + * a single entry, if t he + * advection velocity is + * constant, or have an entry + * for each quadrature point. + * + * The finite element can have + * several components, in which + * case each component is + * advected the same way. + */ + template + void upwind_value_matrix ( + FullMatrix& M11, + FullMatrix& M12, + FullMatrix& M21, + FullMatrix& M22, + const FEValuesBase& fe1, + const FEValuesBase& fe2, + const FEValuesBase& fetest1, + const FEValuesBase& fetest2, + const VectorSlice > >& velocity, + const double factor = 1.) + { + const unsigned int n1 = fe1.dofs_per_cell; + // Multiply the quadrature point + // index below with this factor to + // have simpler data for constant + // velocities. + AssertDimension(velocity.size(), dim); + const unsigned int v_increment = (velocity[0].size() == 1) ? 0 : 1; + if (v_increment == 1) + { + AssertVectorVectorDimension(velocity, dim, fe1.n_quadrature_points); + } + + for (unsigned k=0;k 0) + { + M11(i,j) += dx_nbeta + * fe1.shape_value(j,k) + * fetest1.shape_value(i,k); + M21(i,j) -= dx_nbeta + * fe1.shape_value(j,k) + * fetest2.shape_value(i,k); + } + else + { + M22(i,j) -= dx_nbeta + * fe2.shape_value(j,k) + * fetest2.shape_value(i,k); + M12(i,j) += dx_nbeta + * fe2.shape_value(j,k) + * fetest1.shape_value(i,k); + } + } + else + { + for (unsigned int d=0;d 0) + { + M11(i,j) += dx_nbeta + * fe1.shape_value_component(j,k,d) + * fetest1.shape_value_component(i,k,d); + M21(i,j) -= dx_nbeta + * fe1.shape_value_component(j,k,d) + * fetest2.shape_value_component(i,k,d); + } + else + { + M22(i,j) -= dx_nbeta + * fe2.shape_value_component(j,k,d) + * fetest2.shape_value_component(i,k,d); + M12(i,j) += dx_nbeta + * fe2.shape_value_component(j,k,d) + * fetest1.shape_value_component(i,k,d); + } + } + } + } + } +} + + +DEAL_II_NAMESPACE_CLOSE + +#endif diff --git a/deal.II/include/deal.II/integrators/divergence.h b/deal.II/include/deal.II/integrators/divergence.h index 8734fff170..665fd73caf 100644 --- a/deal.II/include/deal.II/integrators/divergence.h +++ b/deal.II/include/deal.II/integrators/divergence.h @@ -87,14 +87,14 @@ namespace LocalIntegrators AssertDimension(M.m(), t_dofs); AssertDimension(M.n(), n_dofs); - for (unsigned k=0;kHdiv. The test functions + * may be discontinuous. + * + * The function cell_matrix() is the Frechet derivative of this function with respect + * to the test functions. + */ + template + void cell_residual( + Vector& result, + const FEValuesBase& fetest, + const VectorSlice > > >& input, + const double factor = 1.) + { + AssertDimension(fetest.get_fe().n_components(), 1); + AssertVectorVectorDimension(input, dim, fetest.n_quadrature_points); + const unsigned int t_dofs = fetest.dofs_per_cell; + Assert (result.size() == t_dofs, ExcDimensionMismatch(result.size(), t_dofs)); + + for (unsigned int k=0;k& Du = fe.shape_grad(j,k); M(i,j) += dx * vv * Du[d]; @@ -144,15 +178,44 @@ namespace LocalIntegrators } } + /** + * The residual of the gradient operator in strong form. + * \f[ + * \int_Z \mathbf v\cdot\nabla u \,dx + * \f] + * This is the strong gradient operator and the trial + * space should be at least H1. The test functions + * may be discontinuous. + * + * The function cell_residual() is the Frechet derivative of this function with respect to the test functions. + */ + template + void gradient_residual( + Vector& result, + const FEValuesBase& fetest, + const std::vector >& input, + const double factor = 1.) + { + AssertDimension(fetest.get_fe().n_components(), dim); + AssertDimension(input.size(), fetest.n_quadrature_points); + const unsigned int t_dofs = fetest.dofs_per_cell; + Assert (result.size() == t_dofs, ExcDimensionMismatch(result.size(), t_dofs)); + + for (unsigned int k=0;k void @@ -171,11 +234,11 @@ namespace LocalIntegrators AssertDimension(M.m(), t_dofs); AssertDimension(M.n(), n_dofs); - for (unsigned k=0;k ndx = factor * fe.JxW(k) * fe.normal_vector(k); - for (unsigned i=0;i @@ -209,15 +272,16 @@ namespace LocalIntegrators AssertDimension(result.size(), t_dofs); AssertVectorVectorDimension (data, dim, fe.n_quadrature_points); - for (unsigned k=0;k ndx = factor * fe.normal_vector(k) * fe.JxW(k); - for (unsigned i=0;i& n = fe.normal_vector(k); - for (unsigned i=0;i& n = fe1.normal_vector(k); - for (unsigned i=0;i>>>>>> trunk for (unsigned int d=0;d& n = fe.normal_vector(k); - for (unsigned i=0;i& n = fe.normal_vector(k); for (unsigned i=0;i& n = fe.normal_vector(k); + for (unsigned int i=0;i>>>>>> trunk { const double dnv = fe.shape_grad(i,k) * n; const double dnu = Dinput[k] * n; @@ -257,11 +272,15 @@ namespace LocalIntegrators AssertVectorVectorDimension(Dinput, n_comp, fe.n_quadrature_points); AssertVectorVectorDimension(data, n_comp, fe.n_quadrature_points); - for (unsigned k=0;k& n = fe.normal_vector(k); +<<<<<<< HEAD for (unsigned i=0;i>>>>>> trunk for (unsigned int d=0;d& n = fe1.normal_vector(k); for (unsigned int d=0;d>>>>>> trunk { const double dx = fe1.JxW(k); const Point& n = fe1.normal_vector(k); +<<<<<<< HEAD for (unsigned i=0;i>>>>>> trunk { const double vi = fe1.shape_value(i,k); const Tensor<1,dim>& Dvi = fe1.shape_grad(i,k); @@ -446,12 +474,20 @@ namespace LocalIntegrators const double penalty = .5 * pen * (nui + nue); +<<<<<<< HEAD for (unsigned k=0;k>>>>>> trunk { const double dx = fe1.JxW(k); const Point& n = fe1.normal_vector(k); +<<<<<<< HEAD for (unsigned i=0;i>>>>>> trunk for (unsigned int d=0;d::cell( L2::cell_matrix(dinfo.matrix(2,false).matrix, info.fe_values(1)); } * @endcode - * See step-42 for a worked out example of this code. + * See step-39 for a worked out example of this code. * * @ingroup Integrators */ diff --git a/deal.II/include/deal.II/integrators/maxwell.h b/deal.II/include/deal.II/integrators/maxwell.h index 4c9d61efe8..077690306e 100644 --- a/deal.II/include/deal.II/integrators/maxwell.h +++ b/deal.II/include/deal.II/integrators/maxwell.h @@ -184,11 +184,11 @@ namespace LocalIntegrators // all dimensions const unsigned int d_max = (dim==2) ? 1 : dim; - for (unsigned k=0;k& n = fe.normal_vector(k); - for (unsigned i=0;i& n = fe.normal_vector(k); - for (unsigned i=0;i& n = fe1.normal_vector(k); - for (unsigned i=0;i #include #include +#include #include @@ -736,8 +737,14 @@ class BlockMatrixBase : public Subscriptor /** * Call the compress() function on all * the subblocks of the matrix. + * + * + * See @ref GlossCompress "Compressing + * distributed objects" for more + * information. */ - void compress (); + void compress (::dealii::VectorOperation::values operation + =::dealii::VectorOperation::unknown); /** * Multiply the entire matrix by a @@ -2316,11 +2323,11 @@ BlockMatrixBase::diag_element (const unsigned int i) const template inline void -BlockMatrixBase::compress () +BlockMatrixBase::compress (::dealii::VectorOperation::values operation) { for (unsigned int r=0; r > */ ~BlockVector (); + /** + * Call the compress() function on all + * the subblocks. + * + * This functionality only needs to be + * called if using MPI based vectors and + * exists in other objects for + * compatibility. + * + * See @ref GlossCompress "Compressing + * distributed objects" for more + * information. + */ + void compress (::dealii::VectorOperation::values operation + =::dealii::VectorOperation::unknown); + /** * Copy operator: fill all components of * the vector with the given scalar @@ -523,6 +539,14 @@ BlockVector::operator = (const BlockVector &v) return *this; } +template +inline +void BlockVector::compress (::dealii::VectorOperation::values operation) +{ + for (unsigned int i=0; in_blocks();++i) + this->components[i].compress(operation); +} + template diff --git a/deal.II/include/deal.II/lac/block_vector_base.h b/deal.II/include/deal.II/lac/block_vector_base.h index 88c9e0e183..f5f3aaecbc 100644 --- a/deal.II/include/deal.II/lac/block_vector_base.h +++ b/deal.II/include/deal.II/lac/block_vector_base.h @@ -280,12 +280,8 @@ namespace internal */ template class Iterator : -#ifdef HAVE_STD_ITERATOR_CLASS public std::iterator::value_type> -#else - random_access_iterator::value_type,int> -#endif { private: /** @@ -787,8 +783,19 @@ class BlockVectorBase : public Subscriptor /** * Call the compress() function on all * the subblocks of the matrix. + * + * This functionality only needs to be + * called if using MPI based vectors and + * exists in other objects for + * compatibility. + * + * See @ref GlossCompress "Compressing + * distributed objects" for more + * information. */ - void compress (); + void compress (::dealii::VectorOperation::values operation + =::dealii::VectorOperation::unknown); + /** * Access to a single block. @@ -1633,8 +1640,8 @@ namespace internal template Iterator:: - Iterator (BlockVector &parent, - const unsigned global_index) + Iterator (BlockVector &parent, + const unsigned int global_index) : parent (&parent), global_index (global_index) @@ -1824,10 +1831,10 @@ BlockVectorBase::collect_sizes () template inline void -BlockVectorBase::compress () +BlockVectorBase::compress (::dealii::VectorOperation::values operation) { for (unsigned int i=0; iM other degrees of freedom + * where M is also relatively small (no larger than at most around the * average number of entries per row of a linear system). It is not * meant to describe full rank linear systems. * @@ -82,18 +82,34 @@ namespace internals *

    Description of constraints

    * * Each "line" in objects of this class corresponds to one constrained degree - * of freedom, with the number of the line being $i_1$, and the entries in - * this line being pairs $(i_j,a_{i_j})$. Note that the constraints are linear - * in the $x_i$, and that there might be a constant (non-homogeneous) term in + * of freedom, with the number of the line being i, entered by + * using add_line() or add_lines(). The entries in + * this line are pairs of the form + * (j,aij), which are added by add_entry() or + * add_entries(). The organization is essentially a + * SparsityPattern, but with only a few lines containing nonzero + * elements, and therefore no data wasted on the others. For each + * line, which has been added by the mechanism above, an elimination + * of the constrained degree of freedom of the form + * @f[ + * x_i = \sum_j a_{ij} x_j + b_i + * @f] + * is performed, where bi is optional and set by + * set_inhomogeneity(). Thus, if a constraint is formulated for + * instance as a zero mean value of several degrees of freedom, one of + * the degrees has to be chosen to be eliminated. + * + * Note that the constraints are linear + * in the xi, and that there might be a constant (non-homogeneous) term in * the constraint. This is exactly the form we need for hanging node * constraints, where we need to constrain one degree of freedom in terms of * others. There are other conditions of this form possible, for example for * implementing mean value conditions as is done in the step-11 * tutorial program. The name of the class stems from the fact that these - * constraints can be represented in matrix form as $X x = b$, and this object - * then describes the matrix $X$ (as well as, incidentally, the vector $b$ -- + * constraints can be represented in matrix form as X x = b, and this object + * then describes the matrix X (and the vector b; * originally, the ConstraintMatrix class was only meant to handle homogenous - * constraints where $b=0$, thus the name). The most frequent way to + * constraints where b=0, thus the name). The most frequent way to * create/fill objects of this type is using the * DoFTools::make_hanging_node_constraints() function. The use of these * objects is first explained in step-6. @@ -264,8 +280,8 @@ class ConstraintMatrix : public Subscriptor * * This function essentially exists to * allow adding several constraints of - * the form $x_i=0$ all at once, where - * the set of indices $i$ for which these + * the form xi=0 all at once, where + * the set of indices i for which these * constraints should be added are given * by the argument of this function. On * the other hand, just as if the @@ -286,8 +302,8 @@ class ConstraintMatrix : public Subscriptor * * This function essentially exists to * allow adding several constraints of - * the form $x_i=0$ all at once, where - * the set of indices $i$ for which these + * the form xi=0 all at once, where + * the set of indices i for which these * constraints should be added are given * by the argument of this function. On * the other hand, just as if the @@ -308,8 +324,8 @@ class ConstraintMatrix : public Subscriptor * * This function essentially exists to * allow adding several constraints of - * the form $x_i=0$ all at once, where - * the set of indices $i$ for which these + * the form xi=0 all at once, where + * the set of indices i for which these * constraints should be added are given * by the argument of this function. On * the other hand, just as if the @@ -393,16 +409,16 @@ class ConstraintMatrix : public Subscriptor * This function also resolves chains * of constraints. For example, degree * of freedom 13 may be constrained to - * $u_{13}=u_3/2+u_7/2$ while degree of + * u13=u3/2+u7/2 while degree of * freedom 7 is itself constrained as - * $u_7=u_2/2+u_4/2$. Then, the + * u7=u2/2+u4/2. Then, the * resolution will be that - * $u_{13}=u_3/2+u_2/4+u_4/4$. Note, + * u13=u3/2+u2/4+u4/4. Note, * however, that cycles in this graph * of constraints are not allowed, - * i.e. for example $u_4$ may not be + * i.e. for example u4 may not be * constrained, directly or indirectly, - * to $u_{13}$ again. + * to u13 again. */ void close (); @@ -412,7 +428,7 @@ class ConstraintMatrix : public Subscriptor * the constraints represented by this * object. Both objects may or may not * be closed (by having their function - * @p close called before). If this + * close() called before). If this * object was closed before, then it * will be closed afterwards as * well. Note, however, that if the @@ -443,7 +459,7 @@ class ConstraintMatrix : public Subscriptor * * This function is useful if you are * building block matrices, where all - * blocks are built by the same @p + * blocks are built by the same * DoFHandler object, i.e. the matrix * size is larger than the number of * degrees of freedom. Since several @@ -451,7 +467,7 @@ class ConstraintMatrix : public Subscriptor * to the same degrees of freedom, * you'd generate several constraint * objects, then shift them, and - * finally @p merge them together + * finally merge() them together * again. */ void shift (const unsigned int offset); @@ -489,12 +505,12 @@ class ConstraintMatrix : public Subscriptor * with number @p index is a * constrained one. * - * Note that if @p close was called + * Note that if close() was called * before, then this function is * significantly faster, since then the * constrained degrees of freedom are * sorted and we can do a binary - * search, while before @p close was + * search, while before close() was * called, we have to perform a linear * search through all entries. */ @@ -527,7 +543,7 @@ class ConstraintMatrix : public Subscriptor * to. For example, in 2d a hanging * node is constrained only to its two * neighbors, so the returned value - * would be @p 2. However, for higher + * would be 2. However, for higher * order elements and/or higher * dimensions, or other types of * constraints, this number is no more @@ -1384,7 +1400,7 @@ class ConstraintMatrix : public Subscriptor * any other type having the same * interface. * - * Note that if called with a @p + * Note that if called with a * TrilinosWrappers::MPI::Vector it may * not contain ghost elements. */ @@ -1566,11 +1582,12 @@ class ConstraintMatrix : public Subscriptor * A list of unsigned integers that * contains the position of the * ConstraintLine of a constrained degree - * of freedom, or @p + * of freedom, or * numbers::invalid_unsigned_int if the * degree of freedom is not - * constrained. The @p invalid_unsigned - * int return value returns thus whether + * constrained. The + * numbers::invalid_unsigned_int + * return value returns thus whether * there is a constraint line for a given * degree of freedom index. Note that * this class has no notion of how many @@ -1737,7 +1754,7 @@ class ConstraintMatrix : public Subscriptor * Creates a list of affected rows for * distribution without any additional * information, otherwise similar to the - * other @p make_sorted_row_list + * other make_sorted_row_list() * function. */ void diff --git a/deal.II/include/deal.II/lac/constraint_matrix.templates.h b/deal.II/include/deal.II/lac/constraint_matrix.templates.h index ea3f98ab40..970ee190aa 100644 --- a/deal.II/include/deal.II/lac/constraint_matrix.templates.h +++ b/deal.II/include/deal.II/lac/constraint_matrix.templates.h @@ -1455,7 +1455,7 @@ namespace internals // check whether the // constraints are really empty. const unsigned int length = size(); -#ifdef DEBUG + // make sure that we are in the // range of the vector AssertIndexRange (length, total_row_indices.size()+1); @@ -1463,7 +1463,6 @@ namespace internals Assert (total_row_indices[i].constraint_position == numbers::invalid_unsigned_int, ExcInternalError()); -#endif step = length/2; while (step > 0) @@ -1757,25 +1756,20 @@ namespace internals AssertIndexRange (column_end-1, global_rows.size()); const SparsityPattern & sparsity = sparse_matrix->get_sparsity_pattern(); -#ifndef DEBUG + if (sparsity.n_nonzero_elements() == 0) return; -#endif + const std::size_t * row_start = sparsity.get_rowstart_indices(); const unsigned int * sparsity_struct = sparsity.get_column_numbers(); const unsigned int row = global_rows.global_row(i); const unsigned int loc_row = global_rows.local_row(i); -#ifdef DEBUG - const unsigned int * col_ptr = sparsity.n_nonzero_elements() == 0 ? 0 : + const unsigned int * col_ptr = sparsity.row_length(row) == 0 ? 0 : &sparsity_struct[row_start[row]]; - number * val_ptr = sparsity.n_nonzero_elements() == 0 ? 0 : + number * val_ptr = sparsity.row_length(row) == 0 ? 0 : &sparse_matrix->global_entry (row_start[row]); -#else - const unsigned int * col_ptr = &sparsity_struct[row_start[row]]; - number * val_ptr = &sparse_matrix->global_entry (row_start[row]); -#endif const bool optimize_diagonal = sparsity.optimize_diagonal(); unsigned int counter = optimize_diagonal; diff --git a/deal.II/include/deal.II/lac/full_matrix.h b/deal.II/include/deal.II/lac/full_matrix.h index 6e33ecc93a..eab4bd0d8d 100644 --- a/deal.II/include/deal.II/lac/full_matrix.h +++ b/deal.II/include/deal.II/lac/full_matrix.h @@ -290,7 +290,7 @@ class FullMatrix : public Table<2,number> * FullMatrix M(IdentityMatrix(n)); * @endverbatim */ - explicit FullMatrix (const IdentityMatrix &id); + FullMatrix (const IdentityMatrix &id); /** * @} */ @@ -921,10 +921,12 @@ class FullMatrix : public Table<2,number> const unsigned int src_offset_j = 0); /** - * Adda single element at the + * Add a single element at the * given position. */ - void add(const unsigned int row, const unsigned int column, const number value); + void add (const unsigned int row, + const unsigned int column, + const number value); /** * Add an array of values given by diff --git a/deal.II/include/deal.II/lac/full_matrix.templates.h b/deal.II/include/deal.II/lac/full_matrix.templates.h index 6ec578dd75..77b7b2672e 100644 --- a/deal.II/include/deal.II/lac/full_matrix.templates.h +++ b/deal.II/include/deal.II/lac/full_matrix.templates.h @@ -397,7 +397,7 @@ void FullMatrix::add_row (const unsigned int i, Assert (!this->empty(), ExcEmptyMatrix()); const unsigned int size_m = m(); - for (unsigned l=0; l inline void - Vector::compress (const bool add_ghost_data) + Vector::compress (::dealii::VectorOperation::values operation) { compress_start (); - compress_finish (add_ghost_data); + if (operation == ::dealii::VectorOperation::insert) + compress_finish (false); + else + compress_finish (true); } diff --git a/deal.II/include/deal.II/lac/petsc_matrix_base.h b/deal.II/include/deal.II/lac/petsc_matrix_base.h index 727eee8567..03d6f676ba 100644 --- a/deal.II/include/deal.II/lac/petsc_matrix_base.h +++ b/deal.II/include/deal.II/lac/petsc_matrix_base.h @@ -20,6 +20,7 @@ # include # include # include +# include # include # include @@ -671,8 +672,8 @@ namespace PETScWrappers * for more information. * more information. */ - void compress (); - + void compress (::dealii::VectorOperation::values operation + =::dealii::VectorOperation::unknown); /** * Return the value of the entry * (i,j). This may be an @@ -837,6 +838,72 @@ namespace PETScWrappers */ PetscReal frobenius_norm () const; + + /** + * Return the square of the norm + * of the vector $v$ with respect + * to the norm induced by this + * matrix, + * i.e. $\left(v,Mv\right)$. This + * is useful, e.g. in the finite + * element context, where the + * $L_2$ norm of a function + * equals the matrix norm with + * respect to the mass matrix of + * the vector representing the + * nodal values of the finite + * element function. + * + * Obviously, the matrix needs to + * be quadratic for this operation. + * + * The implementation of this function + * is not as efficient as the one in + * the @p MatrixBase class used in + * deal.II (i.e. the original one, not + * the PETSc wrapper class) since PETSc + * doesn't support this operation and + * needs a temporary vector. + * + * Note that if the current object + * represents a parallel distributed + * matrix (of type + * PETScWrappers::MPI::SparseMatrix), + * then the given vector has to be + * a distributed vector as + * well. Conversely, if the matrix is + * not distributed, then neither + * may the vector be. + */ + PetscScalar matrix_norm_square (const VectorBase &v) const; + + + /** + * Compute the matrix scalar + * product $\left(u,Mv\right)$. + * + * The implementation of this function + * is not as efficient as the one in + * the @p MatrixBase class used in + * deal.II (i.e. the original one, not + * the PETSc wrapper class) since PETSc + * doesn't support this operation and + * needs a temporary vector. + * + * Note that if the current object + * represents a parallel distributed + * matrix (of type + * PETScWrappers::MPI::SparseMatrix), + * then both vectors have to be + * distributed vectors as + * well. Conversely, if the matrix is + * not distributed, then neither of the + * vectors may be. + */ + PetscScalar matrix_scalar_product (const VectorBase &u, + const VectorBase &v) const; + + #if DEAL_II_PETSC_VERSION_GTE(3,1,0) /** * Return the trace of the @@ -1053,7 +1120,6 @@ namespace PETScWrappers #endif is_symmetric (const double tolerance = 1.e-12); -#if DEAL_II_PETSC_VERSION_GTE(2,3,0) /** * Test whether a matrix is * Hermitian, i.e. it is the @@ -1069,9 +1135,8 @@ namespace PETScWrappers PetscBool #endif is_hermitian (const double tolerance = 1.e-12); -#endif - /* + /** * Abstract PETSc object that helps view * in ASCII other PETSc objects. Currently * this function simply writes non-zero diff --git a/deal.II/include/deal.II/lac/petsc_parallel_vector.h b/deal.II/include/deal.II/lac/petsc_parallel_vector.h index d7f40bfbcf..df431183bd 100644 --- a/deal.II/include/deal.II/lac/petsc_parallel_vector.h +++ b/deal.II/include/deal.II/lac/petsc_parallel_vector.h @@ -543,7 +543,7 @@ namespace PETScWrappers for (unsigned int i=0; i solver_data; + }; } DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/include/deal.II/lac/petsc_vector.h b/deal.II/include/deal.II/lac/petsc_vector.h index 5c34f2bd0a..cdee298854 100644 --- a/deal.II/include/deal.II/lac/petsc_vector.h +++ b/deal.II/include/deal.II/lac/petsc_vector.h @@ -399,7 +399,7 @@ namespace PETScWrappers for (unsigned int i=0; i # include +# include # include # include @@ -294,9 +295,9 @@ namespace PETScWrappers * * See @ref GlossCompress "Compressing distributed objects" * for more information. - * more information. */ - void compress (); + void compress (::dealii::VectorOperation::values operation + =::dealii::VectorOperation::unknown); /** * Set all components of the vector to @@ -564,7 +565,7 @@ namespace PETScWrappers * collective piecewise * multiply operation of * this vector - * with \f$v\f$. + * with v. */ VectorBase & mult (const VectorBase &v); @@ -572,7 +573,7 @@ namespace PETScWrappers * Same as above, but a * collective piecewise * multiply operation of - * \f$u\f$ with \f$v\f$. + * u with v. */ VectorBase & mult (const VectorBase &u, const VectorBase &v); @@ -823,33 +824,6 @@ namespace PETScWrappers */ IndexSet ghost_indices; - /** - * PETSc doesn't allow to mix additions - * to matrix entries and overwriting - * them (to make synchronisation of - * parallel computations - * simpler). Since the interface of the - * existing classes don't support the - * notion of not interleaving things, - * we have to emulate this - * ourselves. The way we do it is to, - * for each access operation, store - * whether it is an insertion or an - * addition. If the previous one was of - * different type, then we first have - * to flush the PETSc buffers; - * otherwise, we can simply go on. - * - * The following structure and variable - * declare and store the previous - * state. - */ - struct LastAction - { - enum Values { none, insert, add }; - }; - - /** * Store whether the last action was a * write or add operation. This @@ -858,7 +832,7 @@ namespace PETScWrappers * even though the vector object they * refer to is constant. */ - mutable LastAction::Values last_action; + mutable ::dealii::VectorOperation::values last_action; /** * Make the reference class a friend. @@ -954,10 +928,10 @@ namespace PETScWrappers const VectorReference & VectorReference::operator = (const PetscScalar &value) const { - Assert ((vector.last_action == VectorBase::LastAction::insert) + Assert ((vector.last_action == VectorOperation::insert) || - (vector.last_action == VectorBase::LastAction::none), - ExcWrongMode (VectorBase::LastAction::insert, + (vector.last_action == VectorOperation::unknown), + ExcWrongMode (VectorOperation::insert, vector.last_action)); #ifdef PETSC_USE_64BIT_INDICES @@ -970,7 +944,7 @@ namespace PETScWrappers = VecSetValues (vector, 1, &petsc_i, &value, INSERT_VALUES); AssertThrow (ierr == 0, ExcPETScError(ierr)); - vector.last_action = VectorBase::LastAction::insert; + vector.last_action = VectorOperation::insert; return *this; } @@ -981,13 +955,13 @@ namespace PETScWrappers const VectorReference & VectorReference::operator += (const PetscScalar &value) const { - Assert ((vector.last_action == VectorBase::LastAction::add) + Assert ((vector.last_action == VectorOperation::add) || - (vector.last_action == VectorBase::LastAction::none), - ExcWrongMode (VectorBase::LastAction::add, + (vector.last_action == VectorOperation::unknown), + ExcWrongMode (VectorOperation::add, vector.last_action)); - vector.last_action = VectorBase::LastAction::add; + vector.last_action = VectorOperation::add; // we have to do above actions in any // case to be consistent with the MPI @@ -1019,13 +993,13 @@ namespace PETScWrappers const VectorReference & VectorReference::operator -= (const PetscScalar &value) const { - Assert ((vector.last_action == VectorBase::LastAction::add) + Assert ((vector.last_action == VectorOperation::add) || - (vector.last_action == VectorBase::LastAction::none), - ExcWrongMode (VectorBase::LastAction::add, + (vector.last_action == VectorOperation::unknown), + ExcWrongMode (VectorOperation::add, vector.last_action)); - vector.last_action = VectorBase::LastAction::add; + vector.last_action = VectorOperation::add; // we have to do above actions in any // case to be consistent with the MPI @@ -1058,13 +1032,13 @@ namespace PETScWrappers const VectorReference & VectorReference::operator *= (const PetscScalar &value) const { - Assert ((vector.last_action == VectorBase::LastAction::insert) + Assert ((vector.last_action == VectorOperation::insert) || - (vector.last_action == VectorBase::LastAction::none), - ExcWrongMode (VectorBase::LastAction::insert, + (vector.last_action == VectorOperation::unknown), + ExcWrongMode (VectorOperation::insert, vector.last_action)); - vector.last_action = VectorBase::LastAction::insert; + vector.last_action = VectorOperation::insert; // we have to do above actions in any // case to be consistent with the MPI @@ -1098,13 +1072,13 @@ namespace PETScWrappers const VectorReference & VectorReference::operator /= (const PetscScalar &value) const { - Assert ((vector.last_action == VectorBase::LastAction::insert) + Assert ((vector.last_action == VectorOperation::insert) || - (vector.last_action == VectorBase::LastAction::none), - ExcWrongMode (VectorBase::LastAction::insert, + (vector.last_action == VectorOperation::unknown), + ExcWrongMode (VectorOperation::insert, vector.last_action)); - vector.last_action = VectorBase::LastAction::insert; + vector.last_action = VectorOperation::insert; // we have to do above actions in any // case to be consistent with the MPI diff --git a/deal.II/include/deal.II/lac/precondition_block.templates.h b/deal.II/include/deal.II/lac/precondition_block.templates.h index 3e2771741c..a4c97a8bc1 100644 --- a/deal.II/include/deal.II/lac/precondition_block.templates.h +++ b/deal.II/include/deal.II/lac/precondition_block.templates.h @@ -561,23 +561,6 @@ void PreconditionBlockJacobi const Vector &src, bool adding) const { - // introduce the following typedef - // since in the use of exceptions, - // strict C++ requires us to - // specify them fully as they are - // from a template dependent base - // class. thus, we'd have to write - // PreconditionBlock::ExcNoMatrixGivenToUse, - // which is lengthy, but also poses - // some problems to the - // preprocessor due to the comma in - // the template arg list. we could - // then wrap the whole thing into - // parentheses, but that creates a - // parse error for gcc for the - // exceptions that do not take - // args... - typedef PreconditionBlock BaseClass; Assert(this->A!=0, ExcNotInitialized()); const MATRIX &M=*this->A; @@ -741,24 +724,6 @@ void PreconditionBlockSOR::forward ( const bool transpose_diagonal, const bool) const { - // introduce the following typedef - // since in the use of exceptions, - // strict C++ requires us to - // specify them fully as they are - // from a template dependent base - // class. thus, we'd have to write - // PreconditionBlock::ExcNoMatrixGivenToUse, - // which is lengthy, but also poses - // some problems to the - // preprocessor due to the comma in - // the template arg list. we could - // then wrap the whole thing into - // parentheses, but that creates a - // parse error for gcc for the - // exceptions that do not take - // args... - typedef PreconditionBlock BaseClass; - Assert (this->A!=0, ExcNotInitialized()); const MATRIX &M=*this->A; @@ -849,24 +814,6 @@ void PreconditionBlockSOR::backward ( const bool transpose_diagonal, const bool) const { - // introduce the following typedef - // since in the use of exceptions, - // strict C++ requires us to - // specify them fully as they are - // from a template dependent base - // class. thus, we'd have to write - // PreconditionBlock::ExcNoMatrixGivenToUse, - // which is lengthy, but also poses - // some problems to the - // preprocessor due to the comma in - // the template arg list. we could - // then wrap the whole thing into - // parentheses, but that creates a - // parse error for gcc for the - // exceptions that do not take - // args... - typedef PreconditionBlock BaseClass; - Assert (this->A!=0, ExcNotInitialized()); const MATRIX &M=*this->A; diff --git a/deal.II/include/deal.II/lac/sparsity_tools.h b/deal.II/include/deal.II/lac/sparsity_tools.h index a0d9531ac2..4434860f5d 100644 --- a/deal.II/include/deal.II/lac/sparsity_tools.h +++ b/deal.II/include/deal.II/lac/sparsity_tools.h @@ -254,6 +254,15 @@ namespace SparsityTools int, << "The number of partitions you gave is " << arg1 << ", but must be greater than zero."); + + /** + * Exception + */ + DeclException1 (ExcMETISError, + int, + << " An error with error number " << arg1 + << " occurred while calling a METIS function"); + /** * Exception */ diff --git a/deal.II/include/deal.II/lac/tridiagonal_matrix.h b/deal.II/include/deal.II/lac/tridiagonal_matrix.h index b512c5517c..857ef2027a 100644 --- a/deal.II/include/deal.II/lac/tridiagonal_matrix.h +++ b/deal.II/include/deal.II/lac/tridiagonal_matrix.h @@ -294,7 +294,7 @@ class TridiagonalMatrix * compute_eigenvalues(), you can * access each eigenvalue here. */ - number eigenvalue(const unsigned i) const; + number eigenvalue(const unsigned int i) const; //@} ///@name Miscellanea //@{ diff --git a/deal.II/include/deal.II/lac/trilinos_block_sparse_matrix.h b/deal.II/include/deal.II/lac/trilinos_block_sparse_matrix.h index 20034ccfc4..767c2082a4 100644 --- a/deal.II/include/deal.II/lac/trilinos_block_sparse_matrix.h +++ b/deal.II/include/deal.II/lac/trilinos_block_sparse_matrix.h @@ -246,20 +246,6 @@ namespace TrilinosWrappers void reinit (const ::dealii::BlockSparseMatrix &deal_ii_sparse_matrix, const double drop_tolerance=1e-13); - /** - * This function calls the compress() - * command of all matrices after - * the assembly is - * completed. Note that all MPI - * processes need to call this - * command (whereas the individual - * assembly routines will most probably - * only be called on each processor - * individually) before any - * can complete it. - */ - void compress (); - /** * Returns the state of the * matrix, i.e., whether diff --git a/deal.II/include/deal.II/lac/trilinos_block_vector.h b/deal.II/include/deal.II/lac/trilinos_block_vector.h index 9ad16d347a..a5c22e2d03 100644 --- a/deal.II/include/deal.II/lac/trilinos_block_vector.h +++ b/deal.II/include/deal.II/lac/trilinos_block_vector.h @@ -18,6 +18,7 @@ #ifdef DEAL_II_USE_TRILINOS # include +# include # include # include # include @@ -42,489 +43,6 @@ namespace TrilinosWrappers class BlockSparseMatrix; - namespace MPI - { -/** - * An implementation of block vectors based on the vector class - * implemented in TrilinosWrappers. While the base class provides for - * most of the interface, this class handles the actual allocation of - * vectors and provides functions that are specific to the underlying - * vector type. - * - * The model of distribution of data is such that each of the blocks - * is distributed across all MPI processes named in the MPI - * communicator. I.e. we don't just distribute the whole vector, but - * each component. In the constructors and reinit() functions, one - * therefore not only has to specify the sizes of the individual - * blocks, but also the number of elements of each of these blocks to - * be stored on the local process. - * - * @ingroup Vectors - * @ingroup TrilinosWrappers - * @see @ref GlossBlockLA "Block (linear algebra)" - * @author Martin Kronbichler, Wolfgang Bangerth, 2008, 2009 - */ - class BlockVector : public BlockVectorBase - { - public: - /** - * Typedef the base class for simpler - * access to its own typedefs. - */ - typedef BlockVectorBase BaseClass; - - /** - * Typedef the type of the underlying - * vector. - */ - typedef BaseClass::BlockType BlockType; - - /** - * Import the typedefs from the base - * class. - */ - typedef BaseClass::value_type value_type; - typedef BaseClass::pointer pointer; - typedef BaseClass::const_pointer const_pointer; - typedef BaseClass::reference reference; - typedef BaseClass::const_reference const_reference; - typedef BaseClass::size_type size_type; - typedef BaseClass::iterator iterator; - typedef BaseClass::const_iterator const_iterator; - - /** - * Default constructor. Generate an - * empty vector without any blocks. - */ - BlockVector (); - - /** - * Constructor. Generate a block - * vector with as many blocks as - * there are entries in @p - * partitioning. Each Epetra_Map - * contains the layout of the - * distribution of data among the MPI - * processes. - */ - BlockVector (const std::vector ¶llel_partitioning); - - /** - * Constructor. Generate a block - * vector with as many blocks as - * there are entries in - * @p partitioning. Each IndexSet - * together with the MPI communicator - * contains the layout of the - * distribution of data among the MPI - * processes. - */ - BlockVector (const std::vector ¶llel_partitioning, - const MPI_Comm &communicator = MPI_COMM_WORLD); - - /** - * Copy-Constructor. Set all the - * properties of the parallel vector - * to those of the given argument and - * copy the elements. - */ - BlockVector (const BlockVector &V); - - /** - * Creates a block vector - * consisting of - * num_blocks - * components, but there is no - * content in the individual - * components and the user has to - * fill appropriate data using a - * reinit of the blocks. - */ - BlockVector (const unsigned int num_blocks); - - /** - * Destructor. Clears memory - */ - ~BlockVector (); - - /** - * Copy operator: fill all - * components of the vector that - * are locally stored with the - * given scalar value. - */ - BlockVector & - operator = (const value_type s); - - /** - * Copy operator for arguments of - * the same type. - */ - BlockVector & - operator = (const BlockVector &V); - - /** - * Copy operator for arguments of - * the localized Trilinos vector - * type. - */ - BlockVector & - operator = (const ::dealii::TrilinosWrappers::BlockVector &V); - - /** - * Another copy function. This - * one takes a deal.II block - * vector and copies it into a - * TrilinosWrappers block - * vector. Note that the number - * of blocks has to be the same - * in the vector as in the input - * vector. Use the reinit() - * command for resizing the - * BlockVector or for changing - * the internal structure of the - * block components. - * - * Since Trilinos only works on - * doubles, this function is - * limited to accept only one - * possible number type in the - * deal.II vector. - */ - template - BlockVector & - operator = (const ::dealii::BlockVector &V); - - /** - * Reinitialize the BlockVector to - * contain as many blocks as there - * are Epetra_Maps given in the input - * argument, according to the - * parallel distribution of the - * individual components described - * in the maps. - * - * If fast==false, the vector - * is filled with zeros. - */ - void reinit (const std::vector ¶llel_partitioning, - const bool fast = false); - - /** - * Reinitialize the BlockVector to - * contain as many blocks as there - * are index sets given in the input - * argument, according to the - * parallel distribution of the - * individual components described - * in the maps. - * - * If fast==false, the vector - * is filled with zeros. - */ - void reinit (const std::vector ¶llel_partitioning, - const MPI_Comm &communicator = MPI_COMM_WORLD, - const bool fast = false); - - /** - * Change the dimension to that - * of the vector V. The same - * applies as for the other - * reinit() function. - * - * The elements of V are not - * copied, i.e. this function is - * the same as calling reinit - * (V.size(), fast). - * - * Note that you must call this - * (or the other reinit() - * functions) function, rather - * than calling the reinit() - * functions of an individual - * block, to allow the block - * vector to update its caches of - * vector sizes. If you call - * reinit() on one of the - * blocks, then subsequent - * actions on this object may - * yield unpredictable results - * since they may be routed to - * the wrong block. - */ - void reinit (const BlockVector &V, - const bool fast = false); - - /** - * Change the number of blocks to - * num_blocks. The individual - * blocks will get initialized with - * zero size, so it is assumed that - * the user resizes the - * individual blocks by herself - * in an appropriate way, and - * calls collect_sizes - * afterwards. - */ - void reinit (const unsigned int num_blocks); - - /** - * This reinit function is meant to - * be used for parallel - * calculations where some - * non-local data has to be - * used. The typical situation - * where one needs this function is - * the call of the - * FEValues::get_function_values - * function (or of some - * derivatives) in parallel. Since - * it is usually faster to retrieve - * the data in advance, this - * function can be called before - * the assembly forks out to the - * different processors. What this - * function does is the following: - * It takes the information in the - * columns of the given matrix and - * looks which data couples between - * the different processors. That - * data is then queried from the - * input vector. Note that you - * should not write to the - * resulting vector any more, since - * the some data can be stored - * several times on different - * processors, leading to - * unpredictable results. In - * particular, such a vector cannot - * be used for matrix-vector - * products as for example done - * during the solution of linear - * systems. - */ - void import_nonlocal_data_for_fe (const TrilinosWrappers::BlockSparseMatrix &m, - const BlockVector &v); - - /** - * Compress the underlying - * representation of the Trilinos - * object, i.e. flush the buffers - * of the vector object if it has - * any. This function is - * necessary after writing into a - * vector element-by-element and - * before anything else can be - * done on it. - * - * The (defaulted) argument can - * be used to specify the - * compress mode - * (Add or - * Insert) in case - * the vector has not been - * written to since the last - * time this function was - * called. The argument is - * ignored if the vector has - * been added or written to - * since the last time - * compress() was called. - * - * See @ref GlossCompress "Compressing distributed objects" - * for more information. - * more information. - */ - void compress (const Epetra_CombineMode last_action = Zero); - - /** - * Returns the state of the - * vector, i.e., whether - * compress() needs to be - * called after an operation - * requiring data - * exchange. Does only return - * non-true values when used in - * debug mode, since - * it is quite expensive to - * keep track of all operations - * that lead to the need for - * compress(). - */ - bool is_compressed () const; - - /** - * Swap the contents of this - * vector and the other vector - * v. One could do this - * operation with a temporary - * variable and copying over the - * data elements, but this - * function is significantly more - * efficient since it only swaps - * the pointers to the data of - * the two vectors and therefore - * does not need to allocate - * temporary storage and move - * data around. - * - * Limitation: right now this - * function only works if both - * vectors have the same number - * of blocks. If needed, the - * numbers of blocks should be - * exchanged, too. - * - * This function is analog to the - * the swap() function of all C++ - * standard containers. Also, - * there is a global function - * swap(u,v) that simply calls - * u.swap(v), again in analogy - * to standard functions. - */ - void swap (BlockVector &v); - - /** - * Print to a stream. - */ - void print (std::ostream &out, - const unsigned int precision = 3, - const bool scientific = true, - const bool across = true) const; - - /** - * Exception - */ - DeclException0 (ExcIteratorRangeDoesNotMatchVectorSize); - - /** - * Exception - */ - DeclException0 (ExcNonMatchingBlockVectors); - }; - - - -/*----------------------- Inline functions ----------------------------------*/ - - - inline - BlockVector::BlockVector () - {} - - - - inline - BlockVector::BlockVector (const std::vector ¶llel_partitioning) - { - reinit (parallel_partitioning, false); - } - - - - inline - BlockVector::BlockVector (const std::vector ¶llel_partitioning, - const MPI_Comm &communicator) - { - reinit (parallel_partitioning, communicator, false); - } - - - - inline - BlockVector::BlockVector (const unsigned int num_blocks) - { - reinit (num_blocks); - } - - - - inline - BlockVector::BlockVector (const BlockVector& v) - : - BlockVectorBase () - { - this->components.resize (v.n_blocks()); - this->block_indices = v.block_indices; - - for (unsigned int i=0; in_blocks(); ++i) - this->components[i] = v.components[i]; - } - - - - inline - bool - BlockVector::is_compressed () const - { - bool compressed = true; - for (unsigned int row=0; row - BlockVector & - BlockVector::operator = (const ::dealii::BlockVector &v) - { - if (n_blocks() != v.n_blocks()) - { - std::vector block_sizes (v.n_blocks(), 0); - block_indices.reinit (block_sizes); - if (components.size() != n_blocks()) - components.resize(n_blocks()); - } - - for (unsigned int i=0; in_blocks(); ++i) - this->components[i] = v.block(i); - - collect_sizes(); - - return *this; - } - - - inline - void - BlockVector::swap (BlockVector &v) - { - Assert (n_blocks() == v.n_blocks(), - ExcDimensionMismatch(n_blocks(),v.n_blocks())); - - for (unsigned int row=0; row
  • %Table of contents