29 #ifndef MaterialWrapper_h 30 #define MaterialWrapper_h 32 #include "utility/actor/actor/MovableObject.h" 33 #include <utility/recorder/response/MaterialResponse.h> 40 template <
typename MatType,
int cTag>
44 typedef MatType MaterialType;
49 void copy(
const MatType *);
59 {
return theMaterial; }
62 {
return theMaterial; }
65 void Print(std::ostream &,
int flag =0)
const;
66 int getMainClassTag(
void)
const;
77 template <
typename MatType,
int cTag>
80 if(theMaterial)
delete theMaterial;
85 template <
typename MatType,
int cTag>
90 theMaterial= other->getCopy();
94 template <
typename MatType,
int cTag>
100 std::cerr <<
"MaterialWrapper::" << __FUNCTION__
101 <<
"; failed to get copy of material\n";
106 template <
typename MatType,
int cTag>
111 template <
typename MatType,
int cTag>
115 setMaterial(material);
118 template <
typename MatType,
int cTag>
123 template <
typename MatType,
int cTag>
126 { copy(other.theMaterial); }
129 template <
typename MatType,
int cTag>
132 MovableObject::operator=(other);
133 copy(other.theMaterial);
137 template <
typename MatType,
int cTag>
142 template <
typename MatType,
int cTag>
151 template <
typename MatType,
int cTag>
154 theMaterial->Print(s, flag);
157 template <
typename MatType,
int cTag>
169 template <
typename MatType,
int cTag>
173 const int dataTag= getDbTag();
175 int res= sendData(comm);
177 res+= comm.
sendIdData(getDbTagData(),dataTag);
179 std::cerr <<
"WARNING MaterialWrapper::sendSelf() - " 180 << dataTag <<
" failed to send.";
184 template <
typename MatType,
int cTag>
188 const int dataTag= getDbTag();
192 std::cerr <<
"WARNING MaterialWrapper::recvSelf() - " 193 << dataTag <<
" failed to receive ID\n";
195 res+= recvData(comm);
int sendIdData(const DbTagData &, const int &)
Sends miembro data through the communicator argument.
Definition: Communicator.cc:411
MaterialWrapper & operator=(const MaterialWrapper &)
Assignment operator.
Definition: MaterialWrapper.h:130
virtual void setMaterial(const MatType &)
Sets the wrapped material.
Definition: MaterialWrapper.h:95
MaterialWrapper(void)
Default constructor.
Definition: MaterialWrapper.h:107
Communication parameters between processes.
Definition: Communicator.h:66
int sendSelf(Communicator &)
Send the object.
Definition: MaterialWrapper.h:170
Object that can move between processes.
Definition: MovableObject.h:100
Encapsulates a copy to a material.
Definition: MaterialWrapper.h:41
const MatType * getMaterial(void) const
Return a pointer to the wrapped material.
Definition: MaterialWrapper.h:58
MatType * getMaterial(void)
Return a pointer to the wrapped material.
Definition: MaterialWrapper.h:61
int getClassTag(void) const
Return the class identifier.
Definition: MovableObject.cpp:95
void free_mem(void)
Free memory allocated for the uniaxial material.
Definition: MaterialWrapper.h:78
int recvSelf(const Communicator &)
Receive the object.
Definition: MaterialWrapper.h:185
int sendMaterialPtr(Material *, DbTagData &, Communicator &comm, const BrokedPtrCommMetaData &)
Sends a pointer to material through the communicator being passed as parameter.
Definition: Material.cpp:260
int receiveIdData(DbTagData &, const int &) const
Receives el miembro data through the communicator argument.
Definition: Communicator.cc:415
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Material * receiveMaterialPtr(Material *, DbTagData &, const Communicator &comm, const BrokedPtrCommMetaData &)
Receives a pointer to material through the communicator being passed as parameter.
Definition: Material.cpp:278
void copy(const MatType *)
brief Copy object members.
Definition: MaterialWrapper.h:86