13 static LoggerPtr logger(Logger::getLogger(
"pz.mulptiphysicscompmesh"));
79 std::cout<<
"TPZMultiphysicsCompMesh:: The vector provided should have the same size." << std::endl;
100 std::cout<<
"TPZMultiphysicsCompMesh:: The vector provided should have the same size." << std::endl;
118 for (
long el = 0; el < nel_res; el++) {
149 std::cout << __PRETTY_FUNCTION__ <<
" has not been implemented. Use BuildMultiphysicsSpace instead\n";
159 for(
int i_as = 0; i_as < n_approx_spaces; i_as++)
164 std::ofstream out(
"gmesh.txt");
165 geometry->
Print(out);
168 for(icel=0; icel < n_cels; icel++)
216 for (int64_t icel = 0; icel < n_cels; icel++) {
233 int64_t nconnects = 0;
234 for (
int i_as = 0; i_as < n_approx_spaces; i_as++)
239 FirstConnect[i_as] = nconnects;
247 for (
int i_as = 0; i_as < n_approx_spaces; i_as++)
255 for (ic=0; ic<nc; ic++)
260 ConnectVec()[counter].SetSequenceNumber(seqnum);
271 for (ic=0; ic<nc; ic++)
289 for (iel = 0; iel < nelem; iel++)
304 std::list<TPZOneShapeRestraint> oneshape;
305 for (
int i_as = 0; i_as < n_approx_spaces; i_as++) {
315 std::list<TPZOneShapeRestraint> celrest;
317 for (std::list<TPZOneShapeRestraint>::iterator it = celrest.begin(); it != celrest.end(); it++) {
320 for(
int face = 0; face < rest.
fFaces.
size(); face++)
322 int ic = rest.
fFaces[face].first;
323 convertedrest.
fFaces[face].first = ic+FirstConnect[i_as];
325 oneshape.push_back(convertedrest);
329 for (ic=0; ic<ncon; ic++) {
334 for (std::list<TPZOneShapeRestraint>::iterator it = oneshape.begin(); it != oneshape.end(); it++) {
345 for (
int i_as = 0; i_as < n_approx_spaces; i_as++) {
349 FirstConnectIndex[i_as+1] = FirstConnectIndex[i_as]+
m_mesh_vector[i_as]->NConnects();
352 for (
int i_as = 0; i_as < n_approx_spaces; i_as++) {
361 for (ic=0; ic<ncon; ic++) {
364 if(seqnum<0)
continue;
365 int blsize = block.
Size(seqnum);
368 if(seqnumMF < 0)
continue;
370 blockMF.
Put(seqnumMF,
idf, 0, block.
Get(seqnum,
idf, 0));
380 for (
int i_as = 0; i_as < n_approx_spaces; i_as++) {
384 FirstConnectIndex[i_as+1] = FirstConnectIndex[i_as]+
m_mesh_vector[i_as]->NConnects();
387 for (
int i_as = 0; i_as < n_approx_spaces; i_as++) {
396 for (ic=0; ic<ncon; ic++) {
399 if(seqnum<0)
continue;
400 int blsize = block.
Size(seqnum);
403 if (nelconnected == 0) {
408 for (idf=0; idf<blsize; idf++) {
409 block.
Put(seqnum, idf, 0, blockMF.
Get(seqnumMF, idf, 0));
414 if (logger->isDebugEnabled()) {
415 std::stringstream sout;
416 sout <<
"Solutions of the referred meshes";
419 for (
int i_as = 0; i_as < n_approx_spaces; i_as++) {
431 for (int64_t el = 0; el<nel; el++) {
441 for (int64_t el=0; el<nel; el++) {
int64_t NElements() const
Number of computational elements allocated.
TPZGeoMesh * Reference() const
Returns a pointer to the geometrical mesh associated.
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...
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.
virtual void InitializeIntegrationRule() override=0
After adding the elements initialize the integration rule.
TPZManVector< int, 5 > m_active_approx_spaces
~TPZMultiphysicsCompMesh()
Destructor.
int MaterialId() const
Returns the material index of the element.
TPZAdmChunkVector< TPZCompEl * > fElementVec
List of pointers to elements.
virtual void AddShapeRestraint(TPZOneShapeRestraint restraint) override
Add a shape restraint (meant to fit the pyramid to restraint.
virtual void AddElement(TPZCompEl *cel, int64_t mesh)=0
Definition of the retraint associated with the top of the pyramid.
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
const TVar & Get(const int block_row, const int block_col, const int r, const int c) const
Gets a element from matrix verifying.
int64_t NElements() const
Access method to query the number of elements of the vector.
int NDof(TPZCompMesh &mesh)
Number of degrees of freedom associated with the object.
TPZManVector< std::pair< int64_t, int >, 4 > fFaces
Faces which are related. First item is the connect index, second item is the degree of freedom...
virtual int NSides() const =0
Returns the number of connectivities of the element.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
void AutoBuild()
Automatic builder for the computational mesh structure.
It has the declaration of the TPZMultiphysicsCompEl class.
unsigned char LagrangeMultiplier() const
Access method to return the indication whether the connect is associated with a pressure lagrange mul...
void LoadSolutionFromMeshes()
int64_t size() const
Returns the number of elements of the vector.
TPZCompEl * Element(int64_t iel)
void Resize(const int newsize)
Increase the size of the chunk vector.
TPZCreateApproximationSpace & ApproxSpace()
int64_t SequenceNumber() const
Returns the Sequence number of the connect object.
void Push(const T object)
Pushes a copy of the object on the stack.
TPZVec< TPZCompMesh * > & MeshVector()
Get the vector of computational meshes.
virtual void Print(std::ostream &out=std::cout) const
Print the information of the grid to an ostream.
Structure to reference dependency.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
void AddElements()
add the elements from the atomic meshes to the multiphysics elements
#define DebugStop()
Returns a message to user put a breakpoint in.
TPZManVector< TPZCompMesh *, 3 > m_mesh_vector
Vector of computational meshes.
virtual void ExpandSolution()
Adapt the solution vector to new block dimensions.
virtual TPZCompEl * ReferredElement(int64_t mesh)=0
void LoadSolutionFromMultiPhysics()
TPZCompEl * Reference() const
Return a pointer to the element referenced by the geometric element.
unsigned int NShape() const
int HasDependency() const
Returns whether exist dependecy information.
TPZMultiphysicsCompMesh & operator=(const TPZMultiphysicsCompMesh &other)
Assignement constructor.
const TPZBlock< STATE > & Block() const
Access the block structure of the solution vector.
void SetNMeshes(int64_t nmeshes)
TPZAdmChunkVector< TPZConnect > & ConnectVec()
Return a reference to the connect pointers vector.
int SetNBlocks(const int num_of_blocks)
Sets number of blocks on diagonal matrix.
void BuildMultiphysicsSpaceWithMemory(TPZVec< int > &active_approx_spaces, TPZVec< TPZCompMesh * > &mesh_vector)
Set active approximation spaces.
unsigned char NState() const
Number of state variables associated with the connect.
virtual void SetConnectIndexes(TPZVec< int64_t > &indexes)=0
virtual int64_t ConnectIndex(int i) const =0
Returns the index of the ith connectivity of the element.
virtual void SetActiveApproxSpaces(TPZManVector< int, 5 > &active_approx_space)
Set the active approximation spaces.
virtual int NConnects() const =0
Returns the number of nodes of the element.
virtual std::list< TPZOneShapeRestraint > GetShapeRestraints() const
Return a list with the shape restraints.
virtual void PrepareIntPtIndices()
Prepare the vector of the material withmem with the correct integration point indexes.
int Put(const int block_row, const int block_col, const int r, const int c, const TVar &value)
Puts a element to matrix verifying.
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.
Computes the contribution over an interface between two discontinuous elements. Computational Element...
TPZDepend * FirstDepend()
Implements computational mesh. Computational Mesh.
int Size(const int block_diagonal) const
Returns block dimension.
TPZVec< int > & GetActiveApproximationSpaces()
Get the vector of active physics.
TPZAdmChunkVector< TPZCompEl * > & ElementVec()
Returns a reference to the element pointers vector.
int NElConnected() const
Returns fNElConnected.
TPZCompMesh & operator=(const TPZCompMesh ©)
copy the content of the mesh
void BuildMultiphysicsSpace(TPZVec< int > &active_approx_spaces, TPZVec< TPZCompMesh * > &mesh_vector)
Set active approximation spaces.
void CreateWithMemory(bool flag)
int64_t NElements() const
Returns the number of elements of the vector.
void SetAllCreateFunctionsMultiphysicElemWithMem()
void CleanElementsConnects()
delete the elements and connects
void ResetReference()
Resets all load references in elements and nodes.
Defines the interface of a computational element. Computational Element.
void SetAllCreateFunctionsMultiphysicElem()
TPZGeoEl * Father() const
Computes the normal vectors needed for forming HDiv vector valued shape functions.
TPZFMatrix< STATE > & Solution()
Access the solution vector.
TPZMultiphysicsCompMesh()
Default constructor.
virtual void AutoBuild()
Creates the computational elements, and the degree of freedom nodes.
TPZAdmChunkVector< TPZConnect > fConnectVec
List of pointers to nodes.
void AddConnects()
add the connects from the atomic meshes