Commit ae2f7b02 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Merge branch 'master' into feature/geom-factors

parents 6415d988 6d32b93e
......@@ -6,8 +6,8 @@ IF (THIRDPARTY_BUILD_METIS)
EXTERNALPROJECT_ADD(
modmetis-5.1.0
PREFIX ${TPSRC}
URL ${TPURL}/modmetis-5.1.0.tar.bz2
URL_MD5 "8f8313a768e4611d1748d10f88f3d702"
URL ${TPURL}/modmetis-5.1.0_1.tar.bz2
URL_MD5 "6c6816aea0f53db6c71b1d98ed4ad42b"
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
......
......@@ -1327,6 +1327,7 @@ namespace Nektar
* in all other elements.
*/
cnt = 0;
// Loop over all the elements in the domain
for(i = 0; i < locExpVector.size(); ++i)
{
......@@ -1493,6 +1494,33 @@ namespace Nektar
edgeOrient = LocalRegions::Expansion2D::FromStdExp(bndCondFaceExp)->GetGeom2D()->GetEorient(k);
meshEdgeId = LocalRegions::Expansion2D::FromStdExp(bndCondFaceExp)->GetGeom2D()->GetEid(k);
pIt = periodicEdges.find(meshEdgeId);
// See if this edge is periodic. If it is, then we map
// all edges to the one with lowest ID, and align all
// coefficients to this edge orientation.
if (pIt != periodicEdges.end())
{
int minId = pIt->second[0].id;
int minIdL = 0;
for (l = 1; l < pIt->second.size(); ++l)
{
if (pIt->second[l].id < minId)
{
minId = min(minId, pIt->second[l].id);
minIdL = l;
}
}
if (pIt->second[minIdL].orient == StdRegions::eBackwards &&
meshEdgeId != min(minId, meshEdgeId))
{
edgeOrient = edgeOrient == StdRegions::eForwards ?
StdRegions::eBackwards :
StdRegions::eForwards;
}
}
bndCondFaceExp->GetEdgeInteriorMap(
k,edgeOrient,edgeInteriorMap,edgeInteriorSign);
......
......@@ -327,6 +327,7 @@ namespace Nektar
// Set up integer mapping array and sign change for each
// degree of freedom + initialise some more data members
m_staticCondLevel = 0;
m_lowestStaticCondLevel = 0;
m_numPatches = nel;
m_numLocalBndCoeffsPerPatch = Array<OneD, unsigned int>(nel);
m_numLocalIntCoeffsPerPatch = Array<OneD, unsigned int>(nel);
......@@ -735,6 +736,7 @@ namespace Nektar
// Set up integer mapping array and sign change for each
// degree of freedom + initialise some more data members
m_staticCondLevel = 0;
m_lowestStaticCondLevel = 0;
m_numPatches = nel;
m_numLocalBndCoeffsPerPatch = Array<OneD, unsigned int>(nel);
m_numLocalIntCoeffsPerPatch = Array<OneD, unsigned int>(nel);
......
......@@ -333,27 +333,35 @@ namespace Nektar
SegGeomSharedPtr edge;
// First set up the 3 bottom edges
if(m_faces[0]->GetEid(0) != m_faces[1]->GetEid(0))
{
std::ostringstream errstrm;
errstrm << "Local edge 0 (eid=" << m_faces[0]->GetEid(0);
errstrm << ") on face " << m_faces[0]->GetFid();
errstrm << " must be the same as local edge 0 (eid="<<m_faces[1]->GetEid(0);
errstrm << ") on face " << m_faces[1]->GetFid();
ASSERTL0(false, errstrm.str());
}
int faceConnected;
for(faceConnected = 1; faceConnected < 4 ; faceConnected++)
{
check = 0;
for(i = 0; i < 3; i++)
{
for(j = 0; j < 3; j++)
if( (m_faces[0])->GetEid(i) == (m_faces[faceConnected])->GetEid(0) )
{
if( (m_faces[0])->GetEid(i) == (m_faces[faceConnected])->GetEid(j) )
{
edge = boost::dynamic_pointer_cast<SegGeom>((m_faces[0])->GetEdge(i));
m_edges.push_back(edge);
check++;
}
edge = boost::dynamic_pointer_cast<SegGeom>((m_faces[0])->GetEdge(i));
m_edges.push_back(edge);
check++;
}
}
if( check < 1 )
{
std::ostringstream errstrm;
errstrm << "Connected faces do not share an edge. Faces ";
errstrm << "Face 0 does not share an edge with first edge of adjacent face. Faces ";
errstrm << (m_faces[0])->GetFid() << ", " << (m_faces[faceConnected])->GetFid();
ASSERTL0(false, errstrm.str());
}
......@@ -366,6 +374,7 @@ namespace Nektar
}
}
// Then, set up the 3 vertical edges
check = 0;
for(i = 0; i < 3; i++) //Set up the vertical edge :face(1) and face(3)
......
......@@ -60,6 +60,7 @@ IF( NEKTAR_SOLVER_INCNAVIERSTOKES )
ADD_NEKTAR_TEST_LENGTHY(Tet_Kovasnay_SubStep)
ADD_NEKTAR_TEST(Tet_channel_m3)
ADD_NEKTAR_TEST(Tet_channel_m3_dealiasing)
ADD_NEKTAR_TEST(Tet_channel_m4_per)
ADD_NEKTAR_TEST_LENGTHY(Tet_equitri)
ADD_NEKTAR_TEST_LENGTHY(Prism_channel_m6)
ADD_NEKTAR_TEST_LENGTHY(Prism_channel_m6_dealiasing)
......
......@@ -331,8 +331,8 @@ namespace Nektar
UnsteadySystem::v_DoInitialise();
// Set up Field Meta Data for output files
m_fieldMetaDataMap["Kinvis"] = m_kinvis;
m_fieldMetaDataMap["TimeStep"] = m_timestep;
m_fieldMetaDataMap["Kinvis"] = boost::lexical_cast<std::string>(m_kinvis);
m_fieldMetaDataMap["TimeStep"] = boost::lexical_cast<std::string>(m_timestep);
for(int i = 0; i < m_nConvectiveFields; ++i)
{
......@@ -788,7 +788,6 @@ namespace Nektar
Pbc->NormVectorIProductWRTBase(Uy,Vx,Pvals);
}
}
// setting if just standard BC not High order
else if(type == SpatialDomains::eNoUserDefined || type == SpatialDomains::eTimeDependent)
{
......
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>3D channel flow, Tetrahedral elements, P=4, periodic BCs</description>
<executable>IncNavierStokesSolver</executable>
<parameters>Tet_channel_m4_per.xml</parameters>
<files>
<file description="Session File">Tet_channel_m4_per.xml</file>
</files>
<metrics>
<metric type="L2" id="1">
<value variable="u" tolerance="1e-12">2.169e-15</value>
<value variable="v" tolerance="1e-12">2.23196e-16</value>
<value variable="w" tolerance="1e-12">4.49841e-16</value>
<value variable="p" tolerance="1e-8">1.65856e-14</value>
</metric>
<metric type="Linf" id="2">
<value variable="u" tolerance="1e-12">2.10942e-15</value>
<value variable="v" tolerance="1e-12">3.00716e-16</value>
<value variable="w" tolerance="1e-12">3.21388e-16</value>
<value variable="p" tolerance="1e-8">1.02141e-14</value>
</metric>
</metrics>
</test>
<?xml version="1.0" encoding="utf-8" ?>
<NEKTAR>
<GEOMETRY DIM="3" SPACE="3">
<VERTEX>
<V ID="0">-1.00000000e+00 1.00000000e+00 -1.00000000e+00</V>
<V ID="1">-1.00000000e+00 -1.00000000e+00 -1.00000000e+00</V>
<V ID="2"> 1.00000000e+00 -1.00000000e+00 -1.00000000e+00</V>
<V ID="3"> 1.00000000e+00 -1.00000000e+00 1.00000000e+00</V>
<V ID="4"> 1.00000000e+00 1.00000000e+00 -1.00000000e+00</V>
<V ID="5"> 1.00000000e+00 1.00000000e+00 1.00000000e+00</V>
<V ID="6">-1.00000000e+00 1.00000000e+00 1.00000000e+00</V>
<V ID="7">-1.00000000e+00 -1.00000000e+00 1.00000000e+00</V>
</VERTEX>
<EDGE>
<E ID="0"> 0 1 </E>
<E ID="1"> 1 2 </E>
<E ID="2"> 0 2 </E>
<E ID="3"> 0 3 </E>
<E ID="4"> 1 3 </E>
<E ID="5"> 2 3 </E>
<E ID="6"> 4 2 </E>
<E ID="7"> 4 0 </E>
<E ID="8"> 4 3 </E>
<E ID="9"> 0 5 </E>
<E ID="10"> 5 3 </E>
<E ID="11"> 4 5 </E>
<E ID="12"> 6 0 </E>
<E ID="13"> 6 3 </E>
<E ID="14"> 6 5 </E>
<E ID="15"> 0 7 </E>
<E ID="16"> 7 3 </E>
<E ID="17"> 6 7 </E>
<E ID="18"> 1 7 </E>
</EDGE>
<FACE>
<T ID="0"> 0 1 2</T>
<T ID="1"> 0 4 3 </T>
<T ID="2"> 1 5 4 </T>
<T ID="3"> 2 5 3 </T>
<T ID="4"> 7 2 6 </T>
<T ID="5"> 7 3 8 </T>
<T ID="6"> 6 5 8 </T>
<T ID="7"> 9 3 10 </T>
<T ID="8"> 11 10 8 </T>
<T ID="9"> 7 11 9 </T>
<T ID="10"> 12 3 13 </T>
<T ID="11"> 14 13 10 </T>
<T ID="12"> 12 9 14 </T>
<T ID="13"> 15 3 16 </T>
<T ID="14"> 17 16 13</T>
<T ID="15"> 12 17 15 </T>
<T ID="16"> 0 18 15 </T>
<T ID="17"> 18 4 16 </T>
</FACE>
<ELEMENT>
<A ID="0"> 0 1 2 3 </A>
<A ID="1"> 4 5 3 6 </A>
<A ID="2"> 9 5 8 7 </A>
<A ID="3"> 12 10 7 11 </A>
<A ID="4"> 15 10 14 13 </A>
<A ID="5"> 16 1 13 17 </A>
</ELEMENT>
<COMPOSITE>
<C ID="0"> A[0-5] </C>
<C ID="1"> F[0,4,11,14] </C> // top walls
<C ID="2"> F[6,8] </C> // outflow
<C ID="3"> F[15-16] </C> // inflow
<C ID="4"> F[9,12] </C> // Side walls
<C ID="5"> F[2,17] </C> // Side walls
</COMPOSITE>
<DOMAIN> C[0] </DOMAIN>
</GEOMETRY>
<EXPANSIONS>
<E COMPOSITE="C[0]" NUMMODES="4" TYPE="MODIFIED" FIELDS="u,v,w,p" />
</EXPANSIONS>
<CONDITIONS>
<SOLVERINFO>
<I PROPERTY="SolverType" VALUE="VelocityCorrectionScheme" />
<I PROPERTY="EQTYPE" VALUE="UnsteadyNavierStokes" />
<I PROPERTY="AdvectionForm" VALUE="Convective" />
<I PROPERTY="Projection" VALUE="Galerkin" />
<I PROPERTY="TimeIntegrationMethod" VALUE="IMEXOrder1" />
<I PROPERTY="GlobalSysSoln" VALUE="DirectStaticCond" />
</SOLVERINFO>
<PARAMETERS>
<P> TimeStep = 0.1 </P>
<P> NumSteps = 2 </P>
<P> IO_CheckSteps = 100 </P>
<P> IO_InfoSteps = 1 </P>
<P> IO_CFLSteps = 1 </P>
<P> Kinvis = 1 </P>
</PARAMETERS>
<VARIABLES>
<V ID="0">u</V>
<V ID="1">v</V>
<V ID="2">w</V>
<V ID="3">p</V>
</VARIABLES>
<BOUNDARYREGIONS>
<B ID="0">C[1]</B>
<B ID="1">C[2]</B>
<B ID="2">C[3]</B>
<B ID="3">C[4]</B>
<B ID="4">C[5]</B>
</BOUNDARYREGIONS>
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="u" VALUE="0" />
<D VAR="v" VALUE="0" />
<D VAR="w" VALUE="0" />
<N VAR="p" VALUE="0" USERDEFINEDTYPE="H" />
</REGION>
<REGION REF="1">
<N VAR="u" VALUE="0" />
<N VAR="v" VALUE="0" />
<N VAR="w" VALUE="0" />
<D VAR="p" VALUE="0" />
</REGION>
<REGION REF="2">
<D VAR="u" VALUE="1-z^2" />
<D VAR="v" VALUE="0.0" />
<D VAR="w" VALUE="0.0" />
<N VAR="p" VALUE="0" USERDEFINEDTYPE="H" />
</REGION>
<REGION REF="3">
<P VAR="u" VALUE="[4]" />
<P VAR="v" VALUE="[4]" />
<P VAR="w" VALUE="[4]" />
<P VAR="p" VALUE="[4]" />
</REGION>
<REGION REF="4">
<P VAR="u" VALUE="[3]" />
<P VAR="v" VALUE="[3]" />
<P VAR="w" VALUE="[3]" />
<P VAR="p" VALUE="[3]" />
</REGION>
</BOUNDARYCONDITIONS>
<FUNCTION NAME="InitialConditions">
<E VAR="u" VALUE="1-z^2" />
<E VAR="v" VALUE="0" />
<E VAR="w" VALUE="0" />
<E VAR="p" VALUE="-2*(x-1)" />
</FUNCTION>
<FUNCTION NAME="ExactSolution">
<E VAR="u" VALUE="1-z^2" />
<E VAR="v" VALUE="0" />
<E VAR="w" VALUE="0" />
<E VAR="p" VALUE="-2*(x-1)" />
</FUNCTION>
</CONDITIONS>
</NEKTAR>
......@@ -43,7 +43,7 @@ int main(int argc, char *argv[])
Array<OneD, MultiRegions::ExpListSharedPtr> fields = IncNav->UpdateFields();
int i,n,nquad,cnt;
int nfields = fields.num_elements();
int nexp = fields[n]->GetExpSize();
int nexp = fields[0]->GetExpSize();
int elmtid = Vmath::Imax(nexp,cfl,1);
......
......@@ -37,9 +37,9 @@ int main(int argc, char *argv[])
TiXmlElement *nektar = docInput.FirstChildElement("NEKTAR");
// load up root processor's meta data
if(n == 0 && nektar->FirstChildElement("FIELDMETADATA"))
if(n == 0 && nektar->FirstChildElement("Metadata"))
{
TiXmlElement *metadata = nektar->FirstChildElement("FIELDMETADATA");
TiXmlElement *metadata = nektar->FirstChildElement("Metadata");
if(metadata)
{
master->LinkEndChild(new TiXmlElement(*metadata));
......
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