Definition at line 47 of file DiffusionSolverTimeInt.cpp.
Diffusion::Diffusion |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 84 of file DiffusionSolverTimeInt.cpp.
87 session = LibUtilities::SessionReader::CreateInstance(argc, argv);
90 fld = LibUtilities::FieldIO::CreateDefault(
session);
108 fields[0] =
field->UpdatePhys();
111 unsigned int nq =
field->GetNpoints();
113 field->GetCoords(x0,x1,x2);
117 =
session->GetFunction(
"InitialConditions",
"u");
118 icond->Evaluate(x0,x1,x2,0.0,
field->UpdatePhys());
MultiRegions::ContField2DSharedPtr field
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
LibUtilities::FieldIOSharedPtr fld
Array< OneD, Array< OneD, NekDouble > > fields
boost::shared_ptr< Equation > EquationSharedPtr
LibUtilities::SessionReaderSharedPtr session
SpatialDomains::MeshGraphSharedPtr graph
Diffusion::~Diffusion |
( |
| ) |
|
Definition at line 151 of file DiffusionSolverTimeInt.cpp.
References Nektar::StdRegions::eFactorLambda, Nektar::NullFlagList, and Vmath::Smul().
Referenced by TimeIntegrate().
160 for (
int i = 0; i < inarray.num_elements(); ++i)
168 field->HelmSolve(outarray[i],
169 field->UpdateCoeffs(),
173 field->BwdTrans (
field->GetCoeffs(), outarray[i]);
MultiRegions::ContField2DSharedPtr field
std::map< ConstFactorType, NekDouble > ConstFactorMap
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
static FlagList NullFlagList
An empty flag list.
void Diffusion::ExactSolution |
( |
| ) |
|
|
private |
Definition at line 193 of file DiffusionSolverTimeInt.cpp.
195 unsigned int nq =
field->GetNpoints();
197 field->GetCoords(x0,x1,x2);
200 session->GetFunction(
"ExactSolution",0);
209 cout <<
"L inf error: "
210 <<
field->Linf(
field->GetPhys(), exact) << endl;
211 cout <<
"L 2 error: "
212 <<
field->L2(
field->GetPhys(), exact) << endl;
213 cout <<
"H 1 error: "
214 <<
field->H1(
field->GetPhys(), exact) << endl;
MultiRegions::ContField2DSharedPtr field
boost::shared_ptr< Equation > EquationSharedPtr
LibUtilities::SessionReaderSharedPtr session
void Diffusion::TimeIntegrate |
( |
| ) |
|
Definition at line 126 of file DiffusionSolverTimeInt.cpp.
References DoImplicitSolve(), Nektar::LibUtilities::GetTimeIntegrationWrapperFactory(), Vmath::Vcopy(), and Vmath::Zero().
139 for (
int n = 0; n <
nSteps; ++n)
LibUtilities::TimeIntegrationWrapperSharedPtr IntScheme
MultiRegions::ContField2DSharedPtr field
void DefineImplicitSolve(FuncPointerT func, ObjectPointerT obj)
LibUtilities::TimeIntegrationSolutionSharedPtr u
Array< OneD, Array< OneD, NekDouble > > fields
TimeIntegrationWrapperFactory & GetTimeIntegrationWrapperFactory()
void DoImplicitSolve(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time, const NekDouble lambda)
LibUtilities::TimeIntegrationSchemeOperators ode
void Zero(int n, T *x, const int incx)
Zero vector.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
void Diffusion::WriteSolution |
( |
| ) |
|
|
private |
Definition at line 177 of file DiffusionSolverTimeInt.cpp.
180 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
181 =
field->GetFieldDefinitions();
182 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
183 for(
int i = 0; i < FieldDef.size(); ++i)
185 FieldDef[i]->m_fields.push_back(
"u");
186 field->AppendFieldData(FieldDef[i], FieldData[i]);
188 fld->Write(
session->GetSessionName() +
".fld", FieldDef, FieldData);
MultiRegions::ContField2DSharedPtr field
LibUtilities::FieldIOSharedPtr fld
LibUtilities::SessionReaderSharedPtr session
unsigned int Diffusion::nSteps |
|
private |
string Diffusion::sessionName |
|
private |