NeoPZ
Classes | Macros | Functions | Variables
substruct.cpp File Reference

Tests for sub structuration. More...

#include <iostream>
#include <cstdlib>
#include "tpzdohrsubstruct.h"
#include "tpzdohrmatrix.h"
#include "tpzdohrprecond.h"
#include "pzdohrstructmatrix.h"
#include "pzstepsolver.h"
#include "pzcompel.h"
#include "pzgeoelbc.h"
#include "pzelast3d.h"
#include "pzbndcond.h"
#include "tpzdohrassembly.h"
#include "pzlog.h"
#include "tpzgensubstruct.h"
#include "tpzpairstructmatrix.h"
#include "pzviscoelastic.h"
#include "TPZVTKGeoMesh.h"
#include "pzgeotetrahedra.h"
#include "pzskylstrmatrix.h"
#include "tpzarc3d.h"
#include "pzvtkmesh.h"
#include "pzfstrmatrix.h"
#include "pzbfilestream.h"
#include "pzmd5stream.h"
#include <fstream>
#include <string>
#include "arglib.h"
#include "run_stats_table.h"
Include dependency graph for substruct.cpp:

Go to the source code of this file.

Classes

class  FileStreamWrapper
 

Macros

#define PERF_START(obj)
 
#define PERF_STOP(obj)
 
#define VERBOSE(level, ...)
 

Functions

void InsertElasticity (TPZAutoPointer< TPZCompMesh > mesh)
 
void InsertViscoElasticity (TPZAutoPointer< TPZCompMesh > mesh)
 
void InsertElasticityCubo (TPZAutoPointer< TPZCompMesh > mesh)
 
TPZGeoMeshMalhaPredio ()
 
TPZGeoMeshMalhaCubo ()
 
void SetPointBC (TPZGeoMesh *gr, TPZVec< REAL > &x, int bc)
 Generate a boundary geometric element at the indicated node. More...
 
REAL Height (TPZGeoMesh *gmesh)
 
int SubStructure (TPZAutoPointer< TPZCompMesh > cmesh, REAL height)
 
void help (const char *prg)
 
int main (int argc, char *argv[])
 

Variables

clarg::argString cf1 ("-cf1", "starts execution from checkpoint 1 (read checkpoint file)", "ckpt1.ckpt")
 
clarg::argString cf2 ("-cf2", "starts execution from checkpoint 2 (read checkpoint file)", "ckpt2.ckpt")
 
clarg::argString cf3 ("-cf3", "starts execution from checkpoint 3 (read checkpoint file)", "ckpt3.ckpt")
 
clarg::argBool st1 ("-st1", "stop at checkpoint 1 (after dump)", false)
 
clarg::argBool st2 ("-st2", "stop at checkpoint 2 (after dump)", false)
 
clarg::argBool st3 ("-st3", "stop at checkpoint 3 (after dump)", false)
 
clarg::argString gen_sig_ckpt1 ("-gen_c1_md5", "generates MD5 signature for checkpoint 1 and dump into file.", "ckpt1.md5")
 
clarg::argString chk_sig_ckpt1 ("-chk_c1_md5", "compute MD5 signature for checkpoint 1 and check against MD5 at file.", "ckpt1.md5")
 
clarg::argString gen_sig_ckpt2 ("-gen_c2_md5", "generates MD5 signature for checkpoint 2 and dump into file.", "ckpt2.md5")
 
clarg::argString chk_sig_ckpt2 ("-chk_c2_md5", "compute MD5 signature for checkpoint 2 and check against MD5 at file.", "ckpt2.md5")
 
clarg::argString gen_sig_ckpt3 ("-gen_c3_md5", "generates MD5 signature for checkpoint 3 and dump into file.", "ckpt3.md5")
 
clarg::argString chk_sig_ckpt3 ("-chk_c3_md5", "compute MD5 signature for checkpoint 3 and check against MD5 at file.", "ckpt3.md5")
 
