Beispiel #1
0
bool NoxProblemInterface::computeF(const Epetra_Vector &x, Epetra_Vector &f, FillType flag)
{
  EpetraVector xx(x);  // wrap our structures around core Epetra objects
  EpetraVector rhs(f);

  rhs.zero();
  
  scalar* coeff_vec = new scalar[xx.length()];
  xx.extract(coeff_vec);
  fep->assemble(coeff_vec, NULL, &rhs); // NULL is for the global matrix.
  delete [] coeff_vec;

#ifndef HERMES_COMMON_COMPLEX
  for(unsigned int i = 0; i < rhs.length(); i++)
    f.ReplaceGlobalValue(0, i, rhs.get(i));
#endif

  return true;
}