Commit 4d62a658 authored by wagnandr's avatar wagnandr
Browse files

Merge branch 'wagnandr/stokes-eg-example' of...

Merge branch 'wagnandr/stokes-eg-example' of https://i10git.cs.fau.de/hyteg/hyteg into wagnandr/stokes-eg-example
parents 841d7b92 12e553e3
Pipeline #39979 failed with stages
in 34 minutes and 14 seconds
......@@ -52,7 +52,7 @@ class P1ToP1DGEDivTOperator final : public Operator< P1Function< real_t >, P1DGE
UpdateType updateType ) const override
{
cg_to_eg_coupling_.apply( src, *dst.getDiscontinuousPart(), level, flag, updateType );
cg_to_cg_coupling_.apply( src, *dst.getConformingPart(), level, flag, Add );
cg_to_cg_coupling_.apply( src, *dst.getConformingPart(), level, flag, updateType );
}
void toMatrix( const std::shared_ptr< SparseMatrixProxy >& mat,
......@@ -263,7 +263,11 @@ class P1DGELaplaceOperator final : public Operator< P1DGEFunction< real_t >, P1D
DoFType flag,
UpdateType updateType ) const override
{
WALBERLA_ABORT( "Not implemented." );
eg_to_cg_coupling_.apply( *src.getDiscontinuousPart(), *dst.getConformingPart(), level, flag, updateType );
cg_to_cg_coupling_.apply( *src.getConformingPart(), *dst.getConformingPart(), level, flag, Add );
cg_to_eg_coupling_.apply( *src.getConformingPart(), *dst.getDiscontinuousPart(), level, flag, updateType );
eg_to_eg_coupling_.apply( *src.getDiscontinuousPart(), *dst.getDiscontinuousPart(), level, flag, Add );
}
void toMatrix( const std::shared_ptr< SparseMatrixProxy >& mat,
......
......@@ -26,6 +26,7 @@
#include "hyteg/composites/P1DGEP0StokesOperator.hpp"
#include "hyteg/dataexport/VTKOutput.hpp"
#include "hyteg/dgfunctionspace/DGBasisLinearLagrange_Example.hpp"
#include "hyteg/dgfunctionspace/DGMassForm_Example.hpp"
#include "hyteg/functions/FunctionTraits.hpp"
#include "hyteg/mesh/MeshInfo.hpp"
#include "hyteg/p1dgefunctionspace/P1DGEOperators.hpp"
......@@ -151,6 +152,8 @@ real_t testStokesHomogeneousDirichlet( const std::string& meshFile, const uint_t
P1DGEMassOperator M( storage, level, level );
dg::DGOperator M_pressure( storage, level, level, std::make_shared< dg::DGMassForm_Example >() );
P1DGEP0StokesFunction< idx_t > numerator( "numerator", storage, level, level );
P1DGEP0StokesOperator K( storage, level, level );
......@@ -225,13 +228,14 @@ real_t testStokesHomogeneousDirichlet( const std::string& meshFile, const uint_t
sol.uvw().interpolate( { u_x_expr, u_y_expr }, level, All );
sol.p().interpolate( p_expr, level, All );
f.uvw().interpolate( { f_x_expr, f_y_expr }, level, All );
f.p().interpolate( g_expr, level, All );
// Why do I need this?
f.uvw().interpolate( { u_x_expr, u_y_expr }, level, DirichletBoundary );
f.p().interpolate( p_expr, level, DirichletBoundary );
M.apply( f.uvw(), rhs.uvw(), level, All, Replace );
rhs.p().interpolate( 0, level, All );
M_pressure.apply( *f.p().getDGFunction(), *rhs.p().getDGFunction(), level, All, Replace );
// TODO: replace by minres
PETScCGSolver< P1DGEP0StokesOperator > solver( storage, level, numerator );
......
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