Commit edf13df3 authored by Michael Turner's avatar Michael Turner

analytics

parent 4ed95115
......@@ -856,6 +856,7 @@ NekDouble NodeOpti::GetFunctional(NekDouble &minJacNew, bool gradient)
//ASSERTL0(std::isfinite(integral),"inf in integral");
return integral;
//return sqrt(m_grad[0]*m_grad[0] + m_grad[1]*m_grad[1]);
}
}
......
......@@ -74,6 +74,9 @@ public:
template<int DIM> NekDouble GetFunctional(NekDouble &minJacNew,
bool gradient = true);
template<int DIM> void MinEigen(NekDouble &val);
protected:
NodeSharedPtr m_node;
......@@ -82,7 +85,7 @@ protected:
Array<OneD, NekDouble> m_grad;
template<int DIM> int IsIndefinite();
template<int DIM> void MinEigen(NekDouble &val);
NekDouble m_minJac;
ResidualSharedPtr m_res;
......
......@@ -435,7 +435,7 @@ void ProcessVarOpti::Analytics()
NodeSharedPtr node = nodes[4];
// Loop over overintegration orders
const int nPoints = 50;
const int nPoints = 200;
const int overInt = 40;
const NekDouble originX = -1.0;
const NekDouble originY = -1.0;
......@@ -470,6 +470,12 @@ void ProcessVarOpti::Analytics()
// Reconstruct element map
GetElementMap(i, derivUtils);
for(int j = 0; j < m_dataSet.size(); j++)
{
m_dataSet[j]->Evaluate();
m_dataSet[j]->InitialMinJac();
}
// Create NodeOpti object.
NodeOptiSharedPtr nodeOpti = GetNodeOptiFactory().CreateInstance(
m_mesh->m_spaceDim * 11, node, m_nodeElMap.find(node->m_id)->second,
......@@ -479,7 +485,11 @@ void ProcessVarOpti::Analytics()
// Evaluate functional.
nodeOpti->CalcMinJac();
cout << nodeOpti->GetFunctional<2>(minJacNew, false) << " ";
cout << nodeOpti->GetFunctional<2>(minJacNew) << " ";
//NekDouble eigen;
//nodeOpti->GetFunctional<2>(minJacNew);
//nodeOpti->MinEigen<2>(eigen);
//cout << eigen << " ";
}
cout << minJacNew << endl;
......
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