Commit 2cdf1f53 authored by Janick Gerstenberger's avatar Janick Gerstenberger

rename `Algorithm` -> `Scheme` and fix the example

parent f742ff1b
......@@ -10,16 +10,16 @@ add_subdirectory(stencil)
add_subdirectory(test)
set(HEADERS
algorithm.hh
brents.hh
colorfunction.hh
curvature.hh
dataset.hh
eoc.hh
evolution.hh
flagging.hh
interpolation.hh
reconstruction.hh
utility.hh
scheme.hh
velocity.hh
)
......
#ifndef DUNE_VOF_ALGORITHM_HH
#define DUNE_VOF_ALGORITHM_HH
#ifndef DUNE_VOF_SCHEME_HH
#define DUNE_VOF_SCHEME_HH
// C++ includes
#include <utility>
......@@ -8,21 +8,24 @@
#include <dune/common/timer.hh>
// dune-vof includes
#include "test/errors.hh"
#include <dune/vof/dataset/flag.hh>
#include <dune/vof/dataset/reconstruction.hh>
#include <dune/vof/evolution.hh>
#include <dune/vof/flagset.hh>
#include <dune/vof/flagging.hh>
#include <dune/vof/reconstruction.hh>
#include <dune/vof/reconstructionset.hh>
#include <dune/vof/stencil/vertexneighborsstencil.hh>
#include <dune/vof/stencil/vertexneighbors.hh>
#include <dune/vof/velocity.hh>
#include "test/errors.hh"
namespace Dune
{
namespace VoF
{
// Algorithm
// Scheme
// ---------
/**
......@@ -35,7 +38,7 @@ namespace Dune
* \tparam DW data writer type
*/
template< class GV, class PR, class DW >
struct Algorithm
struct Scheme
{
using GridView = GV;
using Problem = PR;
......@@ -45,7 +48,7 @@ namespace Dune
using Flags = FlagSet< GridView >;
using VelocityField = Velocity< Problem, GridView >;
Algorithm ( const GridView &gridView, const Problem& problem, DataWriter& dataWriter, double cfl, double eps, const bool verbose = false )
Scheme ( const GridView &gridView, const Problem& problem, DataWriter& dataWriter, double cfl, double eps, const bool verbose = false )
: gridView_( gridView ), problem_( problem ), dataWriter_( dataWriter ), cfl_( cfl ), eps_( eps ), verbose_( verbose ),
stencils_( gridView ), reconstructions_( gridView ), flags_( gridView )
{}
......@@ -123,4 +126,4 @@ namespace Dune
} // namespace Dune
#endif // #ifndef DUNE_VOF_ALGORITHM_HH
#endif // #ifndef DUNE_VOF_SCHEME_HH
......@@ -24,16 +24,16 @@
// dune-vof includes
#include <dune/vof/colorfunction.hh>
#include <dune/vof/curvatureset.hh>
#include <dune/vof/reconstructionset.hh>
#include <dune/vof/curvature/cartesianheightfunctioncurvature.hh>
#include <dune/vof/evolution.hh>
#include <dune/vof/flagging.hh>
#include <dune/vof/flagset.hh>
#include <dune/vof/interfacegrid/grid.hh>
#include <dune/vof/reconstruction.hh>
#include <dune/vof/stencil/vertexneighborsstencil.hh>
#include <dune/vof/stencil/edgeneighborsstencil.hh>
#include <dune/vof/curvature/heightfunction.hh>
#include <dune/vof/dataset/curvature.hh>
#include <dune/vof/dataset/reconstruction.hh>
#include <dune/vof/dataset/flag.hh>
#include <dune/vof/interfacegrid/grid.hh>
#include <dune/vof/stencil/vertexneighbors.hh>
#include <dune/vof/stencil/edgeneighbors.hh>
// DataOutputParameters
// --------------------
......@@ -210,7 +210,7 @@ try {
auto flagOperator = Dune::VoF::FlagOperator< GridView >( eps );
ColorFunction dfFlags ( gridView );
using CurvatureOperator = Dune::VoF::CartesianHeightFunctionCurvature< GridView, Stencils >;
using CurvatureOperator = Dune::VoF::HeightFunctionCurvature< GridView, Stencils >;
CurvatureOperator curvatureOperator ( stencils );
using CurvatureSet = Dune::VoF::CurvatureSet< GridView >;
CurvatureSet curvatureSet( gridView );
......
......@@ -25,7 +25,7 @@
#include "../dune/vof/test/problems/rotatingcircle.hh"
#include "../dune/vof/test/problems/sflow.hh"
#include "../dune/vof/test/problems/slottedcylinder.hh"
#include <dune/vof/algorithm.hh>
#include <dune/vof/scheme.hh>
#include "binarywriter.hh"
......@@ -122,10 +122,10 @@ try {
using DataOutputType = BinaryWriter< GridView, ColorFunction >;
DataOutputType dataOutput( gridView, uh, parameters, level );
// Run Algorithm
Dune::VoF::Algorithm< GridView, ProblemType, DataOutputType > algorithm( gridView, problem, dataOutput, cfl, eps, verbose );
// Run Scheme
Dune::VoF::Scheme< GridView, ProblemType, DataOutputType > scheme( gridView, problem, dataOutput, cfl, eps, verbose );
double partError = algorithm( uh, start, end, level );
double partError = scheme( uh, start, end, level );
double error = grid.comm().sum( partError );
if ( grid.comm().rank() == 0 )
......
Markdown is supported
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