Forked from
agnumpde / dune-tectonic
157 commits ahead of the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
sliplawstateupdater.hh 973 B
#ifndef SRC_TIME_STEPPING_STATE_SLIPLAWSTATEUPDATER_HH
#define SRC_TIME_STEPPING_STATE_SLIPLAWSTATEUPDATER_HH
#include <dune/common/bitsetvector.hh>
#include "stateupdater.hh"
template <class ScalarVector, class Vector>
class SlipLawStateUpdater : public LocalStateUpdater<ScalarVector, Vector> {
private:
using BitVector = Dune::BitSetVector<1>;
public:
SlipLawStateUpdater(
const ScalarVector& alpha_initial,
const BitVector& nodes,
const double L,
const double V0);
void nextTimeStep() override;
void setup(double tau) override;
void solve(const Vector& velocity_field) override;
void extractAlpha(ScalarVector&) override;
auto clone() const -> std::shared_ptr<LocalStateUpdater<ScalarVector, Vector>> override;
private:
std::vector<int> localToGlobal_;
ScalarVector alpha_o_;
ScalarVector alpha_;
const BitVector& nodes_;
const double L_;
const double V0_;
double tau_;
};
#endif