14 static LoggerPtr logger(Logger::getLogger(
"substruct.dohrassembly"));
23 int ncols = local.
Cols();
25 for (
int ic=0; ic<ncols; ic++)
27 for(ieq=0; ieq<neq; ieq++)
29 global(avec[ieq],ic) += local.
GetVal(ieq,ic);
34 std::stringstream sout;
35 sout <<
"Assembling destination indices " << avec << std::endl;
36 local.
Print(
"Input vector",sout);
37 global.
Print(
"Resulting vector",sout);
38 if (logger->isDebugEnabled())
52 int ncols = global.
Cols();
55 for (
int ic=0; ic<ncols; ic++)
57 for(ieq=0; ieq<neq; ieq++)
59 local(ieq,ic) = global.
GetVal(avec[ieq],ic);
64 std::stringstream sout;
65 sout <<
"sub structure " << isub <<
" Extracting destination indices " << avec << std::endl;
66 local.
Print(
"extracted vector",sout);
67 global.
Print(
"Global vector",sout);
68 if (logger->isDebugEnabled())
83 int ncols = local.
Cols();
84 for (
int ic=0; ic<ncols; ic++)
86 for(ieq=0; ieq<neq; ieq++)
88 global(avec[ieq],ic) += local.
GetVal(ieq,ic);
93 std::stringstream sout;
94 sout <<
"Assembling destination indices " << avec << std::endl;
95 local.
Print(
"Input vector",sout);
96 global.
Print(
"Resulting vector",sout);
97 if (logger->isDebugEnabled())
112 int ncols = global.
Cols();
114 for (
int ic=0; ic<ncols; ic++)
116 for(ieq=0; ieq<neq; ieq++)
118 local(ieq,ic) = global.
GetVal(avec[ieq],ic);
125 return Hash(
"TPZDohrAssembly") ^ ClassIdOrHash<TVar>() << 1;
132 int nfine = fFineEqs.size();
134 for (
int f=0;
f<nfine;
f++) {
137 int ncoarse = fCoarseEqs.size();
138 buf.
Write(&ncoarse,1);
139 for (
int nc=0; nc<ncoarse; nc++) {
140 buf.
Write( fCoarseEqs[nc]);
150 fFineEqs.resize(nfine);
151 for (
int f=0;
f<nfine;
f++) {
152 buf.
Read( fFineEqs[
f]);
156 fCoarseEqs.resize(ncoarse);
157 for (
int nc=0; nc<ncoarse; nc++) {
158 buf.
Read( fCoarseEqs[nc]);
void Extract(int isub, const TPZFMatrix< TVar > &global, TPZFMatrix< TVar > &local) const
Extract the values from the global matrix into the local matrix.
void Assemble(int isub, const TPZFMatrix< TVar > &local, TPZFMatrix< TVar > &global) const
Sum the values in the local matrix into the global matrix.
Assembling using Dohrmann algorithm. Sub structure.
int ClassId() const override
Define the class id associated with the class.
void Read(TPZStream &buf, void *context) override
method for reading the object for a stream
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.
Templated vector implementation.
void AssembleCoarse(int isub, const TPZFMatrix< TVar > &local, TPZFMatrix< TVar > &global) const
Sum the values in the local matrix into the global matrix.
Contains the TPZDohrAssembly class which implements assembling using Dohrmann algorithm.
void ExtractCoarse(int isub, const TPZFMatrix< TVar > &global, TPZFMatrix< TVar > &local) const
Extract the values from the global matrix into the local matrix.
virtual void Write(const bool val)
Contains TPZMatrixclass which implements full matrix (using column major representation).
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
void Write(TPZStream &buf, int withclassid) const override
method for streaming the object to a stream
Full matrix class. Matrix.
int32_t Hash(std::string str)
int64_t Cols() const
Returns number of cols.
virtual void Print(std::ostream &out) const
int Resize(const int64_t newRows, const int64_t wCols) override
Redimension a matrix, but maintain your elements.
Defines the interface for saving and reading data. Persistency.
int64_t NElements() const
Returns the number of elements of the vector.
const TVar & GetVal(const int64_t row, const int64_t col) const override
Get values without bounds checking This method is faster than "Get" if DEBUG is defined.
virtual void Read(bool &val)