61PFEMElement2d :: PFEMElement2d(
int n,
Domain *aDomain) :
66PFEMElement2d :: ~PFEMElement2d()
73 PFEMElement :: initializeFrom(ir, priority);
77PFEMElement2d :: checkConsistency()
79 return PFEMElement :: checkConsistency();
99 answer.
at(1, 2 * i - 1) = dnx.
at(i, 1);
100 answer.
at(2, 2 * i - 0) = dnx.
at(i, 2);
101 answer.
at(3, 2 * i - 1) = dnx.
at(i, 2);
102 answer.
at(3, 2 * i - 0) = dnx.
at(i, 1);
114 for (
auto &gp : *iRule ) {
134 for (
auto &gp : *iRule ) {
141 temp.
at(i, j) = dnx.
at(i, 1) * dnx.
at(j, 1) + dnx.
at(i, 2) * dnx.
at(j, 2);
146 answer.
add(dV, temp);
151 answer.
times(1.0 / rho);
166 for (
auto &gp : *iRule ) {
174 for (
int j = 1; j <=
N.giveSize(); j++ ) {
175 temp.
at(2 * i - 1, j) =
N.at(i) * dnx.
at(j, 1);
176 temp.
at(2 * i, j) =
N.at(i) * dnx.
at(j, 2);
181 answer.
add(dV, temp);
196 for (
auto &gp : *iRule ) {
203 for (
int i = 1; i <=
N.giveSize(); i++ ) {
205 temp.
at(i, 2 * j - 1) = dnx.
at(i, 1) *
N.at(j);
206 temp.
at(i, 2 * j) = dnx.
at(i, 2) *
N.at(j);
211 answer.
add(dV, temp);
248 for (
int iEdge = 1; iEdge <= 3; iEdge++ ) {
249 reducedAnswer.
zero();
250 for (
auto &gp : iRule ) {
259 u_presq_edge.
at(1) = u_presq.
at(1);
260 u_presq_edge.
at(2) = u_presq.
at(2);
261 u_presq_edge.
at(3) = u_presq.
at(3);
262 u_presq_edge.
at(4) = u_presq.
at(4);
263 }
else if ( iEdge == 2 ) {
264 u_presq_edge.
at(1) = u_presq.
at(3);
265 u_presq_edge.
at(2) = u_presq.
at(4);
266 u_presq_edge.
at(3) = u_presq.
at(5);
267 u_presq_edge.
at(4) = u_presq.
at(6);
269 u_presq_edge.
at(1) = u_presq.
at(5);
270 u_presq_edge.
at(2) = u_presq.
at(6);
271 u_presq_edge.
at(3) = u_presq.
at(1);
272 u_presq_edge.
at(4) = u_presq.
at(2);
277 reducedAnswer.
add(dV * un,
N);
281 answer.
assemble(reducedAnswer, mask);
286PFEMElement2d :: giveEdgeDofMapping(
IntArray &answer,
int iEdge)
const
298 }
else if ( iEdge == 2 ) {
301 }
else if ( iEdge == 3 ) {
305 OOFEM_ERROR(
"giveEdgeDofMapping: wrong edge number");
325PFEMElement2d :: computeEdgeVolumeAround(
GaussPoint *gp,
int iEdge)
void computeVectorOfPrescribed(ValueModeType u, TimeStep *tStep, FloatArray &answer)
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
CrossSection * giveCrossSection()
virtual double computeVolumeAround(GaussPoint *gp)
virtual int giveDefaultIntegrationRule() const
void assemble(const FloatArray &fe, const IntArray &loc)
double dotProduct(const FloatArray &x) const
void zero()
Zeroes all coefficients of receiver.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void add(const FloatArray &src)
void add(const FloatMatrix &a)
void resize(Index rows, Index cols)
*Sets size of receiver to be an empty matrix It will have zero rows and zero columns size void clear()
void plusProductUnsym(const FloatMatrix &a, const FloatMatrix &b, double dV)
void beProductOf(const FloatMatrix &a, const FloatMatrix &b)
void beNMatrixOf(const FloatArray &n, int nsd)
void zero()
Zeroes all coefficient of receiver.
int giveNumberOfRows() const
Returns number of rows of receiver.
double at(std::size_t i, std::size_t j) const
virtual FloatMatrixF< 3, 3 > computeTangent2D(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
double giveWeight()
Returns integration weight of receiver.
int setUpIntegrationPoints(integrationDomain intdomain, int nPoints, MaterialMode matMode)
void giveEdgeDofMapping(IntArray &answer, int iEdge) const
Gives the mapping for degrees of freedom on an edge.
void computeEgdeNVectorAt(FloatArray &answer, int iedge, GaussPoint *gp)
Calculates the shape function vector on an edge.
FEInterpolation * giveVelocityInterpolation() override=0
Returns the interpolation for velocity.
double computeEdgeVolumeAround(GaussPoint *gp, int iEdge)
Calculates the volume around an edge.
FEInterpolation * givePressureInterpolation() override=0
Returns the interpolation for the pressure.
void computeEdgeNMatrixAt(FloatMatrix &answer, int iedge, GaussPoint *gp)
Calculates the shape function matrix on an edge.
void computeBMatrix(FloatMatrix &answer, GaussPoint *gp) override
Calculates the element shape function derivative matrix.
PFEMElement(int, Domain *)
Constructor.