82 fprintf(stream,
"%%# gauss point data file\n");
83 fprintf(stream,
"%%# output for time %g\n", tStep->
giveTargetTime() );
84 fprintf(stream,
"%%# variables: ");
87 fprintf( stream,
"%d ", vartype );
90 fprintf(stream,
"\n %%# for interpretation see internalstatetype.h\n");
96 for (
int i = 0; i < elem->giveNumberOfIntegrationRules(); i++ ) {
107 weight = elem->computeVolumeAround(gp);
108 fprintf(stream,
"%d %d %d %d %.6e ", elem->giveNumber(), -1, i + 1, gp->giveNumber(), weight);
112 elem->computeGlobalCoordinates( gcoords, gp->giveNaturalCoordinates() );
115 fprintf(stream,
"%d ",
ncoords);
117 fprintf(stream,
"%d ", nc);
124 for (
auto &c : gcoords ) {
125 fprintf( stream,
"%.6e ", c );
128 for (
int ic = nc + 1; ic <=
ncoords; ic++ ) {
129 fprintf(stream,
"%g ", 0.0);
134 for (
auto vartype : vartypes ) {
136 fprintf(stream,
"%d ", intvar.
giveSize());
137 for (
auto &val : intvar ) {
138 fprintf( stream,
"%.6e ", val );
142 fprintf(stream,
"\n");
149 int nnode = elem->giveNumberOfNodes();
151 for (
int inod = 1; inod <= 3; inod++ ) {
152 fprintf( stream,
"%f %f ", elem->giveNode(inod)->giveCoordinate(1), elem->giveNode(inod)->giveCoordinate(2) );
179 if ( ( answer = fopen(fileName.c_str(),
"w") ) == NULL ) {
180 OOFEM_ERROR(
"failed to open file %s", fileName.c_str());
IntArray vartypes
Identification numbers of variables to be exported.
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
bool testTimeStepOutput(TimeStep *tStep)
Tests if given time step output is required.
int ncoords
Number of coordinates to be exported (at each Gauss point)
FILE * giveOutputStream(TimeStep *tStep)
Returns the output stream for given solution step.
virtual void initialize()
double giveTargetTime()
Returns target time.
Represents export output module - a base class for all output modules.
virtual void terminate()
Terminates the receiver.
Abstract base class representing integration rule.
virtual ~GPExportModule()
Destructor.
virtual void doOutput(TimeStep *tStep, bool forcedOutput=false)
Writes the output.
#define _IFT_GPExportModule_vartypes
EngngModel * emodel
Problem pointer.
Class representing vector of real numbers.
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 void initialize()
Represents GP (Gauss point) export module.
std::vector< std::unique_ptr< Element > > & giveElements()
Abstract base class representing the "problem" under consideration.
int giveSize() const
Returns the size of receiver.
#define _IFT_GPExportModule_ncoords
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.
std::string giveOutputBaseFileName(TimeStep *tStep)
Gives the appropriate name (minus specific file extension).
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class representing integration point in finite element program.
Class representing solution step.
REGISTER_ExportModule(ErrorCheckingExportModule)