clarg::argString gen_sig_ckpt4 ("-gen_c4_md5", "generates MD5 signature for checkpoint 4 and dump into file.", "ckpt4.md5")
 
clarg::argString chk_sig_ckpt4 ("-chk_c4_md5", "compute MD5 signature for checkpoint 4 and check against MD5 at file.", "ckpt4.md5")
 
clarg::argString dc1 ("-dc1", "dump checkpoint 1 to file", "ckpt1.ckpt")
 
clarg::argString dc2 ("-dc2", "dump checkpoint 2 to file", "ckpt2.ckpt")
 
clarg::argString dc3 ("-dc3", "dump checkpoint 3 to file", "ckpt3.ckpt")
 
clarg::argString mc ("-mc", "starts execution from beginning - read a \alha_cubo\input file", "../cube1.txt")
 
clarg::argString mp ("-mp", "starts execution from beginning - read a \alha_predio\input file", "../8andares02.txt")
 
clarg::argInt plevel ("-p", "plevel", 1)
 
clarg::argInt num_it ("-num_it", "number limit of iterations to the CG solver", 1000)
 
clarg::argInt nt_sm ("-nt_sm", "Dohr (l1): number of threads to process the submeshes", 0)
 
clarg::argInt nt_d ("-nt_d", "Dohr (l1): number of threads to decompose each submesh", 0)
 
clarg::argInt nt_a ("-nt_a", "Pair (l2): number of threads to assemble each submesh (multiply by nt_sm)", 0)
 
clarg::argBool dohr_tbb ("-dohr_tbb", "assemble TPZDohrStructMatrix (level 1) using TBB", false)
 
clarg::argBool pair_tbb ("-pair_tbb", "assemble TPZPairStructMatrix (level 2) using TBB", false)
 
clarg::argInt nt_multiply ("-nt_m", "number of threads to multiply", 0)
 
clarg::argInt nsub ("-nsub", "number of substructs", 4)
 
clarg::argInt dim_arg ("-dim", "dim???", 3)
 
clarg::argInt maxlevel ("-maxlevel", "maxlevel???", 5)
 
clarg::argInt sublevel ("-sublevel", "sublevel???", 3)
 
clarg::argInt verb_level ("-v", "verbosity level", 0)
 
clarg::argBool bc ("-bc", "binary checkpoints", false)
 
clarg::argBool h ("-h", "help message", false)
 
clarg::argInt refin ("-ref", "refine mesh", 1)
 
RunStatsTable total_rst ("-tot_rdt", "Whole program (total) statistics raw data table")
 
RunStatsTable create_rst ("-cre_rdt", "Create statistics raw data table (step 2)")
 
RunStatsTable assemble_rst ("-ass_rdt", "Assemble statistics raw data table (step 3)")
 
RunStatsTable precond_rst ("-pre_rdt", "Precond statistics raw data table (step 3)")
 
RunStatsTable solve_rst ("-sol_rdt", "Solver statistics raw data table (step 4)")
 

Detailed Description

Tests for sub structuration.

Author
Philippe Devloo
Since
2006

Definition in file substruct.cpp.

Macro Definition Documentation

◆ PERF_START

#define PERF_START (   obj)

Definition at line 163 of file substruct.cpp.

Referenced by main().

◆ PERF_STOP

#define PERF_STOP (   obj)

Definition at line 164 of file substruct.cpp.

Referenced by main().

◆ VERBOSE

#define VERBOSE (   level,
  ... 
)

Referenced by main().

Function Documentation

◆ Height()

REAL Height ( TPZGeoMesh gmesh)

◆ help()

void help ( const char *  prg)

◆ InsertElasticity()

void InsertElasticity ( TPZAutoPointer< TPZCompMesh mesh)

◆ InsertElasticityCubo()

void InsertElasticityCubo ( TPZAutoPointer< TPZCompMesh mesh)

◆ InsertViscoElasticity()

void InsertViscoElasticity ( TPZAutoPointer< TPZCompMesh mesh)

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 219 of file substruct.cpp.

