NeoPZ
|
Implements the structure to allow one mesh to refer to the solution of another. Geometry. More...
#include <tpzcompmeshreferred.h>
Public Member Functions | |
TPZCompMeshReferred () | |
TPZCompMeshReferred (TPZGeoMesh *gmesh) | |
TPZCompMeshReferred (const TPZCompMeshReferred &compmesh) | |
virtual | ~TPZCompMeshReferred () |
void | LoadReferred (TPZCompMesh *mesh) |
void | ResetReferred () |
TPZCompEl * | ReferredEl (int64_t index) |
TPZCompMesh * | ReferredMesh () const |
virtual void | Print (std::ostream &out=std::cout) const override |
Prints mesh data. More... | |
int | ClassId () const override |
Returns the unique identifier for reading/writing objects to streams. More... | |
void | Write (TPZStream &buf, int withclassid) const override |
Save the element data to a stream. More... | |
void | Read (TPZStream &buf, void *context) override |
Read the element data from a stream. More... | |
Public Member Functions inherited from TPZCompMesh | |
TPZCompMesh (TPZGeoMesh *gr=0) | |
Constructor from geometrical mesh. More... | |
TPZCompMesh (TPZAutoPointer< TPZGeoMesh > &gmesh) | |
Constructor based on an autopointer to a geometric mesh. More... | |
TPZCompMesh (const TPZCompMesh ©) | |
Copy constructor. More... | |
TPZCompMesh & | operator= (const TPZCompMesh ©) |
copy the content of the mesh More... | |
virtual | ~TPZCompMesh () |
Simple Destructor. More... | |
virtual REAL | CompareMesh (int var, char *matname) |
This method will initiate the comparison between the current computational mesh and the mesh which is referenced by the geometric mesh. More... | |
void | GetRefPatches (std::set< TPZGeoEl *> &grpatch) |
Gives all patches of the mesh. More... | |
void | GetNodeToElGraph (TPZVec< int64_t > &nodtoelgraph, TPZVec< int64_t > &nodtoelgraphinde, TPZStack< int64_t > &elgraph, TPZVec< int64_t > &elgraphindexx) |
Gives the conects graphs. More... | |
void | GetElementPatch (TPZVec< int64_t > nodtoelgraph, TPZVec< int64_t > nodtoelgraphindex, TPZStack< int64_t > &elgraph, TPZVec< int64_t > &elgraphindex, int64_t elind, TPZStack< int64_t > &patch) |
Gives the element patch. More... | |
void | SetName (const std::string &nm) |
Set the mesh name. More... | |
void | SetDimModel (int dim) |
Set de dimension of the domain of the problem. More... | |
void | SetReference (TPZGeoMesh *gmesh) |
Sets the geometric reference mesh. More... | |
void | SetReference (TPZAutoPointer< TPZGeoMesh > &gmesh) |
Sets the geometric reference mesh. More... | |
int | Dimension () const |
Returns the dimension of the simulation. More... | |
std::string & | Name () |
Returns the mesh name. More... | |
void | CleanUp () |
Delete all the dynamically allocated data structures. More... | |
TPZMaterial * | FindMaterial (int id) |
Find the material with identity id. More... | |
void | LoadReferences () |
Map this grid in the geometric grid. More... | |
virtual void | ComputeNodElCon () |
Compute the number of elements connected to each connect object. More... | |
virtual void | ComputeNodElCon (TPZVec< int > &nelconnected) const |
Compute the number of elements connected to each connect object. More... | |
virtual void | CleanUpUnconnectedNodes () |
Delete the nodes which have no elements connected to them. More... | |
void | ComputeElGraph (TPZStack< int64_t > &elgraph, TPZVec< int64_t > &elgraphindex) |
Computes the connectivity graph of the elements, as appropriate for the TPZRenumbering class. More... | |
void | ComputeElGraph (TPZStack< int64_t > &elgraph, TPZVec< int64_t > &elgraphindex, std::set< int > &mat_ids) |
Computes the connectivity graph of the elements, as appropriate for the TPZRenumbering class. More... | |
virtual void | BuildCornerConnectList (std::set< int64_t > &connectindexes) const |
adds the connect indexes associated with base shape functions to the set More... | |
int | GetDefaultOrder () |
void | SetDefaultOrder (int order) |
TPZCompMesh * | Clone () const |
Clone this mesh. More... | |
void | CopyMaterials (TPZCompMesh &mesh) const |
Copies the materials of this mesh to the given mesh. More... | |
REAL | DeltaX () |
REAL | MaximumRadiusOfMesh () |
REAL | LesserEdgeOfMesh () |
TPZCompMesh * | ComputeMesh (TPZVec< int64_t > &accumlist, int64_t numaggl) |
Creates a mesh inserting into accumlist the element list to more refined mesh. More... | |
void | ComputeFillIn (int64_t resolution, TPZFMatrix< REAL > &fillin) |
This method will fill the matrix passed as parameter with a representation of the fillin of the global stiffness matrix, based on the sequence number of the connects. More... | |
int64_t | NConnects () const |
Number of connects allocated including free nodes. More... | |
int64_t | NIndependentConnects () |
Number of independent connect objects. More... | |
int64_t | NElements () const |
Number of computational elements allocated. More... | |
size_t | NMaterials () const |
Number of materials. More... | |
TPZAdmChunkVector< TPZCompEl * > & | ElementVec () |
Returns a reference to the element pointers vector. More... | |
TPZCompEl * | Element (int64_t iel) |
const TPZCompEl * | Element (int64_t iel) const |
const TPZAdmChunkVector< TPZCompEl * > & | ElementVec () const |
Returns a reference to the element pointers vector. More... | |
TPZAdmChunkVector< TPZConnect > & | ConnectVec () |
Return a reference to the connect pointers vector. More... | |
const TPZAdmChunkVector< TPZConnect > & | ConnectVec () const |
std::map< int,TPZMaterial *> & | MaterialVec () |
Returns a reference to the material pointers vector. More... | |
std::map< int,TPZMaterial *> | MaterialVec () const |
Returns a reference to the material pointers vector. More... | |
TPZGeoMesh * | Reference () const |
Returns a pointer to the geometrical mesh associated. More... | |
const TPZBlock< STATE > & | Block () const |
Access the block structure of the solution vector. More... | |
TPZBlock< STATE > & | Block () |
Access the block structure of the solution vector. More... | |
TPZFMatrix< STATE > & | Solution () |
Access the solution vector. More... | |
TPZFMatrix< STATE > & | SolutionN () |
Access the previous solution vector. More... | |
TPZFMatrix< STATE > & | ElementSolution () |
Access method for the element solution vectors. More... | |
virtual int64_t | AllocateNewConnect (int nshape, int nstate, int order) |
Returns an index to a new connect. More... | |
virtual int64_t | AllocateNewConnect (const TPZConnect &connect) |
Returns an index to a new connect. More... | |
int | InsertMaterialObject (TPZMaterial *mat) |
Insert a material object in the datastructure. More... | |
void | InitializeBlock () |
Resequence the block object, remove unconnected connect objects and reset the dimension of the solution vector. More... | |
virtual void | ExpandSolution () |
Adapt the solution vector to new block dimensions. More... | |
void | SetElementSolution (int64_t i, TPZVec< STATE > &sol) |
Set a ith element solution, expanding the element-solution matrix if necessary. More... | |
void | ConnectSolution (std::ostream &out) |
Print the solution by connect index. More... | |
virtual TPZCompMesh * | FatherMesh () const |
Get the father meshes stack. More... | |
virtual void | MakeInternal (int64_t local) |
Makes a specified connection a internal mesh connection. More... | |
virtual void | MakeAllInternal () |
Make all mesh connections internal mesh connections. Connects to an internal connection. More... | |
virtual TPZCompMesh * | RootMesh (int64_t local) |
Returns the rootmesh who have the specified connection. More... | |
virtual int64_t | TransferElementFrom (TPZCompMesh *mesh, int64_t elindex) |
Transfer one element from a specified mesh to the current submesh. More... | |
virtual int64_t | TransferElementTo (TPZCompMesh *mesh, int64_t elindex) |
Transfer one element from a submesh to another mesh. More... | |
virtual int64_t | TransferElement (TPZCompMesh *mesh, int64_t elindex) |
Transfer one element form a submesh to another mesh. More... | |
virtual int64_t | PutinSuperMesh (int64_t local, TPZCompMesh *super) |
Put an local connection in the supermesh - Supermesh is one mesh who contains the analised submesh. More... | |
virtual int64_t | GetFromSuperMesh (int64_t superind, TPZCompMesh *super) |
Get an external connection from the supermesh - Supermesh is one mesh who contains the analised submesh. More... | |
virtual TPZCompMesh * | CommonMesh (TPZCompMesh *mesh) |
Gives the commom father mesh of the specified mesh and the current submesh. More... | |
int64_t | NEquations () |
This computes the number of equations associated with non-restrained nodes. More... | |
int | BandWidth () |
This method computes the bandwidth of the system of equations. More... | |
virtual void | Skyline (TPZVec< int64_t > &skyline) |
This method computes the skyline of the system of equations. More... | |
void | AssembleError (TPZFMatrix< REAL > &estimator, int errorid) |
Assemble the vector with errors estimators. More... | |
void | BuildTransferMatrix (TPZCompMesh &coarsemesh, TPZTransfer< STATE > &transfer) |
Builds the transfer matrix from the current grid to the coarse grid. More... | |
void | BuildTransferMatrixDesc (TPZCompMesh &transfermesh, TPZTransfer< STATE > &transfer) |
To discontinuous elements. More... | |
void | ProjectSolution (TPZFMatrix< STATE > &projectsol) |
void | SetNMeshes (int64_t nmeshes) |
int64_t | GetNMeshes () |
TPZCompEl * | CreateCompEl (TPZGeoEl *gel, int64_t &index) |
Create a computational element based on the geometric element. More... | |
virtual void | AutoBuild (const std::set< int > &MaterialIDs) |
Creates the computational elements, and the degree of freedom nodes. More... | |
virtual void | AutoBuild () |
Creates the computational elements, and the degree of freedom nodes. More... | |
void | AutoBuild (const TPZVec< int64_t > &gelindexes) |
build the computational elements for the geometric element indexes More... | |
virtual void | AutoBuildContDisc (const TPZVec< TPZGeoEl *> &continuous, const TPZVec< TPZGeoEl *> &discontinuous) |
Creates the computational elements, and the degree of freedom nodes. More... | |
TPZCreateApproximationSpace & | ApproxSpace () |
void | SetAllCreateFunctionsDiscontinuous () |
void | SetAllCreateFunctionsContinuous () |
void | SetAllCreateFunctionsDiscontinuousReferred () |
void | SetAllCreateFunctionsContinuousReferred () |
void | SetAllCreateFunctionsHDiv () |
void | SetAllCreateFunctionsHDivPressure () |
void | SetAllCreateFunctions (TPZCompEl &cel) |
void | SetAllCreateFunctionsMultiphysicElem () |
void | SetAllCreateFunctionsMultiphysicElemWithMem () |
void | SetAllCreateFunctionsContinuousWithMem () |
int | Consolidate () |
Will build the list of element boundary conditions build the list of connect boundary conditions. More... | |
int | Check () |
void | LoadSolution (const TPZFMatrix< STATE > &sol) |
Given the solution of the global system of equations, computes and stores the solution for the restricted nodes. More... | |
void | UpdatePreviousState (STATE mult=1.0) |
void | TransferMultiphysicsSolution () |
Transfer multiphysics mesh solution. More... | |
void | Divide (int64_t index, TPZVec< int64_t > &subindex, int interpolate=0) |
Divide the element corresponding to index. More... | |
void | Coarsen (TPZVec< int64_t > &elements, int64_t &index, bool CreateDiscontinuous=false) |
Create a computational element father for the comp. elem. into elements. More... | |
void | RemakeAllInterfaceElements () |
Deletes all interfaces and rebuild them all. More... | |
void | AdjustBoundaryElements () |
Will refine the elements associated with a boundary condition till there are no elements constrained by boundary condition elements. More... | |
void | Permute (TPZVec< int64_t > &permute) |
Permute the sequence number of the connect objects It is a permute gather operation. More... | |
void | SaddlePermute () |
Put the sequence number of the pressure connects after the seq number of the flux connects. More... | |
void | SaddlePermute2 () |
TPZVec< STATE > | Integrate (const std::string &varname, const std::set< int > &matids) |
Integrate the variable name over the mesh. More... | |
void | EvaluateError (std::function< void(const TPZVec< REAL > &loc, TPZVec< STATE > &val, TPZFMatrix< STATE > &deriv)> fp, bool store_error, TPZVec< REAL > &errorSum) |
Evaluates the error given the two vectors of the analised parameters. More... | |
void | ConvertDiscontinuous2Continuous (REAL eps, int opt, int dim, TPZVec< STATE > &celJumps) |
This method compute the jump solution of interface and convert discontinuous elements with jump less than eps in continuous elements. More... | |
void | Discontinuous2Continuous (int64_t disc_index, int64_t &new_index) |
This method convert a discontinuous element with index disc_index in continuous element. More... | |
Public Member Functions inherited from TPZSavable | |
TPZSavable () | |
virtual | ~TPZSavable () |
virtual std::list< std::map< std::string, uint64_t > > | VersionHistory () const |
virtual std::pair< std::string, uint64_t > | Version () const |
virtual bool | Compare (TPZSavable *copy, bool override=false) |
Compares the object for identity with the object pointed to, eventually copy the object. More... | |
virtual bool | Compare (TPZSavable *copy, bool override=false) const |
Compares the object for identity with the object pointed to, eventually copy the object. More... | |
Public Member Functions inherited from TPZRegisterClassId | |
template<typename T > | |
TPZRegisterClassId (int(T::*)() const) | |
TPZRegisterClassId ()=default | |
Static Public Member Functions | |
static void | DivideReferredEl (TPZVec< TPZCompEl *> WhichRefine, TPZCompMesh *cmesh) |
Divide computational element recursively over referred elements. More... | |
Static Public Member Functions inherited from TPZSavable | |
static std::set< TPZRestoreClassBase * > & | RestoreClassSet () |
This static function guarantees that the gMap object is available when needed. More... | |
static std::map< int, TPZRestore_t > & | ClassIdMap () |
This static function guarantees that the gMap object is available when needed. More... | |
static std::pair< std::string, uint64_t > | NeoPZVersion () |
static void | Register (TPZRestoreClassBase *restore) |
static void | RegisterClassId (int classid, TPZRestore_t fun) |
static TPZSavable * | CreateInstance (const int &classId) |
Private Attributes | |
TPZVec< int64_t > | fReferredIndices |
TPZCompMesh * | fReferred |
Additional Inherited Members | |
Protected Member Functions inherited from TPZCompMesh | |
void | ModifyPermute (TPZVec< int64_t > &permute, int64_t lagrangeq, int64_t maxeq) |
Modify the permute vector swapping the lagrangeq with maxeq and shifting the intermediate equations. More... | |
Protected Attributes inherited from TPZCompMesh | |
TPZGeoMesh * | fReference |
Geometric grid to which this grid refers. More... | |
TPZAutoPointer< TPZGeoMesh > | fGMesh |
Autopointer to the geometric mesh used in case the user has passed an autopointer. More... | |
std::string | fName |
Grid name for model identification. More... | |
TPZAdmChunkVector< TPZCompEl * > | fElementVec |
List of pointers to elements. More... | |
TPZAdmChunkVector< TPZConnect > | fConnectVec |
List of pointers to nodes. More... | |
std::map< int, TPZMaterial *> | fMaterialVec |
Map of pointers to materials. More... | |
TPZBlock< STATE > | fSolutionBlock |
Block structure of the solution vector ???? More... | |
TPZFMatrix< STATE > | fSolution |
Solution vector. More... | |
TPZFMatrix< STATE > | fSolN |
Solution at previous state. More... | |
TPZBlock< STATE > | fBlock |
Block structure to right construction of the stiffness matrix and load vector. More... | |
TPZFMatrix< STATE > | fElementSolution |
Solution vectors organized by element. More... | |
int | fDimModel |
int | fDefaultOrder |
Default order for all elements of this mesh. More... | |
TPZCreateApproximationSpace | fCreate |
The object which defines the type of space being created. More... | |
int64_t | fNmeshes |
Implements the structure to allow one mesh to refer to the solution of another. Geometry.
Definition at line 27 of file tpzcompmeshreferred.h.
TPZCompMeshReferred::TPZCompMeshReferred | ( | ) |
Definition at line 16 of file tpzcompmeshreferred.cpp.
TPZCompMeshReferred::TPZCompMeshReferred | ( | TPZGeoMesh * | gmesh | ) |
Definition at line 23 of file tpzcompmeshreferred.cpp.
TPZCompMeshReferred::TPZCompMeshReferred | ( | const TPZCompMeshReferred & | compmesh | ) |
Definition at line 29 of file tpzcompmeshreferred.cpp.
|
virtual |
Definition at line 35 of file tpzcompmeshreferred.cpp.
|
overridevirtual |
Returns the unique identifier for reading/writing objects to streams.
Reimplemented from TPZCompMesh.
Definition at line 113 of file tpzcompmeshreferred.cpp.
References TPZCompMesh::ClassId(), and Hash().
Referenced by ReferredMesh().
|
static |
Divide computational element recursively over referred elements.
Definition at line 77 of file tpzcompmeshreferred.cpp.
References TPZCompEl::Divide(), TPZCompMesh::ExpandSolution(), TPZCompEl::Index(), TPZCompMesh::LoadReferences(), LoadReferred(), TPZVec< T >::NElements(), TPZCompMesh::Reference(), ReferredEl(), ReferredMesh(), TPZGeoMesh::ResetReference(), and ResetReferred().
Referenced by ReferredMesh().
void TPZCompMeshReferred::LoadReferred | ( | TPZCompMesh * | mesh | ) |
Definition at line 40 of file tpzcompmeshreferred.cpp.
References TPZCompMesh::fElementVec, fReferred, fReferredIndices, TPZCompEl::Index(), TPZCompMesh::LoadReferences(), TPZCompMesh::NElements(), TPZCompEl::Reference(), TPZCompMesh::Reference(), TPZGeoEl::Reference(), TPZGeoMesh::ResetReference(), and TPZVec< T >::Resize().
Referenced by DivideReferredEl(), and TPZPostProcAnalysis::SetPostProcessVariables().
|
overridevirtual |
Prints mesh data.
out | indicates the device where the data will be printed |
Reimplemented from TPZCompMesh.
Definition at line 10 of file tpzcompmeshreferred.cpp.
References TPZCompMesh::Print(), and ReferredMesh().
Referenced by ReferredMesh().
|
overridevirtual |
Read the element data from a stream.
Reimplemented from TPZCompMesh.
Definition at line 124 of file tpzcompmeshreferred.cpp.
References fReferred, fReferredIndices, TPZPersistenceManager::GetInstance(), TPZStream::Read(), and TPZCompMesh::Read().
Referenced by ReferredMesh().
TPZCompEl * TPZCompMeshReferred::ReferredEl | ( | int64_t | index | ) |
Definition at line 68 of file tpzcompmeshreferred.cpp.
References TPZCompMesh::ElementVec(), fReferred, and fReferredIndices.
Referenced by DivideReferredEl(), TPZReferredCompEl< TCOMPEL >::Print(), TPZReferredCompEl< TCOMPEL >::ReferredElement(), TPZReducedSpace::ReferredIntel(), and TPZPostProcAnalysis::TransferSolution().
|
inline |
Definition at line 49 of file tpzcompmeshreferred.h.
References ClassId(), DivideReferredEl(), fReferred, Print(), Read(), and Write().
Referenced by DivideReferredEl(), Print(), and TPZPostProcAnalysis::SetPostProcessVariables().
void TPZCompMeshReferred::ResetReferred | ( | ) |
Definition at line 62 of file tpzcompmeshreferred.cpp.
References fReferred, fReferredIndices, and TPZVec< T >::Resize().
Referenced by DivideReferredEl().
|
overridevirtual |
Save the element data to a stream.
Reimplemented from TPZCompMesh.
Definition at line 117 of file tpzcompmeshreferred.cpp.
References fReferred, fReferredIndices, TPZStream::Write(), TPZCompMesh::Write(), and TPZPersistenceManager::WritePointer().
Referenced by ReferredMesh().
|
private |
Definition at line 32 of file tpzcompmeshreferred.h.
Referenced by LoadReferred(), Read(), ReferredEl(), ReferredMesh(), ResetReferred(), and Write().
|
private |
Definition at line 30 of file tpzcompmeshreferred.h.
Referenced by LoadReferred(), Read(), ReferredEl(), ResetReferred(), and Write().