chombo-discharge
Loading...
Searching...
No Matches
EBAddOp Class Reference

A Copier class for making copying between BoxLayoutData<EBCellFAB> easier. This increments EBCellFABs when calling copyTo (with the correct Copier). More...

#include <CD_EBAddOp.H>

Inheritance diagram for EBAddOp:
Collaboration diagram for EBAddOp:

Public Member Functions

 EBAddOp ()
 Constructor (does nothing).
virtual ~EBAddOp ()
 Destructor (does nothing).
virtual void linearIn (EBCellFAB &a_data, void *a_buffer, const Box &a_region, const Interval &a_comps) const override
 Linearization function. We linearize the buffer onto arg, but since this is an addition operator we need to add the result.
virtual void op (EBCellFAB &a_dst, const Box &a_regionFrom, const Interval &a_dstVars, const Box &a_regionTo, const EBCellFAB &a_src, const Interval &a_srcVars) const override
 Operator function. Increments data with source.
virtual bool threadSafe () const override
 Report that op() and linearIn() are not thread safe.

Detailed Description

A Copier class for making copying between BoxLayoutData<EBCellFAB> easier. This increments EBCellFABs when calling copyTo (with the correct Copier).

Member Function Documentation

◆ linearIn()

void EBAddOp::linearIn ( EBCellFAB & a_data,
void * a_buffer,
const Box & a_region,
const Interval & a_comps ) const
overridevirtual

Linearization function. We linearize the buffer onto arg, but since this is an addition operator we need to add the result.

Parameters
[in,out]a_dataData to be incremented with buffer
[in,out]a_bufferData buffer (this is another EBCellFAB)
[in]a_regionRegion
[in]a_compsComponents to do.

◆ op()

void EBAddOp::op ( EBCellFAB & a_dst,
const Box & a_regionFrom,
const Interval & a_dstVars,
const Box & a_regionTo,
const EBCellFAB & a_src,
const Interval & a_srcVars ) const
overridevirtual

Operator function. Increments data with source.

Parameters
[in,out]a_dstDestination data.
[in]a_regionFromSource regionw
[in]a_dstVarsDestination variables
[in]a_regionToDestination region
[in]a_srcSource data
[in]a_srcVarsSource variables

◆ threadSafe()

bool EBAddOp::threadSafe ( ) const
overridevirtual

Report that op() and linearIn() are not thread safe.

Both functions increment the destination. Several copies can target the same destination box, and Chombo runs the copies of a copyTo() or exchange() in parallel unless the operator reports that it is not thread safe. Concurrent increments of the same box would lose updates.

Returns
false

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