Commit 67b82e93 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#1292 Fix many warnings, most of them stemming from the fact Seldon used int...

#1292 Fix many warnings, most of them stemming from the fact Seldon used int for its indexes whereas Xtensor use the more sensible std::size_t.
parent b159e313
......@@ -75,11 +75,9 @@ namespace MoReFEM
// If LocalCoords is less than geometric element dimension, columns above its dimension are filled with zeros.
for (unsigned int component = 0u; component < Nshape_function; ++component)
{
const int int_component = static_cast<int>(component);
for (unsigned int shape_fct_index = 0u; shape_fct_index < Nshape_function; ++shape_fct_index)
{
jacobian(int_component, static_cast<int>(shape_fct_index)) +=
jacobian(component, static_cast<int>(shape_fct_index)) +=
coords_in_geom_elt[component] * first_derivate_shape_function[shape_fct_index];
}
}
......
......@@ -146,7 +146,7 @@ namespace // anonymous
std::ostringstream oconv;
for (auto i = 0; i <= 5; ++i)
for (auto i = 0ul; i <= 5; ++i)
{
oconv.str("");
oconv << "solid_displacement." << std::setw(5) << std::setfill('0') << i << ".scl";
......
......@@ -112,7 +112,7 @@ namespace // anonymous
std::ostringstream oconv;
for (auto i = 0; i <= 20; ++i)
for (auto i = 0ul; i <= 20; ++i)
{
oconv.str("");
oconv << "temperature." << std::setw(5) << std::setfill('0') << i << ".scl";
......
......@@ -98,7 +98,7 @@ namespace // anonymous
std::ostringstream oconv;
for (auto i = 0; i <= 20; ++i)
for (auto i = 0ul; i <= 20; ++i)
{
oconv.str("");
oconv << "displacement." << std::setw(5) << std::setfill('0') << i << ".scl";
......
......@@ -80,7 +80,7 @@ namespace MoReFEM
LocalMatrix block({ Nnode_in_row, Nnode_in_col });
block.fill(0.);
for (auto i = 0; i < Nnode_in_row; ++i)
for (auto i = 0ul; i < Nnode_in_row; ++i)
block(i, i) = 1.;
......
......@@ -85,12 +85,12 @@ namespace MoReFEM
// Prepare the content of the block that will be repeated for each unknown component.
LocalMatrix block({ Nnode_in_row, Nnode_in_col });
block.fill(0.);
for (auto i = 0; i < Nnode_in_col; ++i)
// \todo #1492 Xtensor probably has something better for that...
for (auto i = 0ul; i < Nnode_in_col; ++i)
block(i, i) = 1.;
const auto Nvertex = static_cast<int>(ref_geom_elt.Nvertex());
const auto Nvertex = ref_geom_elt.Nvertex();
assert(Nvertex > 0);
const double value_to_set = 1. / static_cast<double>(Nvertex);
......@@ -107,7 +107,7 @@ namespace MoReFEM
}
#endif // NDEBUG
for (auto j = 0; j < Nvertex; ++j)
for (auto j = 0ul; j < Nvertex; ++j)
block(i, j) = value_to_set;
}
......
......@@ -86,7 +86,7 @@ namespace MoReFEM
LocalMatrix block({Nnode_in_row, Nnode_in_col});
block.fill(0.);
for (auto i = 0; i < Nnode_in_col; ++i)
for (auto i = 0ul; i < Nnode_in_col; ++i)
block(i, i) = 1.;
for (auto i = Nnode_in_col; i < Nnode_in_row; ++i)
......
......@@ -78,7 +78,7 @@ namespace MoReFEM
for (unsigned int node_index = 0; node_index < Nnode; ++node_index)
{
unsigned int dof_index = node_index;
auto dof_index = node_index;
for (unsigned int component = 0; component < Ncomponent; ++component, dof_index += Nnode)
{
......
......@@ -68,7 +68,6 @@ namespace MoReFEM
const auto& ref_felt = elementary_data.GetRefFElt(GetNthUnknown(0));
const auto Ncomponent = static_cast<std::size_t>(ref_felt.Ncomponent());
const auto int_Ncomponent = static_cast<int>(Ncomponent);
const auto& test_ref_felt = elementary_data.GetTestRefFElt(GetNthTestUnknown(0));
......@@ -78,14 +77,11 @@ namespace MoReFEM
matrix_result.fill(0.);
const auto Nnode_for_unknown = static_cast<std::size_t>(ref_felt.Nnode());
const auto int_Nnode_for_unknown = static_cast<int>(Nnode_for_unknown);
const auto Nnode_for_test_unknown = static_cast<std::size_t>(test_ref_felt.Nnode());
const auto int_Nnode_for_test_unknown = static_cast<int>(Nnode_for_test_unknown);
decltype(auto) geom_elt = elementary_data.GetCurrentGeomElt();
for (const auto& infos_at_quad_pt : infos_at_quad_pt_list)
{
decltype(auto) quad_pt_unknown_list_data = infos_at_quad_pt.GetUnknownData();
......@@ -121,9 +117,9 @@ namespace MoReFEM
* phi_test(static_cast<int>(node_test_index));
}
for (int m = 0; m < int_Nnode_for_test_unknown; ++m)
for (auto m = 0ul; m < Nnode_for_test_unknown; ++m)
{
for (int n = 0; n < int_Nnode_for_unknown; ++n)
for (auto n = 0ul; n < Nnode_for_unknown; ++n)
{
matrix_result(m, n) +=
factor
......@@ -151,11 +147,11 @@ namespace MoReFEM
* grad_phi_test(static_cast<int>(node_index), static_cast<int>(component));
}
for (int m = 0; m < int_Nnode_for_test_unknown; ++m)
for (auto m = 0ul; m < Nnode_for_test_unknown; ++m)
{
const double m_value = factor * div_modified_velocity_at_quad_pt * phi_test(m);
for (int n = 0; n < int_Nnode_for_unknown; ++n)
for (auto n = 0ul; n < Nnode_for_unknown; ++n)
matrix_result(m, n) += m_value * phi(n);
}
}
......@@ -165,14 +161,14 @@ namespace MoReFEM
// ===========================================
// Duplicate the block for each component.
// ===========================================
for (int m = 0; m < int_Nnode_for_test_unknown; ++m)
for (auto m = 0ul; m < Nnode_for_test_unknown; ++m)
{
for (int n = 0; n < int_Nnode_for_unknown; ++n)
for (auto n = 0ul; n < Nnode_for_unknown; ++n)
{
for (int component_block = 1; component_block < int_Ncomponent; ++component_block)
for (auto component_block = 1ul; component_block <Ncomponent; ++component_block)
{
const auto shift_row = int_Nnode_for_test_unknown * component_block;
const auto shift_col = int_Nnode_for_unknown * component_block;
const auto shift_row = Nnode_for_test_unknown * component_block;
const auto shift_col = Nnode_for_unknown * component_block;
matrix_result(m + shift_row, n + shift_col) = matrix_result(m, n);
}
}
......
......@@ -50,10 +50,10 @@ namespace MoReFEM
const auto& elementary_data = GetElementaryData();
const auto& unknown1_ref_felt = elementary_data.GetRefFElt(GetNthUnknown(0));
const int Nnode_for_unknown1 = static_cast<int>(unknown1_ref_felt.Nnode());
const auto Nnode_for_unknown1 = unknown1_ref_felt.Nnode();
const auto& unknown2_ref_felt = elementary_data.GetRefFElt(GetNthUnknown(1));
const int Nnode_for_unknown2 = static_cast<int>(unknown2_ref_felt.Nnode());
const auto Nnode_for_unknown2 = unknown2_ref_felt.Nnode();
const auto& test_unknown1_ref_felt = elementary_data.GetTestRefFElt(GetNthTestUnknown(0));
const int Nnode_for_test_unknown1 = static_cast<int>(test_unknown1_ref_felt.Nnode());
......@@ -114,14 +114,14 @@ namespace MoReFEM
const auto& infos_at_quad_pt_list = elementary_data.GetInformationsAtQuadraturePointList();
const int Nnode_for_unknown1 = static_cast<int>(unknown1_ref_felt.Nnode());
const int Nnode_for_unknown2 = static_cast<int>(unknown2_ref_felt.Nnode());
const auto Nnode_for_unknown1 = unknown1_ref_felt.Nnode();
const auto Nnode_for_unknown2 = unknown2_ref_felt.Nnode();
assert(unknown1_ref_felt.Ncomponent() == 1u && "Bidomain operator limited to scalar unknowns.");
assert(unknown2_ref_felt.Ncomponent() == 1u && "Bidomain operator limited to scalar unknowns.");
const int Nnode_for_test_unknown1 = static_cast<int>(test_unknown1_ref_felt.Nnode());
const int Nnode_for_test_unknown2 = static_cast<int>(test_unknown2_ref_felt.Nnode());
const auto Nnode_for_test_unknown1 = test_unknown1_ref_felt.Nnode();
const auto Nnode_for_test_unknown2 = test_unknown2_ref_felt.Nnode();
assert(test_unknown1_ref_felt.Ncomponent() == 1u && "Bidomain operator limited to scalar unknowns.");
assert(test_unknown2_ref_felt.Ncomponent() == 1u && "Bidomain operator limited to scalar unknowns.");
......@@ -224,9 +224,9 @@ namespace MoReFEM
}
// Then report it into the elementary matrix.
for (int node_test_unknown1_index = 0; node_test_unknown1_index < Nnode_for_test_unknown1; ++node_test_unknown1_index)
for (auto node_test_unknown1_index = 0ul; node_test_unknown1_index < Nnode_for_test_unknown1; ++node_test_unknown1_index)
{
for (int node_unknown1_index = 0; node_unknown1_index < Nnode_for_unknown1; ++node_unknown1_index)
for (auto node_unknown1_index = 0ul; node_unknown1_index < Nnode_for_unknown1; ++node_unknown1_index)
{
const double value1 = block_matrix1(node_test_unknown1_index, node_unknown1_index);
......@@ -234,9 +234,9 @@ namespace MoReFEM
}
}
for (int node_test_unknown2_index = 0; node_test_unknown2_index < Nnode_for_test_unknown2; ++node_test_unknown2_index)
for (auto node_test_unknown2_index = 0ul; node_test_unknown2_index < Nnode_for_test_unknown2; ++node_test_unknown2_index)
{
for (int node_unknown2_index = 0; node_unknown2_index < Nnode_for_unknown2; ++node_unknown2_index)
for (auto node_unknown2_index = 0ul; node_unknown2_index < Nnode_for_unknown2; ++node_unknown2_index)
{
const double value2 = block_matrix2(node_test_unknown2_index, node_unknown2_index);
......@@ -244,9 +244,9 @@ namespace MoReFEM
}
}
for (int node_test_unknown2_index = 0; node_test_unknown2_index < Nnode_for_test_unknown2; ++node_test_unknown2_index)
for (auto node_test_unknown2_index = 0ul; node_test_unknown2_index < Nnode_for_test_unknown2; ++node_test_unknown2_index)
{
for (int node_unknown1_index = 0; node_unknown1_index < Nnode_for_unknown1; ++node_unknown1_index)
for (auto node_unknown1_index = 0ul; node_unknown1_index < Nnode_for_unknown1; ++node_unknown1_index)
{
const double value4 = block_matrix4(node_test_unknown2_index, node_unknown1_index);
......@@ -254,9 +254,9 @@ namespace MoReFEM
}
}
for (int node_test_unknown1_index = 0; node_test_unknown1_index < Nnode_for_test_unknown1; ++node_test_unknown1_index)
for (auto node_test_unknown1_index = 0ul; node_test_unknown1_index < Nnode_for_test_unknown1; ++node_test_unknown1_index)
{
for (int node_unknown2_index = 0; node_unknown2_index < Nnode_for_unknown2; ++node_unknown2_index)
for (auto node_unknown2_index = 0ul; node_unknown2_index < Nnode_for_unknown2; ++node_unknown2_index)
{
const double value3 = block_matrix3(node_test_unknown1_index, node_unknown2_index);
......
......@@ -55,12 +55,12 @@ namespace MoReFEM
configuration);
const auto& unknown_ref_felt = elementary_data.GetRefFElt(GetNthUnknown(0));
const int Nnode_for_unknown = static_cast<int>(unknown_ref_felt.Nnode());
const auto Nnode_for_unknown = unknown_ref_felt.Nnode();
const auto& test_unknown_ref_felt = elementary_data.GetTestRefFElt(GetNthTestUnknown(0));
const int Nnode_for_test_unknown = static_cast<int>(test_unknown_ref_felt.Nnode());
const int felt_space_dimension = static_cast<int>(unknown_ref_felt.GetFEltSpaceDimension());
const auto Nnode_for_test_unknown = test_unknown_ref_felt.Nnode();
const auto felt_space_dimension = unknown_ref_felt.GetFEltSpaceDimension();
InitLocalMatrixStorage(
{
......@@ -98,10 +98,10 @@ namespace MoReFEM
const auto& infos_at_quad_pt_list = elementary_data.GetInformationsAtQuadraturePointList();
const auto& unknown_ref_felt = elementary_data.GetRefFElt(GetNthUnknown(0));
const int Nnode_for_unknown = static_cast<int>(unknown_ref_felt.Nnode());
const auto Nnode_for_unknown = unknown_ref_felt.Nnode();
const auto& test_unknown_ref_felt = elementary_data.GetTestRefFElt(GetNthTestUnknown(0));
const int Nnode_for_test_unknown = static_cast<int>(test_unknown_ref_felt.Nnode());
const auto Nnode_for_test_unknown = test_unknown_ref_felt.Nnode();
const auto Ncomponent = unknown_ref_felt.Ncomponent();
......@@ -129,11 +129,11 @@ namespace MoReFEM
for (unsigned int row_component = 0u; row_component < Ncomponent; ++row_component)
{
const auto row_first_index = static_cast<int>(test_unknown_ref_felt.GetIndexFirstDofInElementaryData(row_component));
const auto row_first_index = test_unknown_ref_felt.GetIndexFirstDofInElementaryData(row_component);
for (unsigned int col_component = 0u; col_component < Ncomponent; ++col_component)
{
const auto col_first_index = static_cast<int>(unknown_ref_felt.GetIndexFirstDofInElementaryData(col_component));
const auto col_first_index = unknown_ref_felt.GetIndexFirstDofInElementaryData(col_component);
Advanced::LocalVariationalOperatorNS::ExtractGradientBasedBlock(gradient_based_elasticity_tensor,
row_component,
......@@ -146,9 +146,9 @@ namespace MoReFEM
xt::noalias(block_contribution) =
factor * xt::linalg::dot(dphi_test_mult_gradient_based_block, transposed_dphi);
for (int row_node = 0; row_node < Nnode_for_test_unknown; ++row_node)
for (auto row_node = 0ul; row_node < Nnode_for_test_unknown; ++row_node)
{
for (int col_node = 0u; col_node < Nnode_for_unknown; ++col_node)
for (auto col_node = 0ul; col_node < Nnode_for_unknown; ++col_node)
matrix_result(row_first_index + row_node, col_first_index + col_node)
+= block_contribution(row_node, col_node);
}
......
......@@ -59,7 +59,7 @@ namespace MoReFEM
}
#endif // NDEBUG
const int felt_space_dimension = static_cast<int>(ref_felt.GetFEltSpaceDimension());
const auto felt_space_dimension = ref_felt.GetFEltSpaceDimension();
InitLocalMatrixStorage({
{
......
......@@ -48,10 +48,10 @@ namespace MoReFEM
{
const auto& elementary_data = GetElementaryData();
const auto& ref_felt = elementary_data.GetRefFElt(GetNthUnknown(0));
const int Nnode_for_unknown = static_cast<int>(ref_felt.Nnode());
const auto Nnode_for_unknown = ref_felt.Nnode();
const auto& test_unknown_ref_felt = elementary_data.GetTestRefFElt(GetNthTestUnknown(0));
const int Nnode_for_test_unknown = static_cast<int>(test_unknown_ref_felt.Nnode());
const auto Nnode_for_test_unknown = test_unknown_ref_felt.Nnode();
const unsigned int ref_felt_space_dimension = ref_felt.GetFEltSpaceDimension();
......@@ -105,7 +105,7 @@ namespace MoReFEM
const auto& ref_felt = elementary_data.GetRefFElt(GetNthUnknown(0));
const auto& test_ref_felt = elementary_data.GetTestRefFElt(GetNthTestUnknown(0));
const int mesh_dimension = static_cast<int>(ref_felt.GetMeshDimension());
const auto mesh_dimension = ref_felt.GetMeshDimension();
auto& block_matrix = GetLocalMatrix<EnumUnderlyingType(LocalMatrixIndex::block_matrix)>();
auto& transposed_dphi = GetLocalMatrix<EnumUnderlyingType(LocalMatrixIndex::transposed_dphi)>();
......@@ -122,9 +122,8 @@ namespace MoReFEM
const auto& infos_at_quad_pt_list = elementary_data.GetInformationsAtQuadraturePointList();
const int Nnode_for_unknown = static_cast<int>(ref_felt.Nnode());
const int Nnode_for_test_unknown = static_cast<int>(test_ref_felt.Nnode());
const auto Nnode_for_unknown = ref_felt.Nnode();
const auto Nnode_for_test_unknown = test_ref_felt.Nnode();
assert(ref_felt.Ncomponent() == 1u && "GradPhiTauOrthoTauGradPhi operator limited to scalar unknowns.");
......@@ -136,8 +135,7 @@ namespace MoReFEM
const auto& geom_elt = elementary_data.GetCurrentGeomElt();
const int felt_space_dimension = static_cast<int>(ref_felt.GetFEltSpaceDimension());
const auto felt_space_dimension = ref_felt.GetFEltSpaceDimension();
for (const auto& infos_at_quad_pt : infos_at_quad_pt_list)
{
......@@ -177,7 +175,7 @@ namespace MoReFEM
const auto& tau_interpolate = fibers.GetValue(quad_pt, geom_elt);
double norm = 0.;
for (int component = 0 ; component < mesh_dimension ; ++component)
for (auto component = 0ul; component < mesh_dimension; ++component)
norm += tau_interpolate(component) * tau_interpolate(component);
tau_sigma.fill(0.);
......@@ -269,29 +267,21 @@ namespace MoReFEM
const auto mesh_dimension = quad_pt_unknown_list_data.GetMeshDimension();
const unsigned int Ncomponent = geom_elt.GetDimension();
const int int_mesh_dimension = static_cast<int>(mesh_dimension);
covariant_basis.fill(0.);
const unsigned int Nshape_function = static_cast<unsigned int>(dphi_geo.shape(0));
for (unsigned int shape_fct_index = 0u; shape_fct_index < Nshape_function; ++shape_fct_index)
{
const int int_shape_fct_index = static_cast<int>(shape_fct_index);
const auto& coords_in_geom_elt = geom_elt.GetCoord(shape_fct_index);
for (unsigned int component_shape_function = 0u; component_shape_function < Ncomponent; ++component_shape_function)
for (unsigned int component_shape_function = 0u; component_shape_function < Ncomponent;
++component_shape_function)
{
const int int_component_shape_function = static_cast<int>(component_shape_function);
for (unsigned int coord_index = 0u; coord_index < mesh_dimension; ++coord_index)
{
const int int_coord_index = static_cast<int>(coord_index);
covariant_basis(int_coord_index, int_component_shape_function) += coords_in_geom_elt[coord_index] * dphi_geo(int_shape_fct_index, int_component_shape_function);
covariant_basis(coord_index, component_shape_function) +=
coords_in_geom_elt[coord_index] * dphi_geo(shape_fct_index, component_shape_function);
}
}
}
......@@ -302,22 +292,22 @@ namespace MoReFEM
switch (mesh_dimension)
{
case 2:
covariant_basis(0, int_mesh_dimension - 1) = covariant_basis(1,0);
covariant_basis(1, int_mesh_dimension - 1) = - covariant_basis(0,0);
norm = std::sqrt(covariant_basis(0, int_mesh_dimension - 1) * covariant_basis(0, int_mesh_dimension - 1) + covariant_basis(1, int_mesh_dimension - 1) * covariant_basis(1, int_mesh_dimension - 1));
covariant_basis(0, int_mesh_dimension - 1) /= norm;
covariant_basis(1, int_mesh_dimension - 1) /= norm;
covariant_basis(0,mesh_dimension - 1) = covariant_basis(1,0);
covariant_basis(1,mesh_dimension - 1) = - covariant_basis(0,0);
norm = std::sqrt(covariant_basis(0,mesh_dimension - 1) * covariant_basis(0,mesh_dimension - 1) + covariant_basis(1,mesh_dimension - 1) * covariant_basis(1,mesh_dimension - 1));
covariant_basis(0,mesh_dimension - 1) /= norm;
covariant_basis(1,mesh_dimension - 1) /= norm;
break;
case 3:
covariant_basis(0, int_mesh_dimension - 1) = covariant_basis(1,0) * covariant_basis(2,1) - covariant_basis(2,0) * covariant_basis(1,1);
covariant_basis(1, int_mesh_dimension - 1) = covariant_basis(2,0) * covariant_basis(0,1) - covariant_basis(0,0) * covariant_basis(2,1);
covariant_basis(2, int_mesh_dimension - 1) = covariant_basis(0,0) * covariant_basis(1,1) - covariant_basis(1,0) * covariant_basis(0,1);
norm = std::sqrt(covariant_basis(0, int_mesh_dimension - 1) * covariant_basis(0, int_mesh_dimension - 1) +
covariant_basis(1, int_mesh_dimension - 1) * covariant_basis(1, int_mesh_dimension - 1) +
covariant_basis(2, int_mesh_dimension - 1) * covariant_basis(2, int_mesh_dimension - 1));
covariant_basis(0, int_mesh_dimension - 1) /= norm;
covariant_basis(1, int_mesh_dimension - 1) /= norm;
covariant_basis(2, int_mesh_dimension - 1) /= norm;
covariant_basis(0,mesh_dimension - 1) = covariant_basis(1,0) * covariant_basis(2,1) - covariant_basis(2,0) * covariant_basis(1,1);
covariant_basis(1,mesh_dimension - 1) = covariant_basis(2,0) * covariant_basis(0,1) - covariant_basis(0,0) * covariant_basis(2,1);
covariant_basis(2,mesh_dimension - 1) = covariant_basis(0,0) * covariant_basis(1,1) - covariant_basis(1,0) * covariant_basis(0,1);
norm = std::sqrt(covariant_basis(0,mesh_dimension - 1) * covariant_basis(0,mesh_dimension - 1) +
covariant_basis(1,mesh_dimension - 1) * covariant_basis(1,mesh_dimension - 1) +
covariant_basis(2,mesh_dimension - 1) * covariant_basis(2,mesh_dimension - 1));
covariant_basis(0,mesh_dimension - 1) /= norm;
covariant_basis(1,mesh_dimension - 1) /= norm;
covariant_basis(2,mesh_dimension - 1) /= norm;
break;
}
......@@ -331,13 +321,11 @@ namespace MoReFEM
Wrappers::Xtensor::ComputeInverseSquareMatrix(covariant_metric_tensor, contravariant_metric_tensor, determinant);
int int_Ncomponent = static_cast<int>(Ncomponent);
for (int i = 0; i < int_Ncomponent ; ++i)
for (auto i = 0u; i <Ncomponent ; ++i)
{
for (int j = 0 ; j < int_Ncomponent ; ++j)
for (auto j = 0u; j <Ncomponent ; ++j)
{
reduced_contravariant_metric_tensor(i,j) = contravariant_metric_tensor(i,j);
reduced_contravariant_metric_tensor(i, j) = contravariant_metric_tensor(i, j);
}
}
......
......@@ -46,12 +46,12 @@ namespace MoReFEM
const auto& elementary_data = GetElementaryData();
const auto& unknown_ref_felt = elementary_data.GetRefFElt(GetNthUnknown(0));
const int Nnode_for_unknown = static_cast<int>(unknown_ref_felt.Nnode());
const auto Nnode_for_unknown = unknown_ref_felt.Nnode();
const auto& test_unknown_ref_felt = elementary_data.GetTestRefFElt(GetNthTestUnknown(0));
const int Nnode_for_test_unknown = static_cast<int>(test_unknown_ref_felt.Nnode());
const auto Nnode_for_test_unknown = test_unknown_ref_felt.Nnode();
const int felt_space_dimension = static_cast<int>(unknown_ref_felt.GetFEltSpaceDimension());
const auto felt_space_dimension = unknown_ref_felt.GetFEltSpaceDimension();
InitLocalMatrixStorage({
{
......@@ -92,12 +92,12 @@ namespace MoReFEM
const auto& infos_at_quad_pt_list = elementary_data.GetInformationsAtQuadraturePointList();
const int Nnode_for_unknown = static_cast<int>(ref_felt.Nnode());
const int Nnode_for_test_unknown = static_cast<int>(test_ref_felt.Nnode());
const auto Nnode_for_unknown = ref_felt.Nnode();
const auto Nnode_for_test_unknown = test_ref_felt.Nnode();
const int Ncomponent = static_cast<int>(ref_felt.Ncomponent());
const auto Ncomponent = ref_felt.Ncomponent();
assert(Ncomponent == static_cast<int>(test_ref_felt.Ncomponent()));
assert(Ncomponent == test_ref_felt.Ncomponent());
assert(Ncomponent == 1u && "GradPhiTauTauGradPhi operator limited to scalar unknowns.");
......@@ -108,7 +108,7 @@ namespace MoReFEM
const auto& geom_elt = elementary_data.GetCurrentGeomElt();
const int felt_space_dimension = static_cast<int>(ref_felt.GetFEltSpaceDimension());
const auto felt_space_dimension = ref_felt.GetFEltSpaceDimension();
auto& fibers = GetFibers();
......@@ -145,7 +145,7 @@ namespace MoReFEM
const auto& tau_interpolate = fibers.GetValue(quad_pt, geom_elt);
double norm = 0.;
for (int component = 0 ; component < felt_space_dimension ; ++component)
for (auto component = 0ul; component < felt_space_dimension; ++component)
norm += tau_interpolate(component) * tau_interpolate(component);
tau_sigma.fill(0.);
......
......@@ -58,14 +58,14 @@ namespace MoReFEM
const auto& ref_felt = elementary_data.GetRefFElt(GetNthUnknown(0));
const auto& test_ref_felt = elementary_data.GetTestRefFElt(GetNthTestUnknown(0));
const int Ncomponent = static_cast<int>(ref_felt.Ncomponent());
const auto Ncomponent = ref_felt.Ncomponent();
assert(Ncomponent == static_cast<int>(test_ref_felt.Ncomponent()));
assert(Ncomponent == test_ref_felt.Ncomponent());
auto& matrix_result = elementary_data.GetNonCstMatrixResult();
const int Nnode_for_unknown = static_cast<int>(ref_felt.Nnode());
const int Nnode_for_test_unknown = static_cast<int>(test_ref_felt.Nnode());
const auto Nnode_for_unknown = ref_felt.Nnode();
const auto Nnode_for_test_unknown = test_ref_felt.Nnode();
for (const auto& infos_at_quad_pt : infos_at_quad_pt_list)
......@@ -79,15 +79,15 @@ namespace MoReFEM
const double factor = infos_at_quad_pt.GetQuadraturePoint().GetWeight()
* quad_pt_unknown_data.GetAbsoluteValueJacobianDeterminant();
for (int m = 0; m < Nnode_for_test_unknown; ++m)
for (auto m = 0ul; m < Nnode_for_test_unknown; ++m)
{
const double m_value = factor * phi_test_unknown(m);
for (int n = 0; n < Nnode_for_unknown; ++n)
for (auto n = 0ul; n < Nnode_for_unknown; ++n)
{
const double value = m_value * phi_unknown(n);
for (int component = 0; component < Ncomponent; ++component)
for (auto component = 0ul; component < Ncomponent; ++component)
{
const auto shift = Nnode_for_test_unknown * component;
matrix_result(m + shift, n + shift) += value;
......