]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Small cleanup in SD::BatchOptimizer 13139/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Mon, 27 Dec 2021 09:13:07 +0000 (10:13 +0100)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Mon, 27 Dec 2021 09:13:07 +0000 (10:13 +0100)
include/deal.II/differentiation/sd/symengine_optimizer.h
source/differentiation/sd/symengine_optimizer.cc

index 89e203c647938056fdfb5ff0dfb407c5242cfd35..3b129110333f02ccbaea8195a6269ffb2abbc6ce 100644 (file)
@@ -1477,16 +1477,15 @@ namespace Differentiation
                        OptimizationFlags::optimize_all);
 
       /**
-       * Copy constructor
+       * Copy constructor.
        *
-       * The @p copy_initialized flag, which is set to <code>true</code> by default,
-       * determines whether or not all of the optimized data is copied over from
-       * the @p other optimizer instance. Only with the flag set to <code>false</code>
-       * is it possible to re-optimize the data stored in this class with a
-       * different optimization scheme.
-       */
-      BatchOptimizer(const BatchOptimizer &other/*,
-                     const bool            copy_initialized = true*/);
+       * @note The optimized data and results from previous substitutions
+       * executed by the @p other optimizer instance are not copied over.
+       * It is therefore necessary to re-optimize the data stored in
+       * this class, and it is possible to do so with a different optimization
+       * scheme.
+       */
+      BatchOptimizer(const BatchOptimizer &other);
 
       /**
        * Move constructor.
index db0c0840bbc91e6dcc6a0166edc7ba5f40431784..db797da9af2fb7767c6389d7e2ae20471a8569fb 100644 (file)
@@ -63,6 +63,7 @@ namespace Differentiation
       , dependent_variables_output(0)
       , map_dep_expr_vec_entry(other.map_dep_expr_vec_entry)
       , ready_for_value_extraction(false)
+      , has_been_serialized(false)
     {}
 
 
@@ -215,7 +216,7 @@ namespace Differentiation
 
     template <typename ReturnType>
     SD::types::symbol_vector
-    BatchOptimizer<ReturnType>::get_independent_symbols(void) const
+    BatchOptimizer<ReturnType>::get_independent_symbols() const
     {
       return Utilities::extract_symbols(independent_variables_symbols);
     }
@@ -224,7 +225,7 @@ namespace Differentiation
 
     template <typename ReturnType>
     std::size_t
-    BatchOptimizer<ReturnType>::n_independent_variables(void) const
+    BatchOptimizer<ReturnType>::n_independent_variables() const
     {
       return independent_variables_symbols.size();
     }
@@ -271,7 +272,7 @@ namespace Differentiation
 
     template <typename ReturnType>
     const SD::types::symbol_vector &
-    BatchOptimizer<ReturnType>::get_dependent_functions(void) const
+    BatchOptimizer<ReturnType>::get_dependent_functions() const
     {
       return dependent_variables_functions;
     }
@@ -280,7 +281,7 @@ namespace Differentiation
 
     template <typename ReturnType>
     std::size_t
-    BatchOptimizer<ReturnType>::n_dependent_variables(void) const
+    BatchOptimizer<ReturnType>::n_dependent_variables() const
     {
       if (has_been_serialized == false)
         {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.