48int main(
int argc,
char *argv[])
52 fprintf(stderr,
"Usage: ./CflStep file.xml \n");
53 fprintf(stderr,
"\t Method will read initial conditions section of "
54 ".xml file for input \n");
72 session->LoadSolverInfo(
"Driver", vDriverModule,
"Standard");
83 IncNav->UpdateFields();
85 int nfields = fields.size();
86 int nexp = fields[0]->GetExpSize();
90 cout <<
"Max CFL: " << cfl[elmtid] <<
" In element " << elmtid << endl;
92 for (n = 0; n < nfields; ++n)
94 if (session->GetVariable(n) ==
"p")
100 ASSERTL0(n != nfields,
"Could not find field named p in m_fields");
105 for (i = 0; i < fields[n]->GetExpSize(); ++i)
107 nquad = fields[n]->GetExp(i)->GetTotPoints();
112 fields[n]->FwdTransLocalElmt(fields[n]->GetPhys(),
113 fields[n]->UpdateCoeffs());
116 session->SetVariable(n,
"CFL");
119 std::string outname = IncNav->GetSessionName();
121 outname +=
"_CFLStep";
122 IncNav->ResetSessionName(outname);
125 catch (
const std::runtime_error &)
129 catch (
const std::string &eStr)
131 cout <<
"Error: " << eStr << endl;
static MeshGraphSharedPtr Read(const LibUtilities::SessionReaderSharedPtr pSession, LibUtilities::DomainRangeShPtr rng=LibUtilities::NullDomainRangeShPtr, bool fillGraph=true, SpatialDomains::MeshGraphSharedPtr partitionedGraph=nullptr)
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.