77 if (POrderBeginAndEnd.
size()!=2)
79 std::cout <<
" POrderBeginAndEnd Vector must have size == 2 and contain just two values, the first and last approximation orders. " << std::endl;
80 std::cout <<
" Some like POrderBeginAndEnd[0] = 1, POrderBeginAndEnd[1] = 3 " << std::endl;
84 if (ndivinterval.
size()!=2)
86 std::cout <<
" ndivinterval Vector must have size == 2 and contain just two values, the first and last number of uniform refinements. " << std::endl;
87 std::cout <<
" Some like ndivinterval[0] = 0, ndivinterval[1] = 3 for simulations with 0, 1, 2 and 3 refinements " << std::endl;
88 std::cout <<
" Some like ndivinterval[0] = 1, ndivinterval[1] = 1 for simulations with 1 refinement " << std::endl;
92 int sizeErrorMatrix = (ndivinterval[1]-ndivinterval[0])*(POrderBeginAndEnd[1] - POrderBeginAndEnd[0]) + 1;
93 int errorposition = 0;
95 errors.
Resize(sizeErrorMatrix, 4);
97 for(
int p = POrderBeginAndEnd[0]; p <= POrderBeginAndEnd[1]; p++)
100 for (
int ndiv = ndivinterval[0]; ndiv<=ndivinterval[1]; ndiv++)
104 std::cout<<
" BEGIN (CUBE Domain) - Polinomial degree: " << ordemP <<
" rerfinement size (h): " << ndiv << std::endl;
122 int nref = (int)
pow(2., dndiv);
139 for (int64_t iel=0; iel<cmeshH1->
NElements(); iel++) {
152 ErrorH1(cmeshH1, ordemP, ndiv, errorposition, errors);
187 std::cout <<
"Computing Errors\n";
219 std::cout <<
"Computing Errors\n";
229 std::cout<<
" END - polinomial degree: " << ordemP <<
" refinement size (h): " << ndiv << std::endl;
236 std::cout<<
" The End " << std::endl;
243 if (POrderBeginAndEnd.
size()!=2)
245 std::cout <<
" POrderBeginAndEnd Vector must have size == 2 and contain just two values, the first and last approximation orders. " << std::endl;
246 std::cout <<
" Some like POrderBeginAndEnd[0] = 1, POrderBeginAndEnd[1] = 3 " << std::endl;
250 if (ndivinterval.
size()!=2)
252 std::cout <<
" ndivinterval Vector must have size == 2 and contain just two values, the first and last number of uniform refinements. " << std::endl;
253 std::cout <<
" Some like ndivinterval[0] = 0, ndivinterval[1] = 3 for simulations with 0, 1, 2 and 3 refinements " << std::endl;
254 std::cout <<
" Some like ndivinterval[0] = 1, ndivinterval[1] = 1 for simulations with 1 refinement " << std::endl;
258 for(
int p = POrderBeginAndEnd[0]; p <= POrderBeginAndEnd[1]; p++)
260 output <<
"\n WHEN p = " << p <<
" \n " << endl;
261 output <<
"ndiv " << setw(6) <<
"DoFTot" << setw(20) <<
"DofCond" << setw(28) <<
"PrimalL2Error" << setw(35) <<
"L2DualError" << endl;
263 for (
int ndiv = ndivinterval[0]; ndiv<=ndivinterval[1]; ndiv++)
267 std::cout<<
" BEGIN (Cube Domain) - Polinomial degree: " << ordemP <<
" rerfinement size (h): " << ndiv << std::endl;
285 int nref = (int)
pow(2., dndiv);
304 for (int64_t iel=0; iel<cmeshH1->
NElements(); iel++) {
319 ErrorH1(cmeshH1, ordemP, ndiv, output, dofTotal, dofCondensed);
358 std::cout <<
"Computing Errors\n";
397 std::cout <<
"Computing Errors\n";
410 output <<
"\n ----------------------------------------------------------------------------- " << endl;
411 std::cout<<
" END (Quadrilateral Domain) - Polinomial degree: " << p << std::endl;
415 std::cout<<
" The End " << std::endl;
445 gmesh->
NodeVec()[in].SetCoord(coord);
446 gmesh->
NodeVec()[in].SetNodeId(in);
452 gmesh->
NodeVec()[in].SetCoord(coord);
453 gmesh->
NodeVec()[in].SetNodeId(in);
459 gmesh->
NodeVec()[in].SetCoord(coord);
460 gmesh->
NodeVec()[in].SetNodeId(in);
466 gmesh->
NodeVec()[in].SetCoord(coord);
467 gmesh->
NodeVec()[in].SetNodeId(in);
473 gmesh->
NodeVec()[in].SetCoord(coord);
474 gmesh->
NodeVec()[in].SetNodeId(in);
480 gmesh->
NodeVec()[in].SetCoord(coord);
481 gmesh->
NodeVec()[in].SetNodeId(in);
487 gmesh->
NodeVec()[in].SetCoord(coord);
488 gmesh->
NodeVec()[in].SetNodeId(in);
494 gmesh->
NodeVec()[in].SetCoord(coord);
495 gmesh->
NodeVec()[in].SetNodeId(in);
578 for (
int iref = 0; iref < ndiv; iref++) {
580 for (
int iel = 0; iel < nel; iel++) {
608 for (int64_t i=0; i<nelem; i++) {
609 for (int64_t j=0; j<nelem; j++) {
610 for (int64_t k=0; k<nelem; k++) {
612 nodes[0] = k*(nelem+1)*(nelem+1)+j*(nelem+1)+i;
613 nodes[1] = k*(nelem+1)*(nelem+1)+j*(nelem+1)+i+1;
614 nodes[2] = k*(nelem+1)*(nelem+1)+(j+1)*(nelem+1)+i+1;
615 nodes[3] = k*(nelem+1)*(nelem+1)+(j+1)*(nelem+1)+i;
616 nodes[4] = (k+1)*(nelem+1)*(nelem+1)+j*(nelem+1)+i;
617 nodes[5] = (k+1)*(nelem+1)*(nelem+1)+j*(nelem+1)+i+1;
618 nodes[6] = (k+1)*(nelem+1)*(nelem+1)+(j+1)*(nelem+1)+i+1;
619 nodes[7] = (k+1)*(nelem+1)*(nelem+1)+(j+1)*(nelem+1)+i;
621 for (
int el=0; el<6; el++)
625 for (
int il=0; il<4; il++) {
637 const int numelements = gmesh->
NElements();
641 for(
int el=0; el<numelements; el++)
647 int64_t sizeOfVec = 0;
650 for (
int i = 0; i < 4; i++)
653 Nodefinder[i] = gmesh->
NodeVec()[pos];
654 Nodefinder[i].GetCoordinates(nodecoord);
658 ncoordVec.
Resize(sizeOfVec);
659 ncoordVec[sizeOfVec-1] = pos;
672 for (
int i = 0; i < 4; i++)
675 Nodefinder[i] = gmesh->
NodeVec()[pos];
676 Nodefinder[i].GetCoordinates(nodecoord);
680 ncoordVec.
Resize(sizeOfVec);
681 ncoordVec[sizeOfVec-1] = pos;
694 for (
int i = 0; i < 4; i++)
697 Nodefinder[i] = gmesh->
NodeVec()[pos];
698 Nodefinder[i].GetCoordinates(nodecoord);
702 ncoordVec.
Resize(sizeOfVec);
703 ncoordVec[sizeOfVec-1] = pos;
716 for (
int i = 0; i < 4; i++)
719 Nodefinder[i] = gmesh->
NodeVec()[pos];
720 Nodefinder[i].GetCoordinates(nodecoord);
724 ncoordVec.
Resize(sizeOfVec);
725 ncoordVec[sizeOfVec-1] = pos;
739 for (
int i = 0; i < 4; i++)
742 Nodefinder[i] = gmesh->
NodeVec()[pos];
743 Nodefinder[i].GetCoordinates(nodecoord);
747 ncoordVec.
Resize(sizeOfVec);
748 ncoordVec[sizeOfVec-1] = pos;
761 for (
int i = 0; i < 4; i++)
764 Nodefinder[i] = gmesh->
NodeVec()[pos];
765 Nodefinder[i].GetCoordinates(nodecoord);
769 ncoordVec.
Resize(sizeOfVec);
770 ncoordVec[sizeOfVec-1] = pos;
790 for (int64_t i=0; i<=nelem; i++) {
791 for (int64_t j=0; j<=nelem; j++) {
792 for (int64_t k=0; k<=nelem; k++) {
797 gmesh->
NodeVec()[i*(nelem+1)*(nelem+1)+j*(nelem+1)+k].Initialize(x, *gmesh);
820 gmesh->
NodeVec()[in].SetCoord(coord);
821 gmesh->
NodeVec()[in].SetNodeId(in);
827 gmesh->
NodeVec()[in].SetCoord(coord);
828 gmesh->
NodeVec()[in].SetNodeId(in);
834 gmesh->
NodeVec()[in].SetCoord(coord);
835 gmesh->
NodeVec()[in].SetNodeId(in);
841 gmesh->
NodeVec()[in].SetCoord(coord);
842 gmesh->
NodeVec()[in].SetNodeId(in);
849 gmesh->
NodeVec()[in].SetCoord(coord);
850 gmesh->
NodeVec()[in].SetNodeId(in);
856 gmesh->
NodeVec()[in].SetCoord(coord);
857 gmesh->
NodeVec()[in].SetNodeId(in);
863 gmesh->
NodeVec()[in].SetCoord(coord);
864 gmesh->
NodeVec()[in].SetNodeId(in);
870 gmesh->
NodeVec()[in].SetCoord(coord);
871 gmesh->
NodeVec()[in].SetNodeId(in);
1005 for (
int iref = 0; iref < nref; iref++) {
1007 for (
int iel = 0; iel < nel; iel++) {
1017 std::ofstream out(
"SingleCubeWithBcs.vtk");
1033 for(
int d=0; d<3;d++)
1039 solp[0] =
sin(M_PI*x)*
sin(M_PI*y)*
sin(M_PI*z);
1040 flux(0,0) = -M_PI*(
cos(M_PI*x)*
sin(M_PI*y)*
sin(M_PI*z));
1041 flux(1,0) = -M_PI*(
sin(M_PI*x)*
cos(M_PI*y)*
sin(M_PI*z));
1042 flux(2,0) = -M_PI*(
sin(M_PI*x)*
sin(M_PI*y)*
cos(M_PI*z));
1052 ff[0] = 3.0*M_PI*M_PI*
sin(M_PI*x)*
sin(M_PI*y)*
sin(M_PI*z);
1064 for(
int d=0; d<3;d++)
1070 solp[0] =
sin(M_PI*x)*
sin(M_PI*y)*
sin(M_PI*z);
1071 flux(0,0) = M_PI*(
cos(M_PI*x)*
sin(M_PI*y)*
sin(M_PI*z));
1072 flux(1,0) = M_PI*(
sin(M_PI*x)*
cos(M_PI*y)*
sin(M_PI*z));
1073 flux(2,0) = M_PI*(
sin(M_PI*x)*
sin(M_PI*y)*
cos(M_PI*z));
1084 ff[0] = -3.0*M_PI*M_PI*
sin(M_PI*x)*
sin(M_PI*y)*
sin(M_PI*z);
1264 bool h1function =
true;
1279 for(
int i=0; i<ncon; i++)
1290 for(
int i=0; i<nel; i++){
1310 for(
int i =0; i<ncel; i++){
1312 if(!compEl)
continue;
1345 for (
int id = 0;
id < 3;
id++){
1351 InvPermTensor = InvTP;
1387 BCond0->SetForcingFunction(FBCond0);
1393 BCond1->SetForcingFunction(FBCond1);
1399 BCond2->SetForcingFunction(FBCond2);
1405 BCond3->SetForcingFunction(FBCond3);
1411 BCond4->SetForcingFunction(FBCond4);
1417 BCond5->SetForcingFunction(FBCond5);
1442 std::map<int64_t, int64_t> bctoel, eltowrap;
1443 for (int64_t el=0; el<nel; el++) {
1450 while (neighbour != gelside) {
1451 if (neighbour.Element()->Dimension() == dim && neighbour.Element()->Reference()) {
1456 neighbour = neighbour.Neighbour();
1458 if (neighbour == gelside) {
1465 for(int64_t el = 0; el < nel; el++)
1471 for (int64_t el =0; el < wrapEl.
size(); el++) {
1473 int64_t index = cel->
Index();
1474 eltowrap[index] = el;
1477 meshvec[0]->CleanUpUnconnectedNodes();
1481 std::map<int64_t, int64_t>::iterator it;
1482 for (it = bctoel.begin(); it != bctoel.end(); it++) {
1483 int64_t bcindex = it->first;
1484 int64_t elindex = it->second;
1485 if (eltowrap.find(elindex) == eltowrap.end()) {
1488 int64_t wrapindex = eltowrap[elindex];
1494 wrapEl[wrapindex].
Push(bcmf);
1499 int64_t index, nenvel;
1502 for(int64_t ienv=0; ienv<nenvel; ienv++){
1504 elgroups.
Push(elgr);
1506 for(
int jel=0; jel<nel; jel++){
1514 for (int64_t ienv=0; ienv<nenvel; ienv++) {
1517 for (
int ic=0; ic<nc; ic++) {
1541 for (int64_t el=0; el<nel; el++) {
1554 int nerr = elerror.
size();
1555 globalerrors.
resize(nerr);
1557 for (
int i=0; i<nerr; i++) {
1558 globalerrors[i] += elerror[i]*elerror[i];
1563 errors.
PutVal(pos, 0, p);
1564 errors.
PutVal(pos, 1, ndiv);
1565 errors.
PutVal(pos, 2,
sqrt(globalerrors[1]));
1566 errors.
PutVal(pos, 3,
sqrt(globalerrors[2]));
1576 for (int64_t el=0; el<nel; el++) {
1589 int nerr = elerror.
size();
1590 globalerrors.
resize(nerr);
1592 for (
int i=0; i<nerr; i++) {
1593 globalerrors[i] += elerror[i]*elerror[i];
1597 out << ndiv << setw(10) << DoFT << setw(20) << DofCond << setw(28) <<
sqrt(globalerrors[1]) << setw(35) <<
sqrt(globalerrors[2]) << endl;
1607 for (int64_t el=0; el<nel; el++) {
1613 int nerr = elerror.
size();
1614 for (
int i=0; i<nerr; i++) {
1615 globalerrorsDual[i] += elerror[i]*elerror[i];
1625 for (int64_t el=0; el<nel; el++) {
1629 int nerr = elerror.
size();
1630 globalerrorsPrimal.
resize(nerr);
1632 for (
int i=0; i<nerr; i++) {
1633 globalerrorsPrimal[i] += elerror[i]*elerror[i];
1640 errors.
PutVal(pos, 0, p);
1641 errors.
PutVal(pos, 1, ndiv);
1642 errors.
PutVal(pos, 2,
sqrt(globalerrorsPrimal[1]));
1643 errors.
PutVal(pos, 3,
sqrt(globalerrorsDual[1]));
1652 for (int64_t el=0; el<nel; el++) {
1658 int nerr = elerror.
size();
1659 for (
int i=0; i<nerr; i++) {
1660 globalerrorsDual[i] += elerror[i]*elerror[i];
1670 for (int64_t el=0; el<nel; el++) {
1674 int nerr = elerror.
size();
1675 globalerrorsPrimal.
resize(nerr);
1677 for (
int i=0; i<nerr; i++) {
1678 globalerrorsPrimal[i] += elerror[i]*elerror[i];
1683 out << ndiv << setw(10) << DoFT << setw(20) << DofCond << setw(28) <<
sqrt(globalerrorsPrimal[1]) << setw(35) <<
sqrt(globalerrorsDual[1]) << endl;
1689 int nEl= mesh-> NElements();
1693 for (
int iel=0; iel<nEl; iel++) {
1701 for (
int icon=0; icon<ncon-1; icon++){
1703 corder = co.
Order();
1705 if(corder!=cordermin){
1706 cordermin = corder-1;
1722 std::cout <<
"Numero de equacoes "<< fCmesh->
NEquations()<< std::endl;
1724 bool isdirect =
true;
1725 bool simetrico =
true;
1726 bool isfrontal =
false;
1780 Solver->
SetGMRES(20, 20, *precond, 1.e-18, 0);
int64_t NElements() const
Number of computational elements allocated.
TPZCompMesh * CMeshMixed(TPZGeoMesh *gmesh, TPZVec< TPZCompMesh *> meshvec)
TPZGeoMesh * Reference() const
Returns a pointer to the geometrical mesh associated.
Material which implements a Lagrange Multiplier.
void SetPermeabilityTensor(TPZFMatrix< REAL > K, TPZFMatrix< REAL > invK)
void AdjustBoundaryElements()
Will refine the elements associated with a boundary condition till there are no elements constrained ...
void SetAllCreateFunctionsContinuous()
void IncrementElConnected()
Increment fNElConnected.
int Set(const int index, const int dim, const int pos=-1)
Modifies existing block dimensions or creates a new block with given index.
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.
Implements Banded Structural Matrices. Structural Matrix.
bool MyDoubleComparer(REAL a, REAL b)
int MaterialId() const
Returns the material index of the element.
TPZGeoMesh * CreateOneCubo(int nref)
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...
void ErrorH1(TPZCompMesh *l2mesh, int p, int ndiv, int pos, TPZFMatrix< REAL > &errors)
virtual void EvaluateError(std::function< void(const TPZVec< REAL > &loc, TPZVec< STATE > &val, TPZFMatrix< STATE > &deriv)> func, TPZVec< REAL > &errors, bool store_error)
Performs an error estimate on the elemen.
virtual int NConnects() const override
Returns the number of nodes of the element.
virtual void resize(const int64_t newsize)
static void AddElements(TPZVec< TPZCompMesh *> &cmeshVec, TPZCompMesh *MFMesh)
Creating multiphysic elements into mphysics computational mesh. Method to add elements in the mesh mu...
void SetOrder(int order, int64_t index)
Set the order of the shapefunction associated with the connect.
int64_t NEquations()
This computes the number of equations associated with non-restrained nodes.
static void ForcingH1(const TPZVec< REAL > &pt, TPZVec< STATE > &ff, TPZFMatrix< STATE > &flux)
Defines step solvers class. Solver.
void SetSolver(TPZMatrixSolver< STATE > &solver)
Set solver matrix.
virtual int Dimension() const =0
Dimension of the element.
static void TransferFromMultiPhysics(TPZVec< TPZCompMesh *> &cmeshVec, TPZCompMesh *MFMesh)
Transfer information from a specific mesh multiphysics for the current specific set of meshes...
void SetLagrangeMultiplier(unsigned char mult)
Set the connect as a pressure connect or not.
TPZFMatrix< int > tetraedra_2
int64_t NElements() const
Number of elements of the mesh.
TPZGeoMesh * CreateOneCuboWithTetraedrons(int64_t nelem)
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Class which groups elements to characterize dense matrices.
TPZCompMesh * CMeshH1(TPZGeoMesh *gmesh, int pOrder, int dim)
int64_t NElements() const
Access method to query the number of elements of the vector.
TPZGeoElSide Neighbour() const
virtual int NSides() const =0
Returns the number of connectivities of the element.
virtual void Divide(TPZVec< TPZGeoEl *> &pv)
Divides the element and puts the resulting elements in the vector.
virtual int64_t NodeIndex(int i) const =0
Returns the index of the ith node the index is the location of the node in the nodevector of the mesh...
TPZGeoMesh * GMeshWithPrism(int ndiv)
void SetDimension(int dim)
Set Dimension.
void ErrorPrimalDual(TPZCompMesh *l2mesh, TPZCompMesh *hdivmesh, int p, int ndiv, int pos, TPZFMatrix< REAL > &errors)
void Run(ApproximationSpace problem, Eltype element, TPZVec< int > POrderBeginAndEnd, TPZVec< int > ndivinterval, TPZFMatrix< REAL > &errors)
void LoadReferences()
Map this grid in the geometric grid.
int WhichSide(TPZVec< int64_t > &SideNodeIds)
Returns the side number which is connected to the SideNodes returns -1 if no side is found...
void CreateDisconnectedElements(bool create)
Determine if the mesh will be created with disconnected elements After the mesh is created...
static void AddConnects(TPZVec< TPZCompMesh *> &cmeshVec, TPZCompMesh *MFMesh)
void SetDefaultOrder(int order)
Implements SkyLine Structural Matrices. Structural Matrix.
static void ForcingBC3D(const TPZVec< REAL > &pt, TPZVec< STATE > &disp)
This abstract class defines the behaviour which each derived class needs to implement.
unsigned char LagrangeMultiplier() const
Access method to return the indication whether the connect is associated with a pressure lagrange mul...
static void ForcingBC0D(const TPZVec< REAL > &pt, TPZVec< STATE > &disp)
int64_t size() const
Returns the number of elements of the vector.
void SetForcingFunctionExact(TPZAutoPointer< TPZFunction< STATE > > fp)
Sets a procedure as exact solution for the problem.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object reallocating the necessary storage, copying the existing objects to the new...
TPZCompEl * Element(int64_t iel)
void Resize(const int newsize)
Increase the size of the chunk vector.
unsigned char Order() const
Access function to return the order associated with the connect.
TPZCreateApproximationSpace & ApproxSpace()
int64_t SequenceNumber() const
Returns the Sequence number of the connect object.
void ChangeExternalOrderConnects(TPZCompMesh *mesh)
Implements the sequence of actions to perform a finite element analysis. Analysis.
virtual TPZMatrix< STATE > * Create()
void Push(const T object)
Pushes a copy of the object on the stack.
virtual int NStateVariables() const override
Returns the number of state variables associated with the material.
virtual void SetDecomposeType(DecomposeType dectype)
Set the decomposition type.
void SetMaxNodeId(int64_t id)
Used in patch meshes.
Implements a generic geometric element which is refined according to a generic refinement pattern...
static void TransferFromMeshes(TPZVec< TPZCompMesh *> &cmeshVec, TPZCompMesh *MFMesh)
Transfer information from a specific set of meshes for the current mesh multiphysics.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
void SetAllCreateFunctionsDiscontinuous()
#define DebugStop()
Returns a message to user put a breakpoint in.
virtual void ExpandSolution()
Adapt the solution vector to new block dimensions.
virtual void SetNumThreads(int n)
TPZCompMesh * CMeshPressure(TPZGeoMesh *gmesh, int pOrder, int dim)
virtual void clear()
Empty the vector, make its size zero.
void SetAllCreateFunctionsHDiv()
void PrintErrors(ApproximationSpace problem, Eltype element, TPZVec< int > POrderBeginAndEnd, TPZVec< int > ndivinterval, TPZVec< REAL > &errors, std::ostream &output)
int Dimension() const
Returns the dimension of the simulation.
virtual void ComputeNodElCon()
Compute the number of elements connected to each connect object.
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
TPZCompEl * Reference() const
Return a pointer to the element referenced by the geometric element.
virtual void AutoBuild(const std::set< int > *MaterialIDs)
Creates the computational elements, and the degree of freedom nodes.
unsigned int NShape() const
void SetNShape(int nshape)
Set the number of shape functions associated with the connect.
virtual void SetReferenceMatrix(TPZAutoPointer< TPZMatrix< TVar > > matrix)
This method gives a preconditioner to share a matrix with the referring solver object.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
const TPZBlock< STATE > & Block() const
Access the block structure of the solution vector.
static void ForcingBC2D(const TPZVec< REAL > &pt, TPZVec< STATE > &disp)
int64_t NConnects() const
Number of connects allocated including free nodes.
REAL co[8][3]
Coordinates of the eight nodes.
TPZAdmChunkVector< TPZConnect > & ConnectVec()
Return a reference to the connect pointers vector.
Class which implements an element which condenses the internal connects.
int64_t Index() const
Returns element index of the mesh fELementVec list.
static void PrintGMeshVTK(TPZGeoMesh *gmesh, std::ofstream &file, bool matColor=true)
Default constructor for graphical mesh with VTK format.
virtual TPZConnect & Connect(int i) const
Returns a pointer to the ith node.
void SetDimModel(int dim)
Set de dimension of the domain of the problem.
virtual void Run(std::ostream &out=std::cout)
Calls the appropriate sequence of methods to build a solution or a time stepping sequence.
virtual int64_t ConnectIndex(int i) const =0
Returns the index of the ith connectivity of the element.
Computes the contribution over an interface between two discontinuous elements. Computational Element...
virtual int HasSubElement() const =0
Return 1 if the element has subelements.
static void SolExataH1(const TPZVec< REAL > &pt, TPZVec< STATE > &solp, TPZFMatrix< STATE > &flux)
virtual int NConnects() const =0
Returns the number of nodes of the element.
TPZGeoEl * Element() const
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.
TPZFlopCounter pow(const TPZFlopCounter &orig, const TPZFlopCounter &xp)
Returns the power and increments the counter of the power.
int InsertMaterialObject(TPZMaterial *mat)
Insert a material object in the datastructure.
static void ForcingBC4D(const TPZVec< REAL > &pt, TPZVec< STATE > &disp)
virtual void CleanUpUnconnectedNodes()
Delete the nodes which have no elements connected to them.
virtual int Dimension() const =0
Returns the dimension of the element.
int Dimension()
Get Dimension.
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
This class implements a geometric mesh for the pz environment. Geometry.
This class implements a stack object. Utility.
void SetForcingFunction(TPZAutoPointer< TPZFunction< STATE > > fp)
Sets a procedure as source function for the material.
void SetPolynomialOrder(int porder)
static void ForcingBC1D(const TPZVec< REAL > &pt, TPZVec< STATE > &disp)
Implements computational mesh. Computational Mesh.
TPZAdmChunkVector< TPZCompEl * > & ElementVec()
Returns a reference to the element pointers vector.
void Fill(const T ©, const int64_t from=0, const int64_t numelem=-1)
Will fill the elements of the vector with a copy object.
static void Forcing(const TPZVec< REAL > &pt, TPZVec< STATE > &ff)
int Resize(const int64_t newRows, const int64_t wCols) override
Redimension a matrix, but maintain your elements.
int64_t NElements() const
Returns the number of elements of the vector.
void SetCenterPoint(int i, REAL x)
static void AddWrap(TPZMultiphysicsElement *mfcel, int matskeleton, TPZStack< TPZStack< TPZMultiphysicsElement *, 7 > > &ListGroupEl)
Create skeleton elements of the wrap of me.
void SolveSyst(TPZAnalysis &an, TPZCompMesh *fCmesh)
virtual int NStateVariables() const override
Returns the number of state variables associated with the material.
void SetDirect(const DecomposeType decomp)
This class implements a discontinuous element (for use with discontinuous Galerkin). Computational Element.
void ResetReference()
Resets all load references in elements and nodes.
Is a structural matrix with parallel techniques included. Structural Matrix Frontal.
Defines the interface of a computational element. Computational Element.
Material to solve a mixed poisson problem 3D by multiphysics simulation.
void SetAllCreateFunctionsMultiphysicElem()
TPZFlopCounter cos(const TPZFlopCounter &orig)
Returns the cosine in radians and increments the counter of the Cosine.
int PutVal(const int64_t row, const int64_t col, const TVar &value) override
Put values without bounds checking This method is faster than "Put" if DEBUG is defined.
virtual void AddElement(TPZCompEl *cel)
add an element to the element group
static void SolExata(const TPZVec< REAL > &pt, TPZVec< STATE > &solp, TPZFMatrix< STATE > &flux)
void GenerateNodes(TPZGeoMesh *gmesh, int64_t nelem)
static void ForcingBC5D(const TPZVec< REAL > &pt, TPZVec< STATE > &disp)
void SetGMRES(const int64_t numiterations, const int numvectors, const TPZMatrixSolver< TVar > &pre, const REAL tol, const int64_t FromCurrent)
TPZAdmChunkVector< TPZGeoEl * > & ElementVec()
Methods for handling pzlists.
TPZCompMesh * CMeshFlux(TPZGeoMesh *gmesh, int pOrder, int dim)
This class implements a reference counter mechanism to administer a dynamically allocated object...