6 #ifndef PZCOMPELWITHMEM_H 7 #define PZCOMPELWITHMEM_H 26 static LoggerPtr CompElWMemlogger(Logger::getLogger(
"mesh.TPZCompElWithMem"));
36 template <
class TBASE>
54 std::map<int64_t,int64_t> & gl2lcConMap,
55 std::map<int64_t,int64_t> & gl2lcElMap);
113 virtual void Write(
TPZStream &buf,
int withclassid)
const override;
120 virtual int ClassId()
const override;
132 virtual void Print(std::ostream & out = std::cout)
const override 135 out <<
"Integration point indexes " <<
fIntPtIndices << std::endl;
146 template<
class TBASE>
152 template<
class TBASE>
155 TBASE(mesh, gel, index){
159 template<
class TBASE>
162 TBASE(mesh, ref, index, left, right){
166 template<
class TBASE>
174 template<
class TBASE>
177 std::map<int64_t,int64_t> & gl2lcConMap,
178 std::map<int64_t,int64_t> & gl2lcElMap) :
180 TBASE(mesh,copy,gl2lcConMap,gl2lcElMap)
187 template <
class TBASE>
192 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" this->Material() == NULL\n";
196 if (this->NumberOfCompElementsInsideThisCompEl() == 0) {
201 const TPZIntPoints &intrule = TBASE::GetIntegrationRule();
203 int intrulepoints = intrule.
NPoints();
207 for(
int int_ind = 0; int_ind < intrulepoints; ++int_ind){
215 template <
class TBASE>
217 int n = indices.
size();
219 for (
int i = 0; i < n; i++) {
224 template <
class TBASE>
232 for (int64_t i = 0; i < n; i++) {
239 template <
class TBASE>
242 TBASE::SetIntegrationRule(ord);
244 const TPZIntPoints &intrule = TBASE::GetIntegrationRule();
245 int intrulepoints = intrule.
NPoints();
259 template<
class TBASE>
266 template <
class TBASE>
272 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" this->Material() == NULL\n";
279 for(i = 0; i < n; i++)
286 template <
class TBASE>
289 TBASE::ComputeRequiredData(data, qsi);
294 template <
class TBASE>
297 TBASE::ComputeRequiredData(intpointtemp,trvec,datavec);
299 int nelofthismphysics = this->NumberOfCompElementsInsideThisCompEl();
300 for (
int icel = 0; icel < nelofthismphysics; icel++) {
305 template <
class TBASE>
308 int64_t glIntegralPt = -1;
315 template <
class TBASE>
318 TBASE::Write(buf,withclassid);
325 template <
class TBASE>
328 TBASE::Read(buf,context);
337 template <
class TBASE>
339 return Hash(
"TPZCompElWithMem") ^ TBASE::ClassId() << 1;
virtual void SetIntegrationRule(int ord) override
Modify the maximum order an integration rule can integrate.
Contains the TPZInt1d, TPZIntTriang, TPZIntQuad, TPZIntCube3D, TPZIntTetra3D, TPZIntPyram3D and TPZIn...
Contains declaration of TPZIntelGen class which implements a generic computational element...
virtual int NPoints() const =0
Returns number of points for the cubature rule related.
Implements computational element and a side. Computational Element.
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.
virtual void SetMemoryIndices(TPZVec< int64_t > &indices) override
PrepareIntPtIndices initializes the material damage varibles memory in the proper material class...
Contains declaration of TPZInterpolationSpace class which implements the interface for interpolated c...
virtual void Print(std::ostream &out=std::cout) const override
Prints element data.
virtual void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
virtual void SetCreateFunctions(TPZCompMesh *mesh) override
Set create function in TPZCompMesh to create elements of this type.
virtual ~TPZCompElWithMem()
virtual void PrepareIntPtIndices() override
PrepareIntPtIndices initializes the material damage varibles memory in the proper material class...
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
It has the declaration of the TPZMultiphysicsCompEl class.
Abstract class defining integration rules. Numerical Integration.
This abstract class defines the behaviour which each derived class needs to implement.
virtual int ClassId() const override
ClassId of the class. Is implemented for each type of compel in this .h.
virtual TPZCompEl * ClonePatchEl(TPZCompMesh &mesh, std::map< int64_t, int64_t > &gl2lcConMap, std::map< int64_t, int64_t > &gl2lcElMap) const override
Create a copy of the given element. The clone copy have the connect indexes mapped to the local clone...
int64_t size() const
Returns the number of elements of the vector.
virtual void SetFreeIntPtIndices() override
Frees the material damage varibles memory in the proper material class.
virtual void Write(const bool val)
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
#define DebugStop()
Returns a message to user put a breakpoint in.
TPZStack< int64_t, 128 > fIntPtIndices
void SetAllCreateFunctionsContinuousWithMem()
This class implements the TPZCompEl structure to enable material memory feature. It should be instan...
int intGlobPtIndex
global point index
Contains declaration of TPZCompMesh class which is a repository for computational elements...
int intLocPtIndex
Index of the current integration point being evaluated.
int32_t Hash(std::string str)
int64_t GetGlobalIntegrationPointIndex(TPZMaterialData &data)
void CopyIntPtIndicesFrom(const TPZCompElWithMem< TBASE > ©)
virtual void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
virtual void ComputeRequiredData(TPZMaterialData &data, TPZVec< REAL > &qsi) override
virtual void ForcePrepareIntPtIndices() override
PrepareIntPtIndices initializes the material damage varibles memory in the proper material class...
Implements computational mesh. Computational Mesh.
void GetMemoryIndices(TPZVec< int64_t > &indices) const override
Get the indices of the vector of element memory associated with the integration points.
virtual TPZCompEl * Clone(TPZCompMesh &mesh) const override
Defines the interface for saving and reading data. Persistency.
int64_t NElements() const
Returns the number of elements of the vector.
Defines the interface of a computational element. Computational Element.
#define PZError
Defines the output device to error messages and the DebugStop() function.
virtual void Read(bool &val)