References TPZDohrMatrix< TVar, TSubStruct >::AddInternalSolution(), TPZDohrStructMatrix::Assemble(), TPZDohrStructMatrix::AssembleTBB(), TPZCompMesh::AutoBuild(), TPZMD5Stream::CheckMD5(), TPZDohrStructMatrix::Create(), DebugStop, TPZCompMesh::Dimension(), TPZDohrAssembly< TVar >::Extract(), TPZDohrMatrix< TVar, TSubStruct >::fAssembly, TPZCompMesh::FindMaterial(), clarg::argT< T >::get_value(), TPZStepSolver< TVar >::GetTolerance(), TPZPairStructMatrix::gNumThreads, help(), TPZDohrStructMatrix::IdentifyExternalConnectIndexes(), InitializePZLOG(), InsertElasticity(), InsertElasticityCubo(), TPZCompMesh::LoadSolution(), LOGPZ_DEBUG, LOGPZ_INFO, MalhaCubo(), MalhaPredio(), TPZCompMesh::MaterialVec(), TPZCompMesh::NEquations(), TPZMaterial::NStateVariables(), TPZDohrStructMatrix::NumberCornerEqs(), TPZStepSolver< TVar >::NumIterations(), FileStreamWrapper::OpenRead(), FileStreamWrapper::OpenWrite(), clarg::parse_arguments(), PERF_START, PERF_STOP, TPZDohrStructMatrix::Preconditioner(), TPZCompMesh::Print(), TPZDohrStructMatrix::Read(), TPZGeoMesh::Read(), TPZCompMesh::Read(), TPZMatrix< TVar >::Read(), TPZCompMesh::Reference(), SAVEABLE_SKIP_NOTE, SAVEABLE_STR_NOTE, TPZStepSolver< TVar >::SetCG(), TPZCompMesh::SetDefaultOrder(), TPZCompMesh::SetDimModel(), TPZGraphMesh::SetFileName(), TPZCompEl::SetgOrder(), TPZStepSolver< TVar >::SetMultiply(), TPZStructMatrixBase::SetNumThreads(), TPZMatWithMem< TMEM, TFather >::SetUpdateMem(), TPZStepSolver< TVar >::Solve(), SubMesh(), TPZDohrStructMatrix::SubStructure(), TPZDohrMatrix< TVar, TSubStruct >::SubStructures(), clarg::values(), verbose, VERBOSE, clarg::arg_base::was_set(), TPZDohrStructMatrix::Write(), TPZGeoMesh::Write(), TPZStepSolver< TVar >::Write(), TPZDohrMatrix< TVar, TSubStruct >::Write(), TPZFMatrix< TVar >::Write(), TPZCompMesh::Write(), TPZMatrix< TVar >::Write(), and TPZMD5Stream::WriteMD5().

◆ MalhaCubo()

TPZGeoMesh * MalhaCubo ( )

◆ MalhaPredio()

TPZGeoMesh * MalhaPredio ( )

◆ SetPointBC()

void SetPointBC ( TPZGeoMesh gr,
TPZVec< REAL > &  x,
int  bc 
)

Generate a boundary geometric element at the indicated node.

Definition at line 1220 of file substruct.cpp.

References TPZGeoMesh::ElementVec(), TPZGeoMesh::FindNode(), gn, TPZGeoEl::NCornerNodes(), TPZChunkVector< T, EXP >::NElements(), and TPZGeoEl::NodePtr().

Referenced by MalhaCubo().

◆ SubStructure()

int SubStructure ( TPZAutoPointer< TPZCompMesh cmesh,
REAL  height 
)

Variable Documentation

◆ assemble_rst

RunStatsTable assemble_rst("-ass_rdt", "Assemble statistics raw data table (step 3)")

Referenced by help().

◆ bc

clarg::argBool bc("-bc", "binary checkpoints", false)

