Commit 6708a9e4 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Refactored cast routine to streamline code.

parent d52d1766
......@@ -77,8 +77,7 @@ namespace Nektar
}
Expansion1DSharedPtr edgeExp =
StdRegions::StdExpansion::CastTo<Expansion1D>(
m_edgeExp[i].lock());
m_edgeExp[i].lock()->as<Expansion1D>();
if (edgeExp->GetRightAdjacentElementExp())
{
......@@ -103,8 +102,7 @@ namespace Nektar
Vmath::Vvtvp(nquad_e, normals[1], 1, Fy, 1, edgePhys, 1,
edgePhys, 1);
Expansion1DSharedPtr locExp =
StdRegions::StdExpansion::CastTo<Expansion1D>(EdgeExp);
Expansion1DSharedPtr locExp = EdgeExp->as<Expansion1D>();
if (m_negatedNormals[edge])
{
......@@ -145,8 +143,7 @@ namespace Nektar
}
Expansion1DSharedPtr edgeExp =
StdRegions::StdExpansion::CastTo<Expansion1D>(
m_edgeExp[i].lock());
m_edgeExp[i].lock()->as<Expansion1D>();
if (edgeExp->GetRightAdjacentElementExp())
{
......@@ -178,8 +175,7 @@ namespace Nektar
if(n_coeffs!=order_e) // Going to orthogonal space
{
EdgeExp->FwdTrans(Fn, edgeCoeffs);
Expansion1DSharedPtr locExp =
StdRegions::StdExpansion::CastTo<Expansion1D>(EdgeExp);
Expansion1DSharedPtr locExp = EdgeExp->as<Expansion1D>();
if (m_requireNeg[edge])
{
......@@ -205,8 +201,7 @@ namespace Nektar
{
EdgeExp->IProductWRTBase(Fn, edgeCoeffs);
Expansion1DSharedPtr locExp =
StdRegions::StdExpansion::CastTo<Expansion1D>(EdgeExp);
Expansion1DSharedPtr locExp = EdgeExp->as<Expansion1D>();
if (m_requireNeg[edge])
{
......
......@@ -278,8 +278,7 @@ namespace Nektar
// Loop over all faces of element i
for(j = 0; j < locExpansion->GetNfaces(); ++j)
{
faceOrient = StdRegions::StdExpansion::
CastTo<LocalRegions::Expansion3D>(locExpansion)
faceOrient = locExpansion->as<LocalRegions::Expansion3D>()
->GetGeom3D()->GetFaceOrient(j);
meshFaceId = locExpansion->GetGeom()->GetFid(j);
......
......@@ -234,7 +234,7 @@ namespace Nektar
for(i = 0; i < locExpVector.size(); ++i)
{
cnt = locExp.GetCoeff_Offset(i);
if((locSegExp = StdRegions::StdExpansion::CastTo<LocalRegions::SegExp>(locExpVector[i])))
if((locSegExp = locExpVector[i]->as<LocalRegions::SegExp>()))
{
for(j = 0; j < locSegExp->GetNverts(); ++j)
{
......
......@@ -178,7 +178,7 @@ namespace Nektar
for(i = 0; i < locExpVector.size(); ++i)
{
exp2d = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(locExpVector[i]);
exp2d = locExpVector[i]->as<LocalRegions::Expansion2D>();
for(j = 0; j < locExpVector[i]->GetNverts(); ++j)
{
// Vert Dofs
......@@ -216,7 +216,7 @@ namespace Nektar
{
for(j = 0; j < bndCondExp[i]->GetExpSize(); j++)
{
bndSegExp = StdRegions::StdExpansion::CastTo<LocalRegions::SegExp>(bndCondExp[i]->GetExp(j));
bndSegExp = bndCondExp[i]->GetExp(j)->as<LocalRegions::SegExp>();
if(bndConditions[i]->GetBoundaryConditionType()==SpatialDomains::eDirichlet)
{
nLocDirBndCondDofs += bndSegExp->GetNcoeffs();
......@@ -252,7 +252,7 @@ namespace Nektar
m_numLocalBndCoeffs = 0;
for(i = 0; i < locExpVector.size(); ++i)
{
locExpansion = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(locExpVector[locExp.GetOffset_Elmt_Id(i)]);
locExpansion = locExpVector[locExp.GetOffset_Elmt_Id(i)]->as<LocalRegions::Expansion2D>();
for(j = 0; j < locExpansion->GetNedges(); ++j)
{
nEdgeCoeffs = locExpansion->GetEdgeNcoeffs(j);
......@@ -308,7 +308,7 @@ namespace Nektar
for(i = 0; i < m_numPatches; ++i)
{
int elmtid = locExp.GetOffset_Elmt_Id(i);
locExpansion = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(locExpVector[elmtid]);
locExpansion = locExpVector[elmtid]->as<LocalRegions::Expansion2D>();
m_numLocalBndCoeffsPerPatch[i] = (unsigned int)
locExpVector[elmtid]->NumBndryCoeffs();
m_numLocalIntCoeffsPerPatch[i] = (unsigned int)
......@@ -329,7 +329,7 @@ namespace Nektar
// Loop over all the elements in the domain
for(i = 0; i < locExpVector.size(); ++i)
{
locExpansion = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(locExpVector[i]);
locExpansion = locExpVector[i]->as<LocalRegions::Expansion2D>();
cnt = locExp.GetCoeff_Offset(i);
......@@ -393,7 +393,7 @@ namespace Nektar
set<int> foundExtraVerts;
for(j = 0; j < bndCondExp[i]->GetExpSize(); j++)
{
bndSegExp = StdRegions::StdExpansion::CastTo<LocalRegions::SegExp>(bndCondExp[i]->GetExp(j));
bndSegExp = bndCondExp[i]->GetExp(j)->as<LocalRegions::SegExp>();
cnt = offset + bndCondExp[i]->GetCoeff_Offset(j);
for(k = 0; k < 2; k++)
......@@ -501,7 +501,7 @@ namespace Nektar
for(i = 0; i < locExpVector.size(); ++i)
{
int eid = locExp.GetOffset_Elmt_Id(i);
locExpansion = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(locExpVector[eid]);
locExpansion = locExpVector[eid]->as<LocalRegions::Expansion2D>();
for(j = 0; j < locExpansion->GetNverts(); ++j)
{
meshEdgeId = (locExpansion->GetGeom2D())->GetEid(j);
......@@ -631,8 +631,7 @@ namespace Nektar
{
for(j = 0; j < bndCondExp[i]->GetNumElmts(); j++)
{
bndSegExp = StdRegions::StdExpansion::CastTo<
LocalRegions::SegExp>(bndCondExp[i]->GetExp(j));
bndSegExp = bndCondExp[i]->GetExp(j)->as<LocalRegions::SegExp>();
meshEdgeId = (bndSegExp->GetGeom1D())->GetEid();
ReorderedGraphVertId[1][meshEdgeId] = graphVertId++;
for(k = 0; k < 2; k++)
......@@ -683,7 +682,9 @@ namespace Nektar
ASSERTL1(s_eid < locExpVector.size(),
"SingularElement Parameter is too large");
meshVertId = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(locExpVector[s_eid])->GetGeom2D()->GetVid(0);
meshVertId = locExpVector[s_eid]
->as<LocalRegions::Expansion2D>()
->GetGeom2D()->GetVid(0);
}
else if (m_session->DefinesParameter("SingularVertex"))
{
......@@ -692,13 +693,14 @@ namespace Nektar
else if (bndCondExp.num_elements() == 0)
{
// All boundaries are periodic.
meshVertId = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(locExpVector[0])->GetGeom2D()->GetVid(0);
meshVertId = locExpVector[0]
->as<LocalRegions::Expansion2D>()
->GetGeom2D()->GetVid(0);
}
else
{
bndSegExp = StdRegions::StdExpansion::CastTo<
LocalRegions::SegExp>(
bndCondExp[bndCondExp.num_elements()-1]->GetExp(0));
bndSegExp = bndCondExp[bndCondExp.num_elements()-1]
->GetExp(0)->as<LocalRegions::SegExp>();
meshVertId = bndSegExp->GetGeom1D()->GetVid(0);
}
......@@ -785,7 +787,9 @@ namespace Nektar
for(k = 0; k < locExpansion->GetNverts(); k++)
{
meshVertId = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(locExpansion)->GetGeom2D()->GetVid(k);
meshVertId = locExpansion
->as<LocalRegions::Expansion2D>()
->GetGeom2D()->GetVid(k);
if (ReorderedGraphVertId[0].count(meshVertId) != 0)
{
continue;
......@@ -1000,14 +1004,16 @@ namespace Nektar
for(i = 0; i < locExpVector.size(); ++i)
{
elmtid = locExp.GetOffset_Elmt_Id(i);
if((locExpansion = boost::dynamic_pointer_cast<StdRegions::StdExpansion2D>(
locExpVector[elmtid])))
if((locExpansion = locExpVector[elmtid]
->as<StdRegions::StdExpansion2D>()))
{
vertCnt = 0;
nVerts = locExpansion->GetNverts();
for(j = 0; j < nVerts; ++j)
{
meshVertId = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(locExpansion)->GetGeom2D()->GetVid(j);
meshVertId = locExpansion
->as<LocalRegions::Expansion2D>()
->GetGeom2D()->GetVid(j);
if(ReorderedGraphVertId[0].count(meshVertId) == 0)
{
// non-periodic & non-Dirichlet vertex
......@@ -1029,14 +1035,16 @@ namespace Nektar
for(i = 0; i < locExpVector.size(); ++i)
{
elmtid = locExp.GetOffset_Elmt_Id(i);
if((locExpansion = boost::dynamic_pointer_cast<StdRegions::StdExpansion2D>(
locExpVector[elmtid])))
if((locExpansion = locExpVector[elmtid]
->as<StdRegions::StdExpansion2D>()))
{
edgeCnt = 0;
nVerts = locExpansion->GetNverts();
for(j = 0; j < nVerts; ++j)
{
meshEdgeId = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(locExpansion)->GetGeom2D()->GetEid(j);
meshEdgeId = locExpansion
->as<LocalRegions::Expansion2D>()
->GetGeom2D()->GetEid(j);
if(ReorderedGraphVertId[1].count(meshEdgeId) == 0)
{
// non-periodic & non-Dirichlet edge
......@@ -1206,8 +1214,12 @@ namespace Nektar
{
for (j = 0; j < locExpansion->GetNverts(); ++j, ++cnt)
{
int vid = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(locExpansion)->GetGeom2D()->GetVid(j)+1;
int eid = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(locExpansion)->GetGeom2D()->GetEid(j)+1;
int vid = locExpansion
->as<LocalRegions::Expansion2D>()
->GetGeom2D()->GetVid(j)+1;
int eid = locExpansion
->as<LocalRegions::Expansion2D>()
->GetGeom2D()->GetEid(j)+1;
if (foundVerts.count(vid) == 0)
{
......
......@@ -226,8 +226,8 @@ namespace Nektar
cnt = 0;
for(j = 0; j < bndCondExp[i]->GetNumElmts(); j++)
{
bndCondFaceExp = StdRegions::StdExpansion::CastTo<
LocalRegions::Expansion2D>(bndCondExp[i]->GetExp(j));
bndCondFaceExp = bndCondExp[i]->GetExp(j)
->as<LocalRegions::Expansion2D>();
if (bndConditions[i]->GetBoundaryConditionType() ==
SpatialDomains::eDirichlet)
......@@ -342,9 +342,8 @@ namespace Nektar
for(j = 0; j < locExpVector.size(); j++)
{
locExpansion = StdRegions::StdExpansion::CastTo<
LocalRegions::Expansion3D>(
locExpVector[locExp.GetOffset_Elmt_Id(j)]);
locExpansion = locExpVector[locExp.GetOffset_Elmt_Id(j)]
->as<LocalRegions::Expansion3D>();
for(k = 0; k < locExpansion->GetNverts(); k++)
{
......@@ -497,21 +496,22 @@ namespace Nektar
ASSERTL1(s_eid < locExpVector.size(),
"SingularElement Parameter is too large");
meshVertId = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(
locExpVector[s_eid])->GetGeom2D()->GetVid(0);
meshVertId = locExpVector[s_eid]
->as<LocalRegions::Expansion2D>()
->GetGeom2D()->GetVid(0);
}
else if (bndCondExp.num_elements() == 0)
{
// All boundaries are periodic.
meshVertId = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(
locExpVector[0])->GetGeom2D()->GetVid(0);
meshVertId = locExpVector[0]
->as<LocalRegions::Expansion2D>()
->GetGeom2D()->GetVid(0);
}
else
{
// Last region i and j = 0 edge
bndCondFaceExp = StdRegions::StdExpansion::CastTo<
LocalRegions::Expansion2D>(
bndCondExp[bndCondExp.num_elements()-1]->GetExp(0));
bndCondFaceExp = bndCondExp[bndCondExp.num_elements()-1]
->GetExp(0)->as<LocalRegions::Expansion2D>();
// First vertex 0 of the edge
meshVertId = bndCondFaceExp->GetGeom2D()->GetVid(0);
......@@ -602,9 +602,8 @@ namespace Nektar
/// - Count verts, edges, face and add up edges and face sizes
for(i = 0; i < locExpVector.size(); ++i)
{
if((locExpansion = StdRegions::StdExpansion::CastTo<
LocalRegions::Expansion3D>(
locExpVector[locExp.GetOffset_Elmt_Id(i)])))
if((locExpansion = locExpVector[locExp.GetOffset_Elmt_Id(i)]
->as<LocalRegions::Expansion3D>()))
{
nTotalVerts += locExpansion->GetNverts();
nTotalEdges += locExpansion->GetNedges();
......@@ -724,9 +723,8 @@ namespace Nektar
// Set up vertex numbering
for(i = 0; i < locExpVector.size(); ++i)
{
if((locExpansion = StdRegions::StdExpansion::CastTo<
LocalRegions::Expansion3D>(
locExpVector[locExp.GetOffset_Elmt_Id(i)])))
if((locExpansion = locExpVector[locExp.GetOffset_Elmt_Id(i)]
->as<LocalRegions::Expansion3D>()))
{
vertCnt = 0;
nVerts = locExpansion->GetNverts();
......@@ -842,8 +840,8 @@ namespace Nektar
// Set up edge numbering
for(i = 0; i < locExpVector.size(); ++i)
{
if((locExpansion = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion3D>(
locExpVector[locExp.GetOffset_Elmt_Id(i)])))
if((locExpansion = locExpVector[locExp.GetOffset_Elmt_Id(i)]
->as<LocalRegions::Expansion3D>()))
{
edgeCnt = 0;
nEdges = locExpansion->GetNedges();
......@@ -906,8 +904,8 @@ namespace Nektar
// setup face numbering
for(i = 0; i < locExpVector.size(); ++i)
{
if((locExpansion = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion3D>(
locExpVector[locExp.GetOffset_Elmt_Id(i)])))
if((locExpansion = locExpVector[locExp.GetOffset_Elmt_Id(i)]
->as<LocalRegions::Expansion3D>()))
{
nFaces = locExpansion->GetNfaces();
faceCnt = 0;
......@@ -943,8 +941,8 @@ namespace Nektar
localFaceOffset=0;
for(i = 0; i < locExpVector.size(); ++i)
{
if((locExpansion = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion3D>(
locExpVector[locExp.GetOffset_Elmt_Id(i)])))
if((locExpansion = locExpVector[locExp.GetOffset_Elmt_Id(i)]
->as<LocalRegions::Expansion3D>()))
{
nVerts = locExpansion->GetNverts();
nEdges = locExpansion->GetNedges();
......@@ -1104,8 +1102,8 @@ namespace Nektar
for(i = cnt = 0; i < locExpVector.size(); ++i)
{
int elmtid = locExp.GetOffset_Elmt_Id(i);
if((locExpansion = StdRegions::StdExpansion::CastTo<
LocalRegions::Expansion3D>(locExpVector[elmtid])))
if((locExpansion = locExpVector[elmtid]
->as<LocalRegions::Expansion3D>()))
{
for (j = 0; j < locExpansion->GetNverts(); ++j)
{
......@@ -1299,7 +1297,8 @@ namespace Nektar
for(i = 0; i < locExpVector.size(); ++i)
{
locExpansion = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion3D>(locExpVector[locExp.GetOffset_Elmt_Id(i)]);
locExpansion = locExpVector[locExp.GetOffset_Elmt_Id(i)]
->as<LocalRegions::Expansion3D>();
for(j = 0; j < locExpansion->GetNverts(); ++j)
{
......@@ -1377,7 +1376,7 @@ namespace Nektar
// Loop over all the elements in the domain
for(i = 0; i < locExpVector.size(); ++i)
{
locExpansion = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion3D>(locExpVector[i]);
locExpansion = locExpVector[i]->as<LocalRegions::Expansion3D>();
cnt = locExp.GetCoeff_Offset(i);
for(j = 0; j < locExpansion->GetNverts(); ++j)
{
......@@ -1484,8 +1483,8 @@ namespace Nektar
set<int> foundExtraVerts, foundExtraEdges;
for(j = 0; j < bndCondExp[i]->GetNumElmts(); j++)
{
bndCondFaceExp = StdRegions::StdExpansion::CastTo<
LocalRegions::Expansion2D>(bndCondExp[i]->GetExp(j));
bndCondFaceExp = bndCondExp[i]->GetExp(j)
->as<LocalRegions::Expansion2D>();
cnt = offset + bndCondExp[i]->GetCoeff_Offset(j);
for(k = 0; k < bndCondFaceExp->GetNverts(); k++)
{
......
......@@ -127,7 +127,7 @@ namespace Nektar
cnt = 0;
for(i = 0; i < exp1D->size(); ++i)
{
if((locSegExp = StdRegions::StdExpansion::CastTo<LocalRegions::SegExp>((*exp1D)[i])))
if((locSegExp = (*exp1D)[i]->as<LocalRegions::SegExp>()))
{
locSegExp->GetBoundaryMap(vmap);
......@@ -215,7 +215,7 @@ namespace Nektar
// determine mapping from geometry edges to trace
for(i = 0; i < ntrace_exp; ++i)
{
if((locSegExp = StdRegions::StdExpansion::CastTo<LocalRegions::SegExp>(trace->GetExp(i))))
if((locSegExp = trace->GetExp(i)->as<LocalRegions::SegExp>()))
{
id = (locSegExp->GetGeom1D())->GetEid();
MeshEdgeId[id] = i;
......@@ -242,7 +242,7 @@ namespace Nektar
{
m_elmtToTrace[i] = edgemap + cnt;
if((locQuadExp = StdRegions::StdExpansion::CastTo<LocalRegions::QuadExp>((*exp2D)[i])))
if((locQuadExp = (*exp2D)[i]->as<LocalRegions::QuadExp>()))
{
for(j = 0; j < locQuadExp->GetNedges(); ++j)
{
......@@ -252,7 +252,8 @@ namespace Nektar
if(MeshEdgeId.count(id) > 0)
{
m_elmtToTrace[i][j] = StdRegions::StdExpansion::CastTo< LocalRegions::SegExp> ((*trace).GetExp(MeshEdgeId.find(id)->second));
m_elmtToTrace[i][j] = (*trace).GetExp(MeshEdgeId
.find(id)->second)->as<LocalRegions::SegExp>();
}
else
......@@ -261,7 +262,7 @@ namespace Nektar
}
}
}
else if((locTriExp = StdRegions::StdExpansion::CastTo<LocalRegions::TriExp>((*exp2D)[i])))
else if((locTriExp = (*exp2D)[i]->as<LocalRegions::TriExp>()))
{
for(j = 0; j < locTriExp->GetNedges(); ++j)
{
......@@ -271,7 +272,8 @@ namespace Nektar
if(MeshEdgeId.count(id) > 0)
{
m_elmtToTrace[i][j] = StdRegions::StdExpansion::CastTo< LocalRegions::SegExp> ((*trace).GetExp((MeshEdgeId.find(id))->second));
m_elmtToTrace[i][j] = (*trace).GetExp((MeshEdgeId
.find(id))->second)->as<LocalRegions::SegExp>();
}
else
......@@ -303,7 +305,8 @@ namespace Nektar
{
for(j = 0; j < bndCondExp[i]->GetExpSize(); ++j)
{
if((locSegExp = StdRegions::StdExpansion::CastTo<LocalRegions::SegExp>(bndCondExp[i]->GetExp(j))))
if((locSegExp = bndCondExp[i]->GetExp(j)
->as<LocalRegions::SegExp>()))
{
SegGeom = locSegExp->GetGeom1D();
id = SegGeom->GetEid();
......@@ -386,7 +389,7 @@ namespace Nektar
for(j = 0; j < (*exp2D)[eid]->GetNedges(); ++j)
{
locSegExp = StdRegions::StdExpansion::CastTo<LocalRegions::SegExp>(m_elmtToTrace[eid][j]);
locSegExp = m_elmtToTrace[eid][j]->as<LocalRegions::SegExp>();
SegGeom = locSegExp->GetGeom1D();
// Add edge to boost graph for non-Dirichlet Boundary
......@@ -396,7 +399,7 @@ namespace Nektar
{
for(k = j+1; k < (*exp2D)[eid]->GetNedges(); ++k)
{
locSegExp1 = StdRegions::StdExpansion::CastTo<LocalRegions::SegExp>(m_elmtToTrace[eid][k]);
locSegExp1 = m_elmtToTrace[eid][k]->as<LocalRegions::SegExp>();
SegGeom = locSegExp1->GetGeom1D();
id1 = SegGeom->GetEid();
......@@ -473,7 +476,7 @@ namespace Nektar
for(j = 0; j < (*exp2D)[eid]->GetNedges(); ++j)
{
locSegExp = StdRegions::StdExpansion::CastTo<LocalRegions::SegExp>(m_elmtToTrace[eid][j]);
locSegExp = m_elmtToTrace[eid][j]->as<LocalRegions::SegExp>();
SegGeom = locSegExp->GetGeom1D();
id = SegGeom->GetEid();
......@@ -554,7 +557,8 @@ namespace Nektar
{
for(j = 0; j < bndCondExp[i]->GetExpSize(); ++j)
{
if((locSegExp = StdRegions::StdExpansion::CastTo<LocalRegions::SegExp>(bndCondExp[i]->GetExp(j))))
if((locSegExp = bndCondExp[i]->GetExp(j)
->as<LocalRegions::SegExp>()))
{
nbndexp++;
SegGeom = locSegExp->GetGeom1D();
......@@ -604,7 +608,8 @@ namespace Nektar
{
for(j = 0; j < bndCondExp[i]->GetExpSize(); ++j)
{
if((locSegExp = StdRegions::StdExpansion::CastTo<LocalRegions::SegExp>(bndCondExp[i]->GetExp(j))))
if((locSegExp = bndCondExp[i]->GetExp(j)
->as<LocalRegions::SegExp>()))
{
SegGeom = locSegExp->GetGeom1D();
id = SegGeom->GetEid();
......@@ -660,9 +665,8 @@ namespace Nektar
// determine mapping from geometry edges to trace
for(i = 0; i < ntrace_exp; ++i)
{
id = StdRegions::StdExpansion::
CastTo<LocalRegions::Expansion2D>(
trace->GetExp(i))->GetGeom2D()->GetFid();
id = trace->GetExp(i)->as<LocalRegions::Expansion2D>()
->GetGeom2D()->GetFid();
MeshFaceId[id] = i;
}
......@@ -685,9 +689,8 @@ namespace Nektar
for(j = 0; j < (*exp3D)[i]->GetNfaces(); ++j)
{
id = StdRegions::StdExpansion::
CastTo<LocalRegions::Expansion3D>(
(*exp3D)[i])->GetGeom3D()->GetFid(j);
id = (*exp3D)[i]->as<LocalRegions::Expansion3D>()
->GetGeom3D()->GetFid(j);
if(MeshFaceId.count(id) > 0)
{
......@@ -721,9 +724,8 @@ namespace Nektar
for(j = 0; j < bndCondExp[i]->GetExpSize(); ++j)
{
locBndExp = bndCondExp[i]->GetExp(j);
FaceGeom = StdRegions::StdExpansion::
CastTo<LocalRegions::Expansion2D>(
locBndExp)->GetGeom2D();
FaceGeom = locBndExp->as<LocalRegions::Expansion2D>()
->GetGeom2D();
id = FaceGeom->GetFid();
if(bndCond[i]->GetBoundaryConditionType() ==
......@@ -779,7 +781,8 @@ namespace Nektar
// face starts at 0 so we can set up graph.
for(i = 0; i < ntrace_exp; ++i)
{
id = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(trace->GetExp(i))->GetGeom2D()->GetFid();
id = trace->GetExp(i)->as<LocalRegions::Expansion2D>()
->GetGeom2D()->GetFid();
if (dirFaces.count(id) == 0)
{
......@@ -805,7 +808,8 @@ namespace Nektar
for(j = 0; j < (*exp3D)[eid]->GetNfaces(); ++j)
{
// Add face to boost graph for non-Dirichlet Boundary
FaceGeom = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(m_elmtToTrace[eid][j])->GetGeom2D();
FaceGeom = m_elmtToTrace[eid][j]
->as<LocalRegions::Expansion2D>()->GetGeom2D();
id = FaceGeom->GetFid();
face_id = MeshFaceId.find(id)->second;
......@@ -813,7 +817,8 @@ namespace Nektar
{
for(k = j+1; k < (*exp3D)[eid]->GetNfaces(); ++k)
{
FaceGeom = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(m_elmtToTrace[eid][k])->GetGeom2D();
FaceGeom = m_elmtToTrace[eid][k]
->as<LocalRegions::Expansion2D>()->GetGeom2D();
id1 = FaceGeom->GetFid();
face_id1 = MeshFaceId.find(id1)->second;
......@@ -887,7 +892,8 @@ namespace Nektar
for(j = 0; j < (*exp3D)[eid]->GetNfaces(); ++j)
{
FaceGeom = StdRegions::StdExpansion::CastTo<LocalRegions::Expansion2D>(m_elmtToTrace[eid][j])->GetGeom2D();
FaceGeom = m_elmtToTrace[eid][j]
->as<LocalRegions::Expansion2D>()->GetGeom2D();
id = FaceGeom->GetFid();
gid = FaceElmtGid[MeshFaceId.find(id)->second];
order_e = (*exp3D)[eid]->GetFaceNcoeffs(j);
......@@ -951,7 +957,8 @@ namespace Nektar