Getting Started
15 minutes basic
Lesson Objectives
Run a simple MFEM code to test the environment.
Note
IP
address to follow the steps described below.
If you are part of the
HPC software tutorial series,
you should have received an email with the AWS instance IP address allocated to you.
Use that in place of IP
in the instructions below.
If you are running a
Docker container locally, as described in the Local Docker Container page, use localhost
in place of IP
in the instructions below.
If you setup your own cloud instance with the Docker container, you should use the cloud instance IP
address.
Warning
Set up VS Code
-
Open a new browser window and load
http://IP:3000
. -
You should see the Visual Studio Code (VS Code) interface.
-
Click on
Mark Done
to continue.
-
Click on
open a folder
(underRecent
), then selectmfem
, then clickOK
. -
In the left pane, open
examples
and selectex1.cpp
. -
Open a new terminal by clicking on in the upper left corner, then
Terminal
, and thenNew Terminal
. -
Alternatively you can open a new terminal by pressing Ctrl + Shift + `.
-
You should now see the MFEM source tree and a terminal in the
~/mfem
directory.
Note
Set up GLVis
In this tutorial we use GLVis for finite element visualization based on MFEM.
-
Open a new browser window and load
http://IP:8000/live
. -
When you move the mouse to the top of the window you should see the GLVis interface:
- Click on the Connect to socket icon in
the upper left corner, then click
CONNECT
.
Note
IP
.
-
When the button switches to
DISCONNECT
, click outside of the Connect to socket dialog to close it. -
Your environment should now look like:
Simple test
-
To test your environment, run
ex1
, which together with the MFEM library itself, comes pre-build in the AWS image. -
In the VS Code terminal, type
cd examples ./ex1
-
You should see
111
iterations printed in the terminal and the image in the GLVis window should change:
- To test the visualization, click in the GLVis window, and make sure you can rotate the plot with the Left mouse button and zoom in/out with the Right mouse button.
Questions?
Next Steps
Back to the MFEM tutorial page