Commit 71fa200c authored by Santiago Ospina's avatar Santiago Ospina

Fixed warning and compiler error in flux reconstruction

Signed-off-by: Santiago Ospina De Los Ríos's avatarSantiago Ospina <santiago.ospina@iup.uni-heidelberg.de>
parent e05a4b16
......@@ -218,7 +218,7 @@ adding an empty line, make text **bold** or ``monospaced``.
<parameter name="fluxReconstruction">
<definition> Apply the flux reconstruction method to the solved matric
head to obtain conservative gradients for each element. </definition>
head and obtain conservative gradients. </definition>
<suggestion> true </suggestion>
<values> true, false </values>
</parameter>
......
......@@ -123,7 +123,7 @@ public:
*/
std::size_t size(GeometryType geometry_type) const
{
return (geometry_type.dim() == d) ? _fe.size(): 0;
return (geometry_type.dim() == dim) ? _fe.size(): 0;
}
/*-----------------------------------------------------------------------*//**
......
......@@ -13,6 +13,16 @@
namespace Dune{
namespace Dorie{
/**
* @brief Helper for the raviart thomas flux reconstrucion.
* @details This helper exports a bool that says whether the flux
* reconstruction mtehod is available for the convination of the
* used template parameters.
*
* @tparam GO Grid operator type.
* @tparam gt Geometry type.
* @tparam order Order of the flux reconstruction.
*/
template<class GO, Dune::GeometryType::BasicType gt, unsigned int order>
struct RaviartThomasFluxReconstructionHelper
{
......
......@@ -88,6 +88,13 @@ RichardsSimulation<Traits>::RichardsSimulation (
if(verbose>1 && helper.rank()==0)
std::cout << "::: setup time " << std::setw(12) << std::setprecision(4) << std::scientific << timer.elapsed() << std::endl;
bool fluxrc = inifile.get<bool>("numerics.fluxReconstruction");
if (fluxrc and not enable_fluxrc)
std::cout << "Warning: You set flux reconstruction but it is not "
<< "available for this configuration. Kewyord will be "
<< "ignoderd."
<< std::endl;
}
template<typename Traits>
......@@ -240,7 +247,6 @@ void RichardsSimulation<Traits>::write_data () const
{
if (vtkwriter)
{
bool fluxrc = inifile.get<bool>("numerics.fluxReconstruction");
update_adapters();
if (inifile.get<bool>("output.vertexData")) {
......@@ -250,7 +256,7 @@ void RichardsSimulation<Traits>::write_data () const
vtkwriter->template addVertexData<GFWaterContent>(waterdgf,"theta_w");
vtkwriter->template addVertexData<GFSaturation>(satdgf,"Theta");
if constexpr (enable_fluxrc)
if (fluxrc)
if (inifile.get<bool>("numerics.fluxReconstruction"))
vtkwriter->template addVertexData<GFWaterFluxReconstruction>(waterfrgf,"flux RT" + std::to_string(flux_order));
} else {
vtkwriter->template addCellData<GFMatricHead>(udgf,"head");
......@@ -259,7 +265,7 @@ void RichardsSimulation<Traits>::write_data () const
vtkwriter->template addCellData<GFWaterContent>(waterdgf,"theta_w");
vtkwriter->template addCellData<GFSaturation>(satdgf,"Theta");
if constexpr (enable_fluxrc)
if (fluxrc)
if (inifile.get<bool>("numerics.fluxReconstruction"))
vtkwriter->template addCellData<GFWaterFluxReconstruction>(waterfrgf,"flux RT" + std::to_string(flux_order));
}
......
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