From 48d45191c2fd99fada4b2d92f0f2e08588749f97 Mon Sep 17 00:00:00 2001
From: Alexander Jaust <alexander.jaust@ipvs.uni-stuttgart.de>
Date: Fri, 26 Jul 2019 14:00:01 +0200
Subject: [PATCH] added functions for analysis

Added functions to write pressure and velocity from solvers directly to csv
---
 appl/coupling-ff-pm/iterative-reversed/main_ff-reversed.cc | 5 +++--
 appl/coupling-ff-pm/iterative-reversed/main_pm-reversed.cc | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/appl/coupling-ff-pm/iterative-reversed/main_ff-reversed.cc b/appl/coupling-ff-pm/iterative-reversed/main_ff-reversed.cc
index 131c0c4..61ce081 100644
--- a/appl/coupling-ff-pm/iterative-reversed/main_ff-reversed.cc
+++ b/appl/coupling-ff-pm/iterative-reversed/main_ff-reversed.cc
@@ -168,7 +168,7 @@ void writeVelocitiesOnInterfaceToFile( const std::string& filename,
   ofs << "x,y,";
   if ( couplingInterface.getDimensions() == 3 )
     ofs << "z,";
-  ofs << "velocity" << "\n";
+  ofs << "velocityY" << "\n";
   for (const auto& element : elements(fvGridGeometry.gridView()))
   {
     fvGeometry.bind(element);
@@ -185,7 +185,8 @@ void writeVelocitiesOnInterfaceToFile( const std::string& filename,
         {
           ofs << pos[i] << ",";
         }
-        const double v = velocityAtInterface(elemFaceVars, scvf)[scvf.directionIndex()];
+        const double v = problem.dirichlet( element, scvf )[1];
+            //velocityAtInterface(elemFaceVars, scvf)[scvf.directionIndex()];
         ofs << v << "\n";
       }
     }
diff --git a/appl/coupling-ff-pm/iterative-reversed/main_pm-reversed.cc b/appl/coupling-ff-pm/iterative-reversed/main_pm-reversed.cc
index 4a957db..1e1881a 100644
--- a/appl/coupling-ff-pm/iterative-reversed/main_pm-reversed.cc
+++ b/appl/coupling-ff-pm/iterative-reversed/main_pm-reversed.cc
@@ -194,7 +194,7 @@
    ofs << "x,y,";
    if ( couplingInterface.getDimensions() == 3 )
      ofs << "z,";
-   ofs << "velocity" << "\n";
+   ofs << "velocityY" << "\n";
    for (const auto& element : elements(fvGridGeometry.gridView()))
    {
      fvGeometry.bind(element);
-- 
GitLab