From 0fbf2c0df3626565daffd796c109d824fda48f2f Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <github@naumov.de> Date: Tue, 7 Nov 2023 18:58:21 +0100 Subject: [PATCH] [PL/SDN] clang-format --- .../CreateSmallDeformationNonlocalProcess.h | 2 +- ProcessLib/SmallDeformationNonlocal/Damage.h | 3 ++- .../SmallDeformationNonlocal/IntegrationPointData.h | 7 ++++--- .../IntegrationPointDataNonlocalInterface.h | 2 +- .../LocalAssemblerInterface.h | 3 +-- .../SmallDeformationNonlocalFEM.h | 13 ++++++------- .../SmallDeformationNonlocalProcess.h | 1 - .../SmallDeformationNonlocalProcessData.h | 5 ++--- 8 files changed, 17 insertions(+), 19 deletions(-) diff --git a/ProcessLib/SmallDeformationNonlocal/CreateSmallDeformationNonlocalProcess.h b/ProcessLib/SmallDeformationNonlocal/CreateSmallDeformationNonlocalProcess.h index 36b51b8f7e5..ebb5b47c9fc 100644 --- a/ProcessLib/SmallDeformationNonlocal/CreateSmallDeformationNonlocalProcess.h +++ b/ProcessLib/SmallDeformationNonlocal/CreateSmallDeformationNonlocalProcess.h @@ -27,7 +27,7 @@ namespace ParameterLib { struct CoordinateSystem; struct ParameterBase; -} +} // namespace ParameterLib namespace ProcessLib { class AbstractJacobianAssembler; diff --git a/ProcessLib/SmallDeformationNonlocal/Damage.h b/ProcessLib/SmallDeformationNonlocal/Damage.h index 544d420f3a2..59c0fb82cd8 100644 --- a/ProcessLib/SmallDeformationNonlocal/Damage.h +++ b/ProcessLib/SmallDeformationNonlocal/Damage.h @@ -60,7 +60,8 @@ double calculateDamageKappaD( double const r_s = prod_stress / tensile_strength - 1.; // Compute normalizing strain. - double const x_s = [](double const h_d, double const r_s) { + double const x_s = [](double const h_d, double const r_s) + { if (r_s < 0) { return 1.; diff --git a/ProcessLib/SmallDeformationNonlocal/IntegrationPointData.h b/ProcessLib/SmallDeformationNonlocal/IntegrationPointData.h index bc2c91f617e..c3e02815731 100644 --- a/ProcessLib/SmallDeformationNonlocal/IntegrationPointData.h +++ b/ProcessLib/SmallDeformationNonlocal/IntegrationPointData.h @@ -17,7 +17,8 @@ namespace ProcessLib { namespace SmallDeformationNonlocal { -template <typename BMatricesType, typename ShapeMatricesType, +template <typename BMatricesType, + typename ShapeMatricesType, int DisplacementDim> struct IntegrationPointData final : public IntegrationPointDataNonlocalInterface { @@ -40,8 +41,8 @@ struct IntegrationPointData final : public IntegrationPointDataNonlocalInterface typename BMatricesType::KelvinVectorType sigma, sigma_prev; typename BMatricesType::KelvinVectorType eps, eps_prev; double free_energy_density = 0; - double damage = 0; ///< isotropic damage - double damage_prev = 0; ///< \copydoc damage + double damage = 0; ///< isotropic damage + double damage_prev = 0; ///< \copydoc damage double kappa_d_prev = 0; ///< \copydoc kappa_d MaterialLib::Solids::Ehlers::SolidEhlers<DisplacementDim>& solid_material; diff --git a/ProcessLib/SmallDeformationNonlocal/IntegrationPointDataNonlocalInterface.h b/ProcessLib/SmallDeformationNonlocal/IntegrationPointDataNonlocalInterface.h index 1fa0dd3fb57..eeb802eec37 100644 --- a/ProcessLib/SmallDeformationNonlocal/IntegrationPointDataNonlocalInterface.h +++ b/ProcessLib/SmallDeformationNonlocal/IntegrationPointDataNonlocalInterface.h @@ -29,7 +29,7 @@ struct IntegrationPointDataNonlocalInterface std::vector<NonlocalIP> non_local_assemblers; - double kappa_d = 0; ///< damage driving variable. + double kappa_d = 0; ///< damage driving variable. double integration_weight; double nonlocal_internal_length; Eigen::Vector3d coordinates; diff --git a/ProcessLib/SmallDeformationNonlocal/LocalAssemblerInterface.h b/ProcessLib/SmallDeformationNonlocal/LocalAssemblerInterface.h index 75bc1a3ba81..dcf543e663b 100644 --- a/ProcessLib/SmallDeformationNonlocal/LocalAssemblerInterface.h +++ b/ProcessLib/SmallDeformationNonlocal/LocalAssemblerInterface.h @@ -13,11 +13,10 @@ #include <memory> #include <vector> +#include "IntegrationPointDataNonlocalInterface.h" #include "NumLib/Extrapolation/ExtrapolatableElement.h" #include "ProcessLib/LocalAssemblerInterface.h" -#include "IntegrationPointDataNonlocalInterface.h" - namespace ProcessLib { namespace SmallDeformationNonlocal diff --git a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalFEM.h b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalFEM.h index 416b4a89a1f..5e000837569 100644 --- a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalFEM.h +++ b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalFEM.h @@ -147,8 +147,8 @@ public: } std::size_t setIPDataInitialConditions(std::string const& name, - double const* values, - int const integration_order) override + double const* values, + int const integration_order) override { if (integration_order != static_cast<int>(_integration_method.getIntegrationOrder())) @@ -634,9 +634,9 @@ public: cache.clear(); cache.reserve(_ip_data.size()); - transform( - cbegin(_ip_data), cend(_ip_data), back_inserter(cache), - [](auto const& ip_data) { return ip_data.free_energy_density; }); + transform(cbegin(_ip_data), cend(_ip_data), back_inserter(cache), + [](auto const& ip_data) + { return ip_data.free_energy_density; }); return cache; } @@ -790,8 +790,7 @@ private: return cache; } - IntegrationPointDataNonlocalInterface* - getIPDataPtr(int const ip) override + IntegrationPointDataNonlocalInterface* getIPDataPtr(int const ip) override { return &_ip_data[ip]; } diff --git a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.h b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.h index 0a0e52a3620..b8164862ad4 100644 --- a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.h +++ b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.h @@ -14,7 +14,6 @@ #include "NumLib/DOF/DOFTableUtil.h" #include "ProcessLib/Process.h" - #include "SmallDeformationNonlocalFEM.h" #include "SmallDeformationNonlocalProcessData.h" diff --git a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcessData.h b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcessData.h index b90037fe523..ffd680dbf2f 100644 --- a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcessData.h +++ b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcessData.h @@ -31,9 +31,8 @@ struct SmallDeformationNonlocalProcessData { MeshLib::PropertyVector<int> const* const material_ids = nullptr; - std::map< - int, - std::unique_ptr<MaterialLib::Solids::MechanicsBase<DisplacementDim>>> + std::map<int, std::unique_ptr< + MaterialLib::Solids::MechanicsBase<DisplacementDim>>> solid_materials; /// Solid's density. A scalar quantity, ParameterLib::Parameter<double>. ParameterLib::Parameter<double> const& solid_density; -- GitLab