00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include <stdio.h>
00042 #include <string.h>
00043 #include "memvirtu.h"
00044 #include "lowparam.h"
00045 #include "lowmacro.h"
00046 #include "lowsolid.h"
00047 #include "genfunc_.h"
00048 #include "vectorop.h"
00049 #include "eulerops.h"
00050 #include "analise_.h"
00051 #include "mancommd.h"
00052
00053 void MSD_execAnaliseShow(void)
00054 {
00055 char name1[12];
00056
00057 while (1 != sscanf(restbuf, "%s", name1))
00058 {
00059 printf("show: nome");
00060 if (!lineins("? "))
00061 {
00062 return;
00063 }
00064 }
00065 MSD_lowAnaliseShow(name1);
00066 }
00067
00068 void MSD_lowAnaliseShow(char *name)
00069 {
00070 matrix m;
00071 vector c;
00072 int i, j;
00073 FILE *fp;
00074
00075 if (strcmp(name, "*"))
00076 {
00077 if ((fp = fopen("Rov1.ent", "w")) == (FILE *)NIL)
00078 {
00079 return;
00080 }
00081 }
00082 else
00083 {
00084 fp = stdout;
00085 }
00086
00087 MSD_lowMatrizInerciaTotal(m);
00088 for (i = 0; i < 3; i++)
00089 {
00090 for (j = 0; j < 3; j++)
00091 {
00092 fprintf(fp, "%10.4f ", m[i][j]);
00093 }
00094 fprintf(fp, "\n");
00095 }
00096 fprintf(fp, "%f\n", MSD_lowMassaTotal());
00097 MSD_lowCentroMassaTotal(c);
00098 fprintf(fp, "%10.4f %10.4f %10.4f\n", c[0], c[1], c[2]);
00099 MSD_lowCentroCarenaTotal(c);
00100 fprintf(fp, "%10.4f %10.4f %10.4f\n", c[0], c[1], c[2]);
00101 fprintf(fp, "%f\n", MSD_lowVolumeFlutuabilidadeTotal());
00102 fprintf(fp, "%f\n", MSD_lowVolumeTotal());
00103 fprintf(fp, "%f\n", densifluido);
00104 fclose(fp);
00105 }