14 int main(
int argc,
char *argv[])
18 fprintf(stderr,
"Usage: ./Aliasing file.xml \n");
19 fprintf(stderr,
"\t Method will read intiial conditions section of .xml file for input \n");
29 session = LibUtilities::SessionReader::CreateInstance(argc, argv);
32 session->LoadSolverInfo(
"Driver", vDriverModule,
"Standard");
43 int nConvectiveFields = IncNav->GetNConvectiveFields();
44 int nphys = fields[0]->GetTotPoints();
49 for(i = 0; i < nConvectiveFields; ++i)
51 VelFields[i] = fields[i]->UpdatePhys();
56 boost::shared_ptr<NavierStokesAdvection>
A
61 cout <<
"Must use non-linear Navier-Stokes advection" << endl;
66 A->SetSpecHPDealiasing(
false);
67 A->Advect(nConvectiveFields, fields,
73 A->SetSpecHPDealiasing(
true);
74 A->Advect(nConvectiveFields, fields,
76 NonLinearDealiased, 0.0);
79 for(i = 0; i < nConvectiveFields; ++i)
81 Vmath::Vsub(nphys,NonLinearDealiased[i],1,NonLinear[i],1,NonLinear[i],1);
82 fields[i]->FwdTrans_IterPerExp(NonLinear[i],fields[i]->UpdateCoeffs());
84 string name =
"NL_Aliasing_"+session->GetVariable(i);
85 session->SetVariable(i,name.c_str());
90 std::string outname = IncNav->GetSessionName();
92 outname +=
"_NonLinear_Aliasing";
93 IncNav->ResetSessionName(outname);
97 catch (
const std::runtime_error&)
101 catch (
const std::string& eStr)
103 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
int main(int argc, char *argv[])
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.