complex_harmonic.cc File Reference
#include "generic.h"
#include "meshes/one_d_mesh.h"

Classes

class  ComplexLess< T >
 
class  ComplexHarmonicEquations
 
class  QComplexHarmonicElement< NNODE_1D >
 
class  ComplexHarmonicProblem< ELEMENT, EIGEN_SOLVER >
 1D ComplexHarmonic problem in unit interval. More...
 

Namespaces

 EigenproblemShift
 Namespace for the shift applied to the eigenproblem.
 

Functions

int main (int argc, char **argv)
 Driver for 1D Poisson problem. More...
 

Variables

double EigenproblemShift::Mu = 6.5
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

Driver for 1D Poisson problem.

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////

528 {
529 //Want to test Trilinos if we have it, so we must initialise MPI
530 //if we have compiled with it
531 #ifdef OOMPH_HAS_MPI
532  MPI_Helpers::init(argc,argv);
533 #endif
534 
535  // Set up the problem:
536  unsigned n_element=100; //Number of elements
537 
538  clock_t t_start1 = clock();
539  //Solve with ARPACK
540  {
542  problem(n_element);
543 
544  std::cout << "Matrix size " << problem.ndof() << std::endl;
545 
546  problem.solve(1);
547  }
548  clock_t t_end1 = clock();
549 
550  clock_t t_start2 = clock();
551  //Solve with LAPACK_QZ
552  {
554  problem(n_element);
555 
556  problem.solve(2);
557  }
558  clock_t t_end2 = clock();
559 
560 #ifdef OOMPH_HAS_TRILINOS
561  clock_t t_start3 = clock();
562 //Solve with Anasazi
563  {
565  problem.solve(3);
566  }
567  clock_t t_end3 = clock();
568 #endif
569 
570  std::cout << "ARPACK TIME: " << (double)(t_end1 - t_start1)/CLOCKS_PER_SEC
571  << std::endl;
572 
573  std::cout << "LAPACK TIME: " << (double)(t_end2 - t_start2)/CLOCKS_PER_SEC
574  << std::endl;
575 
576 #ifdef OOMPH_HAS_TRILINOS
577  std::cout << "ANASAZI TIME: " << (double)(t_end3 - t_start3)/CLOCKS_PER_SEC
578  << std::endl;
579 #endif
580 
581 #ifdef OOMPH_HAS_MPI
582  MPI_Helpers::finalize();
583 #endif
584 
585 } // end of main
1D ComplexHarmonic problem in unit interval.
Definition: complex_harmonic.cc:350
Class for the Anasazi eigensolver.
Definition: trilinos_eigen_solver.h:571
Class for the ARPACK eigensolver.
Definition: eigen_solver.h:104
Class for the LAPACK eigensolver.
Definition: eigen_solver.h:224
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References problem.