Commit 45d2c0e8 authored by David Moxey's avatar David Moxey
Browse files

Fix diffusion solver

parent a9423797
......@@ -85,6 +85,9 @@ int main(int argc, char *argv[])
// Compute lambda in the Helmholtz problem
factors[StdRegions::eFactorLambda] = 1.0/delta_t/epsilon;
// Zero field coefficients for initial guess for linear solver.
Vmath::Zero(field->GetNcoeffs(), field->UpdateCoeffs(), 1);
// Time integrate using backward Euler
for (unsigned int n = 0; n < nSteps; ++n)
{
......
......@@ -135,6 +135,9 @@ void Diffusion::TimeIntegrate()
// Initialise the scheme for actual time integration scheme
u = IntScheme->InitializeScheme(delta_t, fields, 0.0, ode);
// Zero field coefficients for initial guess for linear solver.
Vmath::Zero(field->GetNcoeffs(), field->UpdateCoeffs(), 1);
for (int n = 0; n < nSteps; ++n)
{
fields = IntScheme->TimeIntegrate(n, delta_t, u, ode);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment