81 fprintf(File,
" dof %d %c % .8e\n",
dofID, ch, x);
89 fprintf(File,
" dof %d %c % .8e\n",
dofID, ch, x);
97 fprintf(File,
" dof %d",
dofID);
98 for (
int i = 1; i <= nite; i++ ) {
99 double x = this->
giveUnknown(mode [ i - 1 ], tStep);
100 fprintf(File,
" %c % .8e", ch [ i - 1 ], x);
122 if ( this->
hasBc(tStep) ) {
126 return this->
giveBc()->
give(
this, VM_Total, tStep) - rel;
128 return this->
giveBc()->
give(
this, mode, tStep) - rel;
139 if ( !stream.
write(_val) ) {
152 if ( !stream.
read(_val) ) {
172 masterUnknowns.
at(1) = this->
giveUnknown(field, mode, tStep);
179 masterContribs.
at(1) = 1.0;
Dof(DofManager *aNode, DofIDItem id=Undef)
Constructor.
int giveGlobalNumber() const
virtual double give(Dof *dof, ValueModeType mode, TimeStep *tStep)
Returns the value of a prescribed unknown, respecting requested mode for given time.
Abstract class representing field of primary variables (those, which are unknown and are typically as...
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
virtual Dictionary * giveUnknowns()
Receives the dictionary of unknowns in receiver.
virtual double giveUnknown(ValueModeType mode, TimeStep *tStep)=0
The key method of class Dof.
Base class for dof managers.
virtual InitialCondition * giveIc()
Returns initial condition of dof if it is prescribed.
virtual void printYourself()
Prints the receiver state on stdout.
virtual void printMultipleOutputAt(FILE *File, TimeStep *tStep, char *ch, ValueModeType *mode, int nite)
Prints Dof output (it prints value of unknown related to dof at given timeStep).
virtual void giveEquationNumbers(IntArray &masterEqNumbers, const UnknownNumberingScheme &s)
Returns equation number of receiver.
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 BoundaryCondition * giveBc()
Returns boundary condition of dof if it is prescribed.
bool isTheFirstStep()
Check if receiver is first step.
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
DofIDItem
Type representing particular dof type.
DofManager * dofManager
Link to related DofManager.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
DofIDItem giveDofID() const
Returns DofID value of receiver, which determines type of of unknown connected to receiver (e...
virtual void giveMasterDofManArray(IntArray &answer)
std::string errorInfo(const char *func) const
Returns string for prepending output (used by error reporting macros).
virtual bool hasIcOn(ValueModeType u)=0
Test if Dof has initial condition of required ValueModeType.
void resize(int n)
Checks size of receiver towards requested bounds.
double give(ValueModeType mode)
Returns value of initial condition for given unknown mode (determines whether total or velocity or ac...
int giveDofManNumber() const
int giveDofManGlobalNumber() const
Class representing vector of real numbers.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
virtual const char * giveClassName() const =0
DofIDItem dofID
Physical meaning of DOF.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual double giveBcValue(ValueModeType mode, TimeStep *tStep)
Returns value of boundary condition of dof if it is prescribed.
virtual void computeDofTransformation(FloatArray &masterContribs)
Computes dof transformation array, which describes the dependence of receiver value on values of mast...
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
virtual bool hasBc(TimeStep *tStep)=0
Test if Dof has active boundary condition.
int giveEquationNumber(const UnknownNumberingScheme &s)
Returns equation number of receiver for given equation numbering scheme.
virtual const char * giveClassName() const
Returns class name of the receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual void giveDofIDs(IntArray &masterDofIDs)
As giveEquationNumbers but for dof IDs.
Class representing solution step.
virtual void printSingleOutputAt(FILE *file, TimeStep *tStep, char ch, ValueModeType mode, double scale=1.0)
Prints Dof output (it prints value of unknown related to dof at given timeStep).
void resize(int s)
Resizes receiver towards requested size.
void printSingleOutputWithAdditionAt(FILE *File, TimeStep *tStep, char ch, ValueModeType mode, double addend)