NeoPZ
|
Implements a mesh that contains agglomerated elements. Computational Mesh. More...
#include <tpzagglomeratemesh.h>
Public Member Functions | |
int | ClassId () const override |
Returns the unique identifier for reading/writing objects to streams. More... | |
TPZAgglomerateMesh () | |
TPZAgglomerateMesh (TPZCompMesh *finemesh) | |
An agglomeratemesh needs a fine mesh to relate to, because its elements may point to elements of the finemesh. More... | |
virtual | ~TPZAgglomerateMesh () |
TPZCompMesh * | FineMesh () |
Returns a pointer to the associated fine mesh. More... | |
Public Member Functions inherited from TPZFlowCompMesh | |
TPZFlowCompMesh (TPZGeoMesh *gr) | |
TPZFlowCompMesh () | |
~TPZFlowCompMesh () | |
REAL | MaxVelocityOfMesh () |
According to each material settings, it returns the greatest velocity in the mesh. More... | |
REAL | ComputeTimeStep () |
Computes the current time step for the mesh. More... | |
void | SetCFL (REAL CFL) |
Informs all materials the CFL number. More... | |
void | ScaleCFL (REAL scale) |
Scales the CFL of all materials. More... | |
void | CollectFluidMaterials () |
Should be called after all materials have been added to the mesh. More... | |
void | SetContributionTime (TPZContributeTime time) |
Informs the time at which the current solution in the computational mesh belongs, so that the materials can choose whether to contribute implicitly or explicitly. More... | |
void | SetResidualType (TPZResidualType type) |
Sets the kind of residual to be computed. More... | |
void | SetFlowforcingFunction (TPZAutoPointer< TPZFunction< STATE > > fp) |
Sets the forcing funtion for all fluid materials in the mesh. More... | |
virtual void | AutoBuild () override |
Creates the computational elements, and the degree of freedom nodes. More... | |
TPZMaterial * | GetFlowMaterial () |
Returns the first flow material in the mesh. More... | |
int | NFlowMaterials () |
Returns the number of Flow materials. More... | |
void | Write (TPZStream &buf, int withclassid) const override |
Saves the element data to a stream. More... | |
void | Read (TPZStream &buf, void *context) override |
Read the element data from a stream. More... | |
virtual void | ExpandSolution2 () |
Adapt the solution vector to new block dimensions. 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... | |
virtual void | Print (std::ostream &out=std::cout) const |
Prints mesh data. 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... | |
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 | |
Private Attributes | |
TPZCompMesh * | fFineMesh |
Reference Mesh for agglomerated elements. More... | |
Additional Inherited Members | |
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) |
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 TPZFlowCompMesh | |
std::map< int, TPZMaterial *> | fFluidMaterial |
This vector of pointers represent the collection of all fluid materials in the mesh. 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 a mesh that contains agglomerated elements. Computational Mesh.
This class contains both discontinuous, continuous and agglomerated elements.
Its distinction from other meshes is that it points to a reference fine mesh
Definition at line 21 of file tpzagglomeratemesh.h.
|
inline |
Definition at line 27 of file tpzagglomeratemesh.h.
References fFineMesh.
|
inline |
An agglomeratemesh needs a fine mesh to relate to, because its elements may point to elements of the finemesh.
Definition at line 34 of file tpzagglomeratemesh.h.
|
inlinevirtual |
Definition at line 40 of file tpzagglomeratemesh.h.
|
overridevirtual |
Returns the unique identifier for reading/writing objects to streams.
Reimplemented from TPZFlowCompMesh.
Definition at line 4 of file TPZAgglomerateMesh.cpp.
References TPZFlowCompMesh::ClassId(), and Hash().
|
inline |
Returns a pointer to the associated fine mesh.
Definition at line 45 of file tpzagglomeratemesh.h.
References fFineMesh.
Referenced by TPZAgglomerateElement::Read().
|
private |
Reference Mesh for agglomerated elements.
Definition at line 53 of file tpzagglomeratemesh.h.
Referenced by FineMesh(), and TPZAgglomerateMesh().