63void SurfaceTensionBoundaryCondition :: initializeFrom(
InputRecord &ir)
65 ActiveBoundaryCondition :: initializeFrom(ir);
72void SurfaceTensionBoundaryCondition :: giveLocationArrays(std :: vector< IntArray > &rows, std :: vector< IntArray > &cols,
CharType type,
75 if ( !this->
useTangent || type != TangentStiffnessMatrix ) {
80 const IntArray &boundaries =
set->giveBoundaryList();
82 rows.resize(boundaries.
giveSize() / 2);
83 cols.resize(boundaries.
giveSize() / 2);
85 for (
int pos = 1; pos <= boundaries.
giveSize() / 2; ++pos ) {
87 int boundary = boundaries.
at(pos * 2);
101 if ( !this->
useTangent || type != TangentStiffnessMatrix ) {
111 const IntArray &boundaries =
set->giveBoundaryList();
113 for (
int pos = 1; pos <= boundaries.
giveSize() / 2; ++pos ) {
115 int boundary = boundaries.
at(pos * 2);
124 if (lock) omp_set_lock(
static_cast<omp_lock_t*
>(lock));
128 if (lock) omp_unset_lock(
static_cast<omp_lock_t*
>(lock));
140 if ( type != ExternalForcesVector ) {
148 const IntArray &boundaries =
set->giveBoundaryList();
150 for (
int pos = 1; pos <= boundaries.
giveSize() / 2; ++pos ) {
152 int boundary = boundaries.
at(pos * 2);
159 if (lock) omp_set_lock(
static_cast<omp_lock_t*
>(lock));
166 if (lock) omp_unset_lock(
static_cast<omp_lock_t*
>(lock));
175 OOFEM_ERROR(
"No interpolation available for element.");
193 for (
int i = 1; i <= nodes; i++ ) {
214 double r = gcoords(0);
219 for (
int i = 0; i < nodes; i++ ) {
220 tmpA(i * 2 + 0) = dNds(i) * es(0);
221 tmpA(i * 2 + 1) = dNds(i) * es(1);
222 tmpB(i * 2 + 0) =
N(i);
224 B(i * 2, 0) = B(i * 2 + 1, 1) = dNds(i);
227 double dV = 2 *
M_PI *
gamma *J *gp->giveWeight();
242 for (
int i = 0; i < nodes; i++ ) {
243 tmpA(i * 2 + 0) = dNds(i) * es(0);
244 tmpA(i * 2 + 1) = dNds(i) * es(1);
245 B(i * 2, 0) = B(i * 2 + 1, 1) = dNds(i);
248 double dV = t *
gamma * J * gp->giveWeight();
255 }
else if ( nsd == 3 ) {
269 for (
int i = 0; i < nodes; i++ ) {
287 OOFEM_ERROR(
"No interpolation or default integration available for element.");
307 for (
int i = 1; i <= nodes; i++ ) {
326 double r = gcoords(0);
331 for (
int i = 0; i < nodes; i++ ) {
332 tmp(2 * i) = dNds(i) * es(0) * r +
N(i);
333 tmp(2 * i + 1) = dNds(i) * es(1) * r;
336 answer.
add(- 2 *
M_PI *
gamma * J * gp->giveWeight(), tmp);
346 for (
int i = 0; i < nodes; i++ ) {
347 tmp(2 * i) = dNds(i) * es(0);
348 tmp(2 * i + 1) = dNds(i) * es(1);
353 answer.
add(- t *
gamma * J * gp->giveWeight(), tmp);
356 }
else if ( nsd == 3 ) {
366 surfProj =
Vec6(1. - n(0)*n(0), 1. - n(1)*n(1), 1. - n(2)*n(2),
367 - n(1)*n(2), - n(0)*n(2), - n(0)*n(1)
373 B.
at(1, 3 * i - 2) = dNdx.
at(i, 1);
374 B.
at(2, 3 * i - 1) = dNdx.
at(i, 2);
375 B.
at(3, 3 * i - 0) = dNdx.
at(i, 3);
377 B.
at(5, 3 * i - 2) = B.
at(4, 3 * i - 1) = dNdx.
at(i, 3);
378 B.
at(6, 3 * i - 2) = B.
at(4, 3 * i - 0) = dNdx.
at(i, 2);
379 B.
at(6, 3 * i - 1) = B.
at(5, 3 * i - 0) = dNdx.
at(i, 1);
#define REGISTER_BoundaryCondition(class)
virtual double give(CrossSectionProperty a, GaussPoint *gp) const
double giveCoordinate(int i) const
bool isAxisymmetric()
Returns true of axisymmetry is in effect.
int giveNumberOfSpatialDimensions()
Returns number of spatial dimensions.
Node * giveNode(int i) const
virtual void giveBoundaryLocationArray(IntArray &locationArray, const IntArray &bNodes, const UnknownNumberingScheme &s, IntArray *dofIds=NULL)
virtual FEInterpolation * giveInterpolation() const
virtual int giveNumberOfNodes() const
CrossSection * giveCrossSection()
virtual Element_Geometry_Type giveGeometryType() const =0
virtual void edgeEvaldNds(FloatArray &answer, int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
IntArray boundaryGiveNodes(int boundary, const Element_Geometry_Type) const override
virtual void surfaceEvaldNdx(FloatMatrix &answer, int isurf, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
virtual std::unique_ptr< IntegrationRule > giveBoundaryIntegrationRule(int order, int boundary, const Element_Geometry_Type) const
virtual IntArray boundaryGiveNodes(int boundary, const Element_Geometry_Type) const =0
virtual double boundaryGiveTransformationJacobian(int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
int giveInterpolationOrder() const
virtual void boundaryLocal2Global(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual double boundaryEvalNormal(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual void boundaryEvalN(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
Domain * giveDomain() const
void assemble(const FloatArray &fe, const IntArray &loc)
void plusProduct(const FloatMatrix &b, const FloatArray &s, double dV)
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void assembleSquared(const FloatArray &fe, const IntArray &loc)
void add(const FloatArray &src)
void plusProductSymmUpper(const FloatMatrix &a, const FloatMatrix &b, double dV)
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 plusDyadUnsym(const FloatArray &a, const FloatArray &b, double dV)
void zero()
Zeroes all coefficient of receiver.
void plusDyadSymmUpper(const FloatArray &a, double dV)
int giveNumberOfRows() const
Returns number of rows of receiver.
double at(std::size_t i, std::size_t j) const
int set
Set number for boundary condition to be applied to.
virtual void scale(double s)
IntArray dofs
Dofs that b.c. is applied to (relevant for Dirichlet type b.c.s).
virtual int assemble(const IntArray &loc, const FloatMatrix &mat)=0
double gamma
Surface tension.
bool useTangent
Determines if tangent should be used.
void computeLoadVectorFromElement(FloatArray &answer, Element *e, int side, TimeStep *tStep)
void computeTangentFromElement(FloatMatrix &answer, Element *e, int side, TimeStep *tStep)
#define OOFEM_WARNING(...)
static FloatArray Vec6(const double &a, const double &b, const double &c, const double &d, const double &e, const double &f)
#define _IFT_SurfaceTensionBoundaryCondition_useTangent
#define _IFT_SurfaceTensionBoundaryCondition_gamma