Skip to content
Snippets Groups Projects
Commit 67b2b386 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Get rid of dataref

parent 14a40c3a
No related branches found
No related tags found
No related merge requests found
......@@ -14,8 +14,8 @@
namespace Dune {
template <class MatrixTypeTEMPLATE, class VectorTypeTEMPLATE>
class GlobalNonlinearity {
private:
using dataref = BlockVector<FieldVector<double, 1>> const &;
protected:
using SingletonVectorType = BlockVector<FieldVector<double, 1>>;
public:
using MatrixType = MatrixTypeTEMPLATE;
......@@ -78,7 +78,7 @@ class GlobalNonlinearity {
return res->regularity(x);
}
virtual void updateState(dataref state) = 0;
virtual void updateState(SingletonVectorType const &state) = 0;
};
}
#endif
......@@ -18,13 +18,15 @@ template <class MatrixType, class VectorType>
class GlobalRuinaNonlinearity
: public GlobalNonlinearity<MatrixType, VectorType> {
private:
using dataref = BlockVector<FieldVector<double, 1>> const &;
using typename GlobalNonlinearity<MatrixType,
VectorType>::SingletonVectorType;
public:
using GlobalNonlinearity<MatrixType, VectorType>::dim;
GlobalRuinaNonlinearity(Dune::BitSetVector<1> const &frictionalNodes,
dataref nodalIntegrals, FrictionData const &fd)
SingletonVectorType const &nodalIntegrals,
FrictionData const &fd)
: restrictions(nodalIntegrals.size()) {
auto trivialNonlinearity =
make_shared<LocalFriction<dim>>(make_shared<TrivialFunction>());
......@@ -37,7 +39,7 @@ class GlobalRuinaNonlinearity
}
}
void updateState(dataref state) override {
void updateState(SingletonVectorType const &state) override {
for (size_t i = 0; i < restrictions.size(); ++i)
restrictions[i]->updateState(state[i]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment