Skip to content
Snippets Groups Projects
Commit e5863a89 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix

parent 658611b2
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@
#include <string>
#include <string.h>
#include <stdlib.h>
#include <fstream>
#include "GmshConfig.h"
#include "GmshDefines.h"
#include "GmshVersion.h"
......@@ -17,8 +18,6 @@
#include "GModel.h"
#include "CreateFile.h"
#include "OS.h"
#include <fstream>
#include <periodical.h>
#if defined(HAVE_FLTK)
#include <FL/Fl.H>
......@@ -33,6 +32,10 @@
#include "PView.h"
#endif
#if defined(HAVE_MESH)
#include "periodical.h"
#endif
int GetGmshMajorVersion(){ return GMSH_MAJOR_VERSION; }
int GetGmshMinorVersion(){ return GMSH_MINOR_VERSION; }
int GetGmshPatchVersion(){ return GMSH_PATCH_VERSION; }
......@@ -472,36 +475,32 @@ void GetOptions(int argc, char *argv[])
else
Msg::Fatal("Missing number of lloyd iterations");
}
#if defined(HAVE_MESH)
else if(!strcmp(argv[i] + 1, "microstructure")) {
i++;
int j;
double number;
double temp;
std::vector<double> coordinates;
if(argv[i]){
std::ifstream file(argv[i++]);
file >> number;
coordinates.clear();
coordinates.resize(3*number);
for(j = 0; j <number; j++){
file >> coordinates[3*j];
file >> coordinates[3*j+1];
file >> coordinates[3*j+2];
file >> temp;
}
voroMetal3D vm1;
vm1.execute(coordinates,0.1);
GModel::current()->load("MicrostructurePolycrystal3D.geo");
voroMetal3D vm2;
vm2.correspondance(0.00001);
}
}
#endif
else if(!strcmp(argv[i] + 1, "nopopup")) {
CTX::instance()->noPopup = 1;
i++;
......
......@@ -544,13 +544,13 @@ void Msg::PrintErrorCounter(const char *title)
#if defined(HAVE_FLTK)
if(FlGui::available()){
std::string red("@C1@.");
FlGui::instance()->addMessage((red + prefix + line).c_str());
FlGui::instance()->addMessage((red + prefix + title).c_str());
FlGui::instance()->addMessage((red + prefix + warn).c_str());
FlGui::instance()->addMessage((red + prefix + err).c_str());
FlGui::instance()->addMessage((red + prefix + help).c_str());
FlGui::instance()->addMessage((red + prefix + line).c_str());
std::string col = _errorCount ? "@C1@." : "@C5@.";
FlGui::instance()->addMessage((col + prefix + line).c_str());
FlGui::instance()->addMessage((col + prefix + title).c_str());
FlGui::instance()->addMessage((col + prefix + warn).c_str());
FlGui::instance()->addMessage((col + prefix + err).c_str());
FlGui::instance()->addMessage((col + prefix + help).c_str());
FlGui::instance()->addMessage((col + prefix + line).c_str());
if(_errorCount) fl_beep();
}
#endif
......@@ -558,7 +558,8 @@ void Msg::PrintErrorCounter(const char *title)
if(CTX::instance()->terminal){
const char *c0 = "", *c1 = "";
if(!streamIsFile(stderr) && streamIsVT100(stderr)){
c0 = "\33[31m"; c1 = "\33[0m"; // red
c0 = _errorCount ? "\33[1m\33[31m" : "\33[35m"; // bold red or magenta
c1 = "\33[0m";
}
fprintf(stderr, "%s%s\n%s\n%s\n%s\n%s\n%s%s\n", c0, (prefix + line).c_str(),
(prefix + title).c_str(), (prefix + warn).c_str(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment