Simulation – Nalu Top-level Interface

class Simulation

Realms

Realm is a Nalu abstraction of a set of equations that are solved on a computational domain, reresented by an Exodus-II mesh. A simulation can contain multiple Realms and that can interact via sierra::nalu::Transfer instance. InputOutputRealm is a special type of Realm that exists solely to provide data (input) or extract a subset of data from another Realm.

class Realm

Representation of a computational domain and physics equations solved on this domain.

Subclassed by sierra::nalu::InputOutputRealm

Public Functions

void set_hypre_global_id()

Initialize the HYPRE global row IDs.

See

Realm::hypreGlobalId_

void check_job(bool get_node_count)

check job for fitting in memory

Public Members

stk::mesh::PartVector bcPartVec_

Vector holding side sets that have been registered with the boundary conditions in the input file.

The member is intended to for use in Realm::enforce_bc_on_exposed_faces to check for “exposed surfaces” that might have not been assigned BCs in the input file.

stk::mesh::EntityId hypreILower_

The starting index (global) of the HYPRE linear system in this MPI rank.

Note that this is actually the offset into the linear system. This index must be adjusted accordingly to account for multiple degrees of freedom on a particular node. This is performed in sierra::nalu::HypreLinearSystem.

stk::mesh::EntityId hypreIUpper_

The ending index (global) of the HYPRE linear system in this MPI rank.

Note that this is actually the offset into the linear system. This index must be adjusted accordingly to account for multiple degrees of freedom on a particular node. This is performed in sierra::nalu::HypreLinearSystem.

stk::mesh::EntityId hypreNumNodes_

The total number of HYPRE nodes in the linear system.

Note that this is not an MPI rank local quantity

HypreIDFieldType *hypreGlobalId_ = {nullptr}

Global Row IDs for the HYPRE linear system.

The HYPRE IDs are different from STK IDs and Realm::naluGlobalId_ because HYPRE expects contiguous IDs for matrix rows and further requires that the IDs be ordered across MPI ranks; i.e., startIdx (MPI_rank + 1) = endIdx(MPI_rank) + 1.

bool hypreIsActive_ = {false}

Flag indicating whether Hypre solver is being used for any of the equation systems.

class InputOutputRealm : public sierra::nalu::Realm
class Realms

Time Integration

class TimeIntegrator

Linear Solver Interface

class LinearSystem

Subclassed by sierra::nalu::HypreLinearSystem, sierra::nalu::TpetraLinearSystem

Public Functions

virtual void buildDirichletNodeGraph(const stk::mesh::PartVector&)

Process nodes that belong to Dirichlet-type BC.

virtual void buildDirichletNodeGraph(const std::vector<stk::mesh::Entity>&)

Process nodes as belonging to a Dirichlet-type row.

See the documentation/implementation of sierra::nalu::FixPressureAtNodeAlgorithm for an example of this use case.

virtual void resetRows(std::vector<stk::mesh::Entity> nodeList, const unsigned beginPos, const unsigned endPos) = 0

Reset LHS and RHS for the given set of nodes to 0.

Parameters
  • nodeList: A list of STK node entities whose rows are zeroed out

  • beginPos: Starting index (usually 0)

  • endPos: Terminating index (1 for scalar quantities; nDim for vectors)

class LinearSolver

An abstract representation of a linear solver in Nalu.

Defines the basic API supported by the linear solvers for use within Nalu. See concrete implementations such as sierra::nalu::TpetraLinearSolver for more details.

Subclassed by sierra::nalu::HypreDirectSolver, sierra::nalu::TpetraLinearSolver

Public Functions

virtual PetraType getType() = 0

Type of solver instance as defined in sierra::nalu::PetraType.

virtual void destroyLinearSolver() = 0

Utility method to cleanup solvers during simulation.

bool &recomputePreconditioner()

Flag indicating whether the preconditioner is recomputed on each invocation.

bool &reusePreconditioner()

Flag indicating whether the preconditioner is reused on each invocation.

void zero_timer_precond()

Reset the preconditioner timer to 0.0 for future accumulation.

double get_timer_precond()

Get the preconditioner timer for the last invocation.

bool &activeMueLu()

Flag indicating whether the user has activated MueLU.

LinearSolverConfig *getConfig()

Get the solver configuration specified in the input file.

Public Members

std::string name_

User-friendly identifier for this particular solver instance.

class TpetraLinearSystem : public sierra::nalu::LinearSystem

Public Functions

virtual void resetRows(const std::vector<stk::mesh::Entity> nodeList, const unsigned beginPos, const unsigned endPos)

Reset LHS and RHS for the given set of nodes to 0.

Parameters
  • nodeList: A list of STK node entities whose rows are zeroed out

  • beginPos: Starting index (usually 0)

  • endPos: Terminating index (1 for scalar quantities; nDim for vectors)

Transfers

class Transfer
class Transfers