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 15 of file ExternalPetscSolverApp.C.

15  : MooseApp(parameters)
16 {
17  ExternalPetscSolverApp::registerAll(_factory, _action_factory, _syntax);
18 
19 #if LIBMESH_HAVE_PETSC
20  PETScExternalSolverCreate(_comm->get(), &_ts);
21 #else
22  mooseError("You need to have PETSc installed to use ExternalPETScApp");
23 #endif
24 }
static void registerAll(Factory &f, ActionFactory &af, Syntax &s)
PETSC_EXTERN PetscErrorCode PETScExternalSolverCreate(MPI_Comm, TS *)
TS _ts
Time-stepping (TS) object.

◆ ~ExternalPetscSolverApp()

ExternalPetscSolverApp::~ExternalPetscSolverApp ( )
virtual

Definition at line 26 of file ExternalPetscSolverApp.C.

27 {
28 #if LIBMESH_HAVE_PETSC
30 #endif
31 }
PETSC_EXTERN PetscErrorCode PETScExternalSolverDestroy(TS)
TS _ts
Time-stepping (TS) object.

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.

Referenced by PETScDMDAMesh::PETScDMDAMesh().

38 { return _ts; }
TS _ts
Time-stepping (TS) object.

◆ registerAll()

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

Definition at line 34 of file ExternalPetscSolverApp.C.

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

35 {
36  Registry::registerObjectsTo(f, {"ExternalPetscSolverApp"});
37  Registry::registerActionsTo(af, {"ExternalPetscSolverApp"});
38 
39  /* register custom execute flags, action syntax, etc. here */
40 }

◆ registerApps()

void ExternalPetscSolverApp::registerApps ( )
static

Definition at line 43 of file ExternalPetscSolverApp.C.

Referenced by ExternalPetscSolverApp__registerApps().

44 {
45  registerApp(ExternalPetscSolverApp);
46 }
This is a demo used to demonstrate how to couple an external app through the MOOSE wrapper APP...

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: