www.mooseframework.org
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ExternalPetscSolverApp Class Reference

This is a demo used to demonstrate how to couple an external app through the MOOSE wrapper APP. More...

#include <ExternalPetscSolverApp.h>

Inheritance diagram for ExternalPetscSolverApp:
[legend]

Public Member Functions

 ExternalPetscSolverApp (InputParameters parameters)
 
virtual ~ExternalPetscSolverApp ()
 
TS & getExternalPETScTS ()
 Return a time-stepping (TS) component that holds all the ingredients of applicaiton. More...
 

Static Public Member Functions

static void registerApps ()
 
static void registerAll (Factory &f, ActionFactory &af, Syntax &s)
 

Private Attributes

TS _ts
 Time-stepping (TS) object. More...
 

Detailed Description

This is a demo used to demonstrate how to couple an external app through the MOOSE wrapper APP.

We are using a PETSc application as an example. ExternalPetscSolverApp create and destroys an external PETSc FEM/FDM solver.

Definition at line 25 of file ExternalPetscSolverApp.h.

Constructor & Destructor Documentation

◆ ExternalPetscSolverApp()

ExternalPetscSolverApp::ExternalPetscSolverApp ( InputParameters  parameters)

Definition at line 24 of file ExternalPetscSolverApp.C.

24  : MooseApp(parameters)
25 {
26  ExternalPetscSolverApp::registerAll(_factory, _action_factory, _syntax);
27 
28 #if LIBMESH_HAVE_PETSC
29  PETScExternalSolverCreate(_comm->get(), &_ts);
30 #else
31  mooseError("You need to have PETSc installed to use ExternalPETScApp");
32 #endif
33 }

◆ ~ExternalPetscSolverApp()

ExternalPetscSolverApp::~ExternalPetscSolverApp ( )
virtual

Definition at line 35 of file ExternalPetscSolverApp.C.

36 {
37 #if LIBMESH_HAVE_PETSC
39 #endif
40 }

Member Function Documentation

◆ getExternalPETScTS()

TS& ExternalPetscSolverApp::getExternalPETScTS ( )
inline

Return a time-stepping (TS) component that holds all the ingredients of applicaiton.

Definition at line 38 of file ExternalPetscSolverApp.h.

38 { return _ts; }

Referenced by PETScDMDAMesh::PETScDMDAMesh().

◆ registerAll()

void ExternalPetscSolverApp::registerAll ( Factory &  f,
ActionFactory &  af,
Syntax &  s 
)
static

Definition at line 43 of file ExternalPetscSolverApp.C.

44 {
45  Registry::registerObjectsTo(f, {"ExternalPetscSolverApp"});
46  Registry::registerActionsTo(af, {"ExternalPetscSolverApp"});
47 
48  /* register custom execute flags, action syntax, etc. here */
49 }

Referenced by ExternalPetscSolverApp(), ExternalPetscSolverApp__registerAll(), ExternalPetscSolverTestApp::registerAll(), CombinedTestApp::registerAll(), CombinedApp::registerAll(), and ModulesApp::registerAll().

◆ registerApps()

void ExternalPetscSolverApp::registerApps ( )
static

Definition at line 52 of file ExternalPetscSolverApp.C.

53 {
54  registerApp(ExternalPetscSolverApp);
55 }

Referenced by ExternalPetscSolverApp__registerApps().

Member Data Documentation

◆ _ts

TS ExternalPetscSolverApp::_ts
private

Time-stepping (TS) object.

Definition at line 43 of file ExternalPetscSolverApp.h.

Referenced by ExternalPetscSolverApp(), getExternalPETScTS(), and ~ExternalPetscSolverApp().


The documentation for this class was generated from the following files:
ExternalPetscSolverApp::_ts
TS _ts
Time-stepping (TS) object.
Definition: ExternalPetscSolverApp.h:43
PETScExternalSolverCreate
PETSC_EXTERN PetscErrorCode PETScExternalSolverCreate(MPI_Comm, TS *)
Definition: PETScDiffusionFDM.C:30
ExternalPetscSolverApp::registerAll
static void registerAll(Factory &f, ActionFactory &af, Syntax &s)
Definition: ExternalPetscSolverApp.C:43
PETScExternalSolverDestroy
PETSC_EXTERN PetscErrorCode PETScExternalSolverDestroy(TS)
Definition: PETScDiffusionFDM.C:84
ExternalPetscSolverApp
This is a demo used to demonstrate how to couple an external app through the MOOSE wrapper APP.
Definition: ExternalPetscSolverApp.h:25