Commit dbd1af4b authored by Christoph Grueninger's avatar Christoph Grueninger
Browse files

Various clean ups, mainly in decoupled.

Make decoupled code compatible to current trunk (Jacobians, VTKOptions)
Move default arguments to declaration to make clang happy.
Remove spurious semicolons.
(reviewed by mwolff)


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11435 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 2c9ef56f
......@@ -134,12 +134,9 @@ bool calculateEigenValues(EVVectorType &eigVel, MatrixType& matrix)
return true;
}
else
{
return false;
}
return false;
}
;
//! Function to calculate eigenvalues and eigenvectors of n x n matrices
/*
......@@ -206,7 +203,7 @@ bool calculateEigenValues(EVVectorType &eigVel, MatrixType& eigVec, MatrixType&
return true;
}
;
}
......
......@@ -100,7 +100,7 @@ private:
protected:
void storeSubVolumeElements(const Element& element, std::vector < std::vector<int> >& elemVertMap);
void storeIntersectionInfo(const Element& element, std::vector < std::vector<int> >& elemVertMap);
void storeInnerInteractionVolume(InteractionVolume& interactionVolume, const Vertex& vertex, bool sameLevel);
void storeInnerInteractionVolume(InteractionVolume& interactionVolume, const Vertex& vertex, bool sameLevel = true);
void storeBoundaryInteractionVolume(InteractionVolume& interactionVolume, const Vertex& vertex);
private:
void storeInteractionVolumeInfo();
......@@ -1199,7 +1199,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
}
template<class TypeTag>
void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeInnerInteractionVolume(InteractionVolume& interactionVolume, const Vertex& vertex, bool sameLevel = true)
void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeInnerInteractionVolume(InteractionVolume& interactionVolume, const Vertex& vertex, bool sameLevel)
{
const DimVector& centerPos = vertex.geometry().center();
......
......@@ -334,7 +334,7 @@ class BoxFVElementGeometry
#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
typedef typename Geometry::JacobianInverseTransposed JacobianInverseTransposed;
#else
typedef typename Geometry::Jacobian JacobianInverseTransposed;
typedef typename Geometry::Jacobian JacobianInverseTransposed;
#endif
typedef Dune::PQkLocalFiniteElementCache<CoordScalar, Scalar, dim, 1> LocalFiniteElementCache;
......
......@@ -27,7 +27,9 @@
#include <dumux/implicit/mpnc/mpnclocalresidual.hh>
namespace Dumux {
namespace Dumux
{
template <class TypeTag>
class MPNCLocalResidualEnergy<TypeTag, /*enableEnergy=*/true, /*kineticEnergyTransfer=*/true>
{
......@@ -381,6 +383,6 @@ public:
}// end source
};
};
} // end namespace Dumux
#endif // DUMUX_MPNC_LOCAL_RESIDUAL_ENERGY_KINETIC_HH
......@@ -74,7 +74,7 @@ public:
{
kr[wPhaseIdx] = TwoPLaw::krw(params, fluidState.saturation(wPhaseIdx));
kr[nPhaseIdx] = TwoPLaw::krn(params, fluidState.saturation(wPhaseIdx));
};
}
};
}
......
......@@ -93,6 +93,11 @@ public:
{
typedef typename Grid::Traits::template Codim<0>::Entity Entity;
typedef typename Entity::Geometry Geometry;
#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
typedef typename Geometry::JacobianInverseTransposed JacobianInverseTransposed;
#else
typedef typename Geometry::Jacobian JacobianInverseTransposed;
#endif
typedef typename Grid::LevelGridView GV;
typedef typename GV::IndexSet IS;
typedef typename GV::template Codim<0>::Iterator Iterator;
......@@ -313,8 +318,8 @@ public:
}
// get the transposed Jacobian of the element mapping
const Dune::FieldMatrix<ct,dim,dim>& jacobianInv = geometry.jacobianInverseTransposed(local);
Dune::FieldMatrix<ct,dim,dim> jacobianT(jacobianInv);
const JacobianInverseTransposed& jacobianInv = geometry.jacobianInverseTransposed(local);
JacobianInverseTransposed jacobianT(jacobianInv);
jacobianT.invert();
// calculate the element velocity by the Piola transformation
......@@ -357,7 +362,7 @@ public:
char fname[128];
sprintf(fname,"%d","exactSol-numRefine", grid.maxLevel());
vtkwriter.addCellData(exactSol,"exact pressure solution~");
vtkwriter.write(fname,Dune::VTKOptions::ascii);
vtkwriter.write(fname,Dune::VTK::ascii);
}
return;
......@@ -434,7 +439,12 @@ public:
typedef typename GridView::template Codim<dim>::Iterator VertexIterator;
typedef typename GridView::IntersectionIterator IntersectionIterator;
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView,ElementLayout> ElementMapper;
typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > SolVector;
typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > SolVector;
#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 3)
typedef typename Geometry::JacobianInverseTransposed JacobianInverseTransposed;
#else
typedef typename Geometry::Jacobian JacobianInverseTransposed;
#endif
ElementMapper elementMapper(gridView);
SolVector exactSol(gridView.size(0));
......@@ -635,10 +645,9 @@ public:
}
// get the transposed Jacobian of the element mapping
const Dune::FieldMatrix<Scalar,dim,dim>& jacobianInv = geometry.jacobianInverseTransposed(local);
Dune::FieldMatrix<Scalar,dim,dim> jacobianT(jacobianInv);
const JacobianInverseTransposed& jacobianInv = geometry.jacobianInverseTransposed(local);
JacobianInverseTransposed jacobianT(jacobianInv);
jacobianT.invert();
//Dune::FieldMatrix<Scalar,dim,dim> jacobianT(0);
// calculate the element velocity by the Piola transformation
Dune::FieldVector<Scalar,dim> elementVelocity(0);
......@@ -701,7 +710,7 @@ public:
char fname[128];
sprintf(fname, "exactSol-numRefine%d", gridView.grid().maxLevel());
vtkwriter.addCellData(exactSol,"exact pressure solution~");
vtkwriter.write(fname,Dune::VTKOptions::ascii);
vtkwriter.write(fname,Dune::VTK::ascii);
}
return;
......
Supports Markdown
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