Referenced by TPZMultCamada::AddLayer(), TPZMulticamadaOrthotropic::AddPlacaOrtho(), TPZMHMixedHybridMeshControl::ApplyNeighbourBoundaryCondition(), TPZEulerConsLaw::ArtDiff(), TPZMatPoisson3d::BCInterfaceJump(), TPZMatHyperElastic::Contribute(), TPZBiharmonic::Contribute(), TPZConsLawTest::Contribute(), TPZEuler::Contribute(), TPZBurger::Contribute(), TPZDiscontinuousGalerkin::Contribute(), TPZNonLinBiharmonic::Contribute(), TPZMat2dLin::Contribute(), TPZMat1dLin::Contribute(), TPZCoupledTransportDarcyBC::Contribute(), TPZMixedDarcyFlow::Contribute(), TPZElasticityMaterial::Contribute(), TPZElasticity3D::Contribute(), TPZNullMaterial::Contribute(), TPZVecL2::Contribute(), TPZSwelling::Contribute(), TPZMatLaplacian::Contribute(), TPZMatMixedPoisson3D::Contribute(), TPZMixedElasticityMaterial::Contribute(), TPZMaterial::Contribute(), TPZMatHyperElastic::ContributeBC(), TPZTracerFlow::ContributeBC(), TPZMatElastoPlastic2D< T, TMEM >::ContributeBC(), TPZMatPoisson3d::ContributeBC(), TPZEulerConsLaw::ContributeBCInterface(), TPZCoupledTransportDarcyBC::ContributeInterface(), TPZConservationLaw::ContributeInterface(), TPZBiharmonicEstimator::ContributeInterfaceErrors(), TPZAnalysis::CreateListOfCompElsToComputeError(), TPZMHMeshControl::DefinePartition(), TPZGeoEl::FatherIndex(), TPZMatElastoPlastic2D< T, TMEM >::FillBoundaryConditionDataRequirement(), TCedricTest::GenerateCompMesh(), TPZGenSubStruct::GenerateMesh(), TPZMatPoisson3dReferred::GetAlpha(), TPZMatElasticity2D::GetMu(), TPZCoupledTransportDarcyBC::HasForcingFunction(), help(), TPZAnalysis::IdentifyPostProcessingMatIds(), insert_elasticity(), TPZMHMixedHybridMeshControl::InsertPeriferalHdivMaterialObjects(), TPZMHMixedMeshControl::InsertPeriferalHdivMaterialObjects(), TCedricTest::InterpolationError(), TPZMatHybrid::Name(), TPZPlaca::Name(), TPZMaterialTest::Name(), TPZMatOrthotropic::Name(), TPZMaterialTest3D::Name(), TPZMatPlaca2::Name(), TPZElasticityHybridMaterial::Name(), TPZLinearConvecDiff::Name(), TPZMatDualHybridPoisson::Name(), TPZMultiphase::Name(), TPZMixedPoissonParabolic::Name(), TPZCoupledTransportDarcy::Name(), TPZEulerEquation::Name(), TPZMatElastoPlastic< T, TMEM >::NEvalErrors(), TPZMatPorous< T, TMEM >::NEvalErrors(), TPZElasticity2DHybrid::NewMaterial(), TPZLinearConvection::NFluxes(), TPZElasticityAxiMaterial::NFluxes(), TPZMatElastoPlastic2D< T, TMEM >::NStateVariables(), TPZL2Projection::NStateVariables(), TPZMixedPoisson::PermeabilityFunction(), TPZAnalysis::PostProcessErrorSerial(), TPZBndCond::Print(), TPZGenGrid::SetBC(), TPZGenGrid::SetDistortion(), TPZReynoldsFlow::SetNplus1Computation(), TPZGenGrid::SetPointBC(), TPZNonLinearPoisson3d::SetReferred(), TPZMatConvectionProblem::SetTrueRungeKuttaTwo(), TPZNLMat1d::Solution(), TPZIncNavierStokesKEps::Solution(), and TPZGeoElRefLess< TGeo >::TypeName().

◆ cf1

