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

*** empty log message ***

parent 759fd4cb
No related branches found
No related tags found
No related merge requests found
...@@ -22,10 +22,10 @@ class gmshLinearSystemGmm : public gmshLinearSystem<scalar> { ...@@ -22,10 +22,10 @@ class gmshLinearSystemGmm : public gmshLinearSystem<scalar> {
gmm::row_matrix<gmm::wsvector<scalar> > *_a; gmm::row_matrix<gmm::wsvector<scalar> > *_a;
std::vector<scalar> *_b, *_x; std::vector<scalar> *_b, *_x;
double _prec; double _prec;
int _noisy; int _noisy, _gmres;
int _gmres;
public: public:
gmshLinearSystemGmm() : _a(0), _b(0), _x(0), _prec(1.e-8), _noisy(0), _gmres(0) {} gmshLinearSystemGmm()
: _a(0), _b(0), _x(0), _prec(1.e-8), _noisy(0), _gmres(0) {}
virtual bool isAllocated() const { return _a != 0; } virtual bool isAllocated() const { return _a != 0; }
virtual void allocate(int _nbRows) virtual void allocate(int _nbRows)
{ {
...@@ -75,7 +75,7 @@ class gmshLinearSystemGmm : public gmshLinearSystem<scalar> { ...@@ -75,7 +75,7 @@ class gmshLinearSystemGmm : public gmshLinearSystem<scalar> {
void setGmres(int n){ _gmres = n; } void setGmres(int n){ _gmres = n; }
virtual int systemSolve() virtual int systemSolve()
{ {
// gmm::ilutp_precond<gmm::row_matrix<gmm::rsvector<scalar> > > P(*_a, 10,0.); //gmm::ilutp_precond<gmm::row_matrix<gmm::wsvector<scalar> > > P(*_a, 10, 0.);
gmm::ildltt_precond<gmm::row_matrix<gmm::wsvector<scalar> > > P(*_a, 2, 1.e-10); gmm::ildltt_precond<gmm::row_matrix<gmm::wsvector<scalar> > > P(*_a, 2, 1.e-10);
gmm::iteration iter(_prec); gmm::iteration iter(_prec);
iter.set_noisy(_noisy); iter.set_noisy(_noisy);
......
...@@ -47,9 +47,10 @@ void GMSH_FiniteElementPlugin::getInfos(char *author, char *copyright, ...@@ -47,9 +47,10 @@ void GMSH_FiniteElementPlugin::getInfos(char *author, char *copyright,
strcpy(help_text, strcpy(help_text,
"Plugin(FiniteElement) solves simple PDEs\n" "Plugin(FiniteElement) solves simple PDEs\n"
"using the finite element method. This is only\n" "using the finite element method. This is only\n"
"intended as a demonstration!\n" "intended as a demonstration tool: it is NOT\n"
"intended for general use."
"\n" "\n"
"Plugin(FiniteElement) is creates a new view.\n"); "Plugin(FiniteElement) creates a new view.\n");
} }
int GMSH_FiniteElementPlugin::getNbOptions() const int GMSH_FiniteElementPlugin::getNbOptions() const
...@@ -150,8 +151,7 @@ PView *GMSH_FiniteElementPlugin::execute(PView *v) ...@@ -150,8 +151,7 @@ PView *GMSH_FiniteElementPlugin::execute(PView *v)
} }
else if(equation == "Helmholtz"){ else if(equation == "Helmholtz"){
solver<std::complex<double> > s; solver<std::complex<double> > s;
std::complex<double> k(parameter, 0.1); gmshFunction<std::complex<double> > waveNumber(parameter);
gmshFunction<std::complex<double> > waveNumber(k);
gmshHelmholtzTerm helmholtz(m, &waveNumber, 1); gmshHelmholtzTerm helmholtz(m, &waveNumber, 1);
for(unsigned int i = 0; i < groups[3][volume].size(); i++) for(unsigned int i = 0; i < groups[3][volume].size(); i++)
helmholtz.addToMatrix(*s.myAssembler, groups[3][volume][i]); helmholtz.addToMatrix(*s.myAssembler, groups[3][volume][i]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment