ABLATE Source Documentation  0.12.34
ablate::monitors::DmViewFromOptions Class Reference

#include <dmViewFromOptions.hpp>

+ Inheritance diagram for ablate::monitors::DmViewFromOptions:

Public Types

enum class  Scope { INITIAL , MONITOR }
 

Public Member Functions

 DmViewFromOptions (Scope scope, std::string options={}, const std::string &optionName={})
 
 DmViewFromOptions (std::string options={}, std::string optionName={})
 
void Register (std::shared_ptr< solver::Solver >) override
 
PetscMonitorFunction GetPetscFunction () override
 
std::string ToString () const override
 
void Modify (DM &) override
 
- Public Member Functions inherited from ablate::monitors::Monitor
virtual void * GetContext ()
 

Additional Inherited Members

- Protected Member Functions inherited from ablate::monitors::Monitor
std::shared_ptr< solver::SolverGetSolver ()
 
- Static Protected Member Functions inherited from ablate::domain::modifiers::Modifier
static void ReplaceDm (DM &originalDm, DM &replaceDm)
 

Detailed Description

This class replicates the functionality provided by PetscObjectViewFromOptions

If the options string is passed, an options object is created and set with the options If not set, options is assumed to the global values and the optionName should be used

Constructor & Destructor Documentation

◆ DmViewFromOptions() [1/2]

ablate::monitors::DmViewFromOptions::DmViewFromOptions ( Scope  scope,
std::string  options = {},
const std::string &  optionName = {} 
)
explicit

public constructor allow this monitor to set scope

Parameters
scope
options
optionName

◆ DmViewFromOptions() [2/2]

ablate::monitors::DmViewFromOptions::DmViewFromOptions ( std::string  options = {},
std::string  optionName = {} 
)
explicit

constructor without allowing the monitor to be set (Set to INITIAL by default)

Parameters
options
optionName

Member Function Documentation

◆ GetPetscFunction()

PetscMonitorFunction ablate::monitors::DmViewFromOptions::GetPetscFunction ( )
inlineoverridevirtual

Return a function to be called after every time step. By default null is returned so this is never called

Returns

Reimplemented from ablate::monitors::Monitor.

◆ Modify()

void ablate::monitors::DmViewFromOptions::Modify ( DM &  dm)
overridevirtual

Allow this monitor to also be used as modifier to save results

Implements ablate::domain::modifiers::Modifier.

◆ Register()

void ablate::monitors::DmViewFromOptions::Register ( std::shared_ptr< solver::Solver solverIn)
overridevirtual

Override this function to setup the monitor

Parameters
solverIn

Reimplemented from ablate::monitors::Monitor.

◆ ToString()

std::string ablate::monitors::DmViewFromOptions::ToString ( ) const
inlineoverridevirtual

Return the name of this modifier

Returns

Implements ablate::domain::modifiers::Modifier.


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