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 "pzbfilestream.h"
#include "pzmd5stream.h"
#include <fstream>
#include <string>
#include "TPZfTime.h"
#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 InsertViscoElasticityCubo (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", 500)
 
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 160 of file substruct.cpp.

Referenced by main().

◆ PERF_STOP

#define PERF_STOP (   obj)

Definition at line 161 of file substruct.cpp.

Referenced by main().

◆ VERBOSE

#define VERBOSE (   level,
  ... 
)

Referenced by main().

Function Documentation

◆ Height()

REAL Height ( TPZGeoMesh gmesh)

Definition at line 1181 of file substruct.cpp.

References TPZChunkVector< T, EXP >::NElements(), and TPZGeoMesh::NodeVec().

◆ help()

void help ( const char *  prg)

◆ InsertElasticity()

void InsertElasticity ( TPZAutoPointer< TPZCompMesh mesh)

◆ InsertViscoElasticity()

void InsertViscoElasticity ( TPZAutoPointer< TPZCompMesh mesh)

◆ InsertViscoElasticityCubo()

void InsertViscoElasticityCubo ( TPZAutoPointer< TPZCompMesh mesh)

◆ main()

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

Definition at line 217 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(), InitializePZLOG(), InsertElasticity(), InsertViscoElasticityCubo(), TPZCompMesh::LoadSolution(), LOGPZ_DEBUG, LOGPZ_INFO, MalhaCubo(), MalhaPredio(), TPZCompMesh::MaterialVec(), TPZCompMesh::NEquations(), TPZMaterial::NStateVariables(), FileStreamWrapper::OpenRead(), FileStreamWrapper::OpenWrite(), clarg::parse_arguments(), PERF_START, PERF_STOP, TPZDohrStructMatrix::Preconditioner(), TPZCompMesh::Print(), TPZGeoMesh::Read(), TPZDohrStructMatrix::Read(), TPZCompMesh::Read(), TPZMatrix< TVar >::Read(), TPZCompMesh::Reference(), TPZfTime::ReturnTimeString(), 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(), 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 1156 of file substruct.cpp.

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

◆ SubStructure()

int SubStructure ( TPZAutoPointer< TPZCompMesh cmesh,
REAL  height 
)

Variable Documentation

◆ assemble_rst

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

◆ bc

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

◆ cf1

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

◆ cf2

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

◆ cf3

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

◆ 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")

◆ 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")

◆ 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")

◆ 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")

◆ create_rst

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

◆ dc1

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

◆ dc2

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

◆ dc3

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

◆ dim_arg

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

◆ dohr_tbb

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

◆ gen_sig_ckpt1

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

◆ gen_sig_ckpt2

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

◆ gen_sig_ckpt3

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

◆ gen_sig_ckpt4

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

◆ h

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

◆ maxlevel

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

◆ mc

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

◆ mp

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

◆ nsub

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

◆ nt_a

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

◆ nt_d

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

◆ nt_multiply

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

◆ nt_sm

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

◆ num_it

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

◆ pair_tbb

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

◆ plevel

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

◆ precond_rst

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

◆ refin

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

◆ solve_rst

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

◆ st1

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

◆ st2

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

◆ st3

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

◆ sublevel

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

◆ total_rst

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

◆ verb_level

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