23 std::cout <<
"standa test Running" << std::endl;
37 points2D =
new double*[bodu];
38 for (i = 0; i < bodu; i++) {
39 points2D[i] =
new double[3];
45 double **strain_2D = NULL;
46 strain_2D =
new double*[nlc];
47 for (i = 0; i < nlc; i++)strain_2D[i] =
new double[4];
48 double **stress_2D = NULL;
49 stress_2D =
new double*[nlc];
50 for (i = 0; i < nlc; i++)stress_2D[i] =
new double[4];
51 double **disp_2D = NULL;
52 disp_2D =
new double*[nlc];
53 for (i = 0; i < nlc; i++)disp_2D[i] =
new double[2];
56 double rs2D[] = { 1.0, 0.0, 0.0, 0.0 };
68 char vtkFile_2D[] =
"./input_5x5.vtk";
78 FILE *fstrain1,*fstrain2;
79 fstrain1 = fopen(
"./3x1_rez1_strain1.txt",
"wt");
85 for (points2D[0][0] = 0.0; points2D[0][0] <= 12.0; points2D[0][0] += 0.01) {
87 fprintf(fstrain1,
"%lf %lf\n", points2D[0][0], strain_2D[0][0]);
98 double *strn =
new double[4];
99 for (
int i = 0; i < 4; i++)strn[i] = 0.;
100 double space[] = { 4.,1. };
103 int npoints = ceil((space[0] * 2 / ds)*(space[1] * 2 / ds));
105 points =
new double*[npoints];
106 for (
double x = -space[0] + ds / 2; x < space[0]; x += ds)
107 for (
double y = -space[1] + ds / 2; y < space[1]; y += ds) {
108 points[bod] =
new double[3];
114 printf(
"%d bodu\n", npoints);
116 double **strain_2D = NULL;
117 strain_2D =
new double*[nlc];
118 for (
int i = 0; i < nlc; i++)strain_2D[i] =
new double[4];
119 double **stress_2D = NULL;
120 stress_2D =
new double*[nlc];
121 for (
int i = 0; i < nlc; i++)stress_2D[i] =
new double[4];
122 double **disp_2D = NULL;
123 disp_2D =
new double*[nlc];
124 for (
int i = 0; i < nlc; i++)disp_2D[i] =
new double[2];
125 double rs2D[] = { 1.0, 0.0, 0.0, 0.0 };
128 char vtkFile_2D[] =
"./input_energyTest01.vtk";
139 for (
int i = 0; i < npoints; i++) {
141 for (
int j = 0; j < 4; j++)energy += strain_2D[0][j] * stress_2D[0][j]*ds*ds;
142 for (
int j = 0; j < 4; j++)strn[j] += strain_2D[0][j]*ds*ds;
144 energy /= space[0] * space[1] * 4;
147 printf(
"Energie = %lf\n", energy);
148 for (
int j = 0; j < 4; j++)printf(
"%lf\n",strn[j]);
222 points2D =
new double*[bodu];
223 for (i = 0; i < bodu; i++) {
224 points2D[i] =
new double[3];
230 double **strain_2D = NULL;
231 strain_2D =
new double*[nlc];
232 for (i = 0; i < nlc; i++)strain_2D[i] =
new double[4];
233 double **stress_2D = NULL;
234 stress_2D =
new double*[nlc];
235 for (i = 0; i < nlc; i++)stress_2D[i] =
new double[4];
236 double **disp_2D = NULL;
237 disp_2D =
new double*[nlc];
238 for (i = 0; i < nlc; i++)disp_2D[i] =
new double[2];
241 double rs2D[] = { 1.0, 0.0, 0.0, 0.0 };
246 char vtkFile_2D[] =
"./input3incl.vtk";
257 fstrain = fopen(
"./TST/comp_4.txt",
"wt");
259 for (points2D[0][0] = -10.0; points2D[0][0] <= 0.0; points2D[0][0] += 0.01) {
261 fprintf(fstrain,
"%lf %lf\n", points2D[0][0], strain_2D[0][0]);
void input_data_initialize_and_check_consistency(void)
Initializes and checks consistency of all input data. This function has to be called after data input...
void set_approximation(int val)
file of various types and symbolic constant definitions
void set_problem_size(double a1, double a2, double a3, double b1, double b2, double b3, double node_distance)
void set_SBA_optimized(bool val)
Set type of self-balancing algorithm.
void set_SBAM(SBAtype val)
void set_diffType(DiffTypes val)
Sets type of differentiation, analytical by default.
void read_input_file(const char *filename)
Reads filename VTK input file containing inclusion geometry and topology.
long giveFieldsOfPoint(double **displc, double **strain, double **stress, const double *coords, char ptFlag, int rs, int nrs, PFCmode pfcMode=PFCM_OPTIMIZED, long reqIncl=-3, STRNotation tn=STRN_THEORETICAL_ROW) const
Function gives the analytical solution of the perturbation or total fields (displacements, strains and stresses) of a point for given set of remote strains.
void set_intFieldsShape(int val)
void convert_to_equivalent_problem(void)
Converts the given heterogeneous problem to the equivalent problem.