Commit 5cccbd55 authored by Santiago Ospina's avatar Santiago Ospina

Fixbug: double writing vertex flux.

Signed-off-by: Santiago Ospina De Los Ríos's avatarSantiago Ospina <santiago.ospina@iup.uni-heidelberg.de>
parent 2bdf3a0d
......@@ -227,7 +227,6 @@ void RichardsSimulation<Traits>::write_data () const
vtkwriter->template addVertexData<GFConductivity>(condgf,"K_0");
vtkwriter->template addVertexData<GFWaterContent>(waterdgf,"theta_w");
vtkwriter->template addVertexData<GFSaturation>(satdgf,"Theta");
vtkwriter->template addVertexData<GFWaterFlux>(fluxdgf,"flux");
vtkwriter->template addVertexData<GFWaterFluxReconstruction>(waterfrgf,"flux (reconstruction)");
} else {
vtkwriter->template addCellData<GFMatricHead>(udgf,"head");
......
......@@ -263,6 +263,9 @@ public:
x_vec.resize(lfsu_cache.size(),0.0);
m_matrix.solve(x_vec,r_vec);
std::cout << "x_vec" << std::endl;
std::cout << x_vec << std::endl;
auto& lfsu = lfsu_cache.localFunctionSpace();
for (unsigned int i = 0; i < lfsu.size(); ++i)
......@@ -417,7 +420,7 @@ public:
// Load residual view into the local residual vector
for (unsigned int i = 0; i < lfsv_skeleton.size(); ++i){
std::cout << i+offset << ": " << rl(lfsv_skeleton,i) << " + " << rn(lfsv_skeleton_n,i) << std::endl;
r_vec[i+offset] += rl(lfsv_skeleton,i);// + rn(lfsv_skeleton_n,i);
r_vec[i+offset] = rl(lfsv_skeleton,i);// + rn(lfsv_skeleton_n,i));
}
auto& lfsu_s = lfsu_s_cache.localFunctionSpace();
......
......@@ -298,7 +298,7 @@ public:
y /= detB;
BTransposed.mtv(y,gradphiv[i]);
}
dg_sign = -1.;
dg_sign = 0.;
} else {
// (we assume Galerkin method lfsu = lfsv)
gradphiv = gradphiu;
......@@ -413,7 +413,7 @@ public:
lfsv_s.finiteElement().localBasis().evaluateFunction(it.position(),phiv_s);
lfsv_n.finiteElement().localBasis().evaluateFunction(it.position(),phiv_n);
// discrete gradient sign.
dg_sign = -1.;
dg_sign = 0.;
} else {
// (we assume Galerkin method lfsu = lfsv)
phiv_s = phiu_s;
......@@ -633,7 +633,7 @@ public:
if constexpr (dimDomainLocalTest == dim-1) {
// (we assume non-Galerkin method lfsu != lfsv)
lfsv_s.finiteElement().localBasis().evaluateFunction(it.position(),phiv_s);
dg_sign = -1.;
dg_sign = 0.;
} else {
// (we assume Galerkin method lfsu = lfsv)
phiv_s = phiu_s;
......
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