~gggears/gggears/trunk

« back to all changes in this revision

Viewing changes to fem/gggears_femsolver.cc

  • Committer: logari81
  • Date: 2014-02-05 22:38:16 UTC
  • Revision ID: svn-v4:433e8906-c453-4489-8f44-c7b8bebe3772:trunk:96
Fix compilation errors

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#include "gggears_femsolver.h"
28
28
#include <sstream>
 
29
#if GETFEM_HAVE_MUPARSER_MUPARSER_H
 
30
#include <muParser/muParser.h>
 
31
#elif GETFEM_HAVE_MUPARSER_H
29
32
#include <muParser.h>
 
33
#endif
30
34
#include <getfem/getfem_Coulomb_friction.h>
31
35
#include <getfem/getfem_model_solvers.h>
32
36
#include <getfem/getfem_export.h>
342
346
 
343
347
  size_type disp_dofs = 0;
344
348
  for (size_type i = 0; i < bodies.size(); i++) {
345
 
    cout << mfus[i].nb_dof() << " dofs in " << bodies[i].name << endl;
 
349
    std::cout << mfus[i].nb_dof() << " dofs in " << bodies[i].name << std::endl;
346
350
    disp_dofs += mfus[i].nb_dof();
347
351
  }
348
 
  cout << md.nb_dof() - disp_dofs << " dofs in multiplier variables" << endl;
349
 
  cout << "Total number of dofs: " << md.nb_dof() << endl;
 
352
  std::cout << md.nb_dof() - disp_dofs << " dofs in multiplier variables" << std::endl;
 
353
  std::cout << "Total number of dofs: " << md.nb_dof() << std::endl;
350
354
 
351
355
  gmm::iteration iter(1e-6, 1, 40000);
352
356
  getfem::default_newton_line_search ls;
415
419
  if (itr != end && ++itr != end)
416
420
    input_filename = *itr;
417
421
  else {
418
 
    cout << "Please specify an input filename using the '-i' command line option" << endl;
 
422
    std::cout << "Please specify an input filename using the '-i' command line option" << std::endl;
419
423
    return 1;
420
424
  }
421
425
  key = "-o";
430
434
  fem_model model;
431
435
  if (model.import_from_file(input_filename) == 0)
432
436
    if (model.build() == 0) {
433
 
      cout << "model successfully built" << endl;
 
437
      std::cout << "model successfully built" << std::endl;
434
438
      if (model.solve() == 0) {
435
 
        cout << "model successfully solved" << endl;
 
439
        std::cout << "model successfully solved" << std::endl;
436
440
        if (model.export_results(output_filename) == 0)
437
 
          cout << "model results successfully saved" << endl;
 
441
          std::cout << "model results successfully saved" << std::endl;
438
442
      }
439
443
    }
440
444
//  try {