Advanced Multi-Physics (AMP)
On-Line Documentation
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
AMP::Mesh::initializeLibMesh Class Referencefinal

A class to initialize libMesh. More...

#include <initializeLibMesh.h>

Public Member Functions

 initializeLibMesh (const AMP_MPI &comm)
 
 ~initializeLibMesh ()
 

Static Public Member Functions

static bool canBeInitialized (const AMP_MPI &comm)
 
static bool isInitialized ()
 

Private Member Functions

 initializeLibMesh ()
 

Static Private Attributes

static AMP_MPI d_comm
 
static void * lminit
 
static std::atomic< int > N_copies
 

Detailed Description

A class to initialize libMesh.

This class provides routines for initializing and finalizing libmesh. Note: this class is not thread safe yet.

Definition at line 15 of file initializeLibMesh.h.

Constructor & Destructor Documentation

◆ initializeLibMesh() [1/2]

AMP::Mesh::initializeLibMesh::initializeLibMesh ( const AMP_MPI comm)
explicit

Constructor that inializes libmesh on the given communicator. Note: libmesh can only be initialized on one comm at a given time. This function can be called more than once. If the the comms share the same comm, then this function will succeed. It the comms are different, then this function will throw an error. If a different comm is needed, then the user needs to call finalize first.

◆ ~initializeLibMesh()

AMP::Mesh::initializeLibMesh::~initializeLibMesh ( )

Deconstructor that finalizes libmesh. This allows libmesh to be reinitialized on a new comm, and frees any memory in use by libmesh.

◆ initializeLibMesh() [2/2]

AMP::Mesh::initializeLibMesh::initializeLibMesh ( )
inlineprivate

Definition at line 50 of file initializeLibMesh.h.

Member Function Documentation

◆ canBeInitialized()

static bool AMP::Mesh::initializeLibMesh::canBeInitialized ( const AMP_MPI comm)
static

Function to check if libmesh can be initialized with the given comm. If this function returns true, then initializeLibMesh::initialize can be safely called with the given comm. Otherwise, initializeLibMesh::finalize must be called first.

◆ isInitialized()

static bool AMP::Mesh::initializeLibMesh::isInitialized ( )
static

Function to check if libmesh has been initialized for any communicator (are there any copies of the class that have not been destroyed)

Member Data Documentation

◆ d_comm

AMP_MPI AMP::Mesh::initializeLibMesh::d_comm
staticprivate

Definition at line 54 of file initializeLibMesh.h.

◆ lminit

void* AMP::Mesh::initializeLibMesh::lminit
staticprivate

Definition at line 55 of file initializeLibMesh.h.

◆ N_copies

std::atomic<int> AMP::Mesh::initializeLibMesh::N_copies
staticprivate

Definition at line 53 of file initializeLibMesh.h.


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



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:43.
Comments on this page