Commit 38860cdc authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Fixed timings codes after removal of continuous coefficients.


git-svn-id: https://gforge.sci.utah.edu/svn/nektar/trunk@4080 305cdda6-5ce1-45b3-a98d-dfc68c8b3305
parent 0335fa39
......@@ -75,8 +75,9 @@ IF (THIRDPARTY_BUILD_BOOST)
)
ENDIF ()
ELSE (THIRDPARTY_BUILD_BOOST)
SET(Boost_DEBUG 1)
SET(Boost_USE_MULTITHREAD ON)
SET(Boost_ADDITIONAL_VERSIONS "1.48" "1.48.0" "1.47.0" "1.47" "1.46" "1.46. 1" "1.40" "1.40.0" "1.35.0" "1.35")
SET(Boost_ADDITIONAL_VERSIONS "1.49" "1.49.0" "1.48" "1.48.0" "1.47.0" "1.47" "1.46" "1.46. 1" "1.40" "1.40.0" "1.35.0" "1.35")
SET(Boost_NO_BOOST_CMAKE ON)
IF( NOT BOOST_ROOT )
......
......@@ -267,13 +267,13 @@ int main(int argc, char *argv[])
if (type == StdRegions::eHelmholtz)
{
FlagList flags;
flags.set(eUseContCoeff, true);
flags.set(eUseGlobal, true);
StdRegions::ConstFactorMap factors;
factors[StdRegions::eFactorLambda] = lambda;
//----------------------------------------------
// Helmholtz solution taking physical forcing
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateContCoeffs(),flags,factors);
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
// GeneralMatrixOp does not impose boundary conditions.
// MultiRegions::GlobalMatrixKey key(type, lambda, Exp- >GetLocalToGlobalMap());
// Exp->GeneralMatrixOp (key, Fce->GetPhys(),Exp- >UpdateContCoeffs(), true);
......@@ -281,18 +281,21 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Backward Transform Solution to get solved values at
Exp->BwdTrans(Exp->GetContCoeffs(), Exp->UpdatePhys(), true);
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(),
MultiRegions::eGlobal);
//----------------------------------------------
L2Error = Exp->L2 (Sol->GetPhys());
LinfError = Exp->Linf(Sol->GetPhys());
}
else
{
Exp->FwdTrans(Sol->GetPhys(), Exp->UpdateContCoeffs(), true);
Exp->FwdTrans(Sol->GetPhys(), Exp->UpdateCoeffs(),
MultiRegions::eGlobal);
//----------------------------------------------
// Backward Transform Solution to get solved values at
Exp->BwdTrans(Exp->GetContCoeffs(), Exp->UpdatePhys(), true);
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(),
MultiRegions::eGlobal);
//----------------------------------------------
L2Error = Exp->L2 (Sol->GetPhys());
LinfError = Exp->Linf(Sol->GetPhys());
......@@ -346,17 +349,18 @@ int main(int argc, char *argv[])
// calcualte spectral/hp approximation on the quad points of this new
// expansion basis
Exp->GlobalToLocal(Exp->GetContCoeffs(),ErrorExp->UpdateCoeffs());
ErrorExp->BwdTrans_IterPerExp(ErrorExp->GetCoeffs(),ErrorExp->UpdatePhys());
Exp->GlobalToLocal(Exp->GetCoeffs(),ErrorExp->UpdateCoeffs());
ErrorExp->BwdTrans_IterPerExp(ErrorExp->GetCoeffs(),
ErrorExp->UpdatePhys());
L2ErrorBis = ErrorExp->L2 (ErrorSol);
LinfErrorBis = ErrorExp->Linf(ErrorSol);
}
else
{
for (i = 0; i < Exp->GetContCoeffs().num_elements(); ++i)
for (i = 0; i < Exp->GetCoeffs().num_elements(); ++i)
{
Exp->UpdateContCoeffs()[i] = 1.0;
Exp->UpdateCoeffs()[i] = 1.0;
}
}
......@@ -367,8 +371,8 @@ int main(int argc, char *argv[])
exeTime = TimeMatrixOp(type, Exp, Fce, NumCalls, lambda);
}
int nLocCoeffs = Exp->GetNcoeffs();
int nGlobCoeffs = Exp->GetContNcoeffs();
int nLocCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalCoeffs();
int nGlobCoeffs = Exp->GetLocalToGlobalMap()->GetNumGlobalCoeffs();
int nLocBndCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalBndCoeffs();
int nGlobBndCoeffs = Exp->GetLocalToGlobalMap()->GetNumGlobalBndCoeffs();
int nLocDirCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalDirBndCoeffs();
......@@ -442,18 +446,21 @@ NekDouble TimeMatrixOp(StdRegions::MatrixType &type,
// Do a run to initialise everything (build matrices, etc)
if (type == StdRegions::eBwdTrans)
{
Exp->BwdTrans(Exp->GetContCoeffs(), Exp->UpdatePhys(), true);
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
else if (type == StdRegions::eIProductWRTBase)
{
Exp->IProductWRTBase(Fce->GetPhys(), Exp->UpdateContCoeffs(), true);
Exp->IProductWRTBase(Fce->GetPhys(), Exp->UpdateCoeffs(),
MultiRegions::eGlobal);
}
else
{
StdRegions::ConstFactorMap factors;
factors[StdRegions::eFactorLambda] = lambda;
MultiRegions::GlobalMatrixKey key(type, Exp->GetLocalToGlobalMap(), factors);
Exp->GeneralMatrixOp (key, Exp->GetContCoeffs(),Exp->UpdatePhys(), true);
Exp->GeneralMatrixOp (key, Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
// We first do a single run in order to estimate the number of calls
......@@ -463,18 +470,21 @@ NekDouble TimeMatrixOp(StdRegions::MatrixType &type,
//Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys(),true);
if (type == StdRegions::eBwdTrans)
{
Exp->BwdTrans(Exp->GetContCoeffs(), Exp->UpdatePhys(), true);
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
else if (type == StdRegions::eIProductWRTBase)
{
Exp->IProductWRTBase(Fce->GetPhys(), Exp->UpdateContCoeffs(), true);
Exp->IProductWRTBase(Fce->GetPhys(), Exp->UpdateCoeffs(),
MultiRegions::eGlobal);
}
else
{
StdRegions::ConstFactorMap factors;
factors[StdRegions::eFactorLambda] = lambda;
MultiRegions::GlobalMatrixKey key(type, Exp->GetLocalToGlobalMap(), factors);
Exp->GeneralMatrixOp (key, Exp->GetContCoeffs(),Exp->UpdatePhys(), true);
Exp->GeneralMatrixOp (key, Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
gettimeofday(&timer2, NULL);
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
......@@ -501,14 +511,16 @@ NekDouble TimeMatrixOp(StdRegions::MatrixType &type,
{
for(i = 0; i < NumCalls; ++i)
{
Exp->BwdTrans (Exp->GetContCoeffs(),Exp->UpdatePhys(), true);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
}
else if (type == StdRegions::eIProductWRTBase)
{
for(i = 0; i < NumCalls; ++i)
{
Exp->IProductWRTBase (Exp->GetPhys(),Exp->UpdateContCoeffs(), true);
Exp->IProductWRTBase (Exp->GetPhys(),Exp->UpdateCoeffs(),
MultiRegions::eGlobal);
}
}
else
......@@ -518,7 +530,8 @@ NekDouble TimeMatrixOp(StdRegions::MatrixType &type,
MultiRegions::GlobalMatrixKey key(type, Exp->GetLocalToGlobalMap(), factors);
for(i = 0; i < NumCalls; ++i)
{
Exp->GeneralMatrixOp (key, Exp->GetContCoeffs(),Exp->UpdatePhys(), true);
Exp->GeneralMatrixOp (key, Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
}
gettimeofday(&timer2, NULL);
......
......@@ -211,15 +211,16 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Helmholtz solution taking physical forcing
FlagList flags;
flags.set(eUseContCoeff, true);
flags.set(eUseGlobal, true);
StdRegions::ConstFactorMap factors;
factors[StdRegions::eFactorLambda] = lambda;
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateContCoeffs(),flags,factors);
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
//----------------------------------------------
//----------------------------------------------
// Backward Transform Solution to get solved values at
Exp->BwdTrans(Exp->GetContCoeffs(), Exp->UpdatePhys(),true);
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(),
MultiRegions::eGlobal);
//----------------------------------------------
//----------------------------------------------
......@@ -289,7 +290,7 @@ int main(int argc, char *argv[])
// calcualte spectral/hp approximation on the quad points of this new
// expansion basis
Exp->GlobalToLocal(Exp->GetContCoeffs(),ErrorExp->UpdateCoeffs());
Exp->GlobalToLocal(Exp->GetCoeffs(),ErrorExp->UpdateCoeffs());
ErrorExp->BwdTrans_IterPerExp(ErrorExp->GetCoeffs(),ErrorExp->UpdatePhys());
NekDouble L2ErrorBis = ErrorExp->L2 (ErrorSol);
......@@ -310,8 +311,9 @@ int main(int argc, char *argv[])
// We first do a single run in order to estimate the number of calls
// we are going to make
gettimeofday(&timer1, NULL);
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateContCoeffs(),flags,factors);
Exp->BwdTrans (Exp->GetContCoeffs(),Exp->UpdatePhys(),true);
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
gettimeofday(&timer2, NULL);
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
time2 = timer2.tv_sec*1000000.0+(timer2.tv_usec);
......@@ -336,8 +338,9 @@ int main(int argc, char *argv[])
gettimeofday(&timer1, NULL);
for(i = 0; i < NumCalls; ++i)
{
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateContCoeffs(),flags,factors);
Exp->BwdTrans (Exp->GetContCoeffs(),Exp->UpdatePhys(),true);
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
gettimeofday(&timer2, NULL);
......@@ -352,8 +355,8 @@ int main(int argc, char *argv[])
time2 = timer2.tv_sec*1000000.0+(timer2.tv_usec);
exeTime = (time2-time1);
int nLocCoeffs = Exp->GetNcoeffs();
int nGlobCoeffs = Exp->GetContNcoeffs();
int nLocCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalCoeffs();
int nGlobCoeffs = Exp->GetLocalToGlobalMap()->GetNumGlobalCoeffs();
int nLocBndCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalBndCoeffs();
int nGlobBndCoeffs = Exp->GetLocalToGlobalMap()->GetNumGlobalBndCoeffs();
int nLocDirCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalDirBndCoeffs();
......
......@@ -265,7 +265,7 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Helmholtz solution taking physical forcing
FlagList flags;
flags.set(eUseContCoeff, true);
flags.set(eUseGlobal, true);
StdRegions::ConstFactorMap factors;
factors[StdRegions::eFactorLambda] = lambda;
......@@ -274,18 +274,21 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Backward Transform Solution to get solved values at
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(), true);
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(),
MultiRegions::eGlobal);
//----------------------------------------------
L2Error = Exp->L2 (Sol->GetPhys());
LinfError = Exp->Linf(Sol->GetPhys());
}
else
{
Exp->FwdTrans(Fce->GetPhys(), Exp->UpdateCoeffs(), true);
Exp->FwdTrans(Fce->GetPhys(), Exp->UpdateCoeffs(),
MultiRegions::eGlobal);
//----------------------------------------------
// Backward Transform Solution to get solved values at
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(), true);
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(),
MultiRegions::eGlobal);
//----------------------------------------------
L2Error = Exp->L2 (Fce->GetPhys());
LinfError = Exp->Linf(Fce->GetPhys());
......@@ -356,8 +359,8 @@ int main(int argc, char *argv[])
exeTime = TimeMatrixOp(type, Exp, Fce, NumCalls, lambda);
int nLocCoeffs = Exp->GetNcoeffs();
int nGlobCoeffs = Exp->GetContNcoeffs();
int nLocCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalCoeffs();
int nGlobCoeffs = Exp->GetLocalToGlobalMap()->GetNumGlobalCoeffs();
int nLocBndCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalBndCoeffs();
int nGlobBndCoeffs = Exp->GetLocalToGlobalMap()->GetNumGlobalBndCoeffs();
int nLocDirCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalDirBndCoeffs();
......@@ -418,18 +421,21 @@ NekDouble TimeMatrixOp(StdRegions::MatrixType &type,
//Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys(),true);
if (type == StdRegions::eBwdTrans)
{
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(), true);
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
else if (type == StdRegions::eIProductWRTBase)
{
Exp->IProductWRTBase(Exp->GetPhys(), Exp->UpdateCoeffs(), true);
Exp->IProductWRTBase(Exp->GetPhys(), Exp->UpdateCoeffs(),
MultiRegions::eGlobal);
}
else
{
StdRegions::ConstFactorMap factors;
factors[StdRegions::eFactorLambda] = lambda;
MultiRegions::GlobalMatrixKey key(type, Exp->GetLocalToGlobalMap(), factors);
Exp->GeneralMatrixOp (key, Exp->GetCoeffs(),Exp->UpdatePhys(), true);
Exp->GeneralMatrixOp (key, Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
gettimeofday(&timer2, NULL);
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
......@@ -457,14 +463,16 @@ NekDouble TimeMatrixOp(StdRegions::MatrixType &type,
{
for(i = 0; i < NumCalls; ++i)
{
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys(), true);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
}
else if (type == StdRegions::eIProductWRTBase)
{
for(i = 0; i < NumCalls; ++i)
{
Exp->IProductWRTBase (Exp->GetPhys(),Exp->UpdateCoeffs(), true);
Exp->IProductWRTBase (Exp->GetPhys(),Exp->UpdateCoeffs(),
MultiRegions::eGlobal);
}
}
else
......@@ -475,7 +483,8 @@ NekDouble TimeMatrixOp(StdRegions::MatrixType &type,
MultiRegions::GlobalMatrixKey key(type, Exp->GetLocalToGlobalMap(), factors);
for(i = 0; i < NumCalls; ++i)
{
Exp->GeneralMatrixOp (key, Exp->GetCoeffs(),Exp->UpdatePhys(), true);
Exp->GeneralMatrixOp (key, Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
}
gettimeofday(&timer2, NULL);
......
......@@ -259,13 +259,13 @@ int main(int argc, char *argv[])
if (type == StdRegions::eHelmholtz)
{
FlagList flags;
flags.set(eUseContCoeff, true);
flags.set(eUseGlobal, true);
StdRegions::ConstFactorMap factors;
factors[StdRegions::eFactorLambda] = lambda;
//----------------------------------------------
// Helmholtz solution taking physical forcing
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateContCoeffs(),flags,factors);
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
// GeneralMatrixOp does not impose boundary conditions.
// MultiRegions::GlobalMatrixKey key(type, lambda, Exp->GetLocalToGlobalMap());
// Exp->GeneralMatrixOp (key, Fce->GetPhys(),Exp->UpdateContCoeffs(), true);
......@@ -273,18 +273,21 @@ int main(int argc, char *argv[])
//----------------------------------------------
// Backward Transform Solution to get solved values at
Exp->BwdTrans(Exp->GetContCoeffs(), Exp->UpdatePhys(), true);
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(),
MultiRegions::eGlobal);
//----------------------------------------------
L2Error = Exp->L2 (Sol->GetPhys());
LinfError = Exp->Linf(Sol->GetPhys());
}
else
{
Exp->FwdTrans(Sol->GetPhys(), Exp->UpdateContCoeffs(), true);
Exp->FwdTrans(Sol->GetPhys(), Exp->UpdateCoeffs(),
MultiRegions::eGlobal);
//----------------------------------------------
// Backward Transform Solution to get solved values at
Exp->BwdTrans(Exp->GetContCoeffs(), Exp->UpdatePhys(), true);
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(),
MultiRegions::eGlobal);
//----------------------------------------------
L2Error = Exp->L2 (Sol->GetPhys());
LinfError = Exp->Linf(Sol->GetPhys());
......@@ -352,8 +355,8 @@ int main(int argc, char *argv[])
exeTime = TimeMatrixOp(type, Exp, Fce, NumCalls, lambda);
int nLocCoeffs = Exp->GetNcoeffs();
int nGlobCoeffs = Exp->GetContNcoeffs();
int nLocCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalCoeffs();
int nGlobCoeffs = Exp->GetLocalToGlobalMap()->GetNumGlobalCoeffs();
int nLocBndCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalBndCoeffs();
int nGlobBndCoeffs = Exp->GetLocalToGlobalMap()->GetNumGlobalBndCoeffs();
int nLocDirCoeffs = Exp->GetLocalToGlobalMap()->GetNumLocalDirBndCoeffs();
......@@ -409,18 +412,21 @@ NekDouble TimeMatrixOp(StdRegions::MatrixType &type,
//Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys(),true);
if (type == StdRegions::eBwdTrans)
{
Exp->BwdTrans(Exp->GetContCoeffs(), Exp->UpdatePhys(), true);
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
else if (type == StdRegions::eIProductWRTBase)
{
Exp->IProductWRTBase(Fce->GetPhys(), Exp->UpdateContCoeffs(), true);
Exp->IProductWRTBase(Fce->GetPhys(), Exp->UpdateCoeffs(),
MultiRegions::eGlobal);
}
else
{
StdRegions::ConstFactorMap factors;
factors[StdRegions::eFactorLambda] = lambda;
MultiRegions::GlobalMatrixKey key(type, Exp->GetLocalToGlobalMap(), factors);
Exp->GeneralMatrixOp (key, Exp->GetContCoeffs(),Exp->UpdatePhys(), true);
Exp->GeneralMatrixOp (key, Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
gettimeofday(&timer2, NULL);
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
......@@ -448,14 +454,16 @@ NekDouble TimeMatrixOp(StdRegions::MatrixType &type,
{
for(i = 0; i < NumCalls; ++i)
{
Exp->BwdTrans (Exp->GetContCoeffs(),Exp->UpdatePhys(), true);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
}
else if (type == StdRegions::eIProductWRTBase)
{
for(i = 0; i < NumCalls; ++i)
{
Exp->IProductWRTBase (Exp->GetPhys(),Exp->UpdateContCoeffs(), true);
Exp->IProductWRTBase (Exp->GetPhys(),Exp->UpdateCoeffs(),
MultiRegions::eGlobal);
}
}
else
......@@ -465,7 +473,8 @@ NekDouble TimeMatrixOp(StdRegions::MatrixType &type,
MultiRegions::GlobalMatrixKey key(type, Exp->GetLocalToGlobalMap(), factors);
for(i = 0; i < NumCalls; ++i)
{
Exp->GeneralMatrixOp (key, Exp->GetContCoeffs(),Exp->UpdatePhys(), true);
Exp->GeneralMatrixOp (key, Exp->GetCoeffs(),Exp->UpdatePhys(),
MultiRegions::eGlobal);
}
}
gettimeofday(&timer2, NULL);
......
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