diff --git a/include/pressio/ode/impl/ode_explicit_stepper_with_mass_matrix.hpp b/include/pressio/ode/impl/ode_explicit_stepper_with_mass_matrix.hpp index 64f27c651..cef2679a5 100644 --- a/include/pressio/ode/impl/ode_explicit_stepper_with_mass_matrix.hpp +++ b/include/pressio/ode/impl/ode_explicit_stepper_with_mass_matrix.hpp @@ -73,7 +73,7 @@ class ExplicitStepperWithMassMatrixImpl private: StepScheme name_; - ::pressio::utils::InstanceOrReferenceWrapper systemObj_; + ::pressio::nonlinearsolvers::impl::InstanceOrReferenceWrapper systemObj_; RightHandSideType rhsInstance_; // xInstances is a container of instances of states diff --git a/include/pressio/ode/impl/ode_explicit_stepper_without_mass_matrix.hpp b/include/pressio/ode/impl/ode_explicit_stepper_without_mass_matrix.hpp index 754ac8f99..441bd271d 100644 --- a/include/pressio/ode/impl/ode_explicit_stepper_without_mass_matrix.hpp +++ b/include/pressio/ode/impl/ode_explicit_stepper_without_mass_matrix.hpp @@ -70,7 +70,7 @@ class ExplicitStepperNoMassMatrixImpl{ private: StepScheme name_; - ::pressio::utils::InstanceOrReferenceWrapper systemObj_; + ::pressio::nonlinearsolvers::impl::InstanceOrReferenceWrapper systemObj_; std::vector rhsInstances_; StateType auxiliaryState_; diff --git a/include/pressio/ode/impl/ode_implicit_policy_residual_jacobian_with_mass_matrix.hpp b/include/pressio/ode/impl/ode_implicit_policy_residual_jacobian_with_mass_matrix.hpp index cfb46312a..c0ef93c52 100644 --- a/include/pressio/ode/impl/ode_implicit_policy_residual_jacobian_with_mass_matrix.hpp +++ b/include/pressio/ode/impl/ode_implicit_policy_residual_jacobian_with_mass_matrix.hpp @@ -236,7 +236,7 @@ class ResidualJacobianWithMassMatrixStandardPolicy } private: - ::pressio::utils::InstanceOrReferenceWrapper systemObj_; + ::pressio::nonlinearsolvers::impl::InstanceOrReferenceWrapper systemObj_; mutable int32_t stepTracker_ = -1; mutable StateType scratchState_; mutable MassMatrixType massMatrix_; diff --git a/include/pressio/ode/impl/ode_implicit_policy_residual_jacobian_without_mass_matrix.hpp b/include/pressio/ode/impl/ode_implicit_policy_residual_jacobian_without_mass_matrix.hpp index a8c767cd9..5c005e022 100644 --- a/include/pressio/ode/impl/ode_implicit_policy_residual_jacobian_without_mass_matrix.hpp +++ b/include/pressio/ode/impl/ode_implicit_policy_residual_jacobian_without_mass_matrix.hpp @@ -299,7 +299,7 @@ class ResidualJacobianStandardPolicy } private: - ::pressio::utils::InstanceOrReferenceWrapper systemObj_; + ::pressio::nonlinearsolvers::impl::InstanceOrReferenceWrapper systemObj_; mutable int32_t stepTracker_ = -1; }; diff --git a/include/pressio/ode/impl/ode_implicit_stepper_arbitrary.hpp b/include/pressio/ode/impl/ode_implicit_stepper_arbitrary.hpp index 712a67def..1ba04c530 100644 --- a/include/pressio/ode/impl/ode_implicit_stepper_arbitrary.hpp +++ b/include/pressio/ode/impl/ode_implicit_stepper_arbitrary.hpp @@ -78,7 +78,7 @@ class StepperArbitrary IndVarType dt_ = {}; typename StepCount::value_type stepNumber_ = {}; - ::pressio::utils::InstanceOrReferenceWrapper systemObj_; + ::pressio::nonlinearsolvers::impl::InstanceOrReferenceWrapper systemObj_; stencil_states_t stencilStates_; // state object to ensure the strong guarantee for handling excpetions StateType recoveryState_; diff --git a/include/pressio/ode/impl/ode_implicit_stepper_standard.hpp b/include/pressio/ode/impl/ode_implicit_stepper_standard.hpp index 2a396bf9c..7cc77e472 100644 --- a/include/pressio/ode/impl/ode_implicit_stepper_standard.hpp +++ b/include/pressio/ode/impl/ode_implicit_stepper_standard.hpp @@ -84,7 +84,7 @@ class ImplicitStepperStandardImpl // for cn : y_n ImplicitStencilStatesDynamicContainer stencil_states_; - ::pressio::utils::InstanceOrReferenceWrapper rj_policy_; + ::pressio::nonlinearsolvers::impl::InstanceOrReferenceWrapper rj_policy_; // stencilRightHandSide contains: // for bdf1,2: nothing diff --git a/include/pressio/utils/utils_instance_or_reference_wrapper.hpp b/include/pressio/solvers_nonlinear/impl/instance_or_reference_wrapper.hpp similarity index 92% rename from include/pressio/utils/utils_instance_or_reference_wrapper.hpp rename to include/pressio/solvers_nonlinear/impl/instance_or_reference_wrapper.hpp index 499787dc0..579b8e3bc 100644 --- a/include/pressio/utils/utils_instance_or_reference_wrapper.hpp +++ b/include/pressio/solvers_nonlinear/impl/instance_or_reference_wrapper.hpp @@ -2,7 +2,7 @@ //@HEADER // ************************************************************************ // -// utils_instance_or_reference_wrapper.hpp +// instance_or_reference_wrapper.hpp // Pressio // Copyright 2019 // National Technology & Engineering Solutions of Sandia, LLC (NTESS) @@ -46,12 +46,10 @@ //@HEADER */ -#ifndef UTILS_UTILS_INSTANCE_OR_REFERENCE_WRAPPER_HPP_ -#define UTILS_UTILS_INSTANCE_OR_REFERENCE_WRAPPER_HPP_ +#ifndef SOLVERS_NONLINEAR_INSTANCE_OR_REFERENCE_WRAPPER_HPP_ +#define SOLVERS_NONLINEAR_INSTANCE_OR_REFERENCE_WRAPPER_HPP_ -#include - -namespace pressio{ namespace utils{ +namespace pressio{ namespace nonlinearsolvers{ namespace impl{ template class InstanceOrReferenceWrapper; @@ -126,5 +124,5 @@ class InstanceOrReferenceWrapper T const& get() const { return refObj_.get(); } }; -}} // end of namespace pressio::utils -#endif // UTILS_UTILS_INSTANCE_OR_REFERENCE_WRAPPER_HPP_ +}}} // end of namespace pressio::nonlinearsolvers +#endif // SOLVERS_NONLINEAR_INSTANCE_OR_REFERENCE_WRAPPER_HPP_ diff --git a/include/pressio/solvers_nonlinear/impl/registries.hpp b/include/pressio/solvers_nonlinear/impl/registries.hpp index 7e9e53d1c..c5f254ab2 100644 --- a/include/pressio/solvers_nonlinear/impl/registries.hpp +++ b/include/pressio/solvers_nonlinear/impl/registries.hpp @@ -3,6 +3,7 @@ #define SOLVERS_REGISTRIES_HPP_ #include "levmar_damping.hpp" +#include "instance_or_reference_wrapper.hpp" namespace pressio{ namespace nonlinearsolvers{ @@ -33,7 +34,7 @@ class RegistryNewton state_t d2_; r_t d3_; j_t d4_; - utils::InstanceOrReferenceWrapper d5_; + InstanceOrReferenceWrapper d5_; SystemType const * d6_; public: @@ -85,7 +86,7 @@ class RegistryGaussNewtonNormalEqs j_t d4_; gradient_t d5_; hessian_t d6_; - utils::InstanceOrReferenceWrapper d7_; + InstanceOrReferenceWrapper d7_; SystemType const * d8_; public: @@ -146,8 +147,8 @@ class RegistryWeightedGaussNewtonNormalEqs j_t d6_; gradient_t d7_; hessian_t d8_; - utils::InstanceOrReferenceWrapper d9_; - utils::InstanceOrReferenceWrapper d10_; + InstanceOrReferenceWrapper d9_; + InstanceOrReferenceWrapper d10_; SystemType const * d11_; public: @@ -211,7 +212,7 @@ class RegistryGaussNewtonQr j_t d4_; gradient_t d5_; QTr_t d6_; - utils::InstanceOrReferenceWrapper d7_; + InstanceOrReferenceWrapper d7_; SystemType const * d8_; public: @@ -273,7 +274,7 @@ class RegistryLevMarNormalEqs hessian_t d6_; hessian_t d7_; lm_damp_t d8_; - utils::InstanceOrReferenceWrapper d9_; + InstanceOrReferenceWrapper d9_; SystemType const * d10_; public: diff --git a/include/pressio/utils.hpp b/include/pressio/utils.hpp index 27585ba52..475ec8a5f 100644 --- a/include/pressio/utils.hpp +++ b/include/pressio/utils.hpp @@ -52,7 +52,6 @@ #include "./mpl.hpp" #include -#include "./utils/utils_instance_or_reference_wrapper.hpp" #include "./utils/logger/utils_logger.hpp" #endif