|
Memosa-FVM
0.2
|
#include <MultiField.h>


Public Types | |
| typedef pair< const Field *, const StorageSite * > | ArrayIndex |
| typedef map< ArrayIndex, int > | ArrayMap |
| typedef vector< shared_ptr < ArrayBase > > | ArrayList |
| typedef vector< ArrayIndex > | ArrayIndexList |
| typedef pair< ArrayIndex, ArrayIndex > | EntryIndex |
| typedef map< EntryIndex, shared_ptr< ArrayBase > > | GhostArrayMap |
Public Member Functions | |
| MultiField () | |
| virtual | ~MultiField () |
| DEFINE_TYPENAME ("MultiField") | |
| const ArrayBase & | operator[] (const ArrayIndex &) const |
| ArrayBase & | operator[] (const ArrayIndex &) |
| shared_ptr< ArrayBase > | getArrayPtr (const ArrayIndex &) |
| const ArrayBase & | operator[] (const int i) const |
| ArrayBase & | operator[] (const int i) |
| bool | hasArray (const ArrayIndex &) const |
| virtual void | zero () |
| virtual void | copyFrom (const IContainer &oc) |
| virtual MultiField & | operator+= (const MultiField &o) |
| virtual MultiField & | operator-= (const MultiField &o) |
| virtual MultiField & | operator/= (const MultiFieldReduction &alpha) |
| virtual MultiField & | operator*= (const MultiFieldReduction &alpha) |
| virtual shared_ptr< IContainer > | newCopy () const |
| virtual shared_ptr< IContainer > | newClone () const |
| int | getLength () const |
| const ArrayIndex | getArrayIndex (const int i) const |
| void | addArray (const ArrayIndex &aIndex, shared_ptr< ArrayBase > a) |
| void | removeArray (const ArrayIndex &aIndex) |
| MultiField & | saxpy (const MultiFieldReduction &alphaMF, const MultiField &xMF) |
| MultiField & | msaxpy (const MultiFieldReduction &alphaMF, const MultiField &xMF) |
| shared_ptr< MultiFieldReduction > | reduceSum () const |
| shared_ptr< MultiFieldReduction > | getOneNorm () const |
| shared_ptr< MultiFieldReduction > | dotWith (const MultiField &ofield) const |
| const ArrayIndexList & | getArrayIndices () const |
| shared_ptr< MultiField > | extract (const ArrayIndexList &indices) |
| void | merge (const MultiField &other) |
| void | syncScatter (const ArrayIndex &i) |
| void | syncGather (const ArrayIndex &i) |
| void | sync () |
Public Member Functions inherited from IContainer | |
| IContainer () | |
| virtual | ~IContainer () |
| IContainer & | operator= (const IContainer &oc) |
Private Member Functions | |
| void | createSyncGatherArrays (const ArrayIndex &i) |
| void | syncScatterLevel1 (const ArrayIndex &i) |
| void | createSyncGatherArraysLevel1 (const ArrayIndex &i) |
| void | syncGatherLevel1 (const ArrayIndex &i) |
| int | get_request_size () |
| int | get_request_size_scatter_level1 () |
| int | get_request_size_gather_level1 () |
| void | syncLevel1 () |
Private Attributes | |
| int | _length |
| ArrayList | _arrays |
| ArrayIndexList | _arrayIndices |
| ArrayMap | _arrayMap |
| GhostArrayMap | _ghostArrays |
| GhostArrayMap | _ghostArraysLevel1 |
Definition at line 17 of file MultiField.h.
| typedef pair<const Field*, const StorageSite*> MultiField::ArrayIndex |
Definition at line 21 of file MultiField.h.
| typedef vector<ArrayIndex> MultiField::ArrayIndexList |
Definition at line 24 of file MultiField.h.
| typedef vector<shared_ptr<ArrayBase> > MultiField::ArrayList |
Definition at line 23 of file MultiField.h.
| typedef map<ArrayIndex,int> MultiField::ArrayMap |
Definition at line 22 of file MultiField.h.
| typedef pair<ArrayIndex,ArrayIndex> MultiField::EntryIndex |
Definition at line 25 of file MultiField.h.
| typedef map<EntryIndex,shared_ptr<ArrayBase> > MultiField::GhostArrayMap |
Definition at line 26 of file MultiField.h.
| MultiField::MultiField | ( | ) |
Definition at line 17 of file MultiField.cpp.
References logCtor.
Referenced by dotWith(), getOneNorm(), newClone(), and newCopy().
|
virtual |
Definition at line 27 of file MultiField.cpp.
References logDtor.
| void MultiField::addArray | ( | const ArrayIndex & | aIndex, |
| shared_ptr< ArrayBase > | a | ||
| ) |
Definition at line 270 of file MultiField.cpp.
References _arrayIndices, _arrayMap, _arrays, and _length.
Referenced by LinearSystem::createCoarse(), dotWith(), ElectricModel< T >::Impl::initChargeTransportLinearization(), FlowModel< T >::Impl::initContinuityLinearization(), PlateModel< T >::Impl::initDeformationLinearization(), StructureModel< T >::Impl::initDeformationLinearization(), ElectricModel< T >::Impl::initElectroStaticsLinearization(), KineticModel< T >::initKineticModelLinearization(), ThermalModel< T >::Impl::initLinearization(), FractureModel< T >::Impl::initLinearization(), VacancyModel< T >::Impl::initLinearization(), SpeciesModel< T >::Impl::initLinearization(), KeModel< T >::Impl::initLinearization(), KeModel< T >::Impl::initLinearizationk(), FlowModel< T >::Impl::initMomentumLinearization(), BatteryModel< T >::Impl::initPCLinearization(), PhononModel< T >::initPhononModelLinearization(), BatteryModel< T >::Impl::initPotentialLinearization(), BatteryModel< T >::Impl::initSpeciesLinearization(), BatteryModel< T >::Impl::initThermalLinearization(), merge(), and MultiFieldMatrix::quadProduct().
|
virtual |
Implements IContainer.
Definition at line 127 of file MultiField.cpp.
References _arrayMap, ArrayBase::copyFrom(), and operator[]().
|
private |
Definition at line 386 of file MultiField.cpp.
References _arrayMap, _arrays, _ghostArrays, StorageSite::getGatherMap(), Array< T >::getLength(), and ArrayBase::newSizedClone().
Referenced by sync().
|
private |
Definition at line 410 of file MultiField.cpp.
References _arrayMap, _arrays, _ghostArraysLevel1, StorageSite::getCountLevel1(), StorageSite::getGatherMapLevel1(), ArrayBase::getLength(), Array< T >::getLength(), and ArrayBase::newSizedClone().
Referenced by syncLevel1().
| MultiField::DEFINE_TYPENAME | ( | "MultiField" | ) |
| shared_ptr< MultiFieldReduction > MultiField::dotWith | ( | const MultiField & | ofield | ) | const |
Definition at line 231 of file MultiField.cpp.
References _arrayIndices, _arrays, _length, addArray(), ArrayBase::dotWith(), StorageSite::getSelfCount(), and MultiField().
Referenced by AMG::cycle().
| shared_ptr< MultiField > MultiField::extract | ( | const ArrayIndexList & | indices | ) |
Definition at line 304 of file MultiField.cpp.
References getArrayPtr(), and removeArray().
|
private |
Definition at line 555 of file MultiField.cpp.
References _arrayIndices, StorageSite::getGatherProcID(), and StorageSite::getScatterMap().
Referenced by sync().
|
private |
Definition at line 663 of file MultiField.cpp.
References _arrayIndices, _arrayMap, _arrays, StorageSite::getCountLevel1(), StorageSite::getGatherMapLevel1(), StorageSite::getGatherProcID(), and ArrayBase::getLength().
Referenced by syncLevel1().
|
private |
Definition at line 641 of file MultiField.cpp.
References _arrayIndices, _arrayMap, _arrays, StorageSite::getCountLevel1(), StorageSite::getGatherProcID(), ArrayBase::getLength(), and StorageSite::getScatterMapLevel1().
Referenced by syncLevel1().
|
inline |
Definition at line 55 of file MultiField.h.
References _arrayIndices.
Referenced by MultiFieldMatrix::computeResidual(), MultiFieldMatrix::correctSolution(), MultiFieldMatrix::createCoarseConnectivity(), MultiFieldMatrix::createCoarseMatrices(), MultiFieldMatrix::createCoarsening(), MultiFieldMatrix::createCoarseToFineMapping(), MultiFieldMatrix::forwardGS(), MultiFieldMatrix::iluSolve(), MultiFieldMatrix::injectResidual(), MultiFieldMatrix::Jacobi(), MultiFieldMatrix::multiply(), MultiFieldMatrix::multiplyAndAdd(), MultiFieldMatrix::quadProduct(), MultiFieldMatrix::reverseGS(), DirectSolver::solve(), MultiFieldMatrix::solveBoundary(), MultiFieldMatrix::spikeSolve(), and MultiFieldMatrix::syncGhostCoarsening().
|
inline |
| shared_ptr< ArrayBase > MultiField::getArrayPtr | ( | const ArrayIndex & | i | ) |
Definition at line 67 of file MultiField.cpp.
References _arrayMap, and _arrays.
Referenced by LinearSystem::createCoarse(), and extract().
|
inline |
Definition at line 54 of file MultiField.h.
References _length.
Referenced by MultiFieldMatrix::computeResidual(), MultiFieldMatrix::correctSolution(), MultiFieldMatrix::createCoarseConnectivity(), MultiFieldMatrix::createCoarseMatrices(), MultiFieldMatrix::createCoarsening(), MultiFieldMatrix::createCoarseToFineMapping(), MultiFieldMatrix::forwardGS(), MultiFieldMatrix::iluSolve(), MultiFieldMatrix::injectResidual(), MultiFieldMatrix::Jacobi(), MultiFieldMatrix::multiply(), MultiFieldMatrix::multiplyAndAdd(), MultiFieldMatrix::quadProduct(), MultiFieldMatrix::reverseGS(), DirectSolver::solve(), MultiFieldMatrix::solveBoundary(), MultiFieldMatrix::spikeSolve(), and MultiFieldMatrix::syncGhostCoarsening().
| shared_ptr< MultiFieldReduction > MultiField::getOneNorm | ( | ) | const |
Definition at line 216 of file MultiField.cpp.
References _arrayIndices, _arrays, _length, ArrayBase::getOneNorm(), StorageSite::getSelfCount(), and MultiField().
Referenced by BCGStab::solve(), ILU0Solver::solve(), JacobiSolver::solve(), CG::solve(), SpikeSolver::solve(), DirectSolver::solve(), and AMG::solve().
| bool MultiField::hasArray | ( | const ArrayIndex & | i | ) | const |
| void MultiField::merge | ( | const MultiField & | other | ) |
Definition at line 316 of file MultiField.cpp.
References _arrayMap, _arrays, and addArray().
| MultiField & MultiField::msaxpy | ( | const MultiFieldReduction & | alphaMF, |
| const MultiField & | xMF | ||
| ) |
Definition at line 177 of file MultiField.cpp.
References _arrayIndices, _arrays, _length, and ArrayBase::msaxpy().
Referenced by BCGStab::solve().
|
virtual |
Implements IContainer.
Definition at line 81 of file MultiField.cpp.
References _arrayIndices, _arrays, _length, MultiField(), and IContainer::newClone().
Referenced by MultiFieldMatrix::Jacobi().
|
virtual |
Implements IContainer.
Definition at line 101 of file MultiField.cpp.
References _arrayIndices, _arrays, _length, MultiField(), and IContainer::newCopy().
Referenced by BCGStab::solve(), and CG::solve().
|
virtual |
Definition at line 204 of file MultiField.cpp.
References _arrayIndices, _arrays, and _length.
|
virtual |
Definition at line 139 of file MultiField.cpp.
References _arrayIndices, _arrays, and _length.
|
virtual |
Definition at line 151 of file MultiField.cpp.
References _arrayIndices, _arrays, and _length.
|
virtual |
Definition at line 192 of file MultiField.cpp.
References _arrayIndices, _arrays, and _length.
| const ArrayBase & MultiField::operator[] | ( | const ArrayIndex & | i | ) | const |
Definition at line 39 of file MultiField.cpp.
References _arrayMap, and _arrays.
Referenced by copyFrom().
| ArrayBase & MultiField::operator[] | ( | const ArrayIndex & | i | ) |
Definition at line 53 of file MultiField.cpp.
References _arrayMap, and _arrays.
|
inline |
|
inline |
| shared_ptr< MultiFieldReduction > MultiField::reduceSum | ( | ) | const |
Definition at line 249 of file MultiField.cpp.
References _arrayIndices, _arrays, _length, and IContainer::newCopy().
Referenced by MultiFieldMatrix::quadProduct().
| void MultiField::removeArray | ( | const ArrayIndex & | aIndex | ) |
Definition at line 280 of file MultiField.cpp.
References _arrayIndices, _arrayMap, _arrays, and _length.
Referenced by extract().
| MultiField & MultiField::saxpy | ( | const MultiFieldReduction & | alphaMF, |
| const MultiField & | xMF | ||
| ) |
Definition at line 163 of file MultiField.cpp.
References _arrayIndices, _arrays, _length, and ArrayBase::saxpy().
| void MultiField::sync | ( | ) |
Definition at line 489 of file MultiField.cpp.
References _arrayIndices, _ghostArrays, createSyncGatherArrays(), get_request_size(), ArrayBase::getData(), ArrayBase::getDataSize(), StorageSite::getGatherMap(), StorageSite::getGatherProcID(), StorageSite::getScatterMap(), StorageSite::getTag(), syncGather(), syncLevel1(), and syncScatter().
Referenced by LinearSystem::createCoarse(), MultiFieldMatrix::forwardGS(), MultiFieldMatrix::iluSolve(), MultiFieldMatrix::Jacobi(), MultiFieldMatrix::multiply(), MultiFieldMatrix::multiplyAndAdd(), MultiFieldMatrix::reverseGS(), AMG::solve(), and MultiFieldMatrix::spikeSolve().
| void MultiField::syncGather | ( | const ArrayIndex & | i | ) |
Definition at line 436 of file MultiField.cpp.
References _arrayMap, _arrays, _ghostArrays, ArrayBase::gather(), and StorageSite::getGatherMap().
Referenced by MultiFieldMatrix::forwardGS(), MultiFieldMatrix::reverseGS(), and sync().
|
private |
Definition at line 461 of file MultiField.cpp.
References _arrayMap, _arrays, _ghostArraysLevel1, ArrayBase::gather(), StorageSite::getCountLevel1(), StorageSite::getGatherMapLevel1(), and ArrayBase::getLength().
Referenced by syncLevel1().
|
private |
Definition at line 575 of file MultiField.cpp.
References _arrayIndices, _arrayMap, _arrays, _ghostArraysLevel1, createSyncGatherArraysLevel1(), get_request_size_gather_level1(), get_request_size_scatter_level1(), StorageSite::getCountLevel1(), ArrayBase::getData(), ArrayBase::getDataSize(), StorageSite::getGatherMapLevel1(), StorageSite::getGatherProcID(), ArrayBase::getLength(), StorageSite::getScatterMapLevel1(), StorageSite::getTag(), syncGatherLevel1(), and syncScatterLevel1().
Referenced by sync().
| void MultiField::syncScatter | ( | const ArrayIndex & | i | ) |
Definition at line 325 of file MultiField.cpp.
References _arrayMap, _arrays, _ghostArrays, Array< T >::getLength(), StorageSite::getScatterMap(), ArrayBase::newSizedClone(), and ArrayBase::scatter().
Referenced by MultiFieldMatrix::forwardGS(), MultiFieldMatrix::reverseGS(), and sync().
|
private |
Definition at line 358 of file MultiField.cpp.
References _arrayMap, _arrays, _ghostArraysLevel1, StorageSite::getCountLevel1(), ArrayBase::getLength(), Array< T >::getLength(), StorageSite::getScatterMapLevel1(), ArrayBase::newSizedClone(), and ArrayBase::scatter().
Referenced by syncLevel1().
|
virtual |
Implements IContainer.
Definition at line 115 of file MultiField.cpp.
References _arrays, _ghostArrays, and _length.
Referenced by StructureModel< T >::Impl::advanceExplicit(), LinearSystem::createCoarse(), AMG::cycle(), and BCGStab::solve().
|
private |
Definition at line 93 of file MultiField.h.
Referenced by addArray(), dotWith(), get_request_size(), get_request_size_gather_level1(), get_request_size_scatter_level1(), getArrayIndex(), getArrayIndices(), getOneNorm(), msaxpy(), newClone(), newCopy(), operator*=(), operator+=(), operator-=(), operator/=(), reduceSum(), removeArray(), saxpy(), sync(), and syncLevel1().
|
private |
Definition at line 94 of file MultiField.h.
Referenced by addArray(), copyFrom(), createSyncGatherArrays(), createSyncGatherArraysLevel1(), get_request_size_gather_level1(), get_request_size_scatter_level1(), getArrayPtr(), hasArray(), merge(), operator[](), removeArray(), syncGather(), syncGatherLevel1(), syncLevel1(), syncScatter(), and syncScatterLevel1().
|
private |
Definition at line 92 of file MultiField.h.
Referenced by addArray(), createSyncGatherArrays(), createSyncGatherArraysLevel1(), dotWith(), get_request_size_gather_level1(), get_request_size_scatter_level1(), getArrayPtr(), getOneNorm(), merge(), msaxpy(), newClone(), newCopy(), operator*=(), operator+=(), operator-=(), operator/=(), operator[](), reduceSum(), removeArray(), saxpy(), syncGather(), syncGatherLevel1(), syncLevel1(), syncScatter(), syncScatterLevel1(), and zero().
|
private |
Definition at line 95 of file MultiField.h.
Referenced by createSyncGatherArrays(), sync(), syncGather(), syncScatter(), and zero().
|
private |
Definition at line 96 of file MultiField.h.
Referenced by createSyncGatherArraysLevel1(), syncGatherLevel1(), syncLevel1(), and syncScatterLevel1().
|
private |
Definition at line 91 of file MultiField.h.
Referenced by addArray(), dotWith(), getLength(), getOneNorm(), msaxpy(), newClone(), newCopy(), operator*=(), operator+=(), operator-=(), operator/=(), reduceSum(), removeArray(), saxpy(), and zero().