Detailed Description
Definition at line 46 of file DiffusionSolverTimeInt.cpp.
Constructor & Destructor Documentation
Diffusion::Diffusion |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 83 of file DiffusionSolverTimeInt.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::LibUtilities::SessionReader::CreateInstance(), and Nektar::SpatialDomains::MeshGraph::Read().
{
session = LibUtilities::SessionReader::CreateInstance(argc, argv);
fields = Array<OneD, Array<OneD, NekDouble> >(1);
fields[0] =
field->UpdatePhys();
unsigned int nq =
field->GetNpoints();
Array<OneD,NekDouble> x0(nq), x1(nq), x2(nq);
field->GetCoords(x0,x1,x2);
=
session->GetFunction(
"InitialConditions",
"u");
icond->Evaluate(x0,x1,x2,0.0,
field->UpdatePhys());
}
Diffusion::~Diffusion |
( |
| ) |
|
Member Function Documentation
void Diffusion::ExactSolution |
( |
| ) |
|
|
private |
Definition at line 193 of file DiffusionSolverTimeInt.cpp.
{
unsigned int nq =
field->GetNpoints();
Array<OneD,NekDouble> x0(nq), x1(nq), x2(nq);
field->GetCoords(x0,x1,x2);
session->GetFunction(
"ExactSolution",0);
if(ex_sol)
{
Array<OneD, NekDouble> exact(nq);
cout << "L inf error: "
cout << "L 2 error: "
cout << "H 1 error: "
}
}
void Diffusion::TimeIntegrate |
( |
| ) |
|
void Diffusion::WriteSolution |
( |
| ) |
|
|
private |
Definition at line 177 of file DiffusionSolverTimeInt.cpp.
{
std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
=
field->GetFieldDefinitions();
std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
for(int i = 0; i < FieldDef.size(); ++i)
{
FieldDef[i]->m_fields.push_back("u");
field->AppendFieldData(FieldDef[i], FieldData[i]);
}
fld->Write(
session->GetSessionName() +
".fld", FieldDef, FieldData);
}
Member Data Documentation
unsigned int Diffusion::nSteps |
|
private |
string Diffusion::sessionName |
|
private |