52double PrescribedMean :: domainSize;
60 GeneralBoundaryCondition :: initializeFrom(ir);
69 int newdofid = this->
domain->giveNextFreeDofID();
83 if ( type != TangentStiffnessMatrix && type != StiffnessMatrix ) {
93 for (
int i = 1; i <=
elements.giveSize(); i++ ) {
102 FloatArray lcoords = gp->giveNaturalCoordinates();
126 for (
int j=1; j<=DofIDStemp.
giveSize(); j++) {
127 if ( DofIDStemp.
at(j) == dofids.
at(1) ) {
128 r_Sideloc.followedBy(rloc.
at(j));
129 c_Sideloc.followedBy(cloc.
at(j));
138 if (lock) omp_set_lock(
static_cast<omp_lock_t*
>(lock));
140 answer.
assemble(r_Sideloc, c_loc, temp);
141 answer.
assemble(r_loc, c_Sideloc, tempT);
143 if (lock) omp_set_lock(
static_cast<omp_lock_t*
>(lock));
156 if ( type == InternalForcesVector ) {
158 }
else if ( type == ExternalForcesVector ) {
178 for (
int i = 1; i <=
elements.giveSize(); i++ ) {
187 for (
auto &gp: *iRule ) {
188 FloatArray lcoords = gp->giveNaturalCoordinates();
211 locationArray.clear();
212 for (
int j = 1; j <= DofIDStemp.
giveSize(); j++) {
213 if ( DofIDStemp.
at(j) == dofids.
at(1) ) {
214 locationArray.followedBy(loc.
at(j));
220 pressureEqns =
N*detJ*gp->giveWeight()*lambda.
at(1)*(1.0/
domainSize);
224 lambdaEqns.
at(1) =
N.dotProduct(a);
226 lambdaEqns.
at(1) = lambdaEqns.
at(1);
229 if (lock) omp_set_lock(
static_cast<omp_lock_t*
>(lock));
232 answer.
assemble(pressureEqns, locationArray);
235 answer.
assemble(lambdaEqns, lambdaLoc);
237 if (lock) omp_unset_lock(
static_cast<omp_lock_t*
>(lock));
260 if (lock) omp_set_lock(
static_cast<omp_lock_t*
>(lock));
264 if (lock) omp_set_lock(
static_cast<omp_lock_t*
>(lock));
269 answer.
times(factor);
273PrescribedMean :: computeDomainSize()
284 for (
int i = 1; i <= setList.
giveSize(); i += 2) {
286 sides.at(i/2+1) = setList.
at(i+1);
295 for (
int i = 1; i <=
elements.giveSize(); i++ ) {
304 for (
auto &gp: *iRule ) {
305 FloatArray lcoords = gp->giveNaturalCoordinates();
#define REGISTER_BoundaryCondition(class)
virtual void giveBoundaryLocationArray(IntArray &locationArray, const IntArray &bNodes, const UnknownNumberingScheme &s, IntArray *dofIds=NULL)
virtual FEInterpolation * giveInterpolation() const
void giveLocationArray(IntArray &locationArray, const UnknownNumberingScheme &s, IntArray *dofIds=NULL) const
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
void computeBoundaryVectorOf(const IntArray &bNodes, const IntArray &dofIDMask, ValueModeType u, TimeStep *tStep, FloatArray &answer, bool padding=false)
virtual Element_Geometry_Type giveGeometryType() const =0
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
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo) const
virtual std::unique_ptr< IntegrationRule > giveIntegrationRule(int order, const Element_Geometry_Type) const
virtual void boundaryEvalN(FloatArray &answer, int boundary, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
Domain * giveDomain() const
Domain * domain
Link to domain object, useful for communicating with other FEM components.
void assemble(const FloatArray &fe, const IntArray &loc)
static FloatMatrix fromArray(const FloatArray &vector, bool transpose=false)
void beTranspositionOf(const FloatMatrix &src)
int set
Set number for boundary condition to be applied to.
Function * giveTimeFunction()
virtual void scale(double s)
void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorm=nullptr, void *lock=nullptr)
void giveExternalForcesVector(FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, void *lock=nullptr)
std::unique_ptr< Node > lambdaDman
virtual int assemble(const IntArray &loc, const FloatMatrix &mat)=0
#define _IFT_GeneralBoundaryCondition_set
#define _IFT_PrescribedMean_DofID
#define _IFT_PrescribedMean_Edge
#define _IFT_PrescribedMean_Mean