Advanced Multi-Physics (AMP)
On-Line Documentation
Classes | Public Member Functions | Protected Attributes | List of all members
AMP::Solver::AMG::HasDeferConsistency< P > Struct Template Reference

#include <DeferConsistency.h>

Inheritance diagram for AMP::Solver::AMG::HasDeferConsistency< P >:
Inheritance graph
[legend]

Classes

struct  defer_guard
 

Public Member Functions

void applyDeferConsistency (std::shared_ptr< const AMP::LinearAlgebra::Vector > u, std::shared_ptr< AMP::LinearAlgebra::Vector > f)
 
 HasDeferConsistency (const P &p)
 
void residual (std::shared_ptr< const AMP::LinearAlgebra::Vector > f, std::shared_ptr< const AMP::LinearAlgebra::Vector > u, std::shared_ptr< AMP::LinearAlgebra::Vector > r) final override
 

Protected Attributes

bool defer_consistency = false
 

Detailed Description

template<class P>
struct AMP::Solver::AMG::HasDeferConsistency< P >

A helper type to provide deferred consistency call for apply to an operator. Operators inherit from this type passing their base operator as the template parameter. They then have access to a bool valued "defer_consistency" that can be queried to condionally call makeConsistent on the output vector.

Template Parameters
PParent operator to inherit from.

Definition at line 18 of file DeferConsistency.h.

Constructor & Destructor Documentation

◆ HasDeferConsistency()

template<class P >
AMP::Solver::AMG::HasDeferConsistency< P >::HasDeferConsistency ( const P &  p)
inlineexplicit

Definition at line 21 of file DeferConsistency.h.

Member Function Documentation

◆ applyDeferConsistency()

template<class P >
void AMP::Solver::AMG::HasDeferConsistency< P >::applyDeferConsistency ( std::shared_ptr< const AMP::LinearAlgebra::Vector u,
std::shared_ptr< AMP::LinearAlgebra::Vector f 
)
inline

The apply function for this operator without necessarily ensuring output vector consistency.

Parameters
[in]uinput vector.
[out]foutput vector.

Definition at line 50 of file DeferConsistency.h.

◆ residual()

template<class P >
void AMP::Solver::AMG::HasDeferConsistency< P >::residual ( std::shared_ptr< const AMP::LinearAlgebra::Vector f,
std::shared_ptr< const AMP::LinearAlgebra::Vector u,
std::shared_ptr< AMP::LinearAlgebra::Vector r 
)
inlinefinaloverride

Residual wrapper to avoid makeConsistent when it subsequently calls apply.

Parameters
[in]fforcing vector.
[in]ustate vector.
[out]rresidual vector.

Sets r = f - apply(u)

Definition at line 64 of file DeferConsistency.h.

Member Data Documentation

◆ defer_consistency

template<class P >
bool AMP::Solver::AMG::HasDeferConsistency< P >::defer_consistency = false
protected

Definition at line 73 of file DeferConsistency.h.


The documentation for this struct 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:45.
Comments on this page