Skip to content
Snippets Groups Projects
Commit 28a3267b authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Fix a few simple compiler warnings

parent afd864b0
No related branches found
No related tags found
1 merge request!67Modernize rod code
......@@ -84,7 +84,7 @@ splitVector(const std::vector<TargetSpace>& sol) const {
Dune::TupleVector<std::vector<MixedSpace0>,std::vector<MixedSpace1>> solutionSplit;
solutionSplit[_0].resize(n);
solutionSplit[_1].resize(n);
for (int i = 0; i < n; i++) {
for (std::size_t i = 0; i < n; i++) {
solutionSplit[_0][i] = sol[i].r; // Deformation part
solutionSplit[_1][i] = sol[i].q; // Rotational part
}
......@@ -145,7 +145,7 @@ assembleGradientAndHessian(const std::vector<TargetSpace>& sol,
hessian = 0;
gradient.resize(n);
gradient = 0;
for (int i = 0; i < n; i++) {
for (std::size_t i = 0; i < n; i++) {
for (int j = 0; j < blocksize0 + blocksize1; j++)
gradient[i][j] = j < blocksize0 ? gradient0[i][j] : gradient1[i][j - blocksize0];
}
......
......@@ -24,7 +24,6 @@ typedef RigidBodyMotion<double,3> TargetSpace;
const int blocksize = TargetSpace::TangentVector::dimension;
using namespace Dune;
using std::string;
int main (int argc, char *argv[]) try
{
......
......@@ -15,8 +15,6 @@
#include "multiindex.hh"
#include "valuefactory.hh"
const double eps = 1e-4;
typedef RigidBodyMotion<double,3> TargetSpace;
using namespace Dune;
......
......@@ -114,7 +114,6 @@ int main (int argc, char *argv[])
));
using CompositeBasis = decltype(compositeBasis);
using LocalView = typename CompositeBasis::LocalView;
/////////////////////////////////////////////////////////////////////////
// Create the energy functions with their parameters
......@@ -170,7 +169,7 @@ int main (int argc, char *argv[])
x[_0].resize(compositeBasis.size({0}));
x[_1].resize(compositeBasis.size({1}));
std::vector<RBM> xRBM(compositeBasis.size({0}));
for (int i = 0; i < compositeBasis.size({0}); i++) {
for (std::size_t i = 0; i < compositeBasis.size({0}); i++) {
for (int j = 0; j < gridDim; j++)
initialDeformation[i][j] = identity[i][j];
x[_0][i] = initialDeformation[i];
......
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