#include <tutorials/src/TimeForceScale.hpp>
◆ TimeAccelerogram() [1/2]
TimeAccelerogram::TimeAccelerogram |
( |
string |
name = "-my_accelerogram" | ) |
|
|
inline |
◆ TimeAccelerogram() [2/2]
TimeAccelerogram::TimeAccelerogram |
( |
string |
name = "-my_accelerogram" | ) |
|
|
inline |
◆ scaleNf() [1/2]
MoFEMErrorCode TimeAccelerogram::scaleNf |
( |
const FEMethod * |
fe, |
|
|
VectorDouble & |
Nf |
|
) |
| |
|
inlinevirtual |
Implements MethodForForceScaling.
Definition at line 196 of file TimeForceScale.hpp.
201 double ts_t = fe->ts_t;
204 double t0 = 0, t1,
dt;
205 std::map<double, VectorDouble>::iterator tit =
tSeries.begin();
206 for (; tit !=
tSeries.end(); tit++) {
207 if (tit->first > ts_t) {
211 acc = acc0 + ((acc1 - acc0) / (t1 - t0)) *
dt;
◆ scaleNf() [2/2]
MoFEMErrorCode TimeAccelerogram::scaleNf |
( |
const FEMethod * |
fe, |
|
|
VectorDouble & |
Nf |
|
) |
| |
|
inlinevirtual |
Implements MethodForForceScaling.
Definition at line 196 of file TimeForceScale.hpp.
201 double ts_t = fe->ts_t;
204 double t0 = 0, t1,
dt;
205 std::map<double, VectorDouble>::iterator tit =
tSeries.begin();
206 for (; tit !=
tSeries.end(); tit++) {
207 if (tit->first > ts_t) {
211 acc = acc0 + ((acc1 - acc0) / (t1 - t0)) *
dt;
◆ timeData() [1/2]
MoFEMErrorCode TimeAccelerogram::timeData |
( |
| ) |
|
|
inline |
Definition at line 146 of file TimeForceScale.hpp.
148 char time_file_name[255];
149 PetscBool flg = PETSC_TRUE;
151 time_file_name, 255, &flg);
153 if (flg != PETSC_TRUE) {
155 "*** ERROR %s (time_data FILE NEEDED)",
nAme.c_str());
157 FILE *time_data = fopen(time_file_name,
"r");
158 if (time_data == NULL) {
160 "*** ERROR data file < %s > open unsuccessful", time_file_name);
165 while (!feof(time_data)) {
167 fscanf(time_data,
"%lf %lf %lf %lf", &no1, &no2[0], &no2[1], &no2[2]);
174 "*** ERROR read data file error (check input time data file) "
180 int r = fclose(time_data);
182 std::map<double, VectorDouble>::iterator tit =
tSeries.begin();
183 for (; tit !=
tSeries.end(); tit++) {
184 PetscPrintf(PETSC_COMM_WORLD,
185 "** read accelerogram %3.2e time %3.2e %3.2e %3.2e\n",
186 tit->first, tit->second[0], tit->second[1], tit->second[2]);
190 SETERRQ(PETSC_COMM_SELF, 1,
"*** ERROR file close unsuccessful");
◆ timeData() [2/2]
MoFEMErrorCode TimeAccelerogram::timeData |
( |
| ) |
|
|
inline |
Definition at line 146 of file TimeForceScale.hpp.
148 char time_file_name[255];
149 PetscBool flg = PETSC_TRUE;
151 time_file_name, 255, &flg);
153 if (flg != PETSC_TRUE) {
155 "*** ERROR %s (time_data FILE NEEDED)",
nAme.c_str());
157 FILE *time_data = fopen(time_file_name,
"r");
158 if (time_data == NULL) {
160 "*** ERROR data file < %s > open unsuccessful", time_file_name);
165 while (!feof(time_data)) {
167 fscanf(time_data,
"%lf %lf %lf %lf", &no1, &no2[0], &no2[1], &no2[2]);
174 "*** ERROR read data file error (check input time data file) "
180 int r = fclose(time_data);
182 std::map<double, VectorDouble>::iterator tit =
tSeries.begin();
183 for (; tit !=
tSeries.end(); tit++) {
184 PetscPrintf(PETSC_COMM_WORLD,
185 "** read accelerogram %3.2e time %3.2e %3.2e %3.2e\n",
186 tit->first, tit->second[0], tit->second[1], tit->second[2]);
190 SETERRQ(PETSC_COMM_SELF, 1,
"*** ERROR file close unsuccessful");
◆ debug
int TimeAccelerogram::debug |
◆ nAme
string TimeAccelerogram::nAme |
◆ readFile
int TimeAccelerogram::readFile |
◆ tSeries
std::map< double, VectorDouble > TimeAccelerogram::tSeries |
The documentation for this struct was generated from the following file: