35 #include "PrescribedGenStrainShell7shell7base.h" 60 FloatArray *coords = dof->giveDofManager()->giveCoordinates();
63 OOFEM_ERROR(
"PrescribedGenStrainShell7 :: give - Size of coordinate system different from center coordinate in b.c.");
67 if ( mode == VM_Total ) {
69 }
else if ( mode == VM_Velocity ) {
71 }
else if ( mode == VM_Acceleration ) {
74 OOFEM_ERROR(
"Should not be called for value mode type then total, velocity, or acceleration.");
111 }
else if ( n == 6 ) {
121 OOFEM_ERROR(
"setPrescribedTensorVoigt: Tensor is in strange voigt format. Should be 3 or 6. Use setPrescribedTensor directly if needed.");
141 C.
resize(npeq, nsd * ( nsd + 1 ) / 2);
145 double xbar = cCoords.
at(1), ybar = cCoords.
at(2), zbar = 0.0;
147 zbar = cCoords.
at(3);
150 for (
int i = 1; i <= nNodes; i++ ) {
159 C.
at(k1, 1) = coords->
at(1) - xbar;
160 C.
at(k1, 3) = coords->
at(2) - ybar;
164 C.
at(k2, 2) = coords->
at(2) - ybar;
165 C.
at(k2, 3) = coords->
at(1) - xbar;
168 OOFEM_ERROR(
"PrescribedGenStrainShell7 :: updateCoefficientMatrix - 3D Not tested yet!");
173 C.
at(k1, 1) = coords->
at(1) - xbar;
174 C.
at(k1, 4) = coords->
at(2) - ybar;
175 C.
at(k1, 5) = coords->
at(3) - zbar;
178 C.
at(k2, 2) = coords->
at(2) - ybar;
179 C.
at(k2, 4) = coords->
at(1) - xbar;
180 C.
at(k2, 6) = coords->
at(3) - zbar;
183 C.
at(k3, 3) = coords->
at(3) - zbar;
184 C.
at(k3, 5) = coords->
at(1) - xbar;
185 C.
at(k3, 6) = coords->
at(2) - ybar;
195 double domain_size = 0.0;
198 const IntArray &boundaries =
set->giveBoundaryList();
200 for (
int pos = 1; pos <= boundaries.
giveSize() / 2; ++pos ) {
202 int boundary = boundaries.
at(pos * 2);
206 return domain_size / nsd;
256 OOFEM_ERROR(
"MixedGradientPressureBC :: computeTangents - Couldn't create sparse matrix of type %d\n", stype);
258 Kff->buildInternalStructure(rve, 1, eid, fnum);
259 Kfp->buildInternalStructure(rve, 1, eid, fnum, pnum);
260 Kpf->buildInternalStructure(rve, 1, eid, pnum, fnum);
261 Kpp->buildInternalStructure(rve, 1, eid, pnum);
262 rve->
assemble(*Kff, tStep, eid, TangentStiffnessMatrix, fnum, this->
domain);
263 rve->
assemble(*Kfp, tStep, eid, TangentStiffnessMatrix, fnum, pnum, this->
domain);
264 rve->
assemble(*Kpf, tStep, eid, TangentStiffnessMatrix, pnum, fnum, this->
domain);
265 rve->
assemble(*Kpp, tStep, eid, TangentStiffnessMatrix, pnum, this->
domain);
270 Kpf->timesT(C, KfpC);
271 solver->solve(*Kff, KfpC, a);
int giveNumberOfColumns() const
Returns number of columns of receiver.
The representation of EngngModel default unknown numbering.
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.
FloatArray centerCoord
Center coordinate .
Domain * domain
Link to domain object, useful for communicating with other FEM components.
int giveNumberOfDofManagers() const
Returns number of dof managers in domain.
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
virtual FloatArray & giveCenterCoordinate()
Returns the center coordinate.
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Function * giveTimeFunction()
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Abstract base class for all finite elements.
int giveNumber()
Returns domain number.
virtual double evalNXIntegral(int boundary, const FEICellGeometry &cellgeo)
Computes the integral .
int giveNumberOfSpatialDimensions()
Returns number of spatial dimensions.
void computeField(FloatArray &sigma, EquationID eid, TimeStep *tStep)
Computes the homogenized, macroscopic, field (stress).
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual int __givePrescribedEquationNumber()=0
Returns prescribed equation number of receiver.
virtual FEInterpolation * giveInterpolation() const
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class representing a general abstraction for finite element interpolation class.
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.
Element * giveElement(int n)
Service for accessing particular domain fe element.
DofIDItem
Type representing particular dof type.
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
virtual void setPrescribedGenStrainShell7Voigt(const FloatArray &t)
Sets the prescribed tensor from the matrix from given voigt notation.
Implementation for assembling external forces vectors in standard monolithic FE-problems.
void computeTangent(FloatMatrix &tangent, EquationID eid, TimeStep *tStep)
Computes the macroscopic tangent for homogenization problems through sensitivity analysis.
void times(double f)
Multiplies receiver by factor f.
Set of elements, boundaries, edges and/or nodes.
Wrapper around element definition to provide FEICellGeometry interface.
Set * giveSet(int n)
Service for accessing particular domain set.
IntArray dofs
Dofs that b.c. is applied to (relevant for Dirichlet type b.c.s).
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 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.
Implementation of matrix containing floating point numbers.
void updateCoefficientMatrix(FloatMatrix &C)
Constructs a coefficient matrix for all prescribed unknowns.
IRResultType
Type defining the return values of InputRecord reading operations.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
The representation of EngngModel default prescribed unknown numbering.
Dof * giveDofWithID(int dofID) const
Returns DOF with given dofID; issues error if not present.
FloatMatrix gradient
Prescribed gradient .
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
virtual FloatArray * giveCoordinates()
void zero()
Zeroes all coefficient of receiver.
Domain * giveDomain() const
#define _IFT_PrescribedGenStrainShell7_centercoords
Abstract base class representing the "problem" under consideration.
int giveSize() const
Returns the size of receiver.
Node * giveNode(int n)
Service for accessing particular domain node.
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.
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.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
virtual double give(Dof *dof, ValueModeType mode, double time)
void resize(int s)
Resizes receiver towards requested size.