KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::Kernel Class Reference

Kernel is in charge of synchronization the whole system of Kratos itself and its application. More...

#include <kernel.h>

Collaboration diagram for Kratos::Kernel:

Public Member Functions

Type Definitions
 KRATOS_CLASS_POINTER_DEFINITION (Kernel)
 Pointer definition of Kernel. More...
 
Life Cycle
 Kernel ()
 Default constructor. More...
 
 Kernel (bool IsDistributedRun)
 
 Kernel (Kernel const &rOther)
 Copy constructor. More...
 
virtual ~Kernel ()
 Destructor. More...
 

Operations

void ImportApplication (KratosApplication::Pointer pNewApplication)
 Plugging an application into Kratos. More...
 
void Initialize ()
 To be deprecated because variables have their own hash key. More...
 
void InitializeApplication (KratosApplication &NewApplication)
 Initializes and synchronizes the list of variables, elements and conditions in each application. More...
 
bool IsImported (const std::string &ApplicationName) const
 
static bool IsDistributedRun ()
 

Input and output

virtual std::string Info () const
 Turn back information as a string. More...
 
virtual void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
virtual void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 
void PrintParallelismSupportInfo () const
 
static std::unordered_set< std::string > & GetApplicationsList ()
 
static std::string Version ()
 
static std::string BuildType ()
 
static std::string OSName ()
 
static std::string PythonVersion ()
 
static std::string Compiler ()
 
static void SetPythonVersion (std::string)
 

Detailed Description

Kernel is in charge of synchronization the whole system of Kratos itself and its application.

Kernel is the first component of the Kratos to be created and then used to plug the application into Kratos. Kernel takes the list of variables defined in the Variables file in Kratos and then by adding each application synchronizes the variables of this application with its variables and add the new ones to the Kratos. After adding all applications its time to initialize the Kratos to assign variables key to the list of all variables in Kratos and all added applications. Finally the initialized variables with keys are synchronized in each application in time of calling InitializeApplication method for each of them. The sequence of using Kernel is as follow:

  1. Creating the Kernel using its default constructor
  2. Adding applications to Kernel using ImportApplication method
  3. Initializing the Kernel using Initialize method
  4. Initializing the applications using InitializeApplication method

    It is very important to perform all this step exactly in the same order as described above.

    See also
    ImportApplication
    Initialize
    InitializeApplication
    KratosApplication

Constructor & Destructor Documentation

◆ Kernel() [1/3]

Kratos::Kernel::Kernel ( )

Default constructor.

The default constructor creates a list of registered variables and classes in kratos_core.cpp by calling the RegisterKratosCore method of application class.

See also
KratosApplication

◆ Kernel() [2/3]

Kratos::Kernel::Kernel ( bool  IsDistributedRun)

◆ Kernel() [3/3]

Kratos::Kernel::Kernel ( Kernel const &  rOther)
inline

Copy constructor.

This constructor is empty

◆ ~Kernel()

virtual Kratos::Kernel::~Kernel ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ BuildType()

std::string Kratos::Kernel::BuildType ( )
static

◆ Compiler()

std::string Kratos::Kernel::Compiler ( )
static

◆ GetApplicationsList()

std::unordered_set< std::string > & Kratos::Kernel::GetApplicationsList ( )
static

◆ ImportApplication()

void Kratos::Kernel::ImportApplication ( KratosApplication::Pointer  pNewApplication)

Plugging an application into Kratos.

This method first call the register method of the new application in order to create the components list of the application and then synchronizes the lists of its components with Kratos ones. The synchronized lists are

  • Variables
  • Elements
  • Conditions
Parameters
NewApplicationThe application to be added and synchronized

◆ Info()

std::string Kratos::Kernel::Info ( ) const
virtual

Turn back information as a string.

◆ Initialize()

void Kratos::Kernel::Initialize ( )

To be deprecated because variables have their own hash key.

The keys of Variables are not sequential anymore, so this method will be deprecated

◆ InitializeApplication()

void Kratos::Kernel::InitializeApplication ( KratosApplication NewApplication)
inline

Initializes and synchronizes the list of variables, elements and conditions in each application.

This method gives the application the list of all variables, elements and condition which is registered by kratos and all other added applications.

See also
ImportApplication
Initialize

◆ IsDistributedRun()

bool Kratos::Kernel::IsDistributedRun ( )
static

◆ IsImported()

bool Kratos::Kernel::IsImported ( const std::string &  ApplicationName) const

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::Kernel::KRATOS_CLASS_POINTER_DEFINITION ( Kernel  )

Pointer definition of Kernel.

◆ OSName()

std::string Kratos::Kernel::OSName ( )
static

◆ PrintData()

void Kratos::Kernel::PrintData ( std::ostream &  rOStream) const
virtual

Print object's data.

◆ PrintInfo()

void Kratos::Kernel::PrintInfo ( std::ostream &  rOStream) const
virtual

Print information about this object.

◆ PrintParallelismSupportInfo()

void Kratos::Kernel::PrintParallelismSupportInfo ( ) const

◆ PythonVersion()

std::string Kratos::Kernel::PythonVersion ( )
static

◆ SetPythonVersion()

void Kratos::Kernel::SetPythonVersion ( std::string  pyVersion)
static

◆ Version()

std::string Kratos::Kernel::Version ( )
static

The documentation for this class was generated from the following files: