Commit 7c444c48 authored by Pavel Burovskiy's avatar Pavel Burovskiy
Browse files

cleaning up calls to Equation

git-svn-id: https://gforge.sci.utah.edu/svn/nektar/trunk@3623 305cdda6-5ce1-45b3-a98d-dfc68c8b3305
parent 2a2170c3
......@@ -100,13 +100,13 @@ int main(int argc, char *argv[])
LibUtilities::EquationSharedPtr exac_w = vSession->GetFunction("ExactSolution", 2);
ffunc_u->Evaluate3Array(xc0,xc1,xc2,Exp_u->UpdatePhys());
ffunc_v->Evaluate3Array(xc0,xc1,xc2,Exp_v->UpdatePhys());
ffunc_w->Evaluate3Array(xc0,xc1,xc2,Exp_w->UpdatePhys());
ffunc_u->Evaluate(xc0,xc1,xc2,Exp_u->UpdatePhys());
ffunc_v->Evaluate(xc0,xc1,xc2,Exp_v->UpdatePhys());
ffunc_w->Evaluate(xc0,xc1,xc2,Exp_w->UpdatePhys());
exac_u->Evaluate3Array(xc0,xc1,xc2,dudx);
exac_v->Evaluate3Array(xc0,xc1,xc2,dvdy);
exac_w->Evaluate3Array(xc0,xc1,xc2,dwdz);
exac_u->Evaluate(xc0,xc1,xc2,dudx);
exac_v->Evaluate(xc0,xc1,xc2,dvdy);
exac_w->Evaluate(xc0,xc1,xc2,dwdz);
//----------------------------------------------
......
......@@ -110,12 +110,12 @@ int main(int argc, char *argv[])
LibUtilities::EquationSharedPtr exac_w = vSession->GetFunction("ExactSolution", 2);
ffunc_u->Evaluate3Array(xc0,xc1,xc2,Exp_u->UpdatePhys());
ffunc_v->Evaluate3Array(xc0,xc1,xc2,Exp_v->UpdatePhys());
ffunc_w->Evaluate3Array(xc0,xc1,xc2,Exp_w->UpdatePhys());
exac_u->Evaluate3Array(xc0,xc1,xc2,dudx);
exac_v->Evaluate3Array(xc0,xc1,xc2,dvdy);
exac_w->Evaluate3Array(xc0,xc1,xc2,dwdz);
ffunc_u->Evaluate(xc0,xc1,xc2,Exp_u->UpdatePhys());
ffunc_v->Evaluate(xc0,xc1,xc2,Exp_v->UpdatePhys());
ffunc_w->Evaluate(xc0,xc1,xc2,Exp_w->UpdatePhys());
exac_u->Evaluate(xc0,xc1,xc2,dudx);
exac_v->Evaluate(xc0,xc1,xc2,dvdy);
exac_w->Evaluate(xc0,xc1,xc2,dwdz);
//----------------------------------------------
......
......@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
SpatialDomains::ConstForcingFunctionShPtr u0SolutionEquation
= boundaryConds.GetExactSolution(boundaryConds.GetVariable(0));
u0SolutionEquation->Evaluate2Array(x1,x2, u0);
u0SolutionEquation->Evaluate(x1,x2, u0);
for(int i = 0; i < nTotQuadPoints; ++i)
{
v1[i] = 1.0;//2.0*M_PI*x2[i];
......@@ -163,7 +163,7 @@ int main(int argc, char *argv[])
SpatialDomains::ConstForcingFunctionShPtr exactSolutionEquation
= boundaryConds.GetExactSolution(boundaryConds.GetVariable(0));
exactSolutionEquation->Evaluate2Array(x1,x2, exactSolution);
exactSolutionEquation->Evaluate(x1,x2, exactSolution);
MultiRegions::DisContField2DSharedPtr exactSolutionExp =
MemoryManager<MultiRegions::DisContField2D>::AllocateSharedPtr(*u);
exactSolutionExp->SetPhys(exactSolution);
......
......@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
SpatialDomains::ConstForcingFunctionShPtr ffunc
= bcs.GetForcingFunction(bcs.GetVariable(0));
ffunc->Evaluate3Array(xc0,xc1,xc2, fce);
ffunc->Evaluate(xc0,xc1,xc2, fce);
//----------------------------------------------
......@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
{
//----------------------------------------------
// evaluate exact solution
ex_sol->Evaluate3Array(xc0,xc1,xc2, fce);
ex_sol->Evaluate(xc0,xc1,xc2, fce);
//----------------------------------------------
......
......@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
fce = Array<OneD,NekDouble>(nq);
SpatialDomains::ConstForcingFunctionShPtr ffunc = bcs.GetForcingFunction(bcs.GetVariable(0));
ffunc->Evaluate3Array(xc0,xc1,xc2,fce);
ffunc->Evaluate(xc0,xc1,xc2,fce);
//----------------------------------------------
//----------------------------------------------
......@@ -111,7 +111,7 @@ int main(int argc, char *argv[])
{
//----------------------------------------------
// evaluate exact solution
ex_sol->Evaluate3Array(xc0,xc1,xc2,fce);
ex_sol->Evaluate(xc0,xc1,xc2,fce);
//----------------------------------------------
......
......@@ -40,7 +40,7 @@ int main(int argc, char *argv[])
LibUtilities::BasisKey bkey = graph2D.GetBasisKey(expansions[0],0);
cout << "Solving 2D Laplace:" << endl;
cout << " Expansion : " << SpatialDomains::kExpansionTypeStr[expansions[0]->m_ExpansionType] << endl;
cout << " No. modes : " << (int) expansions[0]->m_NumModesEqn.Evaluate0() << endl;
cout << " No. modes : " << (int) expansions[0]->m_NumModesEqn.Evaluate() << endl;
cout << endl;
//----------------------------------------------
......@@ -80,7 +80,7 @@ int main(int argc, char *argv[])
SpatialDomains::ConstForcingFunctionShPtr ffunc
= bcs.GetForcingFunction(bcs.GetVariable(0));
ffunc->Evaluate3Array(xc0,xc1,xc2,fce);
ffunc->Evaluate(xc0,xc1,xc2,fce);
//----------------------------------------------
//----------------------------------------------
......@@ -112,7 +112,7 @@ int main(int argc, char *argv[])
SpatialDomains::ConstUserDefinedEqnShPtr cfunc = bcs.GetUserDefinedEqn(lapcoeffstr[i]);
cfunc->Evaluate3Array(xc0,xc1,xc2,lapcoeff[i]);
cfunc->Evaluate(xc0,xc1,xc2,lapcoeff[i]);
}
}
//----------------------------------------------
......@@ -155,7 +155,7 @@ int main(int argc, char *argv[])
{
//----------------------------------------------
// evaluate exact solution
ex_sol->Evaluate3Array(xc0,xc1,xc2,fce);
ex_sol->Evaluate(xc0,xc1,xc2,fce);
//----------------------------------------------
//--------------------------------------------
......
......@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
fce = Array<OneD,NekDouble>(nq);
LibUtilities::EquationSharedPtr ffunc = vSession->GetFunction("Forcing",0);
ffunc->Evaluate3Array(xc0,xc1,xc2,fce);
ffunc->Evaluate(xc0,xc1,xc2,fce);
//----------------------------------------------
//---------------------------------------------
......
......@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
fce = Array<OneD,NekDouble>(nq);
LibUtilities::EquationSharedPtr ffunc = vSession->GetFunction("Forcing",0);
ffunc->Evaluate3Array(xc0,xc1,xc2,fce);
ffunc->Evaluate(xc0,xc1,xc2,fce);
//----------------------------------------------
//----------------------------------------------
......@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
{
//----------------------------------------------
// evaluate exact solution
ex_sol->Evaluate3Array(xc0,xc1,xc2,fce);
ex_sol->Evaluate(xc0,xc1,xc2,fce);
//----------------------------------------------
//--------------------------------------------
......
......@@ -245,7 +245,7 @@ int main(int argc, char *argv[])
SpatialDomains::ConstForcingFunctionShPtr ffunc
= bcs.GetForcingFunction(bcs.GetVariable(0));
ffunc->Evaluate3Array(xc0,xc1,xc2,fce);
ffunc->Evaluate(xc0,xc1,xc2,fce);
//----------------------------------------------
// Setup expansion containing the forcing function
......@@ -272,7 +272,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// evaluate exact solution
sol = Array<OneD,NekDouble>(nq);
ex_sol->Evaluate3Array(xc0,xc1,xc2,sol);
ex_sol->Evaluate(xc0,xc1,xc2,sol);
//----------------------------------------------
//--------------------------------------------
......@@ -336,7 +336,7 @@ int main(int argc, char *argv[])
// evaluate exact solution
Array<OneD,NekDouble> ErrorSol(ErrorNq);
ex_sol->Evaluate3Array(ErrorXc0,ErrorXc1,ErrorXc2,ErrorSol);
ex_sol->Evaluate(ErrorXc0,ErrorXc1,ErrorXc2,ErrorSol);
// calcualte spectral/hp approximation on the quad points of this new
// expansion basis
......
......@@ -204,7 +204,7 @@ int main(int argc, char *argv[])
fce = Array<OneD,NekDouble>(nq);
SpatialDomains::ConstForcingFunctionShPtr ffunc
= bcs.GetForcingFunction(bcs.GetVariable(0));
ffunc->Evaluate3Array(xc0,xc1,xc2,fce);
ffunc->Evaluate(xc0,xc1,xc2,fce);
//----------------------------------------------
//----------------------------------------------
......@@ -232,7 +232,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// evaluate exact solution
sol = Array<OneD,NekDouble>(nq);
ex_sol->Evaluate3Array(xc0,xc1,xc2,sol);
ex_sol->Evaluate(xc0,xc1,xc2,sol);
//----------------------------------------------
//--------------------------------------------
......@@ -312,7 +312,7 @@ int main(int argc, char *argv[])
// evaluate exact solution
Array<OneD,NekDouble> ErrorSol(ErrorNq);
ex_sol->Evaluate3Array(ErrorXc0,ErrorXc1,ErrorXc2,ErrorSol);
ex_sol->Evaluate(ErrorXc0,ErrorXc1,ErrorXc2,ErrorSol);
// calcualte spectral/hp approximation on the quad points of this new
// expansion basis
......
......@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
fce = Array<OneD,NekDouble>(nq);
LibUtilities::EquationSharedPtr ffunc = vSession->GetFunction("Forcing", 0);
ffunc->Evaluate3Array(xc0, xc1, xc2, fce);
ffunc->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......@@ -126,7 +126,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// evaluate exact solution
ex_sol->Evaluate3Array(xc0, xc1, xc2, fce);
ex_sol->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......
......@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
LibUtilities::EquationSharedPtr ffunc
= vSession->GetFunction("Forcing", 0);
ffunc->Evaluate3Array(xc0, xc1, xc2, fce);
ffunc->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......@@ -156,7 +156,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// evaluate exact solution
ex_sol->Evaluate3Array(xc0, xc1, xc2, fce);
ex_sol->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......
......@@ -101,7 +101,7 @@ int main(int argc, char *argv[])
fce = Array<OneD,NekDouble>(nq);
LibUtilities::EquationSharedPtr ffunc = vSession->GetFunction("Forcing", 0);
ffunc->Evaluate3Array(xc0, xc1, xc2, fce);
ffunc->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......@@ -152,7 +152,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// evaluate exact solution
ex_sol->Evaluate3Array(xc0, xc1, xc2, fce);
ex_sol->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......
......@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
LibUtilities::EquationSharedPtr ffunc
= vSession->GetFunction("Forcing", 0);
ffunc->Evaluate3Array(xc0, xc1, xc2, fce);
ffunc->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......@@ -157,7 +157,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// evaluate exact solution
ex_sol->Evaluate3Array(xc0, xc1, xc2, fce);
ex_sol->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......
......@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
LibUtilities::EquationSharedPtr ffunc
= vSession->GetFunction("Forcing", 0);
ffunc->Evaluate3Array(xc0,xc1,xc2, fce);
ffunc->Evaluate(xc0,xc1,xc2, fce);
//----------------------------------------------
......@@ -137,7 +137,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// evaluate exact solution
ex_sol->Evaluate3Array(xc0,xc1,xc2, fce);
ex_sol->Evaluate(xc0,xc1,xc2, fce);
Fce->SetPhys(fce);
//----------------------------------------------
......
......@@ -99,14 +99,14 @@ int main(int argc, char *argv[])
{
Array<OneD, NekDouble> d00(nq,0.0);
LibUtilities::EquationSharedPtr d00func = vSession->GetFunction("d00",0);
d00func->Evaluate3Array(xc0, xc1, xc2, d00);
d00func->Evaluate(xc0, xc1, xc2, d00);
varcoeffs[StdRegions::eVarCoeffD00] = d00;
}
if (vSession->DefinesFunction("d11"))
{
Array<OneD, NekDouble> d11(nq,0.0);
LibUtilities::EquationSharedPtr d11func = vSession->GetFunction("d11",0);
d11func->Evaluate3Array(xc0, xc1, xc2, d11);
d11func->Evaluate(xc0, xc1, xc2, d11);
varcoeffs[StdRegions::eVarCoeffD11] = d11;
}
//----------------------------------------------
......@@ -115,7 +115,7 @@ int main(int argc, char *argv[])
// Define forcing function for first variable defined in file
fce = Array<OneD,NekDouble>(nq);
LibUtilities::EquationSharedPtr ffunc = vSession->GetFunction("Forcing",0);
ffunc->Evaluate3Array(xc0, xc1, xc2, fce);
ffunc->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......@@ -175,7 +175,7 @@ int main(int argc, char *argv[])
{
//----------------------------------------------
// evaluate exact solution
ex_sol->Evaluate3Array(xc0, xc1, xc2, fce);
ex_sol->Evaluate(xc0, xc1, xc2, fce);
Fce->SetPhys(fce);
Fce->SetPhysState(true);
......
......@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
LibUtilities::EquationSharedPtr ffunc
= vSession->GetFunction("Forcing", 0);
ffunc->Evaluate3Array(xc0, xc1, xc2, fce);
ffunc->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......@@ -132,7 +132,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// evaluate exact solution
ex_sol->Evaluate3Array(xc0, xc1, xc2, fce);
ex_sol->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......@@ -152,6 +152,8 @@ int main(int argc, char *argv[])
cout << "L infinity error: " << vLinfError << endl;
cout << "L 2 error: " << vL2Error << endl;
cout << "H 1 error: " << vH1Error << endl;
cout << "Time in ExpEval: " << ex_sol->GetTime() << endl;
}
//--------------------------------------------
}
......
......@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
fce = Array<OneD,NekDouble>(nq);
LibUtilities::EquationSharedPtr ffunc = vSession->GetFunction("Forcing", 0);
ffunc->Evaluate3Array(xc0, xc1, xc2, fce);
ffunc->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......@@ -114,7 +114,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// evaluate exact solution
ex_sol->Evaluate3Array(xc0, xc1, xc2, fce);
ex_sol->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......
......@@ -101,7 +101,7 @@ int main(int argc, char *argv[])
LibUtilities::EquationSharedPtr ffunc = vSession->GetFunction("Forcing", 0);
ffunc->Evaluate3Array(xc0, xc1, xc2, fce);
ffunc->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......@@ -134,7 +134,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// evaluate exact solution
ex_sol->Evaluate3Array(xc0, xc1, xc2, fce);
ex_sol->Evaluate(xc0, xc1, xc2, fce);
//----------------------------------------------
......
......@@ -107,7 +107,7 @@ int main(int argc, char *argv[])
fce = Array<OneD,NekDouble>(nq);
LibUtilities::EquationSharedPtr ffunc = vSession->GetFunction("Forcing", 0);
ffunc->Evaluate3Array(xc0,xc1,xc2, fce);
ffunc->Evaluate(xc0,xc1,xc2, fce);
//----------------------------------------------
......@@ -152,7 +152,7 @@ int main(int argc, char *argv[])
{
//----------------------------------------------
// evaluate exact solution
ex_sol->Evaluate3Array(xc0,xc1,xc2, fce);
ex_sol->Evaluate(xc0,xc1,xc2, fce);
//--------------------------------------------
// Calculate L_inf error
......
Supports Markdown
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