clarg::argString cf1("-cf1", "starts execution from checkpoint 1 (read checkpoint file)", "ckpt1.ckpt")

Referenced by help().

◆ cf2

clarg::argString cf2("-cf2", "starts execution from checkpoint 2 (read checkpoint file)", "ckpt2.ckpt")

Referenced by help().

◆ cf3

clarg::argString cf3("-cf3", "starts execution from checkpoint 3 (read checkpoint file)", "ckpt3.ckpt")

Referenced by help().

◆ chk_sig_ckpt1

clarg::argString chk_sig_ckpt1("-chk_c1_md5", "compute MD5 signature for checkpoint 1 and check against MD5 at file.", "ckpt1.md5")

Referenced by help().

◆ chk_sig_ckpt2

clarg::argString chk_sig_ckpt2("-chk_c2_md5", "compute MD5 signature for checkpoint 2 and check against MD5 at file.", "ckpt2.md5")

Referenced by help().

◆ chk_sig_ckpt3

clarg::argString chk_sig_ckpt3("-chk_c3_md5", "compute MD5 signature for checkpoint 3 and check against MD5 at file.", "ckpt3.md5")

Referenced by help().

◆ chk_sig_ckpt4

clarg::argString chk_sig_ckpt4("-chk_c4_md5", "compute MD5 signature for checkpoint 4 and check against MD5 at file.", "ckpt4.md5")

Referenced by help().

◆ create_rst

RunStatsTable create_rst("-cre_rdt", "Create statistics raw data table (step 2)")

Referenced by help().

◆ dc1

clarg::argString dc1("-dc1", "dump checkpoint 1 to file", "ckpt1.ckpt")

Referenced by help().

◆ dc2

clarg::argString dc2("-dc2", "dump checkpoint 2 to file", "ckpt2.ckpt")

Referenced by help().

◆ dc3

clarg::argString dc3("-dc3", "dump checkpoint 3 to file", "ckpt3.ckpt")

Referenced by help().

◆ dim_arg

clarg::argInt dim_arg("-dim", "dim???", 3)

Referenced by help().

◆ dohr_tbb

clarg::argBool dohr_tbb("-dohr_tbb", "assemble TPZDohrStructMatrix (level 1) using TBB", false)

Referenced by help().

◆ gen_sig_ckpt1

clarg::argString gen_sig_ckpt1("-gen_c1_md5", "generates MD5 signature for checkpoint 1 and dump into file.", "ckpt1.md5")

Referenced by help().

◆ gen_sig_ckpt2

clarg::argString gen_sig_ckpt2("-gen_c2_md5", "generates MD5 signature for checkpoint 2 and dump into file.", "ckpt2.md5")

Referenced by help().

◆ gen_sig_ckpt3

clarg::argString gen_sig_ckpt3("-gen_c3_md5", "generates MD5 signature for checkpoint 3 and dump into file.", "ckpt3.md5")

Referenced by help().

◆ gen_sig_ckpt4

clarg::argString gen_sig_ckpt4("-gen_c4_md5", "generates MD5 signature for checkpoint 4 and dump into file.", "ckpt4.md5")

Referenced by help().

◆ h

clarg::argBool h("-h", "help message", false)

Referenced by help().

◆ maxlevel

clarg::argInt maxlevel("-maxlevel", "maxlevel???", 5)

Referenced by help().

◆ mc

clarg::argString mc("-mc", "starts execution from beginning - read a \malha_cubo\ input file", "../cube1.txt")

Referenced by help().

◆ mp

clarg::argString mp("-mp", "starts execution from beginning - read a \malha_predio\ input file", "../8andares02.txt")

Referenced by help(), and main().

◆ nsub

clarg::argInt nsub("-nsub", "number of substructs", 4)

