Commit 0f1169d1 authored by Dave Moxey's avatar Dave Moxey
Browse files

Fixing XmlToTecplot utility to project to PolyEvenlySpaced spacing.

Updating Tecplot library routines to work for 3D.


git-svn-id: https://gforge.sci.utah.edu/svn/nektar/trunk@4032 305cdda6-5ce1-45b3-a98d-dfc68c8b3305
parent 21982a75
......@@ -1174,7 +1174,7 @@ namespace Nektar
if(dumpVar)
{
outfile << "Variables = x";
if(coordim == 2)
{
outfile << ", y";
......@@ -1183,7 +1183,7 @@ namespace Nektar
{
outfile << ", y, z";
}
outfile << ", "<< var << std::endl << std::endl;
outfile << std::endl << std::endl;
}
outfile << "Zone, I=" << nquad0 << ", J=" << nquad1 << ", K=" << nquad2 << ", F=Point" << std::endl;
......@@ -1192,13 +1192,9 @@ namespace Nektar
{
for(j = 0; j < coordim; ++j)
{
for(k=0; k < coordim; ++k)
{
outfile << coords[k][j] << " ";
}
outfile << m_phys[j] << std::endl;
outfile << coords[j][i] << " ";
}
outfile << m_phys[i] << std::endl;
outfile << std::endl;
}
}
else
......
......@@ -620,7 +620,7 @@ namespace Nektar
{
outfile << ", y, z";
}
outfile << ", "<< var << std::endl << std::endl;
outfile << std::endl << std::endl;
}
outfile << "Zone, I=" << nquad0 << ", J=" << nquad1 << ", K=" << nquad2 << ", F=Point" << std::endl;
......@@ -629,13 +629,9 @@ namespace Nektar
{
for(j = 0; j < coordim; ++j)
{
for(k=0; k < coordim; ++k)
{
outfile << coords[k][j] << " ";
}
outfile << m_phys[j] << std::endl;
outfile << coords[j][i] << " ";
}
outfile << m_phys[i] << std::endl;
outfile << std::endl;
}
}
else if (format==eGnuplot)
......
......@@ -4,6 +4,7 @@
#include <MultiRegions/ExpList.h>
#include <MultiRegions/ExpList1D.h>
#include <MultiRegions/ExpList2D.h>
#include <MultiRegions/ExpList3D.h>
using namespace Nektar;
......@@ -27,38 +28,60 @@ int main(int argc, char *argv[])
SpatialDomains::MeshGraphSharedPtr graphShPt = SpatialDomains::MeshGraph::Read(vSession);//meshfile);
//----------------------------------------------
//----------------------------------------------
// Set up Expansion information
SpatialDomains::ExpansionMap emap = graphShPt->GetExpansions();
SpatialDomains::ExpansionMapIter it;
for (it = emap.begin(); it != emap.end(); ++it)
{
for (int i = 0; i < it->second->m_basisKeyVector.size(); ++i)
{
LibUtilities::BasisKey tmp1 = it->second->m_basisKeyVector[i];
LibUtilities::PointsKey tmp2 = tmp1.GetPointsKey();
it->second->m_basisKeyVector[i] = LibUtilities::BasisKey(
tmp1.GetBasisType(), tmp1.GetNumModes(),
LibUtilities::PointsKey(tmp1.GetNumModes(),
LibUtilities::ePolyEvenlySpaced));
}
}
//----------------------------------------------
//----------------------------------------------
// Define Expansion
graphShPt->ReadExpansions(meshfile);
int expdim = graphShPt->GetMeshDimension();
int expdim = graphShPt->GetMeshDimension();
Array<OneD, MultiRegions::ExpListSharedPtr> Exp(1);
switch(expdim)
{
case 1:
case 1:
{
MultiRegions::ExpList1DSharedPtr Exp1D;
Exp1D = MemoryManager<MultiRegions::ExpList1D>::AllocateSharedPtr(vSession,graphShPt);
Exp[0] = Exp1D;
break;
}
break;
case 2:
case 2:
{
MultiRegions::ExpList2DSharedPtr Exp2D;
Exp2D = MemoryManager<MultiRegions::ExpList2D>::AllocateSharedPtr(vSession,graphShPt);
Exp[0] = Exp2D;
break;
}
break;
case 3:
ASSERTL0(false,"3D not set up");
break;
default:
ASSERTL0(false,"Expansion dimension not recognised");
break;
case 3:
{
MultiRegions::ExpList3DSharedPtr Exp3D;
Exp3D = MemoryManager<MultiRegions::ExpList3D>::AllocateSharedPtr(vSession,graphShPt);
Exp[0] = Exp3D;
break;
}
default:
ASSERTL0(false,"Expansion dimension not recognised");
break;
}
//-----------------------------------------------
//----------------------------------------------
// Write solution depending on #define
string outfile(strtok(argv[argc-1],"."));
......
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