43 #include "../sm/EngineeringModels/structengngmodel.h" 50 this->dofManList.clear();
78 fprintf(stream,
"%% DofMan DataFile Version 1.1\n");
79 fprintf( stream,
"%% Output for time %f\n", tStep->
giveTargetTime() );
82 double x, y, z, displacement;
88 IntArray dofManMap, dofidMap, eqnMap;
100 int ndm = ( ndmInList > 0 ) ? ndmInList : nTotaldm;
102 fprintf(stream,
"%% Primary fields \n");
103 for (
int idm = 1; idm <= ndm; idm++ ) {
104 if ( ndm < nTotaldm ) {
110 y = dm->giveCoordinate(2);
111 z = dm->giveCoordinate(3);
112 fprintf(stream,
"%d %g %g %g ", dm->giveNumber(), x, y, z);
113 for (
Dof *dof: *dm ) {
114 displacement = dof->giveUnknown(VM_Total, tStep);
115 fprintf(stream,
" %g", displacement);
117 fprintf(stream,
"\n");
121 fprintf(stream,
"%% Reaction forces \n");
122 for (
int idm = 1; idm <= ndm; idm++ ) {
125 fprintf(stream,
"%d", dManNum);
127 for (
int i = 1; i <= numRestrDofs; i++ ) {
128 if ( dofManMap.
at(i) == dManNum ) {
130 double reaction = reactions.
at(i);
131 fprintf(stream,
" %g", reaction);
134 fprintf(stream,
"\n");
137 for (
int i = 1; i <= numRestrDofs; i++ ) {
138 double reaction = reactions.
at(i);
139 fprintf(stream,
" %g", reaction);
151 if ( ( answer = fopen(fileName.c_str(),
"w") ) == NULL ) {
152 OOFEM_ERROR(
"failed to open file %s", fileName.c_str() );
bool testTimeStepOutput(TimeStep *tStep)
Tests if given time step output is required.
int giveNumberOfDofManagers() const
Returns number of dof managers in domain.
double & at(int i)
Coefficient access function.
Represents DofManager export module.
double giveTargetTime()
Returns target time.
Base class for dof managers.
Represents export output module - a base class for all output modules.
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
#define _IFT_DofManExportModule_dmlist
void buildReactionTable(IntArray &restrDofMans, IntArray &restrDofs, IntArray &eqn, TimeStep *tStep, int di)
Builds the reaction force table.
EngngModel * emodel
Problem pointer.
FILE * giveOutputStream(TimeStep *tStep)
Class representing vector of real numbers.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
IRResultType
Type defining the return values of InputRecord reading operations.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual ~DofManExportModule()
Destructor.
This class implements extension of EngngModel for structural models.
void computeReaction(FloatArray &answer, TimeStep *tStep, int di)
Computes reaction forces.
virtual void doOutput(TimeStep *tStep, bool forcedOutput=false)
Writes the output.
Abstract base class representing the "problem" under consideration.
virtual double giveCoordinate(int i)
the oofem namespace is to define a context or scope in which all oofem names are defined.
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.
std::string giveOutputBaseFileName(TimeStep *tStep)
Gives the appropriate name (minus specific file extension).
Class representing solution step.
REGISTER_ExportModule(ErrorCheckingExportModule)