55 #ifdef __PARALLEL_MODE 116 #ifdef __PARALLEL_MODE 147 Sx.
at(j) += moments.
at(1);
148 Sy.
at(j) += moments.
at(2);
150 domainArea.
at(j) += fabs( this->
giveDomain(1)->giveElement(i)->computeArea() );
155 for (
int j = 1; j <= noCS; ++j ) {
156 double A = domainArea.
at(j);
158 CG.
at(j, 1) = Sx.
at(j) / A;
159 CG.
at(j, 2) = Sy.
at(j) / A;
179 for (
int j = 1; j <= noCS; ++j ) {
223 OOFEM_ERROR(
"Unknown is of undefined type for this problem");
237 counter =
currentStep->giveSolutionStateCounter() + 1;
251 #ifdef __VERBOSE_PARALLEL 371 if ( this->
giveDomain(1)->giveOutputManager()->testTimeStepOutput(tStep) ) {
377 fprintf(file,
"\n Center of gravity:");
379 fprintf(file,
"\n CrossSection %d x = %f y = %f", j,
CG.
at(j, 1),
CG.
at(j, 2) );
387 int count = 0, pcount = 0;
390 if ( packUnpackType == 0 ) {
391 for (
int map: commMap ) {
393 if ( jdof->isPrimaryDof() && ( jdof->__giveEquationNumber() ) ) {
406 }
else if ( packUnpackType == 1 ) {
407 for (
int map: commMap ) {
424 int CSnumber = elem->giveCrossSection()->giveNumber();
425 if ( CSnumber == j ) {
428 elem->giveLocationArray(locationArray, s);
429 if ( locationArray.
at(1) != 0 ) {
430 int cn = locationArray.
at(1);
431 if ( answer->
at(cn, cn) != 0 ) {
432 answer->
at(cn, cn) *= 2;
434 answer->
at(cn, cn) = 1000;
461 for (
int j = 1; j <= 3; j++ ) {
462 int locationNumber = locationArray.
at(j);
463 if ( locationNumber != 0 ) {
464 CSindicator.
at(locationNumber) = CSnumber;
470 for (
int i = 1; i <= length; i++ ) {
CrossSection * giveCrossSection()
The base class for all spatial localizers.
LinSystSolverType
The values of this type should be related not to specific solvers, but more to specific packages that...
std::unique_ptr< SparseMtrx > stiffnessMatrix
The representation of EngngModel default unknown numbering.
void updateComputedResults(FloatArray &answer, TimeStep *tStep)
SparseMtrxType sparseMtrxType
#define NM_Success
Numerical method exited with success.
std::unique_ptr< TimeStep > currentStep
Current time step.
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver's numerical method.
void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)
Returns local vector of unknowns.
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
Returns number of equations for given domain in active (current time step) time step.
virtual void computeFirstMomentOfArea(FloatArray &answer)
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
Base class for all matrices stored in sparse format.
void computeResultAtCenterOfGravity(TimeStep *tStep)
int estimateMaxPackSize(IntArray &commMap, DataStream &buff, int packUnpackType)
Determines the space necessary for send/receive buffer.
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
std::unique_ptr< TimeStep > previousStep
Previous time step.
double & at(int i)
Coefficient access function.
MetaStep * giveMetaStep(int i)
Returns the i-th meta step.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
long StateCounterType
StateCounterType type used to indicate solution state.
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Prints output of receiver to output domain stream, for given time step.
This base class is an abstraction for numerical algorithm.
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
Implementation for assembling tangent matrices in standard monolithic FE-problems.
bool isParallel() const
Returns true if receiver in parallel mode.
void updateStiffnessMatrix(SparseMtrx *answer)
void incrementStateCounter()
Updates solution state counter.
Abstract base class for all finite elements.
int giveNumberOfProcesses() const
Returns the number of collaborating processes.
virtual void solveYourself()
Starts solution process.
virtual int __giveEquationNumber() const =0
Returns equation number of receiver, usually assigned by emodel.
int giveNumberOfElements() const
Returns number of elements in domain.
virtual double & at(int i, int j)=0
Returns coefficient at position (i,j).
REGISTER_EngngModel(ProblemSequence)
virtual void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &answer)
Computes interpolation matrix for element unknowns.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
unsigned long NM_Status
Mask defining NumMetod Status; which can be asked after finishing computation by Numerical Method...
#define OOFEM_LOG_DEBUG(...)
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
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.
Abstract base class for all "structural" finite elements.
MetaStep * giveCurrentMetaStep()
Returns current meta step.
#define OOFEM_LOG_INFO(...)
void computeCenterOfGravity()
Gives the sum of the first moment of area.
Element * giveElement(int n)
Service for accessing particular domain fe element.
#define _IFT_EngngModel_smtype
int ndomains
Number of receiver domains.
int updateSharedDofManagers(FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
Exchanges necessary remote DofManagers data.
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
Implementation for assembling external forces vectors in standard monolithic FE-problems.
void giveLocationArray(IntArray &locationArray, const UnknownNumberingScheme &s, IntArray *dofIds=NULL) const
Returns the location array (array of code numbers) of receiver for given numbering scheme...
SpatialLocalizer * giveSpatialLocalizer()
Returns receiver's associated spatial localizer.
ProblemCommunicator * communicator
Communicator.
int giveNumberOfCrossSectionModels() const
Returns number of cross section models in domain.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
CommunicatorBuff * commBuff
Common Communicator buffer.
virtual int giveNumberOfFirstStep(bool force=false)
Returns number of first time step used by receiver.
void resizeWithValues(int s, int allocChunk=0)
Checks size of receiver towards requested bounds.
double at(int i, int j) const
Coefficient access function.
Initializes the variable VERBOSE, in order to get a few intermediate messages on screen: beginning an...
Class representing vector of real numbers.
int estimatePackSize(DataStream &buff)
Estimates the necessary pack size to hold all packed data of receiver.
SparseLinearSystemNM * createSparseLinSolver(LinSystSolverType st, Domain *d, EngngModel *m)
Creates new instance of SparseLinearSystemNM corresponding to given type.
virtual int init(bool force=false)
Initialize receiver data structure if not done previously If force is set to true, the initialization is enforced (useful if domain geometry has changed)
Implementation of matrix containing floating point numbers.
#define _IFT_EngngModel_lstype
IRResultType
Type defining the return values of InputRecord reading operations.
virtual int givePackSizeOfDouble(int count)=0
LinSystSolverType solverType
int giveMetaStepNumber()
Returns receiver's meta step number.
virtual double giveUnknownComponent(ValueModeType type, TimeStep *tStep, Domain *d, Dof *dof)
Returns requested unknown.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
virtual Element * giveElementClosestToPoint(FloatArray &lcoords, FloatArray &closest, const FloatArray &coords, int region=0)=0
Returns the element closest to a given point.
void zero()
Zeroes all coefficients of receiver.
FloatArray displacementVector
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Prints output of receiver to output domain stream, for given time step.
std::unique_ptr< SparseLinearSystemNM > nMethod
Numerical method used to solve the problem.
int giveRank() const
Returns domain rank in a group of collaborating processes (0..groupSize-1)
void initializeCommMaps(bool forceInit=false)
ClassFactory & classFactory
FreeWarping(int i, EngngModel *_master=NULL)
This class implements extension of EngngModel for structural models.
The Communicator and corresponding buffers (represented by this class) are separated in order to allo...
std::vector< std::unique_ptr< Element > > & giveElements()
Abstract base class representing the "problem" under consideration.
virtual void setDomain(Domain *d)
virtual TimeStep * giveCurrentStep(bool force=false)
Returns current time step.
Triangle (2d) element with linear approximation for free warping analysis.
int giveSize() const
Returns the size of receiver.
virtual void updateDomainLinks()
Updates domain links after the domains of receiver have changed.
the oofem namespace is to define a context or scope in which all oofem names are defined.
bool isNotEmpty() const
Returns true if receiver is not empty.
Domain * giveDomain(int n)
Service for accessing particular problem domain.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
DofManager * giveDofManager(int n)
Service for accessing particular domain dof manager.
virtual void solveYourself()
Starts solution process.
virtual void updateDomainLinks()
Updates domain links after the domains of receiver have changed.
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.
void resize(int s)
Resizes receiver towards requested size.