Referenced by TPZDohrStructMatrix::Assemble(), TPZDohrStructMatrix::AssembleTBB(), TPZRefPattern::BuildSideMesh(), TPZCheckGeom::CheckRefinement(), TPZDohrStructMatrix::ClusterIslands(), TPZMHMeshControl::ConnectedElements(), TPZDohrStructMatrix::Create(), TPZBuildSBFem::CreateElementGroups(), TPZMHMeshControl::DivideBoundarySkeletonElements(), TPZBuildSBFem::DivideSkeleton(), TPZMHMeshControl::DivideSkeletonElements(), TPZGeoElSide::EqualorHigherCompElementList2(), TPZGeoElSide::EqualorHigherCompElementList3(), TPZGeoElSide::GetAllSiblings(), pzrefine::TPZRefPrism::GetSubElements(), pzrefine::TPZRefTriangle::GetSubElements(), pzrefine::TPZRefCube::GetSubElements(), pzrefine::TPZRefPyramid::GetSubElements(), pzrefine::TPZRefQuad::GetSubElements(), pzrefine::TPZRefLinear::GetSubElements(), pzrefine::TPZRefTetrahedra::GetSubElements(), pzrefine::TPZRefPoint::GetSubElements(), help(), TPZGeoElSide::HigherLevelCompElementList2(), TPZGeoElSide::HigherLevelCompElementList3(), TPZDohrPrecond< TVar, TSubStruct >::Initialize(), TPZGenSubStruct::InitializeDohr(), TPZGenSubStruct::InitializeDohrCondense(), TPZGeoElRefPattern< TGeo >::MidSideNodeIndices(), TPZMHMixedHybridMeshControl::NeedsHDivWrapper(), TPZDohrStructMatrix::SeparateUnconnected(), SetSubMatid(), TPZDohrStructMatrix::SubStructure(), SubStructure(), TPZMGAnalysis::UniformlyRefineMesh(), TPZNonLinMultGridAnalysis::UniformlyRefineMesh(), TPZGenSubStruct::UniformRefine(), TPZGeoEl::WhichSubel(), and TPZGeoElSide::YoungestChildren().

◆ nt_a

clarg::argInt nt_a("-nt_a", "Pair (l2): number of threads to assemble each submesh (multiply by nt_sm)", 0)

Referenced by help().

◆ nt_d

clarg::argInt nt_d("-nt_d", "Dohr (l1): number of threads to decompose each submesh", 0)

Referenced by help().

◆ nt_multiply

clarg::argInt nt_multiply("-nt_m", "number of threads to multiply", 0)

Referenced by help().

◆ nt_sm

clarg::argInt nt_sm("-nt_sm", "Dohr (l1): number of threads to process the submeshes", 0)

Referenced by help().

◆ num_it

clarg::argInt num_it("-num_it", "number limit of iterations to the CG solver", 1000)

Referenced by help().

◆ pair_tbb

clarg::argBool pair_tbb("-pair_tbb", "assemble TPZPairStructMatrix (level 2) using TBB", false)

Referenced by help().

◆ plevel

clarg::argInt plevel("-p", "plevel", 1)

Referenced by help().

◆ precond_rst

RunStatsTable precond_rst("-pre_rdt", "Precond statistics raw data table (step 3)")

Referenced by help().

◆ refin

clarg::argInt refin("-ref", "refine mesh", 1)

Referenced by help().

◆ solve_rst

RunStatsTable solve_rst("-sol_rdt", "Solver statistics raw data table (step 4)")

Referenced by help().

◆ st1

clarg::argBool st1("-st1", "stop at checkpoint 1 (after dump)", false)

Referenced by help().

◆ st2

clarg::argBool st2("-st2", "stop at checkpoint 2 (after dump)", false)

Referenced by help().

◆ st3

clarg::argBool st3("-st3", "stop at checkpoint 3 (after dump)", false)

Referenced by help().

◆ sublevel

clarg::argInt sublevel("-sublevel", "sublevel???", 3)

Referenced by help().

◆ total_rst

RunStatsTable total_rst("-tot_rdt", "Whole program (total) statistics raw data table")

Referenced by help().

◆ verb_level

clarg::argInt verb_level("-v", "verbosity level", 0)

Referenced by help().