54 indicesToRemove.push_back(i);
59 _xAux =
_x->extract(indicesToRemove);
60 _bAux =
_b->extract(indicesToRemove);
66 shared_ptr<LinearSystem>
80 map<const StorageSite*, const Field *> sitesCoarsenedWithField;
86 const Field *fieldIndex = ai.first;
91 if (sitesCoarsenedWithField.find(site) == sitesCoarsenedWithField.end())
93 sitesCoarsenedWithField[site] = fieldIndex;
128 shared_ptr<StorageSite>(
new StorageSite(selfSize,ghostSize));
144 foreach(
const StorageSite::ScatterMap::value_type& pos, fineScatterMap)
155 shared_ptr<StorageSite> ghostSite
159 ghostSite->setTag( fineOSite.
getTag() );
170 foreach(
const StorageSite::GatherMap::value_type& pos, fineGatherMap)
202 const Field* fieldIndexUsedForCoarsening = sitesCoarsenedWithField[site];
226 coarseLS->_matrix._matrices[coarseEntryIndex] =
232 coarseLS->_b = shared_ptr<MultiField>(
new MultiField());
238 coarseLS->_b->addArray(coarseIndex, (*
_b)[k].newSizedClone(coarseSite.
getCount()));
241 coarseLS->_b->zero();
242 coarseLS->_delta = dynamic_pointer_cast<
MultiField>(coarseLS->_b->newClone());
243 coarseLS->_delta->
zero();
244 coarseLS->_residual = dynamic_pointer_cast<
MultiField>(coarseLS->_b->newClone());
245 coarseLS->_residual->
zero();
shared_ptr< MultiField > _delta
MatrixSizeMap _coarseGhostSizes
Matrix & getMatrix(const Index &rowIndex, const Index &colIndex)
virtual int getLength() const =0
void createCoarseToFineMapping(const MultiField &coarseIndexField)
void createCoarseConnectivity(MultiField &coarseIndex)
shared_ptr< MultiField > _b
bool hasMatrix(const Index &rowIndex, const Index &colIndex) const
shared_ptr< MultiField > _x
void createCoarsening(MultiField &coarseIndex, const int groupSize, const double weightRatioThreshold)
shared_ptr< ArrayBase > getArrayPtr(const ArrayIndex &)
CoarseToFineMappingMap _coarseToFineMappings
StorageSiteMap _coarseSites
shared_ptr< MultiField > _residual
shared_ptr< MultiField > _bAux
pair< const Field *, const StorageSite * > ArrayIndex
int getScatterProcID() const
int getGatherProcID() const
shared_ptr< MultiField > _residualAux
MatrixMap _coarseMatrices
vector< ArrayIndex > ArrayIndexList
shared_ptr< LinearSystem > createCoarse(const int groupSize, const double weightRatioThreshold)
virtual bool isInvertible()
void createCoarseMatrices(MultiField &coarseIndex)
const ScatterMap & getScatterMap() const
MatrixMappersMap _coarseGatherMaps
shared_ptr< MultiField > _xAux
map< const StorageSite *, shared_ptr< Array< int > > > ScatterMap
MatrixMappersMap _coarseScatterMaps
virtual void eliminateBoundaryEquations(IContainer &xB)
const GatherMap & getGatherMap() const
map< const StorageSite *, shared_ptr< Array< int > > > GatherMap
void addArray(const ArrayIndex &aIndex, shared_ptr< ArrayBase > a)
const Field * _coarseningField
pair< Index, Index > EntryIndex
shared_ptr< MultiField > _deltaAux
void syncGhostCoarsening(MultiField &coarseIndexField)
MatrixSizeMap _coarseSizes
pair< const StorageSite *, const StorageSite * > SSPair
virtual void solveBoundary(IContainer &xB, const IContainer &bB, IContainer &temp) const