96 for (
int _i = 1; _i <= size; _i++ ) {
120 for (
int _i = 1; _i <= size; _i++ ) {
125 contrib.at(_i, 1) = this->
weights.
at(_i) * factor;
128 contribt.
times(scale);
131 answer.
assemble(lambdaeq, locr, contribt);
132 answer.
assemble(locr, lambdaeq, contrib);
139 answer.
assemble(lambdaeq, lambdaeq, help);
155 if ( type == InternalForcesVector ) {
158 Dof *mdof = *
md->begin();
162 for (
int _i = 1; _i <= size; _i++ ) {
175 }
else if ( type == ExternalForcesVector ) {
182 vec.
at(1) =
rhs * factor;
196 cols [ 0 ] = lambdaeq;
199 rows [ 1 ] = lambdaeq;
201 rows [ 2 ] = lambdaeq;
202 cols [ 2 ] = lambdaeq;
237 if ( ( iores =
md->saveContext(stream, mode) ) !=
CIO_OK ) {
276 if ( ( iores =
md->restoreContext(stream, mode) ) !=
CIO_OK ) {
bool contains(int value) const
virtual bool isImposed(TimeStep *tStep)
Returns nonzero if receiver representing BC is imposed at given time, otherwise returns zero...
contextIOResultType storeYourself(DataStream &stream) const
Stores array to output stream.
virtual void giveLocationArrays(std::vector< IntArray > &rows, std::vector< IntArray > &cols, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s)
Gives a list of location arrays that will be assembled.
REGISTER_BoundaryCondition(BoundaryCondition)
virtual int assemble(const IntArray &loc, const FloatMatrix &mat)=0
Assembles sparse matrix from contribution of local elements.
void giveLocArray(const UnknownNumberingScheme &r_s, IntArray &locr, int &lambdaeq)
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Base class for all matrices stored in sparse format.
IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
std::unique_ptr< DofManager > md
contextIOResultType storeYourself(DataStream &stream) const
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
#define _IFT_LinearConstraintBC_dofs
virtual double giveUnknown(ValueModeType mode, TimeStep *tStep)=0
The key method of class Dof.
virtual ~LinearConstraintBC()
Destructor.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual int read(int *data, int count)=0
Reads count integer values into array pointed by data.
virtual int giveDofEquationNumber(Dof *dof) const =0
Returns the equation number for corresponding DOF.
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
Class representing "master" degree of freedom.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
void clear()
Clears the array (zero size).
DofIDItem
Type representing particular dof type.
#define _IFT_LinearConstraintBC_rhstype
void times(double f)
Multiplies receiver by factor f.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
contextIOResultType restoreYourself(DataStream &stream)
#define _IFT_LinearConstraintBC_weights
Abstract base class for all active boundary conditions.
#define _IFT_LinearConstraintBC_lhstype
#define _IFT_LinearConstraintBC_rhs
double at(int i, int j) const
Coefficient access function.
void resize(int n)
Checks size of receiver towards requested bounds.
double giveIntrinsicTime()
Returns intrinsic time, e.g. time in which constitutive model is evaluated.
virtual void scale(double s)
Scales the receiver according to given value.
contextIOResultType restoreYourself(DataStream &stream)
Restores array from image on stream.
Function * giveFunction(int n)
Service for accessing particular domain load time function.
int giveNextFreeDofID(int increment=1)
Gives the next free dof ID.
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
#define _IFT_LinearConstraintBC_dofmans
void assemble(const FloatArray &fe, const IntArray &loc)
Assembles the array fe (typically, the load vector of a finite element) into the receiver, using loc as location array.
LinearConstraintBC(int n, Domain *d)
#define _IFT_LinearConstraintBC_weightsfuncs
void beTranspositionOf(const FloatMatrix &src)
Assigns to the receiver the transposition of parameter.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
virtual void assemble(SparseMtrx &answer, TimeStep *tStep, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale=1.0)
Assembles B.C.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual void assembleVector(FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorms=NULL)
Assembles B.C.
int giveSize() const
Returns the size of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class implementing node in finite element mesh.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
DofManager * giveDofManager(int n)
Service for accessing particular domain dof manager.
virtual double evaluateAtTime(double t)
Returns the value of the function at given time.
#define _IFT_LinearConstraintBC_rhsfuncs
#define OOFEM_WARNING(...)
Class representing solution step.
IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.