39 double coordstore[4][3] = {{0.,0.,0.},{1.,0.,0.},{1.,1.,0.},
46 for (j=0; j<3; j++) coord[j] = coordstore[i][j];
53 gmesh.
NodeVec ()[i].Initialize (i,coord,gmesh);
57 for(el=0; el<1; el++) {
61 for(i=0; i<4; i++) indices[i] = i;
73 cout <<
"Refinement ";
95 cout <<
"Interpolation order ";
106 ofstream output(
"outputPar.dat");
117 ofstream out(
"cmeshBlock_out.txt");
124 if(seqn < 0)
continue;
126 int64_t lasteq = firsteq+cmesh.
Block().
Size(seqn);
128 int temp = cmesh.
ConnectVec()[ic].NElConnected();
129 for(ind=firsteq;ind<lasteq;ind++) {
130 numelconnected[ind] = temp;
221 int64_t neq = fMesh->NEquations();
222 if(fMesh->FatherMesh()) {
223 cout <<
"TPZSpStructMatrix should not be called with CreateAssemble for a substructure mesh\n";
229 Assemble(*stiff,rhs, guiInterface);
236 int64_t neq = fEquationFilter.NActiveEquations();
249 fMesh->ComputeElGraph(elgraph,elgraphindex);
261 metis.
ConvertGraph(elgraph,elgraphindex,nodegraph,nodegraphindex);
264 int64_t nblock = nodegraphindex.
NElements()-1;
265 int64_t totalvar = 0;
267 for(i=0;i<nblock;i++){
268 int64_t iblsize = fMesh->Block().Size(i);
269 int64_t iblpos = fMesh->Block().Position(i);
270 int64_t numactive = fEquationFilter.NumActive(iblpos, iblpos+iblsize);
274 if (numactive != iblsize) {
278 int64_t icfirst = nodegraphindex[i];
279 int64_t iclast = nodegraphindex[i+1];
282 totalvar+=iblsize*iblsize;
283 for(j=icfirst;j<iclast;j++) {
284 int64_t col = nodegraph[j];
285 int64_t colsize = fMesh->Block().Size(col);
286 int64_t colpos = fMesh->Block().Position(col);
287 int64_t numactive = fEquationFilter.NumActive(colpos, colpos+colsize);
291 totalvar += iblsize*colsize;
298 nblock=fMesh->NIndependentConnects();
300 int64_t * Eq =
new int64_t[totaleq+1];
301 int64_t * EqCol =
new int64_t[totalvar/2];
302 STATE * EqValue =
new STATE[totalvar/2];
303 for(i=0;i<nblock;i++){
304 int64_t iblsize = fMesh->Block().Size(i);
305 int64_t iblpos = fMesh->Block().Position(i);
306 int64_t numactive = fEquationFilter.NumActive(iblpos, iblpos+iblsize);
311 for(ibleq=0; ibleq<iblsize; ibleq++) {
317 int64_t colsize = fMesh->Block().Size(i);
318 int64_t colpos = fMesh->Block().Position(i);
320 for(jbleq=0; jbleq<colsize; jbleq++) {
328 int64_t icfirst = nodegraphindex[i];
329 int64_t iclast = nodegraphindex[i+1];
331 for(j=icfirst;j<iclast;j++) {
332 int64_t col = nodegraph[j];
333 colsize = fMesh->Block().Size(col);
334 colpos = fMesh->Block().Position(col);
335 int64_t numactive = fEquationFilter.NumActive(colpos, colpos+colsize);
339 for(jbleq=0; jbleq<colsize; jbleq++) {
358 mat->
SetData(Eq,EqCol,EqValue);
int AllocateNewElement()
Makes more room for new elements.
Contains TPZAnalysis class which implements the sequence of actions to perform a finite element analy...
int Position(const int block_diagonal) const
Returns the position of first element block dependent on matrix diagonal.
void SetElementGraph(TPZVec< int64_t > &elgraph, TPZVec< int64_t > &elgraphindex)
This method declares the element graph to the object.
Represents a set of shape functions associated with a computational element/side. Computational Eleme...
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...
Implements renumbering for elements of a mesh. Utility.
void ConvertGraph(TPZVec< int64_t > &elgraph, TPZVec< int64_t > &elgraphindex, TPZManVector< int64_t > &nodegraph, TPZManVector< int64_t > &nodegraphindex)
Will convert an element graph defined by elgraph and elgraphindex into a node graph defined by nodegr...
int64_t NEquations()
This computes the number of equations associated with non-restrained nodes.
Defines step solvers class. Solver.
void SetSolver(TPZMatrixSolver< STATE > &solver)
Set solver matrix.
Implements a non symmetric sparse matrix (Yale Sparse Matrix Storage). Matrix.
Contains declaration of TPZGeoElBC class, it is a structure to help the construction of geometric ele...
int64_t NElements() const
Access method to query the number of elements of the vector.
virtual void SetData(int64_t *IA, int64_t *JA, TVar *A)
Pass the data to the class.
virtual TPZStructMatrix * Clone() override
Contains the TPZStructMatrixOR class which responsible for a interface among Matrix and Finite Elemen...
virtual TPZMatrix< STATE > * CreateAssemble(TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface) override
void SetDefaultOrder(int order)
int ClassId() const override
Define the class id associated with 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...
Contains the TPZSpStructMatrix class which implements sparse structural matrices. ...
virtual TPZMatrix< STATE > * Create() override
Contains declaration of TPZMesh class which defines a geometrical mesh and contains a corresponding l...
int64_t SequenceNumber() const
Returns the Sequence number of the connect object.
Implements the sequence of actions to perform a finite element analysis. Analysis.
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.
void SetElementsNodes(int64_t NElements, int64_t NNodes)
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
virtual void AutoBuild(const std::set< int > *MaterialIDs)
Creates the computational elements, and the degree of freedom nodes.
int HasDependency() const
Returns whether exist dependecy information.
Contains the TPZFYsmpMatrix class which implements a non symmetric sparse matrix. ...
const TPZBlock< STATE > & Block() const
Access the block structure of the solution vector.
Contains the TPZMat2dLin class which implements a bi-dimensional linear problem.
TPZAdmChunkVector< TPZConnect > & ConnectVec()
Return a reference to the connect pointers vector.
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.
int32_t Hash(std::string str)
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.
Contains the TPBSpStructMatrix class which assembles on the pair equations.
int InsertMaterialObject(TPZMaterial *mat)
Insert a material object in the datastructure.
TPBSpStructMatrix(TPZCompMesh *)
This class implements a geometric mesh for the pz environment. Geometry.
Implements a bi-dimensional linear problem.
Implements computational mesh. Computational Mesh.
int Size(const int block_diagonal) const
Returns block dimension.
Contains TPZSolver class which defines a abstract class of solvers which will be used by matrix class...
Assembles only the pair equations. Structural Matrix.
Contains TPZStepSolver class which defines step solvers class.
Implements Sparse Structural Matrices. Structural Matrix.
int64_t NElements() const
Returns the number of elements of the vector.
void SetDirect(const DecomposeType decomp)
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...
Contains TPZMetis class which implements the renumbering for elements of a mesh to minimize the band...
int ClassId() const override
Define the class id associated with the class.