Beispiel #1
0
int TPZSpBlockDiagPivot<TVar>::Substitution2( TPZFMatrix<TVar> *B) const
{
	if(this->fDecomposed != ELUPivot) {
		PZError << __PRETTY_FUNCTION__ << "TPZSpBlockDiagPivot::Decompose_LU is decomposed with other scheme than ELUPivot." << endl;
	}
	
	TPZManVector<int, 1000> pivot;
	int b,eq=0;
	const int nb = this->fBlockSize.NElements();
	int c, nc = B->Cols();
	for(c=0; c<nc; c++) {
		eq = 0;
		int pivotindex = 0;
		for(b=0;b<nb; b++) {
			const int bsize = this->fBlockSize[b];
			if(!bsize) continue;
			TPZFMatrix<TVar> BTemp(bsize,1,&(B->operator()(eq,c)),bsize);
			pivot.Resize(bsize);
			for(int id = 0; id < bsize; id++){
				pivot[id] = this->fPivotIndices[pivotindex+id];
			}
			pivotindex += bsize;
			TPZFMatrix<TVar>::Substitution(this->fStorage,bsize,&BTemp);
			eq+= bsize;
		}
	}
	return 1;
}
/** @brief Geological Stress $\sigma_{0}$ */
void TRMSpatialPropertiesMap::S_0(TPZManVector<STATE,3> &x, TPZFMatrix<STATE> &s_0){
    
    s_0.Resize(3, 3);
    s_0.Zero();
    REAL MPa = 1.0e6;
    s_0(0,0) = -40.0*MPa;
    s_0(1,1) = -50.0*MPa;
    s_0(2,2) = -60.0*MPa;
    
    
}
Beispiel #3
0
void TPZSkylMatrix<TVar>::InitializeElem(const TPZVec<int> &skyline, TPZManVector<REAL> &storage, TPZVec<REAL *> &point) {
	int dim = skyline.NElements();
	int nel = NumElements(skyline);
	storage.Resize(nel);
	storage.Fill(0.);
	int i;
	point.Resize(dim+1);
	if(dim) {
		point[0] = &storage[0];
		point[dim] = &storage[0]+nel;
	} else {
		point[0] = 0;
	}
	for(i=1; i<dim+1; i++) point[i] = point[i-1]+(i-1)-skyline[i-1]+1;
}