33 #include "domain/mesh/element/utils/NodePtrsWithIDs.h" 34 #include "material/Material.h" 35 #include "domain/domain/Domain.h" 36 #include "xc_utils/src/geom/pos_vec/Pos3d.h" 51 template <
class TIPOMAT>
82 :
Element(other), theNodes(other.theNodes)
83 { theNodes.set_owner(
this); }
89 Element::operator=(other);
91 theNodes.set_owner(
this);
98 {
return theNodes.size(); }
101 template <
int NNODES>
106 template <
int NNODES>
111 template <
int NNODES>
template <
class TIPOMAT>
114 TIPOMAT *retval=
nullptr;
115 const TIPOMAT *tmp =
dynamic_cast<const TIPOMAT *
>(ptr_mat);
117 retval= tmp->getCopy();
120 std::cerr << getClassName() <<
"::" << __FUNCTION__
121 <<
"; on element: " << getTag()
122 <<
" the material " << ptr_mat->
getTag()
123 <<
" has not a suitable type." << std::endl;
128 std::cerr << getClassName() <<
"::" << __FUNCTION__
129 <<
"; on element: " << getTag()
130 <<
"can't get a copy of the material with tag: " 131 << ptr_mat->
getTag() << std::endl;
138 template <
int NNODES>
141 int res= Element::sendData(cp);
147 template <
int NNODES>
150 int res= Element::recvData(cp);
156 template <
int NNODES>
158 {
return theNodes.getCenterOfMassPosition(initialGeometry); }
NodePtrsWithIDs theNodes
pointers to node.
Definition: ElementBase.h:49
int getNumExternalNodes(void) const
Return the number of external nodes.
Definition: ElementBase.h:97
int sendData(CommParameters &cp)
Send members through the channel being passed as parameter.
Definition: ElementBase.h:139
int receiveMovable(MovableObject &, DbTagData &, const CommMetaData &) const
Receives a movable object trhrough the channel being passed as parameter.
Definition: CommParameters.cc:1076
Base class for materials.
Definition: Material.h:91
Pos3d getCenterOfMassPosition(bool initialGeometry=true) const
Return position of the element centroid.
Definition: ElementBase.h:157
Base class for the finite elements.
Definition: Element.h:109
int recvData(const CommParameters &cp)
Receives members through the channel being passed as parameter.
Definition: ElementBase.h:148
TIPOMAT * cast_material(const Material *ptr_mat)
Casts the material pointer to a suitable type.
Definition: ElementBase.h:112
ElementBase & operator=(const ElementBase &)
Assignment operator.
Definition: ElementBase.h:87
ElementBase(int tag, int classTag)
Default constructor.
Definition: ElementBase.h:76
Node pointer container for elements.
Definition: NodePtrsWithIDs.h:45
NodePtrsWithIDs & getNodePtrs(void)
Returns a pointer to the node vector.
Definition: ElementBase.h:107
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
int getTag(void) const
Returns the tag associated with the object.
Definition: TaggedObject.h:116
Base class for finite element with pointer to nodes container.
Definition: ElementBase.h:46
Communication parameters between processes.
Definition: CommParameters.h:65
int sendMovable(MovableObject &, DbTagData &, const CommMetaData &)
Sends a movable object through the channel being passed as parameter.
Definition: CommParameters.cc:1066
static const int numNodes(void)
Returns the element number of nodes.
Definition: ElementBase.h:63