35 TPZCompEl(),fLeftElSide(0), fRightElSide(0)
57 if (!mp_left || !mp_right) {
62 int left_n_meshes = mp_left->
NMeshes();
63 int right_n_meshes = mp_right->
NMeshes();
68 for (
int iref = 0; iref < left_n_meshes; iref++) {
72 for (
int iref = 0; iref < right_n_meshes; iref++) {
83 for(
int i = 0; i < ncon; i++){
95 if (!left || !right ) {
98 int leftside = left.
Side();
99 int rightside = right.
Side();
104 if (!leftel || !rightel) {
114 std::map<int64_t,int64_t> & gl2lcElMap) :
121 if (!left || !right ) {
124 int leftside = left.
Side();
125 int rightside = right.
Side();
128 if (gl2lcElMap.find(leftindex) == gl2lcElMap.end() || gl2lcElMap.find(rightindex) == gl2lcElMap.end()) {
133 if (!leftel || !rightel) {
152 int side = gel->
NSides()-1;
154 int64_t numneigh = Neighbor.
size();
155 for (int64_t in=0; in<numneigh; in++) {
191 int64_t nleftmeshes = LeftEl->
NMeshes();
192 int64_t nrightmeshes = RightEl->
NMeshes();
194 int64_t nleftindices = leftindices.
size();
195 int64_t nrightindices = rightindices.
size();
203 int64_t ncl=0, ncr=0;
206 for (int64_t iref = 0; iref<nleftmeshes; iref++) {
212 first_left_c_index[iref+1] = first_left_c_index[iref] + nclvec[iref];
218 for (int64_t iref = 0; iref<nrightmeshes; iref++) {
224 first_right_c_index[iref+1] = first_right_c_index[iref] + ncrvec[iref];
230 for(int64_t i = 0; i < nleftindices; i++){
231 int iref = leftindices[i];
241 for(int64_t i = 0; i < nrightindices; i++){
242 int iref = rightindices[i];
254 for(int64_t i = 0; i < nleftindices; i++){
255 int iref = leftindices[i];
258 for (
int ic=0; ic < nclvec[iref]; ic++) {
264 for(int64_t i = 0; i < nrightindices; i++){
265 int iref = rightindices[i];
268 for (
int ic=0; ic < ncrvec[iref]; ic++) {
318 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" this->Material() == NULL\n";
333 if (!leftel || !rightel) {
346 int nmesh =datavecleft.
size();
347 for(
int id = 0;
id<nmesh;
id++){
348 datavecleft[id].p = 0;
363 int thisside = gel->
NSides()-1;
364 TPZFNMatrix<9,REAL> jac(dimension,dimension),axes(dimension,3), jacInv(dimension,dimension);
378 trleft = leftloctr.
Multiply(trleft);
379 trright = rightloctr.
Multiply(trright);
382 int nintpoints = intrule->
NPoints();
383 for (
int ip =0; ip<nintpoints; ip++) {
386 intrule->
Point(ip, Point, weight);
389 trleft.Apply(Point, leftPoint);
391 trright.Apply(Point, rightPoint);
394 data.
x = datavecleft[0].x;
404 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" this->Material() == NULL\n";
417 if (!leftel || !rightel) {
431 int nmesh =datavecleft.
size();
432 for(
int id = 0;
id<nmesh;
id++){
433 datavecleft[id].fNeedsNormal=
true;
446 int thisside = gel->
NSides()-1;
447 TPZFNMatrix<9,REAL> jac(dimension,dimension),axes(dimension,3), jacInv(dimension,dimension);
461 trleft = leftloctr.
Multiply(trleft);
462 trright = rightloctr.
Multiply(trright);
465 int nintpoints = intrule->
NPoints();
466 for (
int ip =0; ip<nintpoints; ip++) {
469 intrule->
Point(ip, Point, weight);
472 trleft.Apply(Point, leftPoint);
474 trright.Apply(Point, rightPoint);
477 data.
x = datavecleft[0].x;
496 if (!left || !right)
return -1;
500 int int_order =
MAX(left_order, right_order);
514 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" this->Material() == NULL\n";
523 if (!leftel || !rightel) {
534 int thisside = gel->
NSides()-1;
554 for(ic=0; ic<ncon; ic++)
562 if (! mfcel_left || !mfcel_right) {
566 int numloadcases = 1;
581 for(i=0; i<ncon; i++)
595 for(i=0; i<ncon; i++){
611 for(ic=0; ic<ncon; ic++)
619 if (! mfcel_left || !mfcel_right) {
623 int numloadcases = 1;
636 for(i=0; i<ncon; i++)
648 for(i=0; i<ncon; i++){
658 int nsides = gel->
NSides();
668 out <<
"\nInterface element : \n";
671 out <<
"\tLeft Computational Index: " <<
LeftElement()->
Index() << std::endl;
694 out <<
"\tNormal vector (at center point): ";
695 out <<
"(" << center_normal[0] <<
"," << center_normal[1] <<
"," << center_normal[2] <<
")\n";
713 int n_meshes = leftel->
NMeshes();
714 data_left.
resize(n_meshes);
715 data_right.
resize(n_meshes);
739 int nsides = gel->
NSides();
773 if (gelside.Dimension() == gelside.Element()->Dimension()-1) {
774 gelside.Normal(point, data.
normal);
790 data.
HSize = faceSize;
807 for (
int i=0; i<scalarnames.
size(); i++) {
812 for (
int i=0; i<vecnames.
size(); i++) {
817 int matid = material->
Id();
818 int nsides = ref->
NSides();
821 if(dimension == 2 && to_postpro){
832 if(dimension == 3 && to_postpro){
851 if(dimension == 1 && to_postpro){
897 lefttr.
Apply(qsi, myqsi);
898 lefttr.
Apply(qsi, myqsi);
915 transf = neighgeoside.SideToSideTransform(highdim).
Multiply(LocalTransf);
Defines the interface which material objects need to implement for discontinuous Galerkin formulation...
bool Material_Is_PostProcessed(int matid)
Return a directive if the material id is being postprocessed.
virtual void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout)
Returns the solution associated with the var index based on the finite element approximation.
Represents a graphical mesh used for post processing purposes. Post processing.
void CalcStiff(TPZElementMatrix &ek, TPZElementMatrix &ef) override
virtual void ComputeRequiredData(TPZVec< REAL > &point, TPZVec< TPZTransform<> > &trvec, TPZVec< TPZMaterialData > &datavec, TPZVec< int64_t > indices)
virtual int Dimension() const override
Dimension of the element.
Contains the TPZGraphElTd class which implements the graphical discontinuous triangular element...
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ fabs
void IncrementElConnected()
Informs the connect that this element is connected to it.
virtual int NConnects() const override
Returns the number of nodes of the element.
virtual void InitMaterialData(TPZVec< TPZMaterialData > &dataVec, TPZVec< int64_t > *indices=0)=0
TPZManVector< REAL, 3 > normal
normal to the element at the integration point
virtual int NPoints() const =0
Returns number of points for the cubature rule related.
Implements computational element and a side. Computational Element.
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...
TPZCompEl * LeftElement() const
Returns the left element from the element interface.
TPZManVector< REAL, 3 > x
value of the coordinate at the integration point
To export a graphical one dimensional discontinuous element. Post processing.
Implements a vector class which allows to use external storage provided by the user. Utility.
virtual void Solution(TPZVec< REAL > &qsi, int var, TPZVec< STATE > &sol) override
Calculates the solution - sol - for the variable var at point qsi, where qsi is expressed in terms of...
virtual int64_t ConnectIndex(int i) const override
Returns the index of the ith connectivity of the element.
int MaterialId() const
Returns the material index of the element.
virtual void resize(const int64_t newsize)
TPZCompElSide Left() const
access function to the left element
virtual TPZCompEl * Element(int64_t elindex)=0
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
TPZStack< int64_t > fConnect
Vector of pointers to TPZConnect objects.
const TPZIntPoints & GetIntegrationRule() const override
TPZGeoElSide Reference() const
Reference to the geometric element.
TPZFNMatrix< 1000, STATE > fMat
Pointer to a blocked matrix object.
TPZManVector< int64_t, 3 > fRightElIndices
indices of the Right Element Vector
TPZManVector< int64_t, 20 > fConnectIndexes
indexes of the connects
virtual int ComputeIntegrationOrder() const override
TPZVec< std::string > VecNames()
Return vectorial variable names.
To export a graphical two-dimensional discontinuous element. Post processing.
To export a graphical three dimensional discontinuous element. Post processing.
virtual int Dimension() const =0
Dimension of the element.
virtual int VariableIndex(const std::string &name)
Returns the variable index associated with the name.
virtual int64_t NMeshes()=0
Contains declaration of TPZInterpolationSpace class which implements the interface for interpolated c...
virtual void Print(std::ostream &out=std::cout) const override
Prints element data.
Contains the TPZGraphEl class which implements the graphical one-, two- and three-dimensional element...
virtual int NStateVariables() const =0
Returns the number of state variables associated with the material.
Contains the declaration of the TPZMultiphysicsElement class. This class is abstract.
TPZFNMatrix< 9, REAL > jacinv
value of the inverse of the jacobian at the integration point
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Implements the graphical element for a pyramid using a map to the cube element. Post processing...
int NDof(TPZCompMesh &mesh)
Number of degrees of freedom associated with the object.
#define MAX(a, b)
Gets maxime value between a and b.
virtual int NSides() const =0
Returns the number of connectivities of the element.
virtual void ComputeRequiredData(TPZVec< REAL > &intpointtemp, TPZVec< TPZTransform<> > &trvec, TPZVec< TPZMaterialData > &datavec)
Compute and fill data with requested attributes for each of the compels in fElementVec.
TPZBlock< STATE > fBlock
Block structure associated with fMat.
Contains the TPZGraphEl1d class which implements the graphical one dimensional element.
void SideTransform3(TPZGeoElSide neighbour, TPZTransform<> &t)
Accumulates the transformations from the current element/side to the neighbour/side.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
TPZFNMatrix< 9, REAL > jacobian
value of the jacobian at the integration point
It has the declaration of the TPZMultiphysicsCompEl class.
virtual int ClassId() const override
Define the class id associated with the class.
Abstract class defining integration rules. Numerical Integration.
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...
virtual void CenterPoint(int side, TPZVec< REAL > &masscent) const =0
It returns the coordinates from the center of the side of the element in the element coordinate space...
virtual TPZIntPoints * CreateSideIntegrationRule(int side, int order)=0
Creates an integration rule for the topology of the corresponding side and able to integrate a polyno...
virtual TPZMaterial * Material() const
Identify the material object associated with the element.
Implements a graphical element for a triangle mapped into de quadrilateral element. Post processing.
virtual void AffineTransform(TPZVec< TPZTransform<> > &trVec) const =0
virtual void CreateGraphicalElement(TPZGraphMesh &grmesh, int dimension) override
Creates corresponding graphical element(s) if the dimension matches graphical elements are used to ge...
int64_t size() const
Returns the number of elements of the vector.
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...
virtual int GetIntegrationOrder(TPZVec< int > &porder_left, TPZVec< int > &porder_right) const
return the integration order as a function of interpolation orders of the left and right elements ...
Contains the TPZGraphElT3d class which implements the graphical representation of a tetrahedra elemen...
Implements the graphical element for a prism using a degenerated cube element. Post processing...
void CreateIntegrationRule()
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Contains the TPZGraphElQ2dd class which implements the graphical two-dimensional discontinuous elemen...
Implements the graphical representation of a tetrahedra element. Post processing. ...
int64_t Index() const
Returns the index of the element within the element vector of the mesh.
virtual void FillDataRequirements(TPZMaterialData &data)
Fill material data parameter with necessary requirements for the.
void GetLeftRightElement(TPZCompElSide &leftel, TPZCompElSide &rightel)
#define DebugStop()
Returns a message to user put a breakpoint in.
Contains the TPZGraphElPrismMapped class which implements the graphical element for a prism using a d...
TPZCompMesh * Mesh() const
Return a pointer to the grid of the element.
virtual void ContributeInterface(TPZMaterialData &data, TPZMaterialData &dataleft, TPZMaterialData &dataright, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef)
It computes a contribution to stiffness matrix and load vector at one integration point...
Contains the declaration of multiphysic interface class.
void Jacobian(TPZVec< REAL > &qsi, TPZFMatrix< REAL > &jac, TPZFMatrix< REAL > &axes, REAL &detjac, TPZFMatrix< REAL > &jacinv) const
Compute a decomposition of the gradient of the mapping function, as a rotation matrix (Jacobian) and ...
TPZMaterial * FindMaterial(int id)
Find the material with identity id.
unsigned int NShape() const
virtual int ComputeIntegrationOrder() const override
void SetLeftRightElement(const TPZCompElSide &leftel, const TPZCompElSide &rightel)
Contains the TPZGraphElT class which implements the graphical triangular element. ...
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
void SetLeftRightElementIndices(const TPZVec< int64_t > &lefindices, const TPZVec< int64_t > &rightindices)
Contains the TPZGraphMesh class which represents a graphical mesh used for post processing purposes...
Contains the TPZGraphElPyramidMapped class which implements the graphical element for a pyramid using...
TPZIntPoints * fIntegrationRule
Integration rule established by the user.
TPZAdmChunkVector< TPZConnect > & ConnectVec()
Return a reference to the connect pointers vector.
int64_t Index() const
Returns element index of the mesh fELementVec list.
REAL HSize
measure of the size of the element
int intGlobPtIndex
global point index
int SetNBlocks(const int num_of_blocks)
Sets number of blocks on diagonal matrix.
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension a matrix and ZERO your elements.
virtual TPZConnect & Connect(int i) const
Returns a pointer to the ith node.
int intLocPtIndex
Index of the current integration point being evaluated.
unsigned char NState() const
Number of state variables associated with the connect.
int32_t Hash(std::string str)
virtual int64_t ConnectIndex(int i) const =0
Returns the index of the ith connectivity of the element.
void InitMaterialData(TPZMaterialData ¢er_data, TPZVec< TPZMaterialData > &data_left, TPZVec< TPZMaterialData > &data_right)
Initialize the material data structures.
This class associates an element matrix with the coeficients of its contribution in the global stiffn...
Implements the interfaces for TPZCompElDisc, TPZInterfaceElement and TPZInterpolatedElement. Computational element.
virtual int NConnects() const =0
Returns the number of nodes of the element.
void Normal(TPZVec< REAL > &point, TPZGeoEl *left, TPZGeoEl *right, TPZVec< REAL > &normal) const
compute the normal to the point from left to right neighbour
void ComputeSideTransform(TPZManVector< TPZCompElSide > &Neighbor, TPZManVector< TPZTransform<> > &transf)
Compute the transform of a paramenter point in the multiphysic interface element to a parameter point...
virtual int Dimension() const =0
Returns the dimension of the element.
TPZCompEl * Element() const
Gives a pointer to the reference computational element.
virtual TPZTransform< REAL > SideToSideTransform(int sidefrom, int sideto)=0
Compute the transformation between the master element space of one side of an element to the master e...
int64_t Id() const
Returns the Id of the element.
TPZManVector< int64_t, 3 > fLeftElIndices
indices of the Left Element Vector
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
void ComputeCenterNormal(TPZVec< REAL > &normal) const
TPZVec< std::string > ScalarNames()
Return scalar variable names.
int Dimension() const
the dimension associated with the element/side
void ResetReference()
Reset the element referenced by the geometric element to NULL.
Computes the contribution over an interface between two discontinuous elements. Computational Element...
void Reset(TPZCompMesh *mesh=NULL, MType type=Unknown)
Reset the data structure.
Implements computational mesh. Computational Mesh.
TPZCompElSide fRightElSide
Element vector the right of the normal a interface.
TPZAdmChunkVector< TPZCompEl * > & ElementVec()
Returns a reference to the element pointers vector.
virtual void FillDataRequirementsInterface(TPZMaterialData &data)
This method defines which parameters need to be initialized in order to compute the contribution of i...
virtual void Print(std::ostream &out=std::cout) const
Prints element data.
TPZCompEl * RightElement() const
Returns the right element from the element interface.
void InitializeElementMatrix(TPZElementMatrix &ek, TPZElementMatrix &ef)
Initialize the structure of the stiffness matrix.
TPZMultiphysicsInterfaceElement()
Default constructor.
virtual void PolynomialOrder(TPZVec< int > &order) const =0
void SetReference(TPZCompEl *elp)
Make the current element reference to the computational element.
virtual void Solution(TPZVec< REAL > &qsi, int var, TPZVec< STATE > &sol)
Calculates the solution - sol - for the variable var at point qsi, where qsi is expressed in terms of...
Contains the TPZGraphElT2dMapped class which implements a graphical element for a triangle mapped int...
int NumLoadCases()
returns the number of load cases for this material object
int Side() const
Returns the side index.
virtual int MaxOrder()
Returns the max order of interpolation.
Contains the TPZIntPoints class which defines integration rules.
int NeighbourExists(const TPZGeoElSide &neighbour) const
Returns 1 if neighbour is a neighbour of the element along side.
Contains the TPZGraphEl1dd class which implements the graphical one dimensional discontinuous element...
TPZCompElSide Right() const
Access function to the right element.
virtual ~TPZMultiphysicsInterfaceElement()
Default destructor.
virtual REAL ElementRadius()
virtual bool IsActiveApproxSpaces(int space_index)
Contains the TPZDiscontinuousGalerkin class which implements the interface for discontinuous Galerkin...
Defines the interface of a computational element. Computational Element.
int IncrementNumInterfaces()
Increments number of TPZInterfaceElement pointing to this.
Contains the TPZGraphElQ3dd class which implements the graphical three dimensional discontinuous elem...
REAL detjac
determinant of the jacobian
virtual int ClassId() const override
Define the class id associated with the class.
virtual void Point(int i, TPZVec< REAL > &pos, REAL &w) const =0
Returns i-th point at master element and related weight.
#define PZError
Defines the output device to error messages and the DebugStop() function.
TPZCompMesh * fMesh
Computational mesh to which the element belongs.
TPZCompElSide fLeftElSide
Element vector the left of the normal a interface.