71 if ( mode == VM_Total ) {
73 }
else if ( mode == VM_Velocity ) {
75 }
else if ( mode == VM_Acceleration ) {
78 OOFEM_ERROR(
"Should not be called for value mode type then total, velocity, or acceleration.");
119 C.
resize(npeq, nsd * nsd);
123 double xbar = cCoords.
at(1), ybar = cCoords.
at(2), zbar = 0.0;
125 zbar = cCoords.
at(3);
130 Dof *d1 = n->giveDofWithID( this->
dofs(0) );
131 Dof *d2 = n->giveDofWithID( this->
dofs(1) );
136 C.
at(k1, 1) = coords->
at(1) - xbar;
137 C.
at(k1, 4) = coords->
at(2) - ybar;
141 C.
at(k2, 2) = coords->
at(2) - ybar;
142 C.
at(k2, 3) = coords->
at(1) - xbar;
145 Dof *d3 = n->giveDofWithID( this->
dofs(2) );
149 C.
at(k1, 1) = coords->
at(1) - xbar;
150 C.
at(k1, 6) = coords->
at(2) - ybar;
151 C.
at(k1, 5) = coords->
at(3) - zbar;
154 C.
at(k2, 2) = coords->
at(2) - ybar;
155 C.
at(k2, 9) = coords->
at(1) - xbar;
156 C.
at(k2, 4) = coords->
at(3) - zbar;
159 C.
at(k3, 3) = coords->
at(3) - zbar;
160 C.
at(k3, 8) = coords->
at(1) - xbar;
161 C.
at(k3, 7) = coords->
at(2) - ybar;
214 OOFEM_ERROR(
"Couldn't create sparse matrix of type %d\n", stype);
216 Kff->buildInternalStructure(rve, 1, fnum);
217 Kfp->buildInternalStructure(rve, 1, fnum, pnum);
218 Kpf->buildInternalStructure(rve, 1, pnum, fnum);
219 Kpp->buildInternalStructure(rve, 1, pnum);
228 Kpf->timesT(C, KfpC);
229 solver->solve(*Kff, KfpC, a);
The representation of EngngModel default unknown numbering.
FloatArray mCenterCoord
Center coordinate .
REGISTER_BoundaryCondition(BoundaryCondition)
virtual double evaluateAccelerationAtTime(double t)=0
Returns the second time derivative of the function at given time.
Implementation for assembling internal forces vectors in standard monolithic, nonlinear FE-problems...
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
Returns number of equations for given domain in active (current time step) time step.
virtual void giveInputRecord(DynamicInputRecord &input)
Domain * domain
Link to domain object, useful for communicating with other FEM components.
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
virtual double domainSize()
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Function * giveTimeFunction()
virtual FloatArray * giveCoordinates()
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
Implementation for assembling tangent matrices in standard monolithic FE-problems.
std::vector< std::unique_ptr< DofManager > > & giveDofManagers()
int giveNumber()
Returns domain number.
int giveNumberOfSpatialDimensions()
Returns number of spatial dimensions.
virtual int __givePrescribedEquationNumber()=0
Returns prescribed equation number of receiver.
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void assemble(SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &s, Domain *domain)
Assembles characteristic matrix of required type into given sparse matrix.
int giveSetNumber()
Gives the set number which boundary condition is applied to.
DofIDItem
Type representing particular dof type.
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
Implementation for assembling external forces vectors in standard monolithic FE-problems.
void resizeWithData(int, int)
Checks size of receiver towards requested bounds.
void times(double f)
Multiplies receiver by factor f.
FloatArray & giveCenterCoordinate()
Returns the center coordinate.
DofIDItem giveDofID() const
Returns DofID value of receiver, which determines type of of unknown connected to receiver (e...
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
IntArray dofs
Dofs that b.c. is applied to (relevant for Dirichlet type b.c.s).
void resizeWithValues(int s, int allocChunk=0)
Checks size of receiver towards requested bounds.
void beTProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix^T and anArray.
double at(int i, int j) const
Coefficient access function.
void updateCoefficientMatrix(FloatMatrix &C)
Constructs a coefficient matrix for all prescribed unknowns.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
FloatMatrix mGradient
Prescribed gradient .
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void computeTangent(FloatMatrix &tangent, TimeStep *tStep)
Computes the macroscopic tangent for homogenization problems through sensitivity analysis.
void subtract(const FloatMatrix &a)
Subtracts matrix from the receiver.
virtual double evaluateVelocityAtTime(double t)=0
Returns the first time derivative of the function at given time.
Class representing vector of real numbers.
SparseLinearSystemNM * createSparseLinSolver(LinSystSolverType st, Domain *d, EngngModel *m)
Creates new instance of SparseLinearSystemNM corresponding to given type.
virtual void computeField(FloatArray &sigma, TimeStep *tStep)
Computes the homogenized, macroscopic, field (stress).
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
The representation of EngngModel default prescribed unknown numbering.
void zero()
Zeroes all coefficients of receiver.
void beTProductOf(const FloatMatrix &a, const FloatMatrix &b)
Assigns to the receiver product of .
void times(double s)
Multiplies receiver with scalar.
ClassFactory & classFactory
void zero()
Zeroes all coefficient of receiver.
virtual double give(Dof *dof, ValueModeType mode, double time)
Domain * giveDomain() const
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Abstract base class representing the "problem" under consideration.
DofManager * giveDofManager() const
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.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
virtual double evaluateAtTime(double t)
Returns the value of the function at given time.
void assembleVector(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
Assembles characteristic vector of required type from dofManagers, element, and active boundary condi...
Class representing solution step.
int findFirstIndexOf(int value) const
Finds index of first occurrence of given value in array.