61 this->lhsType.clear();
62 this->rhsType.clear();
66LinearConstraintBC :: ~LinearConstraintBC()
73 ActiveBoundaryCondition :: initializeFrom(ir);
93 int size = this->
weights.giveSize();
97 for (
int _i = 1; _i <= size; _i++ ) {
98 Dof *idof = this->
domain->giveDofManager( this->
dofmans.at(_i) )->giveDofWithID( this->
dofs.at(_i) );
111 int size = this->
weights.giveSize();
116 if ( !this->
lhsType.contains( (
int ) type ) ) {
122 for (
int _i = 1; _i <= size; _i++ ) {
127 contrib.at(_i, 1) = this->
weights.at(_i) * factor;
133 if (lock) omp_set_lock(
static_cast<omp_lock_t*
>(lock));
135 answer.
assemble(lambdaeq, locr, contribt);
136 answer.
assemble(locr, lambdaeq, contrib);
138 if (lock) omp_unset_lock(
static_cast<omp_lock_t*
>(lock));
147 if (lock) omp_set_lock(
static_cast<omp_lock_t*
>(lock));
149 answer.
assemble(lambdaeq, lambdaeq, help);
151 if (lock) omp_unset_lock(
static_cast<omp_lock_t*
>(lock));
166 if ( !this->
rhsType.contains( (
int ) type ) ) {
170 if ( type == InternalForcesVector ) {
172 int size = this->
weights.giveSize();
173 Dof *mdof = *
md->begin();
177 for (
int _i = 1; _i <= size; _i++ ) {
182 idof = this->
domain->giveDofManager( this->
dofmans.at(_i) )->giveDofWithID( this->
dofs.at(_i) );
185 if (lock) omp_set_lock(
static_cast<omp_lock_t*
>(lock));
189 if (lock) omp_unset_lock(
static_cast<omp_lock_t*
>(lock));
194 if (lock) omp_set_lock(
static_cast<omp_lock_t*
>(lock));
198 if (lock) omp_unset_lock(
static_cast<omp_lock_t*
>(lock));
202 }
else if ( type == ExternalForcesVector ) {
209 vec.
at(1) =
rhs * factor;
211 if (lock) omp_set_lock(
static_cast<omp_lock_t*
>(lock));
215 if (lock) omp_unset_lock(
static_cast<omp_lock_t*
>(lock));
229 cols [ 0 ] = lambdaeq;
232 rows [ 1 ] = lambdaeq;
234 rows [ 2 ] = lambdaeq;
235 cols [ 2 ] = lambdaeq;
253 if ( ( iores =
dofs.storeYourself(stream) ) !=
CIO_OK ) {
270 md->saveContext(stream, mode);
279 if ( ( iores =
weights.restoreYourself(stream) ) !=
CIO_OK ) {
285 if ( ( iores =
dofmans.restoreYourself(stream) ) !=
CIO_OK ) {
288 if ( ( iores =
dofs.restoreYourself(stream) ) !=
CIO_OK ) {
297 if ( ( iores =
lhsType.restoreYourself(stream) ) !=
CIO_OK ) {
300 if ( ( iores =
rhsType.restoreYourself(stream) ) !=
CIO_OK ) {
305 md->restoreContext(stream, mode);
#define REGISTER_BoundaryCondition(class)
ActiveBoundaryCondition(int n, Domain *d)
virtual int read(int *data, std::size_t count)=0
Reads count integer values into array pointed by data.
virtual int write(const int *data, std::size_t count)=0
Writes count integer values from array pointed by data.
virtual double giveUnknown(ValueModeType mode, TimeStep *tStep)=0
int giveNextFreeDofID(int increment=1)
Domain * domain
Link to domain object, useful for communicating with other FEM components.
void assemble(const FloatArray &fe, const IntArray &loc)
void beTranspositionOf(const FloatMatrix &src)
double at(std::size_t i, std::size_t j) const
virtual void scale(double s)
virtual bool isImposed(TimeStep *tStep)
std ::unique_ptr< DofManager > md
void giveLocArray(const UnknownNumberingScheme &r_s, IntArray &locr, int &lambdaeq)
virtual int assemble(const IntArray &loc, const FloatMatrix &mat)=0
double giveIntrinsicTime()
Returns intrinsic time, e.g. time in which constitutive model is evaluated.
virtual int giveDofEquationNumber(Dof *dof) const =0
#define _IFT_LinearConstraintBC_lhstype
#define _IFT_LinearConstraintBC_rhsfuncs
#define _IFT_LinearConstraintBC_rhs
#define _IFT_LinearConstraintBC_dofmans
#define _IFT_LinearConstraintBC_weightsfuncs
#define _IFT_LinearConstraintBC_dofs
#define _IFT_LinearConstraintBC_rhstype
#define _IFT_LinearConstraintBC_weights
@ CIO_IOERR
General IO error.