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 <SpatialDomains/MeshGraphIO.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 866 of file MMFDiffusion.cpp.

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

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