18 vector< vector< double > >& getRecvBuf,
19 vector< unsigned int >& numOnNode );
21 vector< double >& getRecvBuf );
51 void op(
const Eref& e, A arg )
const
60 const vector< A >& arg,
62 unsigned int k )
const
66 for (
unsigned int p = 0; p < numLocalData; ++p ) {
67 unsigned int numField = elm->
numField( p );
68 for (
unsigned int q = 0; q < numField; ++q ) {
69 Eref er( elm, p + start, q );
70 op->
op( er, arg[ k % arg.size() ] );
79 const vector< A >& arg,
86 unsigned int numField =
88 for (
unsigned int q = 0; q < numField; ++q ) {
89 Eref temp( elm, di, q );
90 op->
op( temp, arg[ q % arg.size() ] );
97 const vector< A >& arg,
99 unsigned int start,
unsigned int end )
const
101 unsigned int k = start;
102 unsigned int nn = end - start;
106 vector< A > temp( nn );
109 for (
unsigned int j = 0; j < nn; ++j ) {
110 unsigned int x = k % arg.size();
115 Conv< vector< A > >::size( temp ) );
128 unsigned int lastEnd = 0;
131 lastEnd = endOnNode[i];
138 assert( k == endOnNode[i] );
142 if ( start < elm->numData() ) {
143 Eref starter( elm, start );
145 k =
remoteOpVec( starter, arg, op, k, endOnNode[i]);
151 Eref starter( elm, 0 );
197 void op(
const Eref& e, A1 arg1, A2 arg2 )
const
215 const vector< A1 >& arg1,
216 const vector< A1 >& arg2,
228 for (
unsigned int p = 0; p < numData; ++p ) {
229 unsigned int numField = elm->
numField( p );
230 for (
unsigned int q = 0; q < numField; ++q ) {
231 Eref er( elm, p, q );
232 unsigned int x = k % arg1.size();
233 unsigned int y = k % arg2.size();
234 op->
op( er, arg1[x], arg2[y] );
243 vector< A1 > temp1( nn );
244 vector< A2 > temp2( nn );
247 for (
unsigned int j = 0; j < nn; ++j ) {
248 unsigned int x = k % arg1.size();
249 unsigned int y = k % arg2.size();
255 Conv< vector< A1 > >::size( temp1 ) +
256 Conv< vector< A2 > >::size( temp2 ) );
268 template<
class A1,
class A2 >
276 template <
class A1,
class A2,
class A3 >
class HopFunc3:
284 void op(
const Eref& e, A1 arg1, A2 arg2, A3 arg3 )
const
298 template<
class A1,
class A2,
class A3 >
306 template <
class A1,
class A2,
class A3,
class A4 >
class HopFunc4:
314 void op(
const Eref& e, A1 arg1, A2 arg2, A3 arg3, A4 arg4 )
const
329 template<
class A1,
class A2,
class A3,
class A4 >
337 template <
class A1,
class A2,
class A3,
class A4,
class A5 >
345 void op(
const Eref& e, A1 arg1, A2 arg2, A3 arg3,
346 A4 arg4, A5 arg5 )
const
363 template<
class A1,
class A2,
class A3,
class A4,
class A5 >
371 template <
class A1,
class A2,
class A3,
class A4,
class A5,
class A6 >
379 void op(
const Eref& e, A1 arg1, A2 arg2, A3 arg3,
380 A4 arg4, A5 arg5, A6 arg6 )
const
398 template<
class A1,
class A2,
class A3,
class A4,
class A5,
class A6 >
425 unsigned int numField = elm->
numField(
427 for (
unsigned int q = 0; q < numField; ++q ) {
428 Eref temp( elm, p, q );
429 ret.push_back( op->
returnOp( temp ) );
436 vector< double > buf;
438 assert( buf.size() > 0 );
439 unsigned int numField = buf[0];
440 double* val = &buf[1];
441 for (
unsigned int j = 0; j < numField; ++j ) {
451 for (
unsigned int p = start; p < end; ++p ) {
452 Eref er( elm, p, 0 );
453 ret.push_back( op->
returnOp( er ) );
461 vector< vector< double > > buf;
462 vector< unsigned int > numOnNode;
466 assert( buf.size() == numOnNode.size() );
471 vector< double >& temp = buf[i];
472 assert( static_cast< unsigned int >( temp[0] ) ==
474 double* val = &temp[1];
475 for (
unsigned int j = 0; j < numOnNode[i]; ++j ) {
518 #endif // _HOP_FUNC_H
static void val2buf(const T &val, double **buf)
virtual A returnOp(const Eref &e) const =0
virtual void op(const Eref &e, A arg) const =0
unsigned int localFieldOpVec(const Eref &er, const vector< A > &arg, const OpFunc1Base< A > *op) const
Executes the local vector assignment. Returns number of entries.
unsigned short bindIndex() const
void opVec(const Eref &er, const vector< A > &arg, const OpFunc1Base< A > *op) const
unsigned int getNode() const
void op(const Eref &e, A1 arg1, A2 arg2, A3 arg3, A4 arg4) const
void op(const Eref &e) const
double * addToBuf(const Eref &e, HopIndex hopIndex, unsigned int size)
void op(const Eref &e, A1 arg1, A2 arg2) const
const OpFunc * makeHopFunc(HopIndex hopIndex) const
const OpFunc * makeHopFunc(HopIndex hopIndex) const
const OpFunc * makeHopFunc(HopIndex hopIndex) const
unsigned int dataIndex() const
void op(const Eref &e, A arg) const
void remoteFieldGetVec(const Eref &e, unsigned int bindIndex, vector< double > &getRecvBuf)
HopFunc4(HopIndex hopIndex)
void opVec(const Eref &e, const vector< A1 > &arg1, const vector< A1 > &arg2, const OpFunc2Base< A1, A2 > *op) const
unsigned int localOpVec(Element *elm, const vector< A > &arg, const OpFunc1Base< A > *op, unsigned int k) const
Executes the local vector assignment. Returns current arg index.
HopFunc0(HopIndex hopIndex)
Element * element() const
void getLocalVec(Element *elm, vector< A > &ret, const GetOpFuncBase< A > *op) const
void op(const Eref &e, A1 arg1, A2 arg2, A3 arg3) const
void opGetVec(const Eref &e, vector< A > &ret, const GetOpFuncBase< A > *op) const
unsigned int remoteOpVec(const Eref &er, const vector< A > &arg, const OpFunc1Base< A > *op, unsigned int start, unsigned int end) const
Dispatches remote vector assignment. start and end are arg index.
unsigned int mooseNumNodes()
const OpFunc * makeHopFunc(HopIndex hopIndex) const
HopFunc3(HopIndex hopIndex)
void remoteGetVec(const Eref &e, unsigned int bindIndex, vector< vector< double > > &getRecvBuf, vector< unsigned int > &numOnNode)
virtual unsigned int getNumOnNode(unsigned int node) const =0
double * remoteGet(const Eref &e, unsigned int bindIndex)
void dispatchBuffers(const Eref &e, HopIndex hopIndex)
virtual void op(const Eref &e, A1 arg1, A2 arg2) const =0
virtual unsigned int numField(unsigned int rawIndex) const =0
Returns number of field entries for specified data.
HopFunc6(HopIndex hopIndex)
HopFunc5(HopIndex hopIndex)
virtual bool hasFields() const =0
const OpFunc * makeHopFunc(HopIndex hopIndex) const
void op(const Eref &e, A *ret) const
unsigned int mooseMyNode()
virtual unsigned int numData() const =0
Returns number of data entries across all nodes.
virtual bool isGlobal() const =0
True if there is a copy of every dataEntry on all nodes.
const OpFunc * makeHopFunc(HopIndex hopIndex) const
virtual unsigned int localDataStart() const =0
Returns index of first data entry on this node.
virtual unsigned int numLocalData() const =0
Returns number of local data entries on this node.
void op(const Eref &e, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5, A6 arg6) const
void getRemoteFieldVec(const Eref &e, vector< A > &ret, const GetOpFuncBase< A > *op) const
void dataOpVec(const Eref &e, const vector< A > &arg, const OpFunc1Base< A > *op) const
static const T & buf2val(double **buf)
void getLocalFieldVec(const Eref &er, vector< A > &ret, const GetOpFuncBase< A > *op) const
GetHopFunc(HopIndex hopIndex)
virtual unsigned int getNode(unsigned int dataIndex) const =0
Returns node number of specified dataIndex.
HopFunc1(HopIndex hopIndex)
HopFunc2(HopIndex hopIndex)
const OpFunc * makeHopFunc(HopIndex hopIndex) const
void getMultiNodeVec(const Eref &e, vector< A > &ret, const GetOpFuncBase< A > *op) const
virtual unsigned int startDataIndex(unsigned int nodeNum) const =0
Returns start dataIndex on specified node.
void op(const Eref &e, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5) const