Ticket #50687: patch-nglib-ng_vol.cpp.diff

File patch-nglib-ng_vol.cpp.diff, 1.1 KB (added by mbrethen, 9 years ago)

Patch is required for setting a target element size using ng_vol

  • nglib/ng_vol.cpp

    old new  
     1/*
     2  original from  Joachim Schoeberl
     3  ..../netgen-4.9.13/nglib/ng_vol.cpp
     4  License: LGPL
     5*/
    16#include <iostream>
    27#include <fstream>
     8// added by wittig 2.dec 2013
     9#include <mystdlib.h>
    310
    411using namespace std;
    512
     
    1118{
    1219  using namespace nglib;
    1320
    14   cout << "Netgen Testing" << endl;
     21  // changed by wittig 2.dec 2013
     22  //cout << "Netgen Testing" << endl;
     23  cout << "Netgen tet-mesher" << endl;
    1524
    1625  if (argc < 2)
    1726    {
     
    6473  mp.maxh = 1e6;
    6574  mp.fineness = 1;
    6675  mp.second_order = 0;
     76  // added by wittig 2.dec 2013
     77  if (argc == 3) mp.maxh = atof(argv[2]);
    6778
    6879  cout << "start meshing" << endl;
    6980  Ng_GenerateVolumeMesh (mesh, &mp);
    7081  cout << "meshing done" << endl;
    7182
    7283  // volume mesh output
     84  // deactivated by wittig 2.dec 2013
     85  /*
    7386  np = Ng_GetNP(mesh);
    7487  cout << "Points: " << np << endl;
    7588
     
    87100      cout << i << ": " << tet[0] << " " << tet[1]
    88101           << " " << tet[2] << " " << tet[3] << endl;
    89102    }
     103  */
    90104
    91105  Ng_SaveMesh(mesh,"test.vol");
    92106