From 9b0bbff5c1bc08e69ba039c1f56cd8b62647f04b Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sun, 8 Feb 2009 22:49:21 +0000
Subject: [PATCH] *** empty log message ***

---
 Plugin/FiniteElement.cpp | 2 ++
 Post/PView.cpp           | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Plugin/FiniteElement.cpp b/Plugin/FiniteElement.cpp
index 268be47708..f1cdf4ebd1 100644
--- a/Plugin/FiniteElement.cpp
+++ b/Plugin/FiniteElement.cpp
@@ -139,6 +139,7 @@ PView *GMSH_FiniteElementPlugin::execute(PView *v)
 
   if(equation == "Laplace"){
     solver<double> s;
+    if(!s.myAssembler->sizeOfR()) return 0;
     gmshFunction<double> diffusivity(parameter);
     gmshLaplaceTerm laplace(m, &diffusivity, 1);
     for(unsigned int i = 0; i < groups[3][volume].size(); i++)
@@ -151,6 +152,7 @@ PView *GMSH_FiniteElementPlugin::execute(PView *v)
   }
   else if(equation == "Helmholtz"){
     solver<std::complex<double> > s;
+    if(!s.myAssembler->sizeOfR()) return 0;
     gmshFunction<std::complex<double> > waveNumber(parameter);
     gmshHelmholtzTerm helmholtz(m, &waveNumber, 1);
     for(unsigned int i = 0; i < groups[3][volume].size(); i++)
diff --git a/Post/PView.cpp b/Post/PView.cpp
index ed95d4e4da..cf7194a5ac 100644
--- a/Post/PView.cpp
+++ b/Post/PView.cpp
@@ -115,7 +115,7 @@ void PView::addStep(GModel *model, std::map<int, std::vector<double> > &data,
 {
   PViewDataGModel *d = dynamic_cast<PViewDataGModel*>(_data);
   if(d) d->addData(model, data, d->getNumTimeSteps(), time, 1);
-  else Msg::Error("Cannot only  step data to model-based datasets");
+  else Msg::Error("Can only add step data to model-based datasets");
 }
 
 PView::~PView()
-- 
GitLab