The first example in this tutorial allows for the development of a module using ARCANE. The goal of this module is to display the message "Hello World !".
Modules
- Prerequisites
-
- Actions to perform
- Following the previously referenced documents, you must:
- Create the class
HelloWorldModule by completing the files HelloWorldModule.h and HelloWorldModule.cc:
- Declare the class
- Complete the inheritance
- Define the constructors and destructors
- Register the module with the macro
- Complete the file
HelloWorld.axl which describes the previously created module.
- Compile. The
Makefile files are provided. By observing them, you will notice that you must not forget:
- to compile with the include files of ARCANE
- to perform the linking with the arcane, arcane_std and arcane_mpi libraries (for parallel executions)
Entry Points
- Prerequisites
-
- Actions to perform
- Complete the module by creating a method
HelloWorldModule::printHelloWorld which writes "Hello World !"
- Complete the file
HelloWorld.axl by declaring the entry point
- Recompile
Time Loop
- Prerequisites
-
- Actions to perform
- Complete the file
HelloWorld.config to define the time loop of the application
- Define your application by completing the file
main.cc
- Recompile
Data File
- Actions to perform
- Complete the data file
HelloWorld.arc by selecting the previously defined time loop.
- Execute !
Traces
- Prerequisites
-
- Actions to perform
- Display the message "Hello World" using ARCANE traces.
- Execute !
- Create a user configuration file config.xml and perform executions by parameterizing the display