48 #ifndef SurfaceLoadBase_h 49 #define SurfaceLoadBase_h 58 #include "domain/mesh/element/ElementBase.h" 59 #include "domain/load/ElementalLoad.h" 60 #include "utility/utils/misc_utils/colormod.h" 74 SurfaceLoadBase(
int tag,
int classTag,
double pressure,
double loadFactor);
76 double getLoadFactor(
void)
const;
77 void setLoadFactor(
const double &);
88 int addInertiaLoadToUnbalance(
const Vector &accel);
91 void Print(std::ostream &,
int flag =0);
102 template <
int NNODES>
109 std::cerr << Color::red << this->getClassName() <<
"::" << __FUNCTION__
110 <<
"; failed in base class" 111 << Color::def << std::endl;
117 template <
int NNODES>
121 template <
int NNODES>
125 template <
int NNODES>
130 template <
int NNODES>
132 {
return this->mLoadFactor; }
134 template <
int NNODES>
136 { this->mLoadFactor= d; }
138 template <
int NNODES>
141 {
return this->my_pressure; }
143 template <
int NNODES>
146 { this->my_pressure= d; }
148 template <
int NNODES>
152 const Vector &data= theLoad->getData(type, loadFactor);
154 if(type == LOAD_TAG_SurfaceLoad)
156 mLoadFactor = loadFactor;
157 this->my_pressure+= data[0];
162 std::cerr << Color::red << this->getClassName() <<
"::" << __FUNCTION__
163 <<
"; ele with tag: " << this->getTag()
164 <<
" does not accept load type: " << type
165 << Color::def << std::endl;
171 template <
int NNODES>
174 this->my_pressure= 0.0;
177 template <
int NNODES>
181 template <
int NNODES>
190 template <
int NNODES>
199 template <
int NNODES>
202 os << this->getClassName() <<
", element id: " 203 << this->getTag() << std::endl
204 <<
" Connected external nodes: " << this->theNodes << std::endl;
int receiveDoubles(double &, double &, DbTagData &, const CommMetaData &) const
Receives the doubles through the communicator argument.
Definition: Communicator.cc:675
Float vector abstraction.
Definition: Vector.h:94
int update(void)
Updates the element state.
Definition: SurfaceLoadBase.h:126
Definition: SurfaceLoadBase.h:65
Communication parameters between processes.
Definition: Communicator.h:66
int commitState(void)
Commit the current element state.
Definition: SurfaceLoadBase.h:103
void zeroLoad(void)
Zeroes the loads over the element.
Definition: SurfaceLoadBase.h:172
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: SurfaceLoadBase.h:192
double getPressure(void) const
Set the pressure.
Definition: SurfaceLoadBase.h:140
int sendDoubles(const double &, const double &, DbTagData &, const CommMetaData &)
Send the doubles through the communicator argument.
Definition: Communicator.cc:612
double mLoadFactor
factor from load pattern
Definition: SurfaceLoadBase.h:69
int revertToStart(void)
Reverts the element to its initial state.
Definition: SurfaceLoadBase.h:122
int revertToLastCommit(void)
Revert to the last committed state.
Definition: SurfaceLoadBase.h:118
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Base class for finite element with pointer to nodes container.
Definition: ElementBase.h:47
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: SurfaceLoadBase.h:183
Base class for loads over elements.
Definition: ElementalLoad.h:79
SurfaceLoadBase(int tag, int classTag, double pressure, double loadFactor)
Constructor.
Definition: SurfaceLoadBase.h:96
double my_pressure
pressure applied to surface of element
Definition: SurfaceLoadBase.h:68
void setPressure(const double &)
Get the pressure.
Definition: SurfaceLoadBase.h:145