1 #ifndef PZEQUATIONFILTERHPP 2 #define PZEQUATIONFILTERHPP 40 return Hash(
"TPZEquationFilter");
60 if (mineq < 0 || mineq >
fNumEq ||
61 maxeq < 0 || maxeq >
fNumEq ||
66 const int64_t n = maxeq-mineq;
68 for(int64_t i = 0; i < n; i++){
69 activeEquations[i] = i + mineq;
81 std::set<int64_t> activeset;
82 int64_t neq = active.
size();
84 activeset.insert(&active[0], &active[neq-1]+1);
91 for (std::set<int64_t>::iterator it=activeset.begin(); it != activeset.end(); it++) {
116 int64_t numeq = dest.
size();
117 for (int64_t i=0; i<numeq; i++) {
119 orig[count] = orig[i];
139 int64_t numeq = dest.
size();
140 for (int64_t i=0; i<numeq; i++) {
197 for(int64_t i=0; i<neqcondense; i++)
206 for(int64_t i=0; i<neqcondense; i++) vexpand(
fActiveEqs[i],0) = vsmall.
GetVal(i,0);
226 for(int64_t i=0; i<neqcondense; i++) gathered(i,0) = large.
GetVal(
fActiveEqs[i],0);
232 int64_t
NumActive(int64_t minindex, int64_t maxindex)
const 234 if (minindex < 0 || maxindex < 0 || minindex >
fNumEq || maxindex >
fNumEq ||
235 maxindex < minindex) {
239 return maxindex-minindex;
242 for (int64_t i=minindex; i<maxindex; i++) {
void Scatter(const TPZFMatrix< TVar > &vsmall, TPZFMatrix< TVar > &vexpand) const
int64_t fNumEq
Numero de equacoes do sistema original.
void Filter(TPZVec< int64_t > &orig, TPZVec< int64_t > &dest) const
Templated vector implementation.
TPZEquationFilter(int64_t numeq)
void FilterSkyline(TPZVec< int64_t > &skyline) const
TPZVec< int64_t > fDestIndices
Posicao das equacoes originais no sistema reduzido.
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
void SetNumEq(const int64_t numEq)
TPZEquationFilter(const TPZEquationFilter &cp)
bool fIsActive
Flag indicating whether the filter is active.
TPZEquationFilter & operator=(const TPZEquationFilter &cp)
int Zero() override
Makes Zero all the elements.
int64_t size() const
Returns the number of elements of the vector.
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...
void Gather(const TPZFMatrix< T > &large, TPZFMatrix< T > &gathered) const
Reduce the vector to the number of active equations.
int64_t NActiveEquations() const
Retorna o numero de equacoes ativas do sistema.
virtual void Write(const bool val)
Contains TPZMatrixclass which implements full matrix (using column major representation).
#define DebugStop()
Returns a message to user put a breakpoint in.
int64_t NumActive(int64_t minindex, int64_t maxindex) const
Returns the number of active equations between [minindex,maxindex].
int64_t Rows() const
Returns number of rows.
int64_t NEqExpand() const
Retorna o numero de equacoes do sistema original.
void SetActiveEquations(TPZVec< int64_t > &active)
Define as equacoes ativas.
Full matrix class. Matrix.
int32_t Hash(std::string str)
int ClassId() const override
Define the class id associated with the class.
void SetMinMaxEq(int64_t mineq, int64_t maxeq)
Define as equacoes ativas de [mineq, maxeq)
void Fill(const T ©, const int64_t from=0, const int64_t numelem=-1)
Will fill the elements of the vector with a copy object.
void Filter(TPZVec< int64_t > &dest) const
Defines the interface for saving and reading data. Persistency.
int64_t NElements() const
Returns the number of elements of the vector.
void Read(TPZStream &buf, void *context) override
read objects from the stream
TPZVec< int64_t > fActiveEqs
Equacoes ativas.
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
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.
void Reset()
Reset method.
virtual void Read(bool &val)