Commit ba873ef2 authored by Santiago Ospina's avatar Santiago Ospina

removed static bools of output and adaptativity

parent d7ce191d
......@@ -43,19 +43,19 @@ using Sim = Dune::Dorie::RichardsSimulation<Traits>;
template<int dim, int order>
using Simplex = Dune::Dorie::RichardsSimulationTraits<Dune::Dorie::BaseTraits<Dune::UGGrid<dim>,
Dune::GeometryType::BasicType::simplex,true,false>,order>;
Dune::GeometryType::BasicType::simplex>,order>;
template<int dim, int order>
using SimplexAdaptive = Dune::Dorie::RichardsSimulationTraits<Dune::Dorie::BaseTraits<Dune::UGGrid<dim>,
Dune::GeometryType::BasicType::simplex,true,true>,order>;
Dune::GeometryType::BasicType::simplex>,order>;
template<int dim, int order>
using Cube = Dune::Dorie::RichardsSimulationTraits<Dune::Dorie::BaseTraits<Dune::YaspGrid<dim>,
Dune::GeometryType::BasicType::cube,true,false>,order>;
Dune::GeometryType::BasicType::cube>,order>;
template<int dim, int order>
using CubeAdaptive = Dune::Dorie::RichardsSimulationTraits<Dune::Dorie::BaseTraits<Dune::UGGrid<dim>,
Dune::GeometryType::BasicType::cube,true,true>,order>;
Dune::GeometryType::BasicType::cube>,order>;
/// Main Program Function: Initialize parameter file reader, build grid and call Richards Solver.
/** As simplex and rectangular grids demand different FiniteElementMaps, the program calls different functions for these tasks.
......
......@@ -8,9 +8,8 @@
namespace Dune{
namespace Dorie{
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::cube,true,true>,1>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::simplex,true,true>,1>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::simplex,true,false>,1>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::cube>,1>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::simplex>,1>>;
} // namespace Dorie
} // namespace Dune
\ No newline at end of file
......@@ -8,9 +8,8 @@
namespace Dune{
namespace Dorie{
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::cube,true,true>,2>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::simplex,true,true>,2>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::simplex,true,false>,2>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::cube>,2>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::simplex>,2>>;
} // namespace Dorie
} // namespace Dune
\ No newline at end of file
......@@ -8,9 +8,8 @@
namespace Dune{
namespace Dorie{
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::cube,true,true>,3>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::simplex,true,true>,3>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::simplex,true,false>,3>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::cube>,3>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<2>,Geo::simplex>,3>>;
} // namespace Dorie
} // namespace Dune
\ No newline at end of file
......@@ -8,9 +8,8 @@
namespace Dune{
namespace Dorie{
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::cube,true,true>,1>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::simplex,true,true>,1>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::simplex,true,false>,1>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::cube>,1>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::simplex>,1>>;
} // namespace Dorie
} // namespace Dune
\ No newline at end of file
......@@ -8,9 +8,8 @@
namespace Dune{
namespace Dorie{
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::cube,true,true>,2>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::simplex,true,true>,2>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::simplex,true,false>,2>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::cube>,2>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::simplex>,2>>;
} // namespace Dorie
} // namespace Dune
......@@ -8,9 +8,8 @@
namespace Dune{
namespace Dorie{
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::cube,true,true>,3>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::simplex,true,true>,3>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::simplex,true,false>,3>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::cube>,3>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<UGGrid<3>,Geo::simplex>,3>>;
} // namespace Dorie
} // namespace Dune
\ No newline at end of file
......@@ -8,7 +8,7 @@
namespace Dune{
namespace Dorie{
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<YaspGrid<2>,Geo::cube,true,false>,1>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<YaspGrid<2>,Geo::cube>,1>>;
} // namespace Dorie
} // namespace Dune
\ No newline at end of file
......@@ -8,7 +8,7 @@
namespace Dune{
namespace Dorie{
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<YaspGrid<2>,Geo::cube,true,false>,2>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<YaspGrid<2>,Geo::cube>,2>>;
} // namespace Dorie
} // namespace Dune
\ No newline at end of file
......@@ -8,7 +8,7 @@
namespace Dune{
namespace Dorie{
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<YaspGrid<2>,Geo::cube,true,false>,3>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<YaspGrid<2>,Geo::cube>,3>>;
} // namespace Dorie
} // namespace Dune
\ No newline at end of file
......@@ -8,7 +8,7 @@
namespace Dune{
namespace Dorie{
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<YaspGrid<3>,Geo::cube,true,false>,1>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<YaspGrid<3>,Geo::cube>,1>>;
} // namespace Dorie
} // namespace Dune
\ No newline at end of file
......@@ -8,7 +8,7 @@
namespace Dune{
namespace Dorie{
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<YaspGrid<3>,Geo::cube,true,false>,2>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<YaspGrid<3>,Geo::cube>,2>>;
} // namespace Dorie
} // namespace Dune
\ No newline at end of file
......@@ -8,7 +8,7 @@
namespace Dune{
namespace Dorie{
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<YaspGrid<3>,Geo::cube,true,false>,3>>;
template class RichardsSimulation<RichardsSimulationTraits<BaseTraits<YaspGrid<3>,Geo::cube>,3>>;
} // namespace Dorie
} // namespace Dune
\ No newline at end of file
This diff is collapsed.
......@@ -136,7 +136,6 @@ template<typename Traits, typename GFS, typename Param, typename U>
struct OutputWriterFactory
{
private:
static constexpr bool enabled = Traits::write_output;
using OWB = OutputWriterBase<Traits>;
......@@ -163,17 +162,7 @@ public:
u(_u)
{ }
/// Create a dummy OutputWriter
template<bool active = enabled>
std::enable_if_t<!active,std::unique_ptr<OWB>> create ()
{
return std::make_unique<OWB>();
}
/// Create a true OutputWriter
template<bool active = enabled>
std::enable_if_t<active,std::unique_ptr<OWB>> create ()
std::unique_ptr<OWB> create ()
{
std::unique_ptr<OWB> p;
p = std::make_unique<OutputWriter<Traits,GFS,Param,U>>(inifile,gv,gfs,param,u);
......
This diff is collapsed.
This diff is collapsed.
......@@ -195,12 +195,10 @@ public:
};
/// Traits struct defining basic types based on grid an geometry
template<class GridType, Dune::GeometryType::BasicType GeometryType, bool output, bool adaptivity>
template<class GridType, Dune::GeometryType::BasicType GeometryType>
struct BaseTraits
{
static constexpr int dim = GridType::dimension;
static constexpr bool write_output = output;
static constexpr bool adapt_grid = adaptivity;
static constexpr Dune::GeometryType::BasicType GridGeometryType = GeometryType;
using RF = double;
......
......@@ -17,19 +17,19 @@
template<int dim, int order>
using Simplex = Dune::Dorie::RichardsSimulationTraits<Dune::Dorie::BaseTraits<Dune::UGGrid<dim>,
Dune::GeometryType::BasicType::simplex,true,false>,order>;
Dune::GeometryType::BasicType::simplex>,order>;
template<int dim, int order>
using SimplexAdaptive = Dune::Dorie::RichardsSimulationTraits<Dune::Dorie::BaseTraits<Dune::UGGrid<dim>,
Dune::GeometryType::BasicType::simplex,true,true>,order>;
Dune::GeometryType::BasicType::simplex>,order>;
template<int dim, int order>
using Cube = Dune::Dorie::RichardsSimulationTraits<Dune::Dorie::BaseTraits<Dune::YaspGrid<dim>,
Dune::GeometryType::BasicType::cube,true,false>,order>;
Dune::GeometryType::BasicType::cube>,order>;
template<int dim, int order>
using CubeAdaptive = Dune::Dorie::RichardsSimulationTraits<Dune::Dorie::BaseTraits<Dune::UGGrid<dim>,
Dune::GeometryType::BasicType::cube,true,true>,order>;
Dune::GeometryType::BasicType::cube>,order>;
int main (int argc, char** argv)
......
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