29 static LoggerPtr logger(Logger::getLogger(
"pz.StrMatrix"));
41 if (logger->isDebugEnabled())
43 LOGPZ_DEBUG(logger,
"TPZSymetricSpStructMatrix::CreateAssemble starting");
47 int64_t neq = fMesh->NEquations();
48 if(fMesh->FatherMesh()) {
49 cout <<
"TPZSymetricSpStructMatrix should not be called with CreateAssemble for a substructure mesh\n";
57 TPZTimer before(
"Assembly of a sparse matrix");
61 if(logger->isDebugEnabled())
LOGPZ_DEBUG(logger,
"TPZSymetricSpStructMatrix::CreateAssemble calling Assemble()");
63 Assemble(*stiff,rhs,guiInterface);
73 if(logger->isDebugEnabled())
LOGPZ_DEBUG(logger,
"TPZSymetricSpStructMatrix::CreateAssemble exiting");
85 fMesh->ComputeElGraph(elgraph,elgraphindex);
92 int64_t neq = fEquationFilter.NActiveEquations();
97 metis.SetElementsNodes(elgraphindex.
NElements() -1 ,fMesh->NIndependentConnects());
98 metis.SetElementGraph(elgraph,elgraphindex);
106 metis.ConvertGraph(elgraph,elgraphindex,nodegraph,nodegraphindex);
109 int64_t nblock = nodegraphindex.
NElements()-1;
111 int64_t totalvar = 0;
114 for(i=0;i<nblock;i++){
115 int64_t iblsize = fMesh->Block().Size(i);
116 int64_t iblpos = fMesh->Block().Position(i);
117 int64_t numactive = fEquationFilter.NumActive(iblpos, iblpos+iblsize);
122 int64_t icfirst = nodegraphindex[i];
123 int64_t iclast = nodegraphindex[i+1];
126 totalvar+=(iblsize*(iblsize+1))/2;
127 for(j=icfirst;j<iclast;j++) {
128 int64_t col = nodegraph[j];
137 int64_t colsize = fMesh->Block().Size(col);
138 int64_t colpos = fMesh->Block().Position(col);
139 int64_t numactive = fEquationFilter.NumActive(colpos, colpos+colsize);
143 totalvar += iblsize*colsize;
151 nblock=fMesh->NIndependentConnects();
156 for(i=0;i<nblock;i++){
157 int64_t iblsize = fMesh->Block().Size(i);
158 int64_t iblpos = fMesh->Block().Position(i);
160 for (int64_t i=0; i<iblsize; i++) {
161 rowdestindices[i] = iblpos+i;
163 fEquationFilter.Filter(rowdestindices);
167 for(ibleq=0; ibleq<rowdestindices.
size(); ibleq++) {
168 if (rowdestindices[ibleq] != ieq) {
172 int64_t colsize,colpos,jbleq;
173 int64_t diagonalinsert = 0;
174 int64_t icfirst = nodegraphindex[i];
175 int64_t iclast = nodegraphindex[i+1];
177 for(j=icfirst;j<iclast;j++)
179 int64_t col = nodegraph[j];
185 if(!diagonalinsert && col > i)
188 int64_t colsize = fMesh->Block().Size(i);
189 int64_t colpos = fMesh->Block().Position(i);
191 for (int64_t i=0; i<colsize; i++) {
192 destindices[i] = colpos+i;
194 fEquationFilter.Filter(destindices);
196 for(jbleq=0; jbleq<destindices.
size(); jbleq++) {
198 int64_t jeq = destindices[jbleq];
202 EqCol[pos] = destindices[jbleq];
208 colsize = fMesh->Block().Size(col);
209 colpos = fMesh->Block().Position(col);
210 if (fEquationFilter.NumActive(colpos, colpos+colsize) == 0) {
214 for (int64_t i=0; i<colsize; i++) {
215 destindices[i] = colpos+i;
217 fEquationFilter.Filter(destindices);
218 for(jbleq=0; jbleq<destindices.
size(); jbleq++) {
219 int64_t jeq = destindices[jbleq];
233 int64_t colsize = fMesh->Block().Size(i);
234 int64_t colpos = fMesh->Block().Position(i);
236 for (int64_t i=0; i<colsize; i++) {
237 destindices[i] = colpos+i;
239 fEquationFilter.Filter(destindices);
241 for(jbleq=0; jbleq<destindices.
size(); jbleq++) {
243 int64_t jeq = destindices[jbleq];
258 mat->
SetData(Eq,EqCol,EqValue);
269 #ifndef STATE_COMPLEX 279 double coordstore[4][3] = {{0.,0.,0.},{1.,0.,0.},{1.,1.,0.},
286 for (j=0; j<3; j++) coord[j] = coordstore[i][j];
296 for(el=0; el<1; el++) {
300 for(i=0; i<4; i++) indices[i] = i;
310 cout <<
"Refinement ";
327 cout <<
"Interpolation order ";
338 ofstream output(
"outputPar.dat");
The timer class. Utility.
int AllocateNewElement()
Makes more room for new elements.
Contains TPZAnalysis class which implements the sequence of actions to perform a finite element analy...
Contains definitions to LOGPZ_DEBUG, LOGPZ_INFO, LOGPZ_WARN, LOGPZ_ERROR and LOGPZ_FATAL, and the implementation of the inline InitializePZLOG(string) function using log4cxx library or not. It must to be called out of "#ifdef LOG4CXX" scope.
void SetStructuralMatrix(TPZAutoPointer< TPZStructMatrix > strmatrix)
Set structural matrix as auto pointer for analysis.
virtual TPZGeoEl * CreateGeoElement(MElementType type, TPZVec< int64_t > &cornerindexes, int matid, int64_t &index, int reftype=1)
Generic method for creating a geometric element. Putting this method centrally facilitates the modifi...
Timing class. Absolutely copied from GNU time. Take a look at
Implements renumbering for elements of a mesh. Utility.
virtual TPZMatrix< STATE > * Create()
Defines step solvers class. Solver.
void SetSolver(TPZMatrixSolver< STATE > &solver)
Set solver matrix.
virtual TPZMatrix< STATE > * SetupMatrixData(TPZStack< int64_t > &elgraph, TPZVec< int64_t > &elgraphindex)
Contains declaration of TPZGeoElBC class, it is a structure to help the construction of geometric ele...
Contains the TPZStructMatrixOR class which responsible for a interface among Matrix and Finite Elemen...
Contains the TPZSymetricSpStructMatrix class which implements sparse structural matrices.
virtual TPZStructMatrix * Clone()
void SetDefaultOrder(int order)
virtual void SetData(const TPZVec< int64_t > &IA, const TPZVec< int64_t > &JA, const TPZVec< TVar > &A)
Sets data to the class.
Refines geometrical mesh (all the elements) num times.
This abstract class defines the behaviour which each derived class needs to implement.
Contains declaration of TPZElementMatrix struct which associates an element matrix with the coeficien...
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
void SetJacobi(const int64_t numiterations, const REAL tol, const int64_t FromCurrent)
int64_t size() const
Returns the number of elements of the vector.
Contains declaration of TPZMesh class which defines a geometrical mesh and contains a corresponding l...
Implements the sequence of actions to perform a finite element analysis. Analysis.
void start()
Turns the timer on.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
#define DebugStop()
Returns a message to user put a breakpoint in.
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
virtual void AutoBuild(const std::set< int > *MaterialIDs)
Creates the computational elements, and the degree of freedom nodes.
virtual TPZMatrix< STATE > * CreateAssemble(TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface)
Contains the TPZMat2dLin class which implements a bi-dimensional linear problem.
Contains declaration of TPZCompMesh class which is a repository for computational elements...
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension a matrix and ZERO your elements.
void SetMaterial(TPZFMatrix< STATE > &xkin, TPZFMatrix< STATE > &xcin, TPZFMatrix< STATE > &xfin)
virtual void Run(std::ostream &out=std::cout)
Calls the appropriate sequence of methods to build a solution or a time stepping sequence.
Structure to help the construction of geometric elements along side of a given geometric element...
void BuildConnectivity()
Build the connectivity of the grid.
virtual TPZBndCond * CreateBC(TPZMaterial *reference, int id, int typ, TPZFMatrix< STATE > &val1, TPZFMatrix< STATE > &val2)
Creates an object TPZBndCond derived of TPZMaterial.
int InsertMaterialObject(TPZMaterial *mat)
Insert a material object in the datastructure.
This class implements a geometric mesh for the pz environment. Geometry.
Implements a bi-dimensional linear problem.
Implements a symmetric sparse matrix. Matrix.
Implements computational mesh. Computational Mesh.
Contains TPZSolver class which defines a abstract class of solvers which will be used by matrix class...
Contains TPZStepSolver class which defines step solvers class.
void stop()
Turns the timer off, and computes the elapsed time.
int64_t NElements() const
Returns the number of elements of the vector.
Contains the TPZDXGraphMesh class which implements the interface of the graphmesh to the OpenDX graph...
void InitializeBlock()
Resequence the block object, remove unconnected connect objects and reset the dimension of the soluti...
TPZSymetricSpStructMatrix()
Implements Sparse Structural Matrices. Structural Matrix.
Contains TPZMetis class which implements the renumbering for elements of a mesh to minimize the band...
Contains TPZSYsmpMatrix class which implements a symmetric sparse matrix. Purpose: Defines operation...