Commit 77cc8641 authored by GILLES Sebastien's avatar GILLES Sebastien

#1425 Reapply the improvement Jerome wrote to avoid cache misses.

parent e0db4ce4
Pipeline #88754 failed with stages
in 15 minutes and 41 seconds
...@@ -234,8 +234,6 @@ namespace MoReFEM ...@@ -234,8 +234,6 @@ namespace MoReFEM
} }
} }
} }
// std::cout << "matrix_result" << std::endl << matrix_result << std::endl;
} }
const auto int_Nsurface_comp = static_cast<int>(Nsurface_comp); const auto int_Nsurface_comp = static_cast<int>(Nsurface_comp);
...@@ -274,7 +272,6 @@ namespace MoReFEM ...@@ -274,7 +272,6 @@ namespace MoReFEM
++quad_pt_index; ++quad_pt_index;
} // loop over quadrature points } // loop over quadrature points
} }
...@@ -314,7 +311,7 @@ namespace MoReFEM ...@@ -314,7 +311,7 @@ namespace MoReFEM
} }
} }
} }
// std::cout << "covariant basis" << std::endl << covariant_basis << std::endl;
auto& covariant_metric_tensor = GetLocalMatrix<EnumUnderlyingType(LocalMatrixIndex::covariant_metric_tensor)>(); auto& covariant_metric_tensor = GetLocalMatrix<EnumUnderlyingType(LocalMatrixIndex::covariant_metric_tensor)>();
...@@ -329,8 +326,8 @@ namespace MoReFEM ...@@ -329,8 +326,8 @@ namespace MoReFEM
determinant); determinant);
// #1259: Actually never used!!! Only determinant seems relevant. // #1259: Actually never used!!! Only determinant seems relevant.
auto& contravariant_basis = GetLocalMatrix<EnumUnderlyingType(LocalMatrixIndex::contravariant_basis)>(); // auto& contravariant_basis = GetLocalMatrix<EnumUnderlyingType(LocalMatrixIndex::contravariant_basis)>();
Seldon::Mlt(1., covariant_basis, contravariant_metric_tensor, contravariant_basis); // Seldon::Mlt(1., covariant_basis, contravariant_metric_tensor, contravariant_basis);
} }
...@@ -343,31 +340,35 @@ namespace MoReFEM ...@@ -343,31 +340,35 @@ namespace MoReFEM
auto& local_displacement = GetFormerLocalDisplacement(); auto& local_displacement = GetFormerLocalDisplacement();
// Note #1303: modification here introduced by Antoine: replace dphi_geo by dphi. // Note #1303: First modification introduced by Antoine: replace dphi_geo by dphi.
// const auto& dphi_geo = quad_pt_unknown_list_data.GetGradientRefGeometricPhi(); // This test make the case with asymmetric (function P2 and test P1) fails; I don't remember if for this
// one Dominique validated it with his script.
//const auto& dphi = quad_pt_unknown_list_data.GetGradientRefGeometricPhi();
const auto& dphi = quad_pt_unknown_list_data.GetGradientRefFEltPhi(); const auto& dphi = quad_pt_unknown_list_data.GetGradientRefFEltPhi();
constexpr auto Nsurface_comp = 2ul; constexpr auto Nsurface_comp = 2ul;
constexpr auto euclidean_dimension = 3ul; constexpr auto euclidean_dimension = 3ul;
const unsigned int Nshape_function = static_cast<unsigned int>(dphi.GetM()); const unsigned int Nshape_function = static_cast<unsigned int>(dphi.GetM());
for (unsigned int component_shape_function = 0u; component_shape_function < Nsurface_comp; for (auto shape_fct_index = 0ul; shape_fct_index < Nshape_function; ++shape_fct_index)
++component_shape_function)
{ {
const int int_component_shape_function = static_cast<int>(component_shape_function); const int int_shape_fct_index = static_cast<int>(shape_fct_index);
for (auto shape_fct_index = 0ul; shape_fct_index < Nshape_function; ++shape_fct_index) for (unsigned int component_shape_function = 0u; component_shape_function < Nsurface_comp;
++component_shape_function)
{ {
const int int_shape_fct_index = static_cast<int>(shape_fct_index); const int int_component_shape_function = static_cast<int>(component_shape_function);
for (auto coord_index = 0ul; coord_index < euclidean_dimension; ++coord_index) for (auto coord_index = 0ul; coord_index < euclidean_dimension; ++coord_index)
{ {
const int int_coord_index = static_cast<int>(coord_index); const int int_coord_index = static_cast<int>(coord_index);
// Note #1303: Second modification introduced by Antoine. Previous version is commented below.
const auto local_displacement_index = Nshape_function * coord_index + shape_fct_index;
// const auto local_displacement_index = // const auto local_displacement_index =
// euclidean_dimension * shape_fct_index + coord_index; // euclidean_dimension * shape_fct_index + coord_index;
const auto local_displacement_index = Nshape_function * coord_index + shape_fct_index;
assert(local_displacement_index < local_displacement.size()); assert(local_displacement_index < local_displacement.size());
displacement_gradient(int_coord_index, int_component_shape_function) displacement_gradient(int_coord_index, int_component_shape_function)
...@@ -405,7 +406,7 @@ namespace MoReFEM ...@@ -405,7 +406,7 @@ namespace MoReFEM
disp_grad_0 * disp_grad_1; disp_grad_0 * disp_grad_1;
} }
//PRETENSION // PRETENSION
if (NumericNS::IsZero(pretension)) if (NumericNS::IsZero(pretension))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment