17 fprintf(stderr,
"Usage: ./Aliasing file.xml \n");
18 fprintf(stderr,
"\t Method will read intiial conditions section of .xml file for input \n");
28 session = LibUtilities::SessionReader::CreateInstance(argc, argv);
31 session->LoadSolverInfo(
"Driver", vDriverModule,
"Standard");
42 int nConvectiveFields = IncNav->GetNConvectiveFields();
43 int nphys = fields[0]->GetTotPoints();
48 for(i = 0; i < nConvectiveFields; ++i)
50 VelFields[i] = fields[i]->UpdatePhys();
55 boost::shared_ptr<NavierStokesAdvection> A
60 cout <<
"Must use non-linear Navier-Stokes advection" << endl;
65 A->SetSpecHPDealiasing(
false);
66 A->Advect(nConvectiveFields, fields,
72 A->SetSpecHPDealiasing(
true);
73 A->Advect(nConvectiveFields, fields,
75 NonLinearDealiased, 0.0);
78 for(i = 0; i < nConvectiveFields; ++i)
80 Vmath::Vsub(nphys,NonLinearDealiased[i],1,NonLinear[i],1,NonLinear[i],1);
81 fields[i]->FwdTrans_IterPerExp(NonLinear[i],fields[i]->UpdateCoeffs());
83 string name =
"NL_Aliasing_"+session->GetVariable(i);
84 session->SetVariable(i,name.c_str());
89 std::string outname = IncNav->GetSessionName();
91 outname +=
"_NonLinear_Aliasing";
92 IncNav->ResetSessionName(outname);
96 catch (
const std::runtime_error&)
100 catch (
const std::string& eStr)
102 cout <<
"Error: " << eStr << endl;
boost::shared_ptr< Driver > DriverSharedPtr
A shared pointer to a Driver object.
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
boost::shared_ptr< IncNavierStokes > IncNavierStokesSharedPtr
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
boost::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
This class is the base class for Navier Stokes problems.
DriverFactory & GetDriverFactory()
SOLVER_UTILS_EXPORT void SetInitialConditions(NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)
Initialise the data in the dependent fields.