Nektar++
Namespaces | Functions
MMFDiffusion.cpp File Reference
#include <iomanip>
#include <iostream>
#include <boost/algorithm/string.hpp>
#include <boost/core/ignore_unused.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
 The above copyright notice and this permission notice shall be included.
 

Functions

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

Function Documentation

◆ main()

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

Definition at line 868 of file MMFDiffusion.cpp.

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

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