73 static LoggerPtr logger(Logger::getLogger(
"pz.multiphysics"));
109 int main(
int argc,
char *argv[])
114 cout <<
"Usage: " << argv[0] << endl;
130 std::cout <<
"Number of elements = " << gmesh->
NElements() << std::endl;
131 ofstream arg1(
"gmesh0.txt");
138 std::cout <<
"Number of equations = " << cmesh->
NEquations() << std::endl;
168 ofstream arg4(
"gmesh1.txt");
171 ofstream arg3(
"cmesh1.txt");
183 ofstream arg5(
"cmesh_apossolve.txt");
186 ofstream arg6(
"gmesh_apossolve.txt");
189 ofstream file(
"malhageometrica.vtk");
193 string plotfile(
"Solution.vtk");
218 for(
int xi = 0; xi < Qnodes/2; xi++)
221 Node[id].SetNodeId(
id);
222 Node[id].SetCoord(0 ,valx );
223 Node[id].SetCoord(1 ,0. );
224 gmesh->
NodeVec()[id] = Node[id];
228 for(
int xi = 0; xi < Qnodes/2; xi++)
231 Node[id].SetNodeId(
id);
232 Node[id].SetCoord(0 ,valx );
233 Node[id].SetCoord(1 ,Ly);
234 gmesh->
NodeVec()[id] = Node[id];
282 for(
int ref = 0; ref < NRefUnif; ref++ ){
285 for ( int64_t i = 0; i < n; i++ ){
366 std::set<int> MaterialIDs;
367 std::set<int> BCMaterialIDs;
368 MaterialIDs.insert(matInterno);
371 BCMaterialIDs.insert(bc1);
372 BCMaterialIDs.insert(bc2);
373 BCMaterialIDs.insert(bc3);
374 BCMaterialIDs.insert(bc4);
408 std::map<int,TPZElementGroup *> elgroup;
410 for (int64_t el=0; el<nel; el++) {
422 std::stringstream sout;
423 sout <<
"Creating an element group around element index " << el;
429 for (std::map<int,TPZElementGroup *>::iterator it = elgroup.begin(); it != elgroup.end(); it++) {
433 int nsides = gel->
NSides();
434 for (
int is=0; is<nsides; is++) {
436 if (sidedim != dim-1) {
443 int neq = equal.
size();
444 for (
int eq =0; eq < neq; eq++) {
452 if (matid == interfacemat) {
459 if (left == cel || right == cel) {
460 it->second->AddElement(interfacee);
465 else if (matid != lagrangemat && eqgel->
Dimension() == dim-1)
467 it->second->AddElement(eqcel);
472 it->second->AddElement(cel);
477 for (int64_t el=0; el<nel; el++) {
491 for (int64_t el = 0; el<nel; el++) {
498 for (int64_t el = 0; el<nel; el++) {
511 disp[0]= 2.*Pi*Pi*
sin(Pi*x)*
sin(Pi*y);
518 flux(0,0)=flux(1,0)=flux(2,0)=0.;
522 disp[0]=
sin(Pi*x)*
sin(Pi*y);
523 flux(0,0)=-Pi*
cos(Pi*x)*
sin(Pi*y);
524 flux(1,0)=-Pi*
cos(Pi*y)*
sin(Pi*x);
525 flux(2,0)=2.*Pi*Pi*
sin(Pi*x)*
sin(Pi*y);
530 scalnames[0] =
"Pressure";
531 scalnames[1] =
"ExactPressure";
534 vecnames[1]=
"ExactFlux";
540 std::ofstream out(
"malha.txt");
541 an.
Print(
"nothing",out);
int64_t NElements() const
Number of computational elements allocated.
Contains a class to record running statistics on CSV tables.
Contains the TPZFrontSym class which implements decomposition process of the frontal matrix (case sym...
clarg::argInt p_order("-p", "polynomial order", 1)
static void SetgOrder(int order)
Sets the value of the default interpolation order.
Contains TPZAnalysis class which implements the sequence of actions to perform a finite element analy...
Implements computational element and a side. Computational Element.
Contains the TPZParSkylineStructMatrix class which defines parallel structural matrix for skyline mat...
Contains declaration of TPZGeoElSide class which represents an element and its side, and TPZGeoElSideIndex class which represents an TPZGeoElSide index.
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.
void SetStructuralMatrix(TPZAutoPointer< TPZStructMatrix > strmatrix)
Set structural matrix as auto pointer for analysis.
Implements a vector class which allows to use external storage provided by the user. Utility.
void Print(const std::string &name, std::ostream &out)
Print connect and solution information.
void BuildElementGroups(TPZCompMesh *cmesh, int materialid, int interfacemat, int lagrangemat)
clarg::argInt n_threads("-nthreads", "Number of threads", 1)
int MaterialId() const
Returns the material index of the element.
void Unwrap()
put the elements in the element group back in the mesh and delete the element group ...
clarg::argBool cond_f("-cond", "perform static condensation")
void SolExata(const TPZVec< REAL > &pt, TPZVec< STATE > &disp, TPZFMatrix< STATE > &flux)
int64_t NEquations()
This computes the number of equations associated with non-restrained nodes.
RunStatsTable total_rdt("-tot_rdt","Statistics for the whole application")
Contains declaration of TPZCompEl class which defines the interface of a computational element...
Templated vector implementation.
Contains the declaration of the TPZElementGroup class, which implements an computational element whic...
RunStatsTable cond_ass_rdt("-cond_ass_rdt","Statistics for the assemble step during static condensation")
TPZCompMesh * MalhaComp(TPZGeoMesh *gmesh, int pOrder)
Defines step solvers class. Solver.
void SetSolver(TPZMatrixSolver< STATE > &solver)
Set solver matrix.
Contains the TPZFrontNonSym class which implements storage and decomposition process of the frontal m...
int64_t NElements() const
Number of elements of the mesh.
RunStatsTable cond_rdt("-cond_rdt","Statistics for the static condensation step")
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Class which groups elements to characterize dense matrices.
virtual void DefineGraphMesh(int dimension, const TPZVec< std::string > &scalnames, const TPZVec< std::string > &vecnames, const std::string &plotfile)
Define GrapMesh as V3D, DX, MV or VTK depending on extension of the file.
virtual int NSides() const =0
Returns the number of connectivities of the element.
Contains the TPZStructMatrixOR class which responsible for a interface among Matrix and Finite Elemen...
virtual void Divide(TPZVec< TPZGeoEl *> &pv)
Divides the element and puts the resulting elements in the vector.
virtual int SideDimension(int side) const =0
Return the dimension of side.
void EqualLevelCompElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected computational elements which have equal level to the current element...
void LoadReferences()
Map this grid in the geometric grid.
Contains the TPZMatPoisson3d class.
TPZAutoPointer< TPZGeoMesh > MalhaGeom(int dimension, TPZVec< int > &nblocks, int nref)
malha geometrica de grande porte
Contains the TPZFStructMatrix class which implements Full Structural Matrices.
Implements SkyLine Structural Matrices. Structural Matrix.
This abstract class defines the behaviour which each derived class needs to implement.
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
int64_t size() const
Returns the number of elements of the vector.
Contains the TPZSpStructMatrix class which implements sparse structural matrices. ...
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...
clarg::argInt n_uref("-nuref", "Number of uniform refinements", 1)
void Resize(const int newsize)
Increase the size of the chunk vector.
void Unwrap()
unwrap the condensed element from the computational element and delete the condensed element ...
Contains declaration of TPZMesh class which defines a geometrical mesh and contains a corresponding l...
Implements the sequence of actions to perform a finite element analysis. Analysis.
void SetMaxNodeId(int64_t id)
Used in patch meshes.
virtual void Print(std::ostream &out=std::cout) const
Print the information of the grid to an ostream.
Implements a generic geometric element which is refined according to a generic refinement pattern...
virtual void SetParameters(STATE diff, REAL conv, TPZVec< REAL > &convdir)
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Contains declaration of TPZCompMeshReferred class which implements the structure to allow one mesh to...
clarg::argBool help("-h", "display the help message")
Contains the TPZBandStructMatrix class which implements Banded Structural Matrices.
Contains TPZMatrixclass which implements full matrix (using column major representation).
#define DebugStop()
Returns a message to user put a breakpoint in.
Contains declaration of TPZInterfaceElement class which computes the contribution over an interface b...
int parse_arguments(int argc, char *argv[])
virtual void SetNumThreads(int n)
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
Contains the TPZElasticityMaterial class which implements a two dimensional elastic material in plane...
Contains the declaration of the TPZBuildmultiphysicsMesh class.
virtual void ComputeNodElCon()
Compute the number of elements connected to each connect object.
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
void PosProcessSol(TPZAnalysis &an, std::string plotfile)
Contains declaration of TPZGeoElRefPattern class which implements a generic geometric element which i...
Contains declaration of the TPZAutoPointer class which has Increment and Decrement actions are mutexe...
Class which implements an element which condenses the internal connects.
Contains the TPZMatPoisson3dReferred class which implements a version of TPZMatPoisson3d (convection...
void arguments_descriptions(ostream &os, string prefix, string suffix)
static void PrintGMeshVTK(TPZGeoMesh *gmesh, std::ofstream &file, bool matColor=true)
Default constructor for graphical mesh with VTK format.
Contains declaration of TPZCompMesh class which is a repository for computational elements...
virtual void PostProcess(int resolution)
Draw solution over mesh for all dimensions.
Contains the TPZRefPattern class which defines the topology of the current refinement pattern to a me...
virtual void Assemble(TPZMatrix< STATE > &mat, TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface) override
Assemble the global system of equations into the matrix which has already been created.
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.
Contains the TPZGeoPoint class which implements the geometry of a point element or 0-D element...
Computes the contribution over an interface between two discontinuous elements. Computational Element...
void Forcing(const TPZVec< REAL > &pt, TPZVec< STATE > &disp)
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.
Contains the TPBSpStructMatrix class which assembles on the pair equations.
int InsertMaterialObject(TPZMaterial *mat)
Insert a material object in the datastructure.
void InitializePZLOG()
Initializes log file for log4cxx with commom name log4cxx.cfg.
virtual void CleanUpUnconnectedNodes()
Delete the nodes which have no elements connected to them.
virtual int Dimension() const =0
Returns the dimension of the element.
TPZCompEl * Element() const
Gives a pointer to the reference computational element.
int AddInterfaceMaterial(int leftmaterial, int rightmaterial, int interfacematerial)
Add an interface material associated to left and right element materials.
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
TPZCompEl * LeftElement() const
Returns the left element from the element interface.
static void BuildHybridMesh(TPZCompMesh *cmesh, std::set< int > &MaterialIDs, std::set< int > &BCMaterialIds, int LagrangeMat, int InterfaceMat)
Creating computational mesh with interface elements.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ atan
This class implements a geometric mesh for the pz environment. Geometry.
void SetForcingFunction(TPZAutoPointer< TPZFunction< STATE > > fp)
Sets a procedure as source function for the material.
void ResetReference()
Reset the element referenced by the geometric element to NULL.
Implements computational mesh. Computational Mesh.
void SetAllCreateFunctionsHDivPressure()
const T & get_value() const
TPZAdmChunkVector< TPZCompEl * > & ElementVec()
Returns a reference to the element pointers vector.
Contains TPZStepSolver class which defines step solvers class.
int Resize(const int64_t newRows, const int64_t wCols) override
Redimension a matrix, but maintain your elements.
TPZCompEl * RightElement() const
Returns the right element from the element interface.
virtual int NStateVariables() const override
Returns the number of state variables associated with the material.
void SetDirect(const DecomposeType decomp)
Contains the TPZElasticityHybridMaterial class which implements a two dimensional elastic material to...
void ResetMesh(TPZCompMesh *cmesh)
Defines the interface of a computational element. Computational Element.
Contains the TPZVTKGeoMesh class which implements the graphical mesh to VTK environment to geometric ...
TPZFlopCounter cos(const TPZFlopCounter &orig)
Returns the cosine in radians and increments the counter of the Cosine.
Contains the declaration of the TPZCondensedCompEl class, which implements an computational element w...
Material to solve a mixed poisson problem 2d by multiphysics simulation.
virtual void Print(std::ostream &out=std::cout) const
Prints mesh data.
TPZAdmChunkVector< TPZGeoEl * > & ElementVec()
Methods for handling pzlists.
This class implements a reference counter mechanism to administer a dynamically allocated object...