📄 smfl.h
字号:
/*--------------------------------------------------------------------------Free Finite Element Package Copyright (c) 2002-2006 by Joerg FrochteAll rights reserved.Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditionsare met:1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOTLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FORA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ORCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ORPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDINGNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THISSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.----------------------------------------------------------------------------*/#ifndef __SMFL_H#define __SMFL_H/* simple mesh functionality library */#include "meml.h"# include <math.h># include <stdio.h># include <stdlib.h>typedef MEML_FLOAT (*xyt_function) (MEML_FLOAT x, MEML_FLOAT y, MEML_FLOAT t);typedef struct{ MEML_INT p[3];} TRIANGLE;typedef struct{ MEML_FLOAT a1[2]; MEML_FLOAT a2[2]; MEML_FLOAT a3[2];} T_POINTS;typedef struct{ MEML_FLOAT B[2][2]; MEML_FLOAT det;} TRANSFORMATION;typedef struct{ char kind; MEML_INT number_of_points; MEML_INT number_of_triangles; MEML_INT number_of_boundary_points; /* number_of_edges = number_of_triangles + number_of_points -1 */ /* Eulerische Polyederformel */ MEML_INT number_of_edges; MEML_INT number_of_boundary_edges; MEML_INT number_of_adof; MEML_INT *boundary_edges; MEML_INT degrees_of_freedom_per_triangle; MEML_INT *number_of_neighbours; VECTOR *points; VECTOR *additional_degrees_of_freedom; VECTOR **normal_vector; INDEXARRAY *boundary; INDEXARRAY *triangles; /* adof := additional_degrees_of_freedom */ MEML_INT **triangles_adof; MEML_INT **edges; MEML_INT **triangle2edge; MEML_INT **edge2triangle; INDEXARRAY **point2triangle; INDEXARRAY **neighbours; MEML_INT **son; MEML_FLOAT * ht; MEML_FLOAT hmax; MEML_FLOAT hmin; TRANSFORMATION *transformation; TRANSFORMATION *backtransformation; ME_MATRIX *restriction;} MESH;TRIANGLE smfl_get_triangle (MEML_INT w_triangle, MEML_INT * triangle);T_POINTS smfl_get_t_points (TRIANGLE triangle, MEML_FLOAT * points);INDEXARRAY *smfl_read_boundary_data (char filename[]);VECTOR *smfl_read_point_data (char filename[]);INDEXARRAY *smfl_read_triangle_data (char filename[]);TRANSFORMATION *smfl_compute_transformations (const VECTOR * points, const INDEXARRAY * triangles);TRANSFORMATION *smfl_compute_backtransformations (const TRANSFORMATION * trans, const MEML_INT number_of_triangles);MESH *smfl_mesh_new (char kind, INDEXARRAY * boundary, VECTOR * points, INDEXARRAY * triangles);void smfl_mesh_free (MESH * mesh);MESH * smfl_read_gts_meshdata(char kind, char filename[]);void smfl_mesh_guess_normals (MESH * mesh);MESH *smfl_mesh_refine (MESH * mesh, const INDEXARRAY * torefine);MESH * smfl_mesh_global_refine(MESH * mesh);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -