From 7cd3fc7a6f468316b323c7e585b61d4202c741bb Mon Sep 17 00:00:00 2001
From: Emilie Marchandise <emilie.marchandise@uclouvain.be>
Date: Fri, 30 Apr 2010 21:11:38 +0000
Subject: [PATCH] Bloodflow OK for bifurcation and windkessel (aorta.lua and
 bifurcation.lua) high order OK for 1D but still bug in exportMsh (hack emi)
 p1 for 1D for bifurcation test case still strange ...

---
 Common/CreateFile.cpp | 3 ++-
 Solver/function.cpp   | 8 +++++++-
 Solver/function.h     | 4 +++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/Common/CreateFile.cpp b/Common/CreateFile.cpp
index 57de2f7509..3f69d2e2d7 100644
--- a/Common/CreateFile.cpp
+++ b/Common/CreateFile.cpp
@@ -397,6 +397,7 @@ void CreateOutputFile(std::string fileName, int format)
 
   case FORMAT_TEX:
     {
+      printf("couc tex format \n");
       if(!FlGui::available()) break;
 
       FILE *fp = fopen(fileName.c_str(), "w");
@@ -428,7 +429,7 @@ void CreateOutputFile(std::string fileName, int format)
 #endif
 
   default:
-    Msg::Error("Unknown output file format");
+    Msg::Error("Unknown output file format %d", format);
     printEndMessage = false;
     break;
   }
diff --git a/Solver/function.cpp b/Solver/function.cpp
index a493fa0a91..6143b8d781 100644
--- a/Solver/function.cpp
+++ b/Solver/function.cpp
@@ -373,7 +373,7 @@ class functionC : public function {
     FILE *tmpMake = fopen("_tmpMake","w");
     fprintf(tmpMake, "include $(DG_BUILD_DIR)/CMakeFiles/dg.dir/flags.make\n"
         "%s : %s\n"
-        "\tg++ -shared -fPIC -o $@ $(CXX_FLAGS) $(CXX_DEFINES) $<\n",
+        "\tg++ -fPIC -shared -o $@ $(CXX_FLAGS) $(CXX_DEFINES) $<\n",
         filename.c_str(), "_tmpSrc.cpp");
     fclose(tmpMake);
     if(system("make -f _tmpMake"))
@@ -548,3 +548,9 @@ functionConstant *function::getTime() {
     _timeFunction = functionConstantNew(0.);
   return _timeFunction;
 }
+functionConstant *function::_dtFunction = NULL;
+functionConstant *function::getDT() {
+  if (! _dtFunction)
+    _dtFunction = functionConstantNew(0.);
+  return _dtFunction;
+}
diff --git a/Solver/function.h b/Solver/function.h
index d1ca9706c3..737c4f9071 100644
--- a/Solver/function.h
+++ b/Solver/function.h
@@ -21,7 +21,8 @@ class functionReplaceCache;
 // An abstract interface to functions 
 // more explanation at the head of this file
 class function {
-  static functionConstant *_timeFunction; 
+  static functionConstant *_timeFunction;
+  static functionConstant *_dtFunction;  
   public :
   class argument {
     //iMap is the id of the dataCacheMap, e.g. on interfaces
@@ -75,6 +76,7 @@ class function {
   static function *getParametricCoordinates();
   static function *getNormals();
   static functionConstant *getTime();
+  static functionConstant *getDT();
 };
 
 // dataCache when the value is a  matrix of double 
-- 
GitLab