Commit 0baad7ea authored by Nils Kohl's avatar Nils Kohl 🌝
Browse files

DG Poisson works on single macro-cell with hom. Dirichlet BCs. Penalty...

DG Poisson works on single macro-cell with hom. Dirichlet BCs. Penalty parameters can now be set from HyTeG.
parent 947036e0
......@@ -38,15 +38,20 @@ using walberla::real_c;
class DGDiffusionForm_Example : public DGForm
{
public:
DGDiffusionForm_Example()
DGDiffusionForm_Example( real_t _beta_0 )
: callback_Scalar_Variable_Coefficient_2D_g( []( const Point3D& ) { return real_c( 0 ); } )
, callback_Scalar_Variable_Coefficient_3D_g( []( const Point3D& ) { return real_c( 0 ); } )
, sigma_0( 6 )
, beta_0( _beta_0 )
{}
DGDiffusionForm_Example( const std::function< real_t( const Point3D& ) >& _callback_Scalar_Variable_Coefficient_2D_g,
DGDiffusionForm_Example( real_t _beta_0,
const std::function< real_t( const Point3D& ) >& _callback_Scalar_Variable_Coefficient_2D_g,
const std::function< real_t( const Point3D& ) >& _callback_Scalar_Variable_Coefficient_3D_g )
: callback_Scalar_Variable_Coefficient_2D_g( _callback_Scalar_Variable_Coefficient_2D_g )
, callback_Scalar_Variable_Coefficient_3D_g( _callback_Scalar_Variable_Coefficient_3D_g )
, sigma_0( 6 )
, beta_0( _beta_0 )
{}
protected:
......@@ -157,6 +162,9 @@ class DGDiffusionForm_Example : public DGForm
std::function< real_t( const Point3D& ) > callback_Scalar_Variable_Coefficient_2D_g;
std::function< real_t( const Point3D& ) > callback_Scalar_Variable_Coefficient_3D_g;
real_t sigma_0;
real_t beta_0;
};
} // namespace dg
......
......@@ -59,7 +59,7 @@ real_t testOnSingleElementHomDirichlet( uint_t level, uint_t degree )
};
auto basis = std::make_shared< DGBasisLinearLagrange_Example >();
auto laplaceForm = std::make_shared< DGDiffusionForm_Example >( solFunc, solFunc );
auto laplaceForm = std::make_shared< DGDiffusionForm_Example >( 1, solFunc, solFunc );
auto massForm = std::make_shared< DGMassForm_Example >();
DGFunction< real_t > u( "u", storage, level, level, basis, degree );
......@@ -113,7 +113,7 @@ real_t testHomDirichlet( uint_t level, uint_t degree )
};
auto basis = std::make_shared< DGBasisLinearLagrange_Example >();
auto laplaceForm = std::make_shared< DGDiffusionForm_Example >( solFunc, solFunc );
auto laplaceForm = std::make_shared< DGDiffusionForm_Example >( 1, solFunc, solFunc );
auto massForm = std::make_shared< DGMassForm_Example >();
DGFunction< real_t > u( "u", storage, level, level, basis, degree );
......@@ -168,7 +168,7 @@ real_t testDirichlet( uint_t level, uint_t degree )
std::function< real_t( const Point3D& ) > rhsFunc = []( const Point3D& ) { return 0; };
auto basis = std::make_shared< DGBasisLinearLagrange_Example >();
auto laplaceForm = std::make_shared< DGDiffusionForm_Example >( solFunc, solFunc );
auto laplaceForm = std::make_shared< DGDiffusionForm_Example >( 1, solFunc, solFunc );
auto massForm = std::make_shared< DGMassForm_Example >();
DGFunction< real_t > u( "u", storage, level, level, basis, degree );
......@@ -229,7 +229,7 @@ real_t testDirichletAndRhs( uint_t level, uint_t degree )
};
auto basis = std::make_shared< DGBasisLinearLagrange_Example >();
auto laplaceForm = std::make_shared< DGDiffusionForm_Example >( solFunc, solFunc );
auto laplaceForm = std::make_shared< DGDiffusionForm_Example >( 1, solFunc, solFunc );
auto massForm = std::make_shared< DGMassForm_Example >();
DGFunction< real_t > u( "u", storage, level, level, basis, degree );
......
......@@ -66,7 +66,7 @@ real_t testOnSingleElementHomDirichlet( uint_t level, uint_t degree )
};
auto basis = std::make_shared< DGBasisLinearLagrange_Example >();
auto laplaceForm = std::make_shared< DGDiffusionForm_Example >( solFunc, solFunc );
auto laplaceForm = std::make_shared< DGDiffusionForm_Example >( 0.5, solFunc, solFunc );
auto massForm = std::make_shared< DGMassForm_Example >();
DGFunction< real_t > u( "u", storage, level, level, basis, degree );
......
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