src/mfemopt/modelproblems.cpp
void ModelHeat::ComputeGradient(const Vector& tdstate, const Vector& state, const Vector& m, const Vector &pert, Vector& o)
{
   MFEM_VERIFY(m.Size() >= GetParameterSize(),"Invalid Vector size " << m.Size() << ", should be (at least) " << GetParameterSize());
   MFEM_VERIFY(pert.Size() >= GetParameterSize(),"Invalid Vector size " << pert.Size() << ", should be (at least) " << GetParameterSize());
   MFEM_VERIFY(o.Size() == tdstate.Size(),"Invalid Vector size " << o.Size() << ", should be " << tdstate.Size());

   /* XXX multiple coeffs */
   mpd->ComputeGradient(tdstate,m,pert,o);
}
/* Callback used by the tangent linear model solver */
Callback used by the tangent linear model solver
Callback used by the tangent linear model solver
void ModelHeat::ComputeGradient(const Vector& tdstate, const Vector& state, const Vector& m, const Vector &pert, Vector& o)
{
   MFEM_VERIFY(m.Size() >= GetParameterSize(),"Invalid Vector size " << m.Size() << ", should be (at least) " << GetParameterSize());
   MFEM_VERIFY(pert.Size() >= GetParameterSize(),"Invalid Vector size " << pert.Size() << ", should be (at least) " << GetParameterSize());
   MFEM_VERIFY(o.Size() == tdstate.Size(),"Invalid Vector size " << o.Size() << ", should be " << tdstate.Size());
   mpd->ComputeGradient(tdstate,m,pert,o);
}
void ModelHeat :: ComputeGradient ( const Vector & tdstate , const Vector & state , const Vector & m , const Vector & pert , Vector & o ) { MFEM_VERIFY ( m . Size ( ) >= GetParameterSize ( ) , " " << m . Size ( ) << " " << GetParameterSize ( ) ) ; MFEM_VERIFY ( pert . Size ( ) >= GetParameterSize ( ) , " " << pert . Size ( ) << " " << GetParameterSize ( ) ) ; MFEM_VERIFY ( o . Size ( ) == tdstate . Size ( ) , " " << o . Size ( ) << " " << tdstate . Size ( ) ) ; mpd -> ComputeGradient ( tdstate , m , pert , o ) ; }
Callback used by the tangent linear model solver
Callback used by the tangent linear model solver
/* XXX multiple coeffs */