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

[Cleanup] Rename: MySolver -> SolverFactory

parent 022d4cd0
Branches
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ SOURCES = \ ...@@ -10,7 +10,7 @@ SOURCES = \
state/compute_state_dieterich_euler.cc \ state/compute_state_dieterich_euler.cc \
state/compute_state_dieterich_common.cc \ state/compute_state_dieterich_common.cc \
state/compute_state_ruina.cc \ state/compute_state_ruina.cc \
mysolver.cc \ solverfactory.cc \
one-body-sample.cc \ one-body-sample.cc \
timestepping.cc \ timestepping.cc \
vtk.cc vtk.cc
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
#include <dune/tectonic/globalnonlinearity.hh> #include <dune/tectonic/globalnonlinearity.hh>
#include "assemblers.hh" #include "assemblers.hh"
#include "mysolver.hh" #include "solverfactory.hh"
#include "vtk.hh" #include "vtk.hh"
#include "enums.hh" #include "enums.hh"
...@@ -354,7 +354,7 @@ int main(int argc, char *argv[]) { ...@@ -354,7 +354,7 @@ int main(int argc, char *argv[]) {
alpha_initial = alpha_initial =
std::log(parset.get<double>("boundary.friction.initial_state")); std::log(parset.get<double>("boundary.friction.initial_state"));
using LinearFactoryType = MySolver< using LinearFactoryType = SolverFactory<
dims, BlockNonlinearTNNMGProblem<ConvexProblem< dims, BlockNonlinearTNNMGProblem<ConvexProblem<
ZeroNonlinearity<SmallVector, SmallMatrix>, MatrixType>>, ZeroNonlinearity<SmallVector, SmallMatrix>, MatrixType>>,
GridType>; GridType>;
...@@ -442,7 +442,7 @@ int main(int argc, char *argv[]) { ...@@ -442,7 +442,7 @@ int main(int argc, char *argv[]) {
// Set up TNNMG solver // Set up TNNMG solver
auto const solverTolerance = parset.get<double>("solver.tolerance"); auto const solverTolerance = parset.get<double>("solver.tolerance");
using NonlinearFactoryType = MySolver< using NonlinearFactoryType = SolverFactory<
dims, dims,
MyBlockProblem<ConvexProblem< MyBlockProblem<ConvexProblem<
Dune::GlobalNonlinearity<MatrixType, VectorType>, MatrixType>>, Dune::GlobalNonlinearity<MatrixType, VectorType>, MatrixType>>,
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
#include <dune/solvers/common/numproc.hh> // Solver::FULL #include <dune/solvers/common/numproc.hh> // Solver::FULL
#include <dune/fufem/assemblers/transferoperatorassembler.hh> #include <dune/fufem/assemblers/transferoperatorassembler.hh>
#include "mysolver.hh" #include "solverfactory.hh"
template <int dim, class BlockProblemType, class GridType> template <int dim, class BlockProblemType, class GridType>
MySolver<dim, BlockProblemType, GridType>::MySolver( SolverFactory<dim, BlockProblemType, GridType>::SolverFactory(
Dune::ParameterTree const &parset, int refinements, double solver_tolerance, Dune::ParameterTree const &parset, int refinements, double solver_tolerance,
GridType const &grid, Dune::BitSetVector<dim> const &ignoreNodes) GridType const &grid, Dune::BitSetVector<dim> const &ignoreNodes)
: baseEnergyNorm(linearBaseSolverStep), : baseEnergyNorm(linearBaseSolverStep),
...@@ -43,7 +43,7 @@ MySolver<dim, BlockProblemType, GridType>::MySolver( ...@@ -43,7 +43,7 @@ MySolver<dim, BlockProblemType, GridType>::MySolver(
} }
template <int dim, class BlockProblemType, class GridType> template <int dim, class BlockProblemType, class GridType>
MySolver<dim, BlockProblemType, GridType>::~MySolver() { SolverFactory<dim, BlockProblemType, GridType>::~SolverFactory() {
for (auto &x : transferOperators) for (auto &x : transferOperators)
delete x; delete x;
...@@ -51,9 +51,9 @@ MySolver<dim, BlockProblemType, GridType>::~MySolver() { ...@@ -51,9 +51,9 @@ MySolver<dim, BlockProblemType, GridType>::~MySolver() {
} }
template <int dim, class BlockProblemType, class GridType> template <int dim, class BlockProblemType, class GridType>
typename MySolver<dim, BlockProblemType, GridType>::SolverType * typename SolverFactory<dim, BlockProblemType, GridType>::SolverType *
MySolver<dim, BlockProblemType, GridType>::getSolver() { SolverFactory<dim, BlockProblemType, GridType>::getSolver() {
return multigridStep; return multigridStep;
} }
#include "mysolver_tmpl.cc" #include "solverfactory_tmpl.cc"
#ifndef MYSOLVER_HH #ifndef SOLVER_FACTORY_HH
#define MYSOLVER_HH #define SOLVER_FACTORY_HH
#include <dune/common/bitsetvector.hh> #include <dune/common/bitsetvector.hh>
#include <dune/common/parametertree.hh> #include <dune/common/parametertree.hh>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <dune/tnnmg/iterationsteps/tnnmgstep.hh> #include <dune/tnnmg/iterationsteps/tnnmgstep.hh>
template <int dim, class BlockProblemTypeTEMPLATE, class GridType> template <int dim, class BlockProblemTypeTEMPLATE, class GridType>
class MySolver { class SolverFactory {
public: public:
using BlockProblemType = BlockProblemTypeTEMPLATE; using BlockProblemType = BlockProblemTypeTEMPLATE;
using ConvexProblemType = typename BlockProblemType::ConvexProblemType; using ConvexProblemType = typename BlockProblemType::ConvexProblemType;
...@@ -26,11 +26,11 @@ class MySolver { ...@@ -26,11 +26,11 @@ class MySolver {
NonlinearSmootherType>; NonlinearSmootherType>;
public: public:
MySolver(Dune::ParameterTree const &parset, int refinements, SolverFactory(Dune::ParameterTree const &parset, int refinements,
double solver_tolerance, GridType const &grid, double solver_tolerance, GridType const &grid,
Dune::BitSetVector<dim> const &ignoreNodes); Dune::BitSetVector<dim> const &ignoreNodes);
~MySolver(); ~SolverFactory();
SolverType *getSolver(); SolverType *getSolver();
......
...@@ -27,11 +27,11 @@ using MatrixType = Dune::BCRSMatrix<SmallMatrix>; ...@@ -27,11 +27,11 @@ using MatrixType = Dune::BCRSMatrix<SmallMatrix>;
using GridType = Dune::ALUGrid<DIM, DIM, Dune::simplex, Dune::nonconforming>; using GridType = Dune::ALUGrid<DIM, DIM, Dune::simplex, Dune::nonconforming>;
template class MySolver< template class SolverFactory<
DIM, MyBlockProblem<ConvexProblem< DIM, MyBlockProblem<ConvexProblem<
Dune::GlobalNonlinearity<MatrixType, VectorType>, MatrixType>>, Dune::GlobalNonlinearity<MatrixType, VectorType>, MatrixType>>,
GridType>; GridType>;
template class MySolver< template class SolverFactory<
DIM, BlockNonlinearTNNMGProblem<ConvexProblem< DIM, BlockNonlinearTNNMGProblem<ConvexProblem<
ZeroNonlinearity<SmallVector, SmallMatrix>, MatrixType>>, ZeroNonlinearity<SmallVector, SmallMatrix>, MatrixType>>,
GridType>; GridType>;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment