Skip to content
Snippets Groups Projects
Commit 504420e7 authored by graeser's avatar graeser Committed by graeser@PCPOOL.MI.FU-BERLIN.DE
Browse files

Moved to dune-solvers. We don't need it in ag-common.

[[Imported from SVN: r2809]]
parent c1d4c370
No related branches found
No related tags found
No related merge requests found
#ifndef CONTACT_COMPUTE_ENERGY_HH
#define CONTACT_COMPUTE_ENERGY_HH
template <class M, class V>
double computeEnergy(const M& mat, const V& x, const V& rhs)
{
V tmp(x.size());
tmp = 0;
mat.umv(x, tmp);
// std::cout << "tmp*x: " << (tmp*x) << " rhs*x: " << (rhs*x) << std::endl;
// exit(0);
return 0.5*(tmp*x) - rhs*x;
}
template <class M, class V>
double computeEnergy(const M& mat, const V& x)
{
V tmp(x.size());
tmp = 0;
mat.umv(x, tmp);
return 0.5*(tmp*x);
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment