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

Always explicitly use std::array

parent d6042742
No related branches found
No related tags found
No related merge requests found
#ifndef ROD_LOCAL_STIFFNESS_HH
#define ROD_LOCAL_STIFFNESS_HH
#include <array>
#include <dune/common/fmatrix.hh>
#include <dune/istl/matrix.hh>
#include <dune/geometry/quadraturerules.hh>
......@@ -583,7 +585,7 @@ assembleGradient(const Entity& element,
q.getFirstDerivativesOfDirectors(dd_dq);
// First derivatives of the position
array<Quaternion<double>,6> dq_dwij;
std::array<Quaternion<double>,6> dq_dwij;
interpolationDerivative(solution[0].q, solution[1].q, quadPos, dq_dwij);
// /////////////////////////////////////////////
......@@ -654,10 +656,10 @@ assembleGradient(const Entity& element,
FieldVector<double,blocksize> referenceStrain = getStrain(localReferenceConfiguration, element, quadPos);
// First derivatives of the position
array<Quaternion<double>,6> dq_dwij;
std::array<Quaternion<double>,6> dq_dwij;
interpolationDerivative(solution[0].q, solution[1].q, quadPos, dq_dwij);
array<Quaternion<double>,6> dq_ds_dwij;
std::array<Quaternion<double>,6> dq_ds_dwij;
interpolationVelocityDerivative(solution[0].q, solution[1].q, quadPos[0]*intervalLength, intervalLength,
dq_ds_dwij);
......
......@@ -4,6 +4,8 @@
#include <fenv.h>
#include <array>
//#define MULTIPRECISION
#ifdef MULTIPRECISION
......@@ -283,8 +285,8 @@ assembleGradientAndHessian(const typename Basis::LocalView& localView,
field_type centerValue = -localEnergy_->energy(localView, localASolution);
// Precompute energy infinitesimal corrections in the directions of the local basis vectors
std::vector<Dune::array<field_type,embeddedBlocksize> > forwardEnergy(nDofs);
std::vector<Dune::array<field_type,embeddedBlocksize> > backwardEnergy(nDofs);
std::vector<std::array<field_type,embeddedBlocksize> > forwardEnergy(nDofs);
std::vector<std::array<field_type,embeddedBlocksize> > backwardEnergy(nDofs);
for (size_t i=0; i<localSolution.size(); i++) {
for (size_t i2=0; i2<embeddedBlocksize; i2++) {
......@@ -394,7 +396,7 @@ void compareMatrices(const Matrix<FieldMatrix<double,N,N> >& matrixA, std::strin
double absDifference = valueA - valueB;
double relDifference = std::abs(absDifference) / std::abs(valueA);
maxAbsDifference = std::max(maxAbsDifference, std::abs(absDifference));
if (not isinf(relDifference))
if (not std::isinf(relDifference))
maxRelDifference = std::max(maxRelDifference, relDifference);
if (relDifference > 1)
......@@ -421,7 +423,7 @@ int main (int argc, char *argv[]) try
FieldVector<double,dim> upper = {{0.38, 0.128}};
array<int,dim> elements = {{15, 5}};
std::array<int,dim> elements = {{5, 5}};
GridType grid(upper, elements);
typedef GridType::LeafGridView GridView;
......
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