Nektar++
Namespaces | Functions
MMFDiffusion.cpp File Reference
#include <iomanip>
#include <iostream>
#include <boost/algorithm/string.hpp>
#include <DiffusionSolver/EquationSystems/MMFDiffusion.h>
#include <LibUtilities/BasicUtils/SessionReader.h>
#include <MultiRegions/AssemblyMap/AssemblyMapDG.h>
#include <SolverUtils/Driver.h>
#include <boost/math/special_functions/spherical_harmonic.hpp>

Go to the source code of this file.

Namespaces

namespace  Nektar
 

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 865 of file MMFDiffusion.cpp.

866{
869 std::string vDriverModule;
870 DriverSharedPtr drv;
871
872 try
873 {
874 // Create session reader.
875 session = LibUtilities::SessionReader::CreateInstance(argc, argv);
876
877 // Create MeshGraph
878 graph = SpatialDomains::MeshGraph::Read(session);
879
880 // Create driver
881 session->LoadSolverInfo("Driver", vDriverModule, "Standard");
882 drv = GetDriverFactory().CreateInstance(vDriverModule, session, graph);
883
884 // Execute driver
885 drv->Execute();
886
887 // Finalise session
888 session->Finalise();
889 }
890 catch (const std::runtime_error &e)
891 {
892 return 1;
893 }
894 catch (const std::string &eStr)
895 {
896 std::cout << "Error: " << eStr << std::endl;
897 }
898
899 return 0;
900}
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:143
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< Driver > DriverSharedPtr
A shared pointer to a Driver object.
Definition: Driver.h:52
DriverFactory & GetDriverFactory()
Definition: Driver.cpp:65
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:174

References Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), and Nektar::SolverUtils::GetDriverFactory().