Skip to content
Snippets Groups Projects
Commit 356e984b authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[PL] clang-format

parent d729a0ee
No related branches found
No related tags found
No related merge requests found
...@@ -113,8 +113,8 @@ private: ...@@ -113,8 +113,8 @@ private:
GlobalMatOrVec& mat_or_vec_; GlobalMatOrVec& mat_or_vec_;
}; };
explicit ConcurrentMatrixView(GlobalVector&)->ConcurrentMatrixView<1>; explicit ConcurrentMatrixView(GlobalVector&) -> ConcurrentMatrixView<1>;
explicit ConcurrentMatrixView(GlobalMatrix&)->ConcurrentMatrixView<2>; explicit ConcurrentMatrixView(GlobalMatrix&) -> ConcurrentMatrixView<2>;
template <std::size_t Dim> template <std::size_t Dim>
class MatrixElementCache final class MatrixElementCache final
......
...@@ -36,9 +36,9 @@ struct SourceTermConfig; ...@@ -36,9 +36,9 @@ struct SourceTermConfig;
std::unique_ptr<SourceTerm> createSourceTerm( std::unique_ptr<SourceTerm> createSourceTerm(
const SourceTermConfig& config, const SourceTermConfig& config,
const NumLib::LocalToGlobalIndexMap& dof_table_bulk, const MeshLib::Mesh& source_term_mesh, const NumLib::LocalToGlobalIndexMap& dof_table_bulk,
const int variable_id, const unsigned integration_order, const MeshLib::Mesh& source_term_mesh, const int variable_id,
const unsigned shapefunction_order, const unsigned integration_order, const unsigned shapefunction_order,
std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters, std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const& parameters,
std::vector<std::reference_wrapper<ProcessVariable>> const& std::vector<std::reference_wrapper<ProcessVariable>> const&
all_process_variables_for_this_process); all_process_variables_for_this_process);
......
...@@ -24,7 +24,7 @@ namespace MeshLib ...@@ -24,7 +24,7 @@ namespace MeshLib
class Node; class Node;
template <typename T> template <typename T>
class PropertyVector; class PropertyVector;
} } // namespace MeshLib
namespace ParameterLib namespace ParameterLib
{ {
......
...@@ -10,9 +10,10 @@ ...@@ -10,9 +10,10 @@
#pragma once #pragma once
#include "BoundaryCondition.h"
#include <memory> #include <memory>
#include "BoundaryCondition.h"
namespace BaseLib namespace BaseLib
{ {
class ConfigTree; class ConfigTree;
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
#pragma once #pragma once
#include "ProcessLib/Deformation/BMatrixPolicy.h"
#include <cmath> #include <cmath>
#include "ProcessLib/Deformation/BMatrixPolicy.h"
namespace ProcessLib namespace ProcessLib
{ {
namespace LinearBMatrix namespace LinearBMatrix
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
namespace NumLib namespace NumLib
{ {
class LocalToGlobalIndexMap; class LocalToGlobalIndexMap;
} // NumLib } // namespace NumLib
namespace ProcessLib namespace ProcessLib
{ {
......
...@@ -10,19 +10,19 @@ ...@@ -10,19 +10,19 @@
#pragma once #pragma once
#include "NumLib/Fem/ShapeMatrixPolicy.h"
#include <cassert> #include <cassert>
#include <type_traits> #include <type_traits>
#include "NumLib/Fem/ShapeMatrixPolicy.h"
namespace ProcessLib namespace ProcessLib
{ {
namespace detail namespace detail
{ {
/*! This class makes it possible to handle Eigen's block expressions transparently, /*! This class makes it possible to handle Eigen's block expressions
* both for fixed-size and dynamically allocated Eigen matrices. * transparently, both for fixed-size and dynamically allocated Eigen matrices.
* *
* \tparam ShpPol the shape matrix policy used * \tparam ShpPol the shape matrix policy used
* \tparam NNodes the number of nodes for the FEM element * \tparam NNodes the number of nodes for the FEM element
...@@ -36,9 +36,9 @@ template <typename ShpPol, unsigned NNodes, unsigned NodalDOF, int Dim> ...@@ -36,9 +36,9 @@ template <typename ShpPol, unsigned NNodes, unsigned NodalDOF, int Dim>
struct LocalAssemblerTraitsFixed struct LocalAssemblerTraitsFixed
{ {
private: private:
template<int N, int M> template <int N, int M>
using Matrix = typename ShpPol::template MatrixType<N, M>; using Matrix = typename ShpPol::template MatrixType<N, M>;
template<int N> template <int N>
using Vector = typename ShpPol::template VectorType<N>; using Vector = typename ShpPol::template VectorType<N>;
public: public:
...@@ -51,10 +51,10 @@ public: ...@@ -51,10 +51,10 @@ public:
// and use the same shape functions. // and use the same shape functions.
//! Local matrix for the given number of d.o.f.\ per node and number of //! Local matrix for the given number of d.o.f.\ per node and number of
//! integration points //! integration points
using LocalMatrix = Matrix<NNodes*NodalDOF, NNodes*NodalDOF>; using LocalMatrix = Matrix<NNodes * NodalDOF, NNodes * NodalDOF>;
//! Local vector for the given number of d.o.f.\ per node and number of //! Local vector for the given number of d.o.f.\ per node and number of
//! integration points //! integration points
using LocalVector = Vector<NNodes*NodalDOF>; using LocalVector = Vector<NNodes * NodalDOF>;
//! Local vector for one component of one process variable. //! Local vector for one component of one process variable.
//! The size is the number of nodes in the element. //! The size is the number of nodes in the element.
...@@ -62,7 +62,7 @@ public: ...@@ -62,7 +62,7 @@ public:
//! Laplace matrix for the given space dimensionality and number of d.o.f //! Laplace matrix for the given space dimensionality and number of d.o.f
//! per node. //! per node.
using LaplaceMatrix = Matrix<Dim*NodalDOF, Dim*NodalDOF>; using LaplaceMatrix = Matrix<Dim * NodalDOF, Dim * NodalDOF>;
//! Get a block \c Dim x \c Dim whose upper left corner is at \c top and \c //! Get a block \c Dim x \c Dim whose upper left corner is at \c top and \c
//! left. //! left.
...@@ -177,8 +177,7 @@ public: ...@@ -177,8 +177,7 @@ public:
} }
}; };
} // namespace detail } // namespace detail
#ifndef OGS_EIGEN_DYNAMIC_SHAPE_MATRICES #ifndef OGS_EIGEN_DYNAMIC_SHAPE_MATRICES
...@@ -187,8 +186,8 @@ using LocalAssemblerTraits = ...@@ -187,8 +186,8 @@ using LocalAssemblerTraits =
detail::LocalAssemblerTraitsFixed<ShpPol, NNodes, NodalDOF, Dim>; detail::LocalAssemblerTraitsFixed<ShpPol, NNodes, NodalDOF, Dim>;
static_assert(OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_FLAG == 0, static_assert(OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_FLAG == 0,
"Inconsistent use of the macro OGS_EIGEN_DYNAMIC_SHAPE_MATRICES." "Inconsistent use of the macro OGS_EIGEN_DYNAMIC_SHAPE_MATRICES."
" Maybe you forgot to include some header file."); " Maybe you forgot to include some header file.");
#else #else
template <typename ShpPol, unsigned NNodes, unsigned NodalDOF, int Dim> template <typename ShpPol, unsigned NNodes, unsigned NodalDOF, int Dim>
...@@ -196,8 +195,8 @@ using LocalAssemblerTraits = ...@@ -196,8 +195,8 @@ using LocalAssemblerTraits =
detail::LocalAssemblerTraitsFixed<ShapeMatrixPolicyType<void, 0>, 0, 0, 0>; detail::LocalAssemblerTraitsFixed<ShapeMatrixPolicyType<void, 0>, 0, 0, 0>;
static_assert(OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_FLAG == 1, static_assert(OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_FLAG == 1,
"Inconsistent use of the macro OGS_EIGEN_DYNAMIC_SHAPE_MATRICES." "Inconsistent use of the macro OGS_EIGEN_DYNAMIC_SHAPE_MATRICES."
" Maybe you forgot to include some header file."); " Maybe you forgot to include some header file.");
#endif #endif
} // namespace ProcessLib } // namespace ProcessLib
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#pragma once #pragma once
#include <memory> #include <memory>
#include "NumLib/DOF/LocalToGlobalIndexMap.h" #include "NumLib/DOF/LocalToGlobalIndexMap.h"
#include "NumLib/Extrapolation/Extrapolator.h" #include "NumLib/Extrapolation/Extrapolator.h"
......
...@@ -29,9 +29,8 @@ std::vector<double> const& getIntegrationPointDimMatrixData( ...@@ -29,9 +29,8 @@ std::vector<double> const& getIntegrationPointDimMatrixData(
{ {
return getIntegrationPointDimMatrixData<DisplacementDim>( return getIntegrationPointDimMatrixData<DisplacementDim>(
ip_data_vector, ip_data_vector,
[member](IpData const& ip_data) -> auto const& { [member](IpData const& ip_data) -> auto const&
return ip_data.*member; { return ip_data.*member; },
},
cache); cache);
} }
...@@ -72,9 +71,8 @@ std::vector<double> const& getIntegrationPointKelvinVectorData( ...@@ -72,9 +71,8 @@ std::vector<double> const& getIntegrationPointKelvinVectorData(
{ {
return getIntegrationPointKelvinVectorData<DisplacementDim>( return getIntegrationPointKelvinVectorData<DisplacementDim>(
ip_data_vector, ip_data_vector,
[member](IpData const& ip_data) -> auto const& { [member](IpData const& ip_data) -> auto const&
return ip_data.*member; { return ip_data.*member; },
},
cache); cache);
} }
...@@ -138,9 +136,8 @@ std::size_t setIntegrationPointKelvinVectorData( ...@@ -138,9 +136,8 @@ std::size_t setIntegrationPointKelvinVectorData(
MemberType IpData::*const member) MemberType IpData::*const member)
{ {
return setIntegrationPointKelvinVectorData<DisplacementDim>( return setIntegrationPointKelvinVectorData<DisplacementDim>(
values, ip_data_vector, [member](IpData & ip_data) -> auto& { values, ip_data_vector,
return ip_data.*member; [member](IpData& ip_data) -> auto& { return ip_data.*member; });
});
} }
template <int DisplacementDim, typename IntegrationPointDataVector, template <int DisplacementDim, typename IntegrationPointDataVector,
...@@ -182,9 +179,8 @@ std::vector<double> const& getIntegrationPointScalarData( ...@@ -182,9 +179,8 @@ std::vector<double> const& getIntegrationPointScalarData(
{ {
return getIntegrationPointScalarData( return getIntegrationPointScalarData(
ip_data_vector, ip_data_vector,
[member](IpData const& ip_data) -> auto const& { [member](IpData const& ip_data) -> auto const&
return ip_data.*member; { return ip_data.*member; },
},
cache); cache);
} }
...@@ -221,10 +217,9 @@ std::size_t setIntegrationPointScalarData( ...@@ -221,10 +217,9 @@ std::size_t setIntegrationPointScalarData(
IntegrationPointDataVector& ip_data_vector, IntegrationPointDataVector& ip_data_vector,
MemberType IpData::*const member) MemberType IpData::*const member)
{ {
return setIntegrationPointScalarData( return setIntegrationPointScalarData(values, ip_data_vector,
values, ip_data_vector, [member](IpData & ip_data) -> auto& { [member](IpData& ip_data) -> auto&
return ip_data.*member; { return ip_data.*member; });
});
} }
template <typename IntegrationPointDataVector, typename Accessor> template <typename IntegrationPointDataVector, typename Accessor>
......
...@@ -61,7 +61,7 @@ struct TrafoTanh ...@@ -61,7 +61,7 @@ struct TrafoTanh
/// Derivative of the "physical" variable x w.r.t. y. /// Derivative of the "physical" variable x w.r.t. y.
/// the argument is x! /// the argument is x!
static double dxdy(const double x) { return 2.0*x*(1.0-x); } static double dxdy(const double x) { return 2.0 * x * (1.0 - x); }
}; };
struct TrafoScale struct TrafoScale
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment