Commit b23d88cd authored by Praetorius, Simon's avatar Praetorius, Simon

Merge branch 'develop' into 'master'

Develop

See merge request !15
parents 1292193d 428d373f
......@@ -38,8 +38,6 @@ int main(int argc, char** argv)
auto dbcValues = [](auto const& x){ return 0.0; }; // set value
prob.addDirichletBC(predicate, _0, _0, dbcValues);
*prob.getSolution() = 0.0; // maybe not necessary
prob.buildAfterCoarsen(adaptInfo, Flag(0));
// write matrix to file
......
dimension of world: 2
stokesMesh->macro file name: ./macro/macro.stand.2d
stokesMesh->global refinements: 6
stokesMesh->global refinements: 0
stokes->mesh: stokesMesh
stokes->solver->name: bicgstab_ell
stokes->solver->ell: 5
stokes->solver->ell: 3
stokes->solver->max iteration: 1000
stokes->solver->reduction: 1e-8
stokes->solver->restart: 50
......@@ -26,7 +26,7 @@ stokes->output[1]->ParaView format: 1
stokes->output[1]->ParaView mode: 1
stokes->viscosity: 0.1
stokes->viscosity: 1.0
stokes->density: 1.0
stokes->boundary velocity: 10.0
adapt->timestep: 0.1
......
......@@ -3,6 +3,7 @@
#include <cmath>
#include <amdis/AMDiS.hpp>
#include <amdis/common/FieldMatVec.hpp>
#include <amdis/AdaptInstationary.hpp>
#include <amdis/ProblemStat.hpp>
#include <amdis/ProblemInstat.hpp>
......@@ -37,7 +38,7 @@ int main(int argc, char** argv)
Parameters::get("stokes->density", density);
Parameters::get("stokes->boundary velocity", vel);
AdaptInfo adaptInfo("adapt", prob.getNumComponents());
AdaptInfo adaptInfo("adapt");
// tree-paths for components
auto _v = 0_c;
......
......@@ -71,7 +71,7 @@ int main(int argc, char** argv)
prob.addDirichletBC([](auto const& x) { return x[0] < 1.e-8 && x[1] < 1.e-8; }, _p, _p, 0.0);
AdaptInfo adaptInfo("adapt", prob.getNumComponents());
AdaptInfo adaptInfo("adapt");
// assemble and solve system
prob.buildAfterCoarsen(adaptInfo, Flag(0));
......
......@@ -72,7 +72,7 @@ int main(int argc, char** argv)
prob.addDirichletBC([](auto const& x) { return x[0] < 1.e-8 && x[1] < 1.e-8; }, _p, _p, 0.0);
AdaptInfo adaptInfo("adapt", prob.getNumComponents());
AdaptInfo adaptInfo("adapt");
// assemble and solve system
prob.buildAfterCoarsen(adaptInfo, Flag(0));
......
......@@ -55,7 +55,7 @@ int main(int argc, char** argv)
// set point constraint for pressure
prob.addDirichletBC([](auto const& x) { return x[0] < 1.e-8 && x[1] < 1.e-8; }, _p, _p, 0.0);
AdaptInfo adaptInfo("adapt", prob.getNumComponents());
AdaptInfo adaptInfo("adapt");
// assemble and solve system
prob.buildAfterCoarsen(adaptInfo, Flag(0));
......
......@@ -36,8 +36,6 @@ int main(int argc, char** argv)
auto dbcValues = [](auto const& x){ return 0.0; }; // set value
prob.addDirichletBC(predicate, 1, 1, dbcValues);
*prob.getSolution() = 0.0; // maybe not necessary
prob.buildAfterCoarsen(adaptInfo, Flag(0));
// write matrix to file
......
......@@ -35,11 +35,6 @@ namespace AMDiS
, constraints_(constraints)
{}
void update(GridView const& gv)
{
globalBasis_.update(gv);
}
/// Assemble the linear system
template <class SystemMatrixType, class SystemVectorType>
void assemble(
......@@ -59,23 +54,11 @@ namespace AMDiS
SystemVectorType& rhs,
bool asmMatrix, bool asmVector) const;
template <class ElementContainer, class Container, class Operators, class Geometry, class Basis>
void assembleElementOperators(
ElementContainer& elementContainer,
Container& container,
Operators& operators,
Geometry const& geometry,
Basis const& subBasis) const;
template <class ElementContainer, class Container, class Operators, class Geometry, class RowBasis, class ColBasis>
template <class Element, class Operators, class ElementAssembler>
void assembleElementOperators(
ElementContainer& elementContainer,
Container& container,
Element const& element,
Operators& operators,
Geometry const& geometry,
RowBasis const& rowBasis,
ColBasis const& colBasis) const;
ElementAssembler const& elementAssembler) const;
/// Finish insertion into the matrix and assembles boundary conditions
/// Return the number of nonzeros assembled into the matrix
......
......@@ -42,11 +42,19 @@ void Assembler<Traits>::assemble(
{
auto rowBasis = Dune::Functions::subspaceBasis(globalBasis_, rowTreePath);
auto rowLocalView = rowBasis.localView();
rowLocalView.bind(element); // NOTE: Is this necessary?
rowLocalView.bind(element);
auto& rhsOp = rhsOperators_[rowNode];
if (rhsOp.assemble(asmVector) && !rhsOp.empty())
this->assembleElementOperators(elementVector, rhs, rhsOp, geometry, rowLocalView);
if (rhsOp.assemble(asmVector) && !rhsOp.empty()) {
rhsOp.bind(element, geometry);
auto vecAssembler = [&](auto const& context, auto& operator_list) {
for (auto scaled : operator_list)
scaled.op->assemble(context, elementVector, rowLocalView.tree());
};
this->assembleElementOperators(element, rhsOp, vecAssembler);
}
forEachNode(localView.tree(), [&,this](auto const& colNode, auto colTreePath)
{
......@@ -54,9 +62,16 @@ void Assembler<Traits>::assemble(
if (matOp.assemble(asmMatrix) && !matOp.empty()) {
auto colBasis = Dune::Functions::subspaceBasis(globalBasis_, colTreePath);
auto colLocalView = colBasis.localView();
colLocalView.bind(element); // NOTE: Is this necessary?
colLocalView.bind(element);
matOp.bind(element, geometry);
auto matAssembler = [&](auto const& context, auto& operator_list) {
for (auto scaled : operator_list)
scaled.op->assemble(context, elementMatrix, rowLocalView.tree(), colLocalView.tree());
};
this->assembleElementOperators(elementMatrix, matrix, matOp, geometry, rowLocalView, colLocalView);
this->assembleElementOperators(element, matOp, matAssembler);
}
});
});
......@@ -82,6 +97,14 @@ void Assembler<Traits>::assemble(
}
}
// unbind all operators
forEachNode(localView.tree(), [&,this](auto const& rowNode, auto&&) {
rhsOperators_[rowNode].unbind();
forEachNode(localView.tree(), [&,this](auto const& colNode, auto&&) {
matrixOperators_[rowNode][colNode].unbind();
});
});
localIndexSet.unbind();
localView.unbind();
}
......@@ -89,85 +112,29 @@ void Assembler<Traits>::assemble(
// 4. finish matrix insertion and apply dirichlet boundary conditions
std::size_t nnz = finishMatrixVector(matrix, solution, rhs, asmMatrix, asmVector);
msg("fillin of assembled matrix: ", nnz);
msg("fill-in of assembled matrix: ", nnz);
}
template <class Traits>
template <class ElementContainer, class Container, class Operators, class Geometry, class LocalView>
template <class Element, class Operators, class ElementAssembler>
void Assembler<Traits>::assembleElementOperators(
ElementContainer& elementContainer,
Container& container,
Element const& element,
Operators& operators,
Geometry const& geometry,
LocalView const& localView) const
ElementAssembler const& elementAssembler) const
{
auto const& element = getElement(localView);
auto const& gridView = getGridView(localView);
bool add = false;
auto assemble_operators = [&](auto const& context, auto& operator_list) {
for (auto scaled : operator_list) {
scaled.op->bind(element, geometry);
bool add_op = scaled.op->assemble(context, elementContainer, localView.tree());
scaled.op->unbind();
add = add || add_op;
}
};
// assemble element operators
assemble_operators(element, operators.element);
// assemble intersection operators
if (!operators.intersection.empty()
|| (!operators.boundary.empty() && element.hasBoundaryIntersections()))
{
for (auto const& intersection : intersections(gridView, element)) {
if (intersection.boundary())
assemble_operators(intersection, operators.boundary);
else
assemble_operators(intersection, operators.intersection);
}
}
}
template <class Traits>
template <class ElementContainer, class Container, class Operators, class Geometry, class RowLocalView, class ColLocalView>
void Assembler<Traits>::assembleElementOperators(
ElementContainer& elementContainer,
Container& container,
Operators& operators,
Geometry const& geometry,
RowLocalView const& rowLocalView, ColLocalView const& colLocalView) const
{
auto const& element = getElement(rowLocalView, colLocalView);
auto const& gridView = getGridView(rowLocalView, colLocalView);
bool add = false;
auto assemble_operators = [&](auto const& context, auto& operator_list) {
for (auto scaled : operator_list) {
scaled.op->bind(element, geometry);
bool add_op = scaled.op->assemble(context, elementContainer, rowLocalView.tree(), colLocalView.tree());
scaled.op->unbind();
add = add || add_op;
}
};
// assemble element operators
assemble_operators(element, operators.element);
elementAssembler(element, operators.element);
// assemble intersection operators
if (!operators.intersection.empty()
|| (!operators.boundary.empty() && element.hasBoundaryIntersections()))
{
for (auto const& intersection : intersections(gridView, element)) {
for (auto const& intersection : intersections(globalBasis_.gridView(), element)) {
if (intersection.boundary())
assemble_operators(intersection, operators.boundary);
elementAssembler(intersection, operators.boundary);
else
assemble_operators(intersection, operators.intersection);
elementAssembler(intersection, operators.intersection);
}
}
}
......@@ -184,6 +151,8 @@ void Assembler<Traits>::initMatrixVector(
matrix.init(asmMatrix);
solution.compress();
rhs.compress();
if (asmVector)
rhs = 0;
auto localView = globalBasis_.localView();
forEachNode(localView.tree(), [&,this](auto const& rowNode, auto rowTreePath)
......
......@@ -49,8 +49,11 @@ namespace AMDiS
RowBasis const& rowBasis,
ColBasis const& /*colBasis*/)
{
using RowNode = typename RowBasis::LocalView::Tree;
initImpl(rowBasis, typename RowNode::NodeTag{});
if (!initialized_) {
using RowNode = typename RowBasis::LocalView::Tree;
initImpl(rowBasis, typename RowNode::NodeTag{});
initialized_ = true;
}
}
......@@ -69,7 +72,14 @@ namespace AMDiS
RowBasis const& rowBasis,
ColBasis const& colBasis)
{
test_exit_dbg(initialized_, "Boundary condition not initialized!");
auto columns = matrix.applyDirichletBC(dirichletNodes_);
finishImpl(matrix, rhs, solution, rowBasis, colBasis, ValueCategory_t<Range>{});
// subtract columns of dirichlet nodes from rhs
for (auto const& triplet : columns)
rhs[triplet.row] -= triplet.value * solution[triplet.col];
}
protected:
......@@ -79,6 +89,9 @@ namespace AMDiS
template <class RowBasis>
void initImpl(RowBasis const& rowBasis, Dune::TypeTree::PowerNodeTag);
template <class RowBasis>
void initImpl(RowBasis const& rowBasis, Dune::TypeTree::CompositeNodeTag);
template <class RB, class RowNodeTag>
void initImpl(RB const&, RowNodeTag) {}
......
......@@ -13,11 +13,7 @@ namespace AMDiS
RowBasis const& rowBasis, Dune::TypeTree::LeafNodeTag)
{
using Dune::Functions::interpolate;
if (!initialized_) {
interpolate(rowBasis, hierarchicVectorWrapper(dirichletNodes_), predicate_);
initialized_ = true;
}
interpolate(rowBasis, hierarchicVectorWrapper(dirichletNodes_), predicate_);
}
template <class WorldVector, class Range>
......@@ -25,16 +21,29 @@ namespace AMDiS
void DirichletBC<WorldVector, Range>::initImpl(
RowBasis const& rowBasis, Dune::TypeTree::PowerNodeTag)
{
using Dune::Functions::interpolate;
using Dune::Functions::subspaceBasis;
using Node = typename RowBasis::LocalView::Tree;
using ChildNode = typename Node::template Child<0>::type;
if (!initialized_) {
auto tp = rowBasis.prefixPath();
auto const& basis = rowBasis.rootBasis();
for (std::size_t i = 0; i < degree(rowBasis.localView().tree()); ++i)
interpolate(Dune::Functions::subspaceBasis(basis, push_back(tp,i)),
hierarchicVectorWrapper(dirichletNodes_), predicate_);
initialized_ = true;
}
auto tp = rowBasis.prefixPath();
auto const& basis = rowBasis.rootBasis();
for (std::size_t i = 0; i < degree(rowBasis.localView().tree()); ++i)
initImpl(subspaceBasis(basis, push_back(tp,i)), typename ChildNode::NodeTag{});
}
template <class WorldVector, class Range>
template <class RowBasis>
void DirichletBC<WorldVector, Range>::initImpl(
RowBasis const& rowBasis, Dune::TypeTree::CompositeNodeTag)
{
using Dune::Functions::subspaceBasis;
using Node = typename RowBasis::LocalView::Tree;
auto tp = rowBasis.prefixPath();
auto const& basis = rowBasis.rootBasis();
forEach(range_<0,Node::CHILDREN>, [&,this](auto const _i) {
using ChildNode = typename Node::template Child<decltype(_i)::value>::type;
this->initImpl(subspaceBasis(basis, push_back(tp,_i)), typename ChildNode::NodeTag{});
});
}
......@@ -45,18 +54,10 @@ namespace AMDiS
RowBasis const& rowBasis, ColBasis const& colBasis, ValueCat)
{
using Dune::Functions::interpolate;
test_exit_dbg(initialized_, "Boundary condition not initialized!");
auto columns = matrix.applyDirichletBC(dirichletNodes_);
interpolate(rowBasis, hierarchicVectorWrapper(rhs.getVector()), values_,
hierarchicVectorWrapper(dirichletNodes_));
interpolate(colBasis, hierarchicVectorWrapper(solution.getVector()), values_,
hierarchicVectorWrapper(dirichletNodes_));
// subtract columns of dirichlet nodes from rhs
for (auto const& triplet : columns)
rhs[triplet.row] -= triplet.value * solution[triplet.col];
}
......
......@@ -65,24 +65,28 @@ namespace AMDiS
Vector const& dofvector)
: FileWriterInterface(baseName)
, dofvector_(dofvector)
, animation_(false)
{
Parameters::get(baseName + "->ParaView animation", animation_);
int m = Parameters::get<int>(baseName + "->ParaView mode").value_or(0);
mode_ = (m == 0 ? Dune::VTK::ascii : Dune::VTK::appendedraw);
init(baseName, ValueCategory_t<Range>{});
}
template <class ValueCat>
void init(std::string const& baseName, ValueCat)
{
int m = Parameters::get<int>(baseName + "->ParaView mode").value_or(0);
mode_ = (m == 0 ? Dune::VTK::ascii : Dune::VTK::appendedraw);
int subSampling = Parameters::get<int>(baseName + "->subsampling").value_or(0);
if (subSampling > 0)
vtkWriter_ = std::make_shared<Dune::SubsamplingVTKWriter<GridView>>(gridView(), subSampling);
else
vtkWriter_ = std::make_shared<Dune::VTKWriter<GridView>>(gridView());
vtkSeqWriter_ = std::make_shared<Dune::VTKSequenceWriter<GridView>>(vtkWriter_, filename_, dir_, "");
if (animation_)
vtkSeqWriter_ = std::make_shared<Dune::VTKSequenceWriter<GridView>>(vtkWriter_, filename_, dir_, "");
vtkWriter_->addVertexData(dofvector_, Dune::VTK::FieldInfo(name_, VTKFieldType<Range>, VTKFieldSize<Range>));
}
......@@ -91,10 +95,12 @@ namespace AMDiS
/// Implements \ref FileWriterInterface::writeFiles
virtual void writeFiles(AdaptInfo& adaptInfo, bool force) override
{
if (!filesystem::exists(dir_))
error_exit("Output directory '",dir_,"' does not exist!");
test_exit(filesystem::exists(dir_), "Output directory '",dir_,"' does not exist!");
if (vtkSeqWriter_)
vtkSeqWriter_->write(adaptInfo.getTime(), mode_);
else if (vtkWriter_)
vtkWriter_->write(filesystem::path({dir_, filename_}).string(), mode_);
}
protected:
......@@ -109,6 +115,9 @@ namespace AMDiS
std::shared_ptr<Dune::VTKWriter<GridView>> vtkWriter_;
std::shared_ptr<Dune::VTKSequenceWriter<GridView>> vtkSeqWriter_;
// write .pvd if animation=true, otherwise write only .vtu
bool animation_;
// represents VTK::OutputType: ascii, appendedraw
Dune::VTK::OutputType mode_;
};
......
......@@ -294,9 +294,11 @@ namespace AMDiS
{
using RawExpr = Underlying_t<Expr>;
static_assert(Concepts::HasGridFunctionOrder<RawExpr>,
"Polynomial degree of expression can not be deduced. You need to provide an explicit value for polynomial order or a quadrature rule in 'makeOperator()'.");
"Polynomial degree of expression can not be deduced. You need to provide a polynomial order or a quadrature rule in 'makeOperator()'.");
return ExpressionPreOperator<Tag, Expr, tag::deduce>{tag, expr};
return Dune::Hybrid::ifElse(bool_<Concepts::HasGridFunctionOrder<RawExpr>>,
[&](auto) { return ExpressionPreOperator<Tag, Expr, tag::deduce>{tag, expr}; },
[&](auto) { return ExpressionPreOperator<Tag, double, tag::deduce>{tag, 0.0}; });
}
/// Store tag and expression and polynomial order of expression to create a \ref GridFunctionOperator
......
......@@ -37,7 +37,7 @@
*
* 4. Integrate a GridFunction on a GridView:
* ```
* auto value = integrate(Expression, prob.leafGridView());
* auto value = integrate(Expression, prob.gridView());
* ```
*
* **Remarks:**
......@@ -51,7 +51,7 @@
* and arithmetic operator operator+, operator-, or operator*.
*
* If the polynomial order can not be deduced, the compiler gives an error.
* Then, these functions, accept an additional argument, to provide either the
* Then, these functions accept an additional argument, to provide either the
* polynomial degree of the expression, or a quadrature rule explicitly.
*
* *Examples:*
......@@ -67,47 +67,3 @@
#include <amdis/gridfunctions/DerivativeGridFunction.hpp>
#include <amdis/gridfunctions/FunctorGridFunction.hpp>
#include <amdis/gridfunctions/OperationsGridFunction.hpp>
namespace AMDiS
{
/// \brief Generator for Gridfunctions from Expressions (PreGridfunctions)
/**
* \ingroup GridFunctions
* Create an evaluable GridFunction from an expression that itself can not be
* evaluated. Therefore, it binds the GridFunction to a GridView.
*
* **Example:**
* ```
* ProblemStat<Traits> prob("name");
* prob.initialize(INIT_ALL);
*
* auto gridFct = makeGridFunction(Expression, prob.leafGridView());
*
* // eval GridFunction at GlobalCoordinates
* auto value = gridFct(Dune::FieldVector<double,2>{1.0, 2.0});
*
* auto localFct = localFunction(gridFct);
* for (auto const& element : elements(prob.leafGridView())) {
* localFct.bind(element);
* // eval LocalFunction at local coordinates
* auto x = localFct(element.geometry().center());
* localFct.unbind();
* }
* ```
*
* In contrast to Expressions, GridFunctions can be evaluated, and
* - have the free-function \ref localFunction() to obtain a LocalFunction
* - its LocalFunctions have the free-function \ref order() to obtain the
* polynomial order of the Expression (if available)
* - its LocalFunctions have the free-function \ref derivative() to
* differentiate the Expression with respect to global Coordinates.
* A derivative Expression can be created, using \ref gradientAtQP() that
* can be converted to a GridFunction afterwards.
**/
template <class PreGridFct, class GridView>
decltype(auto) makeGridFunction(PreGridFct&& preGridFct, GridView const& gridView)
{
return Impl::makeGridFunctionImpl(std::forward<PreGridFct>(preGridFct), gridView, Dune::PriorityTag<10>{});
}
} // end namespace AMDiS
......@@ -29,7 +29,7 @@ namespace AMDiS
return pt().get<T>(key);
}
catch (...) {
return Dune::Std::nullopt;
return {};
}
}
......
......@@ -51,6 +51,8 @@ namespace AMDiS
public:
virtual ~LocalAssemblerBase() {}
virtual void bind(Element const& element, Geometry const& geometry) = 0;
virtual void unbind() = 0;
......@@ -97,6 +99,21 @@ namespace AMDiS
{
return flag && (!assembled || changing);
}
template <class Geo>
void bind(Element const& elem, Geo const& geo)
{
for (auto& scaled : element) scaled.op->bind(elem,geo);
for (auto& scaled : boundary) scaled.op->bind(elem,geo);
for (auto& scaled : intersection) scaled.op->bind(elem,geo);
}
void unbind()
{
for (auto& scaled : element) scaled.op->unbind();
for (auto& scaled : boundary) scaled.op->unbind();
for (auto& scaled : intersection) scaled.op->unbind();
}
};
public:
......
......@@ -113,14 +113,14 @@ namespace AMDiS
auto ext = fn.extension();
#if HAVE_ALBERTA
if (ext == "1d" || ext == "2d" || ext == "3d") {
if (ext == ".1d" || ext == ".2d" || ext == ".3d") {
Dune::GridFactory<Grid> factory;
Dune::AlbertaReader<Grid> reader;
reader.readGrid(filename, factory);
return std::unique_ptr<Grid>{factory.createGrid()};
}
#endif
if (ext == "msh") {
if (ext == ".msh") {
Dune::GmshReader<Grid> reader;
return std::unique_ptr<Grid>{reader.read(filename)};
}
......
......@@ -14,5 +14,6 @@
#include <amdis/operations/Basic.hpp>
#include <amdis/operations/CMath.hpp>
#include <amdis/operations/Composer.hpp>
#include <amdis/operations/Composer.impl.hpp>
#include <amdis/operations/FieldMatVec.hpp>
#include <amdis/operations/MaxMin.hpp>
......@@ -58,15 +58,26 @@ namespace AMDiS
}
/// Returns \ref oldSolution.
decltype(auto) getOldSolution() { return *oldSolution; }
decltype(auto) getOldSolution() const { return *oldSolution; }
std::unique_ptr<SystemVector> getOldSolutionVector() const
{
return *oldSolution;
}
/// Returns the I'th component of \ref oldSolution.
// template <std::size_t I = 0>
// decltype(auto) getOldSolution(const index_t<I> _i = {})
// {
// return (*oldSolution)[_i];
// }
/// Return a mutable view to a oldSolution component
template <class TreePath = RootTreePath>
auto getOldSolution(TreePath const& path = {})
{
auto&& tp = makeTreePath(path);
return makeDOFVectorView(*oldSolution, tp);
}
/// Return a const view to a oldSolution component
template <class TreePath = RootTreePath>
auto getOldSolution(TreePath const& path = {}) const
{
auto&& tp = makeTreePath(path);
return makeDOFVectorView(*oldSolution, tp);
}
/// Implementation of \ref ProblemTimeInterface::transferInitialSolution().
virtual void transferInitialSolution(AdaptInfo& adaptInfo) override;
......@@ -79,6 +90,21 @@ namespace AMDiS
std::unique_ptr<SystemVector> oldSolution;
};
#if DUNE_HAVE_CXX_CLASS_TEMPLATE_ARGUMENT_DEDUCTION
// Deduction rule
template <class Traits>
ProblemInstat(std::string name, ProblemStat<Traits>& prob)
-> ProblemInstat<Traits>;
#endif
// Generator for ProblemInstat with given ProblemStat
template <class Traits>
ProblemInstat<Traits> makeProblemInstat(std::string name, ProblemStat<Traits>& prob)
{
return {std::move(name), prob};
}
} // end namespace AMDiS
#include "ProblemInstat.inc.hpp"
......@@ -42,16 +42,10 @@ void ProblemInstat<Traits>::createUhOld()
{
AMDIS_FUNCNAME("ProblemInstat::createUhOld()");
if (oldSolution) {
if (oldSolution)
warning("oldSolution already created\n");
}
else {
const int size = problemStat.getNumComponents();
// create oldSolution
std::vector<std::string> componentNames(size, name + "_uOld");
else // create oldSolution
oldSolution.reset(new SystemVector(*problemStat.getGlobalBasis(), name + "_uOld"));
}
}
......@@ -59,7 +53,7 @@ template <class Traits>
void ProblemInstat<Traits>::initTimestep(AdaptInfo&)
{
if (oldSolution)
oldSolution->copy(*problemStat.getSolution());
oldSolution->copy(*problemStat.getSolutionVector());
}
} // end namespace AMDiS
......@@ -52,8 +52,6 @@ namespace AMDiS
using Element = typename GridView::template Codim<0>::Entity;
static const std::size_t nComponents = 1; // TODO: count leaf nodes in GlobalBasis
/// Dimension of the mesh
static constexpr int dim = Grid::dimension;
......@@ -71,27 +69,17 @@ namespace AMDiS
/**
* \brief Constructor. Takes the name of the problem that is used to
* access values correpsonding to this püroblem in the parameter file.
*
* Parameters read by ProblemStat, with name 'PROB'
* PROB->names: \ref componentNames