Welcome![Sign In][Sign Up]
Location:
Search - compare d

Search list

[Other resourcest10f166_adc

Description: This example program shows how to configure and use the A/D Converter of the following microcontroller: STMicroelectronics ST10F166 After configuring the A/D, the program reads the A/D result and outputs the converted value using the serial port. To run this program... Build the project (Project Menu, Build Target) Start the debugger (Debug Menu, Start/Stop Debug Session) View the Serial Window (View Menu, Serial Window #1) View the A/D converter peripheral (Peripheral Menu, A/D Converter) Run the program (Debug Menu, Go) A debug script (debug.ini) creates buttons that set different analog values in A/D channels. As the program runs, you will see the A/D input and output change. Other buttons create signals that generate sine wave or sawtooth patterns as analog inputs. µ Vision3 users may enable the built-in Logic Analyzer to view, measure and compare these input signals graphically.-This example shows how to program configur e and use the A / D Converter of the following MICR ocontroller : STMicroelectronics ST10F166 After configuri ng the A / D, the program reads the A / D and outputs the result converted value using the serial port. To run th Build program ... is the project (Project Menu, Build Target) Start the debugger (Debug Menu, Start / Stop Debug Session) View the Serial Wind ow (View Menu, Serial Window # 1) View the A / D converter Periph General (Peripheral Menu, A / D Converter) Run the program (Debug Menu, Go) A debug script (debug.ini) creates buttons that set different analog values in A / D channel s. As the program runs, you will see the A / D input and output change. Oth er buttons create signals that generate sine wa ve or sawtooth patterns as anal
Platform: | Size: 19077 | Author: 郭文彬 | Hits:

[Special EffectsPicture_Compare

Description: 可用于比较计算两个图片是否相似. The code is commented and explanation is provided in a seperate file. Compiled in Turbo C++ 3.0.-calculation can be used to compare two pictures similar to. The code is commented an d explanation is provided in a separate file. Co. mpiled in Turbo C 3.0.
Platform: | Size: 68348 | Author: Toby | Hits:

[Other resourceriqi

Description: 自定义一个简单的日期类DateType,它具有数据成员y、m、d,用来表示当前日期的年、月、日。而后设计该类欲实现(完成)的功能,进而设计出相应的类成员函数。 例如,下面给出的“雏形”可用来实现对天的增加,比较两个日期是否相等,以及对日期的输出等操作。请完成各类成员函数,并编制主函数,说明DateType类对象,对定义的各成员函数进行调用,以验证它们的正确性。 class DateType { //自定义的日期类DateType int y,m,d //数据成员,表示当前日期的年、月、日 public: DateType(int y0=1, int m0=1, int d0=1) //构造函数,设定年、月、日;并设置参数默认值 void incrementDay() //增加1天 bool equal(DateType dt2) //判断二日期是否相等 void printDate() //屏幕输出日期对象的有关数据(年、月、日) } -from the simple definition of a category DateType date, it has data members y, m, d, said the date for the current year, month, day. Then the design of such wishes to achieve (completed) function, and then design the class member functions. For example, the following is a "prototype" can be used to achieve the increase in the days to compare the same date. and the date of the export operation. Please complete the various members function, and the preparation of the main function, note DateType type object, definition of the members of the function call to verify their accuracy. Class DateType (/ / define the date category DateType int y, m, d / / data members, said the date of the current year, month, day public : DateType (int y0 = 1, m0 = 1 int, int d002 = 1) / / constructor fu
Platform: | Size: 4135 | Author: fisherman | Hits:

[Other resourceC++完美演绎2

Description: C++完美演绎 经典算法 如 /* 头文件:my_Include.h */ #include <stdio.h> /* 展开C语言的内建函数指令 */ #define PI 3.1415926 /* 宏常量,在稍后章节再详解 */ #define circle(radius) (PI*radius*radius) /* 宏函数,圆的面积 */ /* 将比较数值大小的函数写在自编include文件内 */ int show_big_or_small (int a,int b,int c) { int tmp if (a>b) { tmp = a a = b b = tmp } if (b>c) { tmp = b b = c c = tmp } if (a>b) { tmp = a a = b b = tmp } printf(\"由小至大排序之后的结果:%d %d %d\\n\", a, b, c) } 程序执行结果: 由小至大排序之后的结果:1 2 3 可将内建函数的include文件展开在自编的include文件中 圆圈的面积是=201.0619264-C perfect interpretation of classic algorithms / * header files : my_Include.h * / # include lt; Stdio.hgt; / * Start with the built-in C language function instructions * / # define PI 3.1415926 / * Acer constants later, in another chapter Elaborates on * / # define circle (radius) (PI * * radius radius) / * Macro function, a round of the area * / / * to compare the numerical size of the write functions include writing paper * / int show_big_or_small (int a, b int, int c) (int tmp if (Agt; b) (tmp = a b a = b = tmp) if (BGT; c) (tmp = b b = c c = tmp) if (Agt; b) ( tmp = a b a = b = tmp) printf ( "ascending order by the following results :% d% d% d \\ n", a, b, c)) procedures : in ascending order by the following results : 1 2 3 will the built-in functions include documents writte
Platform: | Size: 130555 | Author: 立功 | Hits:

[Algorithmhyplas

Description: ************************************************************************ * * * * * THIS IS THE H Y P L A S 2.0 README FILE * * ----------------- * * * * HYPLAS is a finite element program for implicit small and large * * strain analisys of hyperelastic and elasto-plastic two-dimensional * * and axisymmetric solids * * * * HYPLAS v2.0 is the companion software to the textbook: * * EA de Souza Neto, D Peric & DRJ Owen. Computational Methods for * * Plasticity: Theory and Applications. Wiley, Chichester, 2008. * * (www.wiley.com/go/desouzaneto) * * * * Copyright (c) 1998-2008 EA de Souza Neto, D Peric, D.R.J. Owen * *----------------------------------------------------------------------* * File last updated: 18 October 2008 * * * * This file belongs in the directory ../HYPLAS_v2.0 * ************************************************************************ * * * I M P O R T A N T * * * * READ SECTIONS 0 TO 3 OF THIS FILE CAREFULLY BEFORE ATTEMPTING * * TO COMPILE AND RUN THE PROGRAM HYPLAS ON YOUR COMPUTER !! * * * * THE AUTHORS DO NOT GUARANTEE THAT ANY SUGGESTIONS/INSTRUCTIONS * * GIVEN IN THIS README FILE WILL WORK ON ANY PARTICULAR OPERATING * * SYSTEM. IF YOU DECIDE TO FOLLOW ANY SUGGESTIONS/INSTRUCTIONS * * GIVEN HERE YOU MUST DO SO AT YOUR OWN RISK. * * * * * * BUG REPORTS: Please send bug reports to * * * * hyplas_v2.0@live.co.uk * * * * Messages sent to the authors' personal email addresses * * will NOT be answered. * ************************************************************************ This file contains the following sections: 0. Copyright statement and disclaimer 0.(a) Copyright statement 0.(b) Disclaimer 0.(c) Conditions of use 1. Introduction 1.(a) Note on portability 2. Compiling and running HYPLAS 2.(a) Memory requirements 2.(b) Testing a newly compiled executable 3. The HYPLAS directory tree 4. Cross-referencing between the source code and the textbook 5. HYPLAS error messaging 6. Further remarks on HYPLAS ************************************************************************ 0. COPYRIGHT STATEMENT AND DISCLAIMER ================================== 0.(a) Copyright statement ------------------- You may only use this program for your own private purposes. You are not allowed, in any circumstances, to distribute this program (including its source code, executable and any other files related to it, either in their original version or any modifications introduced by you, the authors or any other party) in whole or in part, either freely or otherwise, in any medium, without the prior written consent of the copyright holders. 0.(b) Disclaimer ---------- This program (including its source code, executable and any other files related to it) is provided "as is" without warranty of any kind, either expressed or implied, including, but not limited to, any implied warranties of fitness for purpose. In particular, THIS PROGRAM IS BY NO MEANS GUARANTEED TO BE FREE FROM ERRORS. This program (or any modification incorporated to it by you, the authors or any other party) will run entirely at your risk. The results produced by this program are in no way guaranteed to be fit for any purpose. Under no circumstances will the authors/copyright holders be liable to anyone for damages, including any general, special, incidental or consequential damages arising from the use or inability to use the program (including, but not limited to, loss or corruption of data, failure of the program to operate in any particular way as well as damages arising from the use of any results produced by the program for any purpose). 0.(c) Conditions of use ----------------- You may only use this program if you fully understand and agree with the terms of the above disclaimer. You must not use this program if you do not agree with or do not understand (fully or in part) these conditions of use. 1. INTRODUCTION ============ HYPLAS is a finite element code for small and large strain analysis of hyperelastic and elasto-plastic solids. Most procedures implemented in HYPLAS are described in detail in its companion textbook: EA de Souza Neto, D Peric & DRJ Owen. Computational Methods for Plasticity: Theory and Applications. Wiley, Chichester, 2008 (www.wiley.com/go/desouzaneto). 1.(a) Note on Portability ------------------- HYPLAS has been written in standard ANSI FORTRAN 77. Currently, the only known (and deliberate) exceptions to the FORTRAN 77 ANSI standard are the instructions: INCLUDE '' used in many routines to include the HYPLAS database files (common blocks and global variables), and; CALL GETENV('HYPLASHOME',HYPLASHOME) used in subroutine "ERRPRT" (file ../HYPLAS_v2.0/src/GENERAL/errprt.f). This instruction inquires the name of the system environment variable HYPLASHOME and writes it on the character string HYPLASHOME. This instruction is NOT part of the ANSI FORTRAN 77 standard, but seems to work in most currently available FORTRAN 77 compilers. 2. COMPILING AND RUNNING H Y P L A S ================================== The HYPLAS source code is stored in directory ../HYPLAS_v2.0/src/ (../HYPLAS_v2.0/ being the current directory) and all its subdirectories. To generate an executable file, you just need to compile the FORTRAN source files: ../HYPLAS_v2.0/src/hyplas.f and ../HYPLAS_v2.0/src/*/*.f together. We recommend that the executable HYPLAS be stored in the directory ../HYPLAS_v2.0/bin to which the environment variable HYPLASHOME should be set (see below how to set a system environmental variable). WINDOWS (R) systems ------------------- On Microsoft Windows(R) systems, HYPLAS has been successfully compiled using Intel Visual Fortran Compiler(R) integrated with Microsoft Visual Studio(R). Here you only need to create a project that contains all Fortran source files mentioned above as well as the include files ..\HYPLAS_v2.0\src\*.INC On a Windows XP system, the system environment variable HYPLASHOME can be set as follows: 1. Open a File Manager 2. Right-click on the "My Computer" icon 3. Select "Properties" on the drop-down menu 4. A new window named "System Properties" will pop-up. Here select the "Advanced" tab. 5. On the "Advanced" tab, click the "Environment Variables" button. 6. A new window titled "Environment Variables" will pop-up. Here click the button "New" in the "System Variables" section of the window. 7. A new window will pop-up titled "New System Variable". Here you should fill the fields "Variable name" and "Variable Value", respectively, with HYPLASHOME and the path name (in full) of the directory ..\HYPLAS_v2.0\bin. 8. Press "OK" on the relevant pop-up windows. 9. The next time the computer is REBOOTED, this variable will be set to the correct path and HYPLAS should be able to find the error messages file ERROR.RUN if required. UNIX/LINUX systems ------------------ In a UNIX/LINUX operating system using a C-shell, for instance, the HYPLASHOME environment variable should be set with the command: setenv HYPLASHOME where here denotes the full path to the directory ../HYPLAS_v2.0/bin. To compile HYPLAS (from directory ../HYPLAS_v2.0/src) with a FORTRAN 77 compiler such as g77, you can use the command: g77 -o ../bin/hyplas hyplas.f */*.f Note that the executable file "hyplas" will be stored in the directory ../HYPLAS_2.0/bin (i.e. the directory set in the HYPLASHOME environment variable). Alternatively, you may use the Makefile provided (with suitable modifications, if needed) to create the HYPLAS executable. IMPORTANT: Before generating a HYPLAS executable, read Sections 2.(a) and 2.(b) below. 2.(a) Memory Requirements ------------------- HYPLAS memory requirements depend on the array dimensioning parameters set in files: ../HYPLAS_v2.0/src/ ELEMENTS.INC GLBDBASE.INC MATERIAL.INC MAXDIM.INC Files ELEMENTS.INC, GLBDBASE.INC and MATERIAL.INC contain parameters which are associated with the currently implemented finite elements and materials. DO NOT MODIFY THEM ! unless you are absolutely sure of what you are doing (only developers coding new elements or new material models/analysis types may need to modify them by changing the existing dimensioning parameters and/or including new parameters). The ONLY dimensioning file that can be safely modified by the average user is the file MAXDIM.INC This file contains the array dimensioning parameters related to the maximum permissible dimension of problems to be analysed by HYPLAS. These parameters include the maximum number of nodes, elements, element groups, etc. If necessary, CHANGE THESE PARAMETERS TO SUIT YOUR PROBLEM SIZE/MEMORY REQUIREMENTS before compiling HYPLAS. 2.(b) Testing a newly compiled executable ----------------------------------- After you have successfully compiled the HYPLAS source code and created an executable file, the next step is to run some tests to verify that HYPLAS is working well. To do this, proceed as follows: The directory ../HYPLAS_v2.0/book_examples/data_files contains a series of data files named .dat of benchmarked examples described in the companion textbook. The corresponding (benchmarked) result files are in the directory ../HYPLAS_v2.0/book_examples/result_files This directory contains a series of result files named .res generated with the current version of HYPLAS on a tested platform. All these files have been named such that their names start with the textbook section number where the corresponding example is described. For instance, files 14_9_2_tresca.dat and 14_9_2_tresca.res refer to a problem described in section 14.9.2 of the textbook, and so on. To check that HYPLAS is working well on your platform, after compiling HYPLAS, run the program HYPLAS for the examples of files .dat and compare the newly generated results .res with their benchmarked counterparts (of the same filename) in the result_files directory. To run an example, execute HYPLAS and use the keyboard to enter the name of the corresponding data file in full (including the extension .dat). To compare the benchmarked .res files against their newly generated you may proceed as follows: 1. On MICROSOFT WINDOWS systems - Here we have successfully used the software "ExamDiff" (the task was made particularly easy by selecting "View" and then the "Show Differences Only" option - this refers to version 1.8 of this software). 2. On UNIX/LINUX systems - Here we use the "diff" command from a shell window (and set the option to ignore blank spaces). A shell script may be used to perform this task automatically (including running HYPLAS and checking for result file differences) for all benchmarked examples provided. IMPORTANT: THE ONLY ACCEPTABLE DIFFERENCES BETWEEN A THE NEWLY GENERATED RESULT FILES AND THEIR BENCHMARKED COUNTERPARTS ARE THE DIMENSIONING PARAMETERS (FROM FILE MAXDIM.INC) USED TO COMPILE THE NEW EXECUTABLE (THESE PARAMETERS ARE PRINTED RIGHT AT THE BEGINNING OF THE RESULT FILES) AND NUMERICAL DIFFERENCES IN RESULTS DUE TO NUMERICAL "ROUNDING-OFF" (THESE ARE VERY SMALL DIFFERENCES THAT DEPEND ON THE PRECISION OF ARITHMETIC OPERATIONS IN THE PLATFORM USED). ALSO NOTE THAT THE EXAMPLES OF THE COMPANION TEXTBOOK DO NOT COVER ALL FEATURES OF HYPLAS. HENCE THIS TEST DOES NOT GUARANTEE THAT EVERYTHING IS WORKING PROPERLY. 3. THE H Y P L A S DIRECTORY TREE ================================ 3.(a) Summary ------- ../ HYPLAS_v2.0/ bin/ book_examples/ data_files/ result_files/ man/ html/ src/ CRYSTAL/ DAMAGE/ DAMAGED_ELASTIC/ DRUCKER_PRAGER/ ELASTIC/ ELEMENTS/ GENERAL/ MATERIALS/ MATHS/ MOHR_COULOMB/ OGDEN/ TRESCA/ VON_MISES/ VON_MISES_MIXED/ 3.(b) Description ----------- The HYPLAS program directory tree is organised as follows: ../HYPLAS_v2.0/ (this directory) This is the HYPLAS root directory, where the HYPLAS directory tree starts. ../HYPLAS_v2.0/bin/ This directory contains the file ERROR.RUN where most HYPLAS error/warning messages are. IMPORTANT: the environment variable HYPLASHOME should be set to this directory. Otherwise, HYPLAS will not find its error/warning messages when required. We also recommend that the EXECUTABLE of HYPLAS be stored in this directory. ../HYPLAS_v2.0/book_examples/ This directory has the following subdirectories: ../HYPLAS_v2.0/book_examples/data_files ../HYPLAS_v2.0/book_examples/result_files Refer to Section 2.(b) above for further details. ../HYPLAS_v2.0/man/ This is the HYPLAS documentation/manuals directory. It contains the following files: input_man.txt - A concise input data manual for HYPLAS in ASCII format; hyplas_calltree.txt - Contains a flowgraph (shows the call tree) of HYPLAS in ASCII-format. Note: calls to function subprograms are not included in this flowgraph; and the subdirectory: ../HYPLAS_v2.0/man/html This directory contains the hypertext (HTML) format Fortran source code and of manual pages of the entire HYPLAS program. Manual pages with descriptions of each function/subprogram including their argument list are linked to their corresponding HTML-format source code. This allows the user the navigate through the HYPLAS source code using a web browser. To start at the main program, use your web browser to open the file hyplas.html. This facility should be helpful to those trying to understand the flow of program HYPLAS. ../HYPLAS_v2.0/src/ This directory (and its subdirectories) contains the Fortran source code of HYPLAS. The files containing the sources are named following the standard practice: .f where is the name of the FORTRAN procedure (subroutine, function subprogram, etc.) whose source code is in file .f. The source code of the HYPLAS main program is in file hyplas.f and the HYPLAS database (COMMON blocks, array dimensioning parameters and other global parameters) is coded in the "include files" ELEMENTS.INC GLDBASE.INC MATERIAL.INC MAXDIM.INC in this directory. In addition, this directory contains a file named "Makefile" (UNIX-LINUX Release only) which may be used for compiling and linking HYPLAS in UNIX/LINUX systems. The subdirectories of ../HYPLAS_v2.0/src are as follows: ../HYPLAS_v2.0/src/CRYSTAL Contains the source code of all procedures related to the finite strain single crystal plasticity model implemented in HYPLAS. ../HYPLAS_v2.0/src/DAMAGE Source files of the procedures related to the Lemaitre ductile damage model implementation. ../HYPLAS_v2.0/src/DAMAGED_ELASTIC Source files of the procedures related to the damaged elasticity model with crack closure effect. ../HYPLAS_v2.0/src/DRUCKER_PRAGER Source files of the procedures related to the implemented Drucker-Prager plasticity model. ../HYPLAS_v2.0/src/ELASTIC Source files of the procedures related to the linear elasticity model (Hencky model under large strains) implemented. ../HYPLAS_v2.0/src/ELEMENTS Source files of the element interfaces and element-related procedures. ../HYPLAS_v2.0/src/GENERAL Source files of general procedures. ../HYPLAS_v2.0/src/MATERIALS Source files of the material interfaces. ../HYPLAS_v2.0/src/MATHS Source files of the mathematical procedures. ../HYPLAS_v2.0/src/MOHR_COULOMB Source files of the procedures related to the implemented Mohr-Coulomb plasticity model. ../HYPLAS_v2.0/src/OGDEN Source files of the procedures related to the implemented Ogden hyperelasticity model. ../HYPLAS_v2.0/src/TRESCA Source files of the procedures related to the implemented Tresca plasticity model. ../HYPLAS_v2.0/src/VON_MISES Source files of the procedures related to the implemented von Mises plasticity model with isotropic hardening. ../HYPLAS_v2.0/src/VON_MISES_MIXED Source files of the procedures related to the implemented von Mises plasticity model with mixed isotropic/kinematic hardening. 4. CROSS-REFERENCING BETWEEN THE SOURCE CODE AND THE TEXTBOOK ========================================================== Many references are made in the textbook to various subprograms of HYPLAS. These are usually made when a particular procedure described in the text is implemented in the program. The reader should refer to the textbook index. Also, a substantial number of comment lines have been added to the source code of HYPLAS with reference to sections, figures, boxes, etc of the textbook related to the part of the code in question. Such references are usually displayed after the word "REFERENCE:" (in capitals) on commented lines. Searching for this word will take you to the line of code where the particular routine has a reference to the textbook. NOTE: Occasional references to other textbooks/journal papers are also made following the word "REFERENCE:" on commented lines. 5. HYPLAS ERROR MESSAGING ====================== Most error/warning messages issued by HYPLAS are in the ASCII-format file ERROR.RUN (kept in the HYPLASHOME directory - ../HYPLAS_v2.0/bin). All such error/warning messages have an identification code (e.g. ED0015) which is printed both to the standard output (this is usually the computer screen) and to the relevant results file. If you wish to find where in the source code a particular message is being issued, then perform a search for the corresponding message identification code in the entire source code of HYPLAS. 6. FURTHER REMARKS ON HYPLAS ========================= 6.(a) Program efficiency THIS SECTION IS OF INTEREST ONLY TO THOSE WANTING TO MAKE HYPLAS RUN FASTER. It is particularly stressed in the textbook that this program has not been designed having efficiency in mind (refer to Section 5.1.2 of the textbook). Its structure has been designed mainly to illustrate in a relatively clear manner the computer implementation of the techniques and algorithms described in the text, with a particular view to the implementation of solid constitutive models and finite elements. For those who are especially interested in the speed of the code, there are a few tips that could help in this direction. Unfortunately, these involve modifications to the source code which is probably most appropriate to readers with a good level of experience in finite element programming. To those with this particular interest, we can suggest the following: (i) The use of faster linear solvers This is probably the change that would result in a greater gain in efficiency. The Frontal Method adopted in subroutine FRONT (file ../HYPLAS_v2.0/src/GENERAL/front.f) has been designed originally to save memory (back in the days when computer memory was severely limited). There are currently a vast number of methodologies which focus on speeding up the linear solution, in addition to reducing memory storage requirements (which is a particularly important issue in the solution of large scale problems). Some of these are extensions/refinements of the original Frontal solver. We remark that a number of such procedures (with their respective source codes) are available (conditions may apply) from the LAPACK (Linear Algebra PACKage - http://www.netlib.org/lapack) repository or from the HSL Library (http://www.cse.cse.scitech.ac.uk/nag/hsl). For the reader interested in gaining speed, we would recommend the replacement of the existing solver of FRONT by a faster one. We remark though that this is a substantial programming task. Another aspect here is the fact that computing times in FRONT are directly linked to the frontwidth of the system which, in the present version of HYPLAS is fixed and depends, for a given mesh, on how the degrees of freedom are numbered (node numbering). The incorporation of a frontwidth optimiser (which re-numbers the degrees of freedom in order to minimise the frontwidth) in FRONT could produce some good savings in computing times. Such savings become particularly noticeable in larger problems where the original node numbering produces an excessively large frontwidth. (ii) Material-specific computations The issues pointed out here affect only the computing times for specific material models and are expected to have a much lower impact in overall speed than the linear solver issue discussed above. Some of the material model-specific computations carried out in HYPLAS could be made a bit faster. For example, for isotropic models whose stress update is carried out in the principal stress space (such as the Tresca and Mohr-Coulomb models - see routines SUTR and SUMC, files ../HYPLAS_v2.0/src/TRESCA/sutr.f and ../HYPLAS_v2.0/MOHR_COULOMB/sumc.f, respectively) the spectral decomposition of the stress in carried out in the state update update routine and then repeated in the corresponding routine for computation of the consistent tangent operator (refer to files ../HYPLAS_v2.0/src/TRESCA/cttr.f and ../HYPLAS_v2.0/src/MOHR_COULOMB/ctmc.f, respectively, for the Tresca and Mohr-Coulomb plasticity models). Some savings in computing time can be achieved here by storing the stress eigenprojection tensors (these can be stored as state variables) during the execution of the state updating and then retrieving them later for use in the computation of the consistent tangent operator. This change can be incorporated to the code relatively easily. The computation of the exponential map and is derivative for the single crystal plasticity model (routines EXPMAP, file ../HYPLAS_v2.0/src/CRYSTAL/expmap.f and DEXPMP, file ../HYPLAS_v2.0/src/CRYSTAL/dexpmp.f) is carried out in three dimensions (these routines have been adapted from an earlier three-dimensional code). To improve efficiency, these can be adapted to work only in two-dimensional problems by removing the unnecessary operations related to the third dimension. 6.(b) Output of nodal averaged values The reader should be aware that the way in which nodal averaged values of stresses and other variables are calculated in HYPLAS is very basic (and rudimentary). This feature of the program is made available only to help those interested in producing contour plots, etc from results presented in HYPLAS result files and should be useful in many circumstances of interest. This facility has in fact been used in producing many of the figures presented in the textbook. But note, for example, that the values of incremental plastic multipliers for plasticity models may take (inadmissible) negative values when extrapolated from Gauss-point to nodes and averaged. We remark that more sophisticated and refined techniques of transferring Gauss point values of variables to nodal points and obtaining the corresponding smoothed field are available in the current literature. These fall outside the scope of the companion textbook of HYPLAS.
Platform: | Size: 11008084 | Author: gtcewli3 | Hits:

[OtherC++程序设计语言实验三

Description: 实验三:C++编程入门 一、实验内容 1. 类模版。 2. 运算符重载。 3. 友元。 4. 继承。 二、实验题目 1, 设计一个类SavingsAccount,定义一个静态数据成员记录存款的年利率(rate),该类的每个成员都包含一个私有的数据成员balance,表示该成员当前的存款数额。提供一个成员函数CalMonthlyInterest(),用以计算月利息(用balance乘以rate再除以12),并将这个月利息加入balance中。提供一个静态成员函数ModifyRate(),用以改变静态数据成员rate的值。定义两个不同的SavingsAccount对象saver1和saver2,当前存款数额balance分别为2000.00和3000.00。首先将rate设置为3%,计算每个存款人的月息并打印新的结果,然后将rate设置为4%,再次计算每个存款人的月息并打印新的结果。 2, 设计一个学生类student,包括学生学号、姓名、成绩;设计一个友元函数,比较某两个学生成绩的高低;读入一个文本文件(格式如示例studengt.txt,每行的学号、姓名、成绩之间用四个空格隔开)中所有学生的学号、姓名、成绩,输出最高成绩和最低成绩的学生信息(学号、姓名、成绩)。 3, 阅读下面例子,将题中的Time类声明为Data类的友元类,通过Time类中的display函数引用Data类的私有数据,输出年、月、日和时、分、秒。 #include <iostream> using namespace std; class Date; //对Date类的提前引用声明 class Time //定义Time类 { public: Time(int,int,int); void display(Date &); //display是成员函数,形参是Date类对象的引用 private: int hour; int minute; int sec; }; class Date //声明Date类 { public: Date(int,int,int); friend void Time∷display(Date &); //声明Time中的display函数为友元成员函数 private: int month; int day; int year; }; Time∷Time(int h,int m,int s) //类Time的构造函数 { hour=h; minute=m; sec=s; } void Time∷display(Date &d) //display的作用是输出年、月、日和时、分、秒 { cout<<d.month<<″/″<<d.day<<″/″<<d.year<<endl; //引用Date类对象中的私有数据 cout<<hour<<″:″<<minute<<″:″<<sec<<endl; //引用本类对象中的私有数据 } Date∷Date(int m,int d,int y) //类Date的构造函数 { month=m; day=d; year=y; } int main( ) { Time t1(10,13,56); //定义Time类对象t1 Date d1(12,25,2004); //定义Date类对象d1 t1.display(d1); //调用t1中的display函数,实参是Date类对象d1 return 0; } 4, 将下面程序改为在类模板外定义各成员函数: #include <iostream> using namespace std; template<class numtype> //定义类模板 class Compare { public: Compare(numtype a,numtype b) { x=a;y=b; } numtype max( ) { return (x>y)?x:y; } numtype min( ) { return (x<y)?x:y; } private: numtype x,y; }; int main( ) { Compare<int> cmp1(3,7); //定义对象cmp1,用于两个整数的比较 cout<<cmp1.max( )<<″ is the Maximum of two integer numbers.″<<endl; cout<<cmp1.min( )<<″ is the Minimum of two integer numbers.″<<endl<<endl; Compare<float> cmp2(45.78,93.6); //定义对象cmp2,用于两个浮点数的比较 cout<<cmp2.max( )<<″ is the Maximum of two float numbers.″<<endl; cout<<cmp2.min( )<<″ is the Minimum of two float numbers.″<<endl<<endl; Compare<char> cmp3(′a′,′A′); //定义对象cmp3,用于两个字符的比较 cout<<cmp3.max( )<<″ is the Maximum of two characters.″<<endl; cout<<cmp3.min( )<<″ is the Minimum of two characters.″<<endl; return 0; } 5, 有两个矩阵a和b,均为2行3列,求两个矩阵的和。重载运算符“+”使之用于矩阵相加。如:c=a+b。重载插入运算符“<<”和流提取运算符“>>”,使之能用于该矩阵的输入和输出。 6, 利用类继承分别完成一个学生类、一个大学生类、一个本科生类,本科生类中包括了一个学生作为他的班长。在创建一个本科生对象时赋予他的全部信息,输出该本科生对象的全部信息。 7, 利用c++继承、多态虚函数、构造函数完成以下程序:设计人、老师、学生、大学生、研究生、大四学生等类、其主要属性自己定义,要求包括以下方法: 1) 构造函数,创建对象的主要信息 2) Display,显示每种类对象的主要信息 此外,要求每个类包含一个生日对象,其类型为Birthday类,学生类应该包含一个班主任对象,其类型为老师类。 三、实验要求  将程序源代码压缩后提交至学院FTP上对应实验和班级的目录中。  作业命名方式为:“学号姓名.rar”。  作业提交时间:下次实验课前提交。
Platform: | Size: 1255695 | Author: zhuchao0731@163.com | Hits:

[Documentsasm源码

Description: asm源码 汇编引导程序 源程序 汇编初见面 名称 解释 格式 a (Assemble) 逐行汇编 a [address] c (Compare) 比较两内存块 c range address d (Dump) 内存16进制显示 d [address]或 d [range] e (Enter) 修改内存字节 e address [list] f (fin) 预置一段内存 f range list g (Go) 执行程序 g [=address][address...] h (Hexavithmetic) 制算术运算 h value value i (Input) 从指定端口地址输入 i pataddress l (Load) 读盘 l [address [driver seetor> m (Move) 内存块传送 m range address n (Name) 置文件名 n filespec [filespec...] o (Output) 从指定端口地址输出 o portadress byte q (Quit) 结束 q r (Register) 显示和修改寄存器 r [register name] s (Search) 查找字节串 s range list t (Trace) 跟踪执行 t [=address] [value] u (Unassemble) 反汇编 u [address ]或range w (Write) 存盘 w [address[driver sector secnum> ? 联机帮助 ? debug小汇编a命令 debug小汇编a命令是一个很有用的功能,许多的小程序都要他来做。 编一些小程序比汇编要来得方便,快洁。 在Debug中,中断是非常有用的,首先,让我们先了解一下中断。 所谓中断,其实,就是,当你做某事时,有人过来找你有其他事,你先放下手中的事(计算机中,称为保护现场) ,再去与叫你的那个人办事去,等完了,你又回,接着做刚才的事。这是个很通俗的讲法。 计算机在运行时,也会出现这种情况,我们叫之中断。 下面是他的一些常用中断向量的入口值详解:(记住哦,很用的...呵呵)
Platform: | Size: 17612 | Author: 525836987@qq.com | Hits:

[VC/MFCC++完美演绎2

Description: C++完美演绎 经典算法 如 /* 头文件:my_Include.h */ #include <stdio.h> /* 展开C语言的内建函数指令 */ #define PI 3.1415926 /* 宏常量,在稍后章节再详解 */ #define circle(radius) (PI*radius*radius) /* 宏函数,圆的面积 */ /* 将比较数值大小的函数写在自编include文件内 */ int show_big_or_small (int a,int b,int c) { int tmp if (a>b) { tmp = a a = b b = tmp } if (b>c) { tmp = b b = c c = tmp } if (a>b) { tmp = a a = b b = tmp } printf("由小至大排序之后的结果:%d %d %d\n", a, b, c) } 程序执行结果: 由小至大排序之后的结果:1 2 3 可将内建函数的include文件展开在自编的include文件中 圆圈的面积是=201.0619264-C perfect interpretation of classic algorithms/* header files : my_Include.h* /# include lt; Stdio.hgt;/* Start with the built-in C language function instructions* /# define PI 3.1415926/* Acer constants later, in another chapter Elaborates on* /# define circle (radius) (PI** radius radius)/* Macro function, a round of the area*//* to compare the numerical size of the write functions include writing paper*/int show_big_or_small (int a, b int, int c) (int tmp if (Agt; b) (tmp = a b a = b = tmp) if (BGT; c) (tmp = b b = c c = tmp) if (Agt; b) ( tmp = a b a = b = tmp) printf ( "ascending order by the following results :% d% d% d \ n", a, b, c)) procedures : in ascending order by the following results : 1 2 3 will the built-in functions include documents writte
Platform: | Size: 130048 | Author: 立功 | Hits:

[SCMst10f166_adc

Description: This example program shows how to configure and use the A/D Converter of the following microcontroller: STMicroelectronics ST10F166 After configuring the A/D, the program reads the A/D result and outputs the converted value using the serial port. To run this program... Build the project (Project Menu, Build Target) Start the debugger (Debug Menu, Start/Stop Debug Session) View the Serial Window (View Menu, Serial Window #1) View the A/D converter peripheral (Peripheral Menu, A/D Converter) Run the program (Debug Menu, Go) A debug script (debug.ini) creates buttons that set different analog values in A/D channels. As the program runs, you will see the A/D input and output change. Other buttons create signals that generate sine wave or sawtooth patterns as analog inputs. µ Vision3 users may enable the built-in Logic Analyzer to view, measure and compare these input signals graphically.-This example shows how to program configur e and use the A/D Converter of the following MICR ocontroller : STMicroelectronics ST10F166 After configuri ng the A/D, the program reads the A/D and outputs the result converted value using the serial port. To run th Build program ... is the project (Project Menu, Build Target) Start the debugger (Debug Menu, Start/Stop Debug Session) View the Serial Wind ow (View Menu, Serial Window# 1) View the A/D converter Periph General (Peripheral Menu, A/D Converter) Run the program (Debug Menu, Go) A debug script (debug.ini) creates buttons that set different analog values in A/D channel s. As the program runs, you will see the A/D input and output change. Oth er buttons create signals that generate sine wa ve or sawtooth patterns as anal
Platform: | Size: 18432 | Author: 郭文彬 | Hits:

[Special EffectsPicture_Compare

Description: 可用于比较计算两个图片是否相似. The code is commented and explanation is provided in a seperate file. Compiled in Turbo C++ 3.0.-calculation can be used to compare two pictures similar to. The code is commented an d explanation is provided in a separate file. Co. mpiled in Turbo C 3.0.
Platform: | Size: 67584 | Author: Toby | Hits:

[Data structsriqi

Description: 自定义一个简单的日期类DateType,它具有数据成员y、m、d,用来表示当前日期的年、月、日。而后设计该类欲实现(完成)的功能,进而设计出相应的类成员函数。 例如,下面给出的“雏形”可用来实现对天的增加,比较两个日期是否相等,以及对日期的输出等操作。请完成各类成员函数,并编制主函数,说明DateType类对象,对定义的各成员函数进行调用,以验证它们的正确性。 class DateType { //自定义的日期类DateType int y,m,d //数据成员,表示当前日期的年、月、日 public: DateType(int y0=1, int m0=1, int d0=1) //构造函数,设定年、月、日;并设置参数默认值 void incrementDay() //增加1天 bool equal(DateType dt2) //判断二日期是否相等 void printDate() //屏幕输出日期对象的有关数据(年、月、日) } -from the simple definition of a category DateType date, it has data members y, m, d, said the date for the current year, month, day. Then the design of such wishes to achieve (completed) function, and then design the class member functions. For example, the following is a "prototype" can be used to achieve the increase in the days to compare the same date. and the date of the export operation. Please complete the various members function, and the preparation of the main function, note DateType type object, definition of the members of the function call to verify their accuracy. Class DateType (//define the date category DateType int y, m, d// data members, said the date of the current year, month, day public : DateType (int y0 = 1, m0 = 1 int, int d002 = 1)// constructor fu
Platform: | Size: 4096 | Author: fisherman | Hits:

[assembly languageBDA_OK_676_630

Description: 对于BDA可调控制,有A/D功能和比较器比较输出-For BDA adjustable control, there are A/D functions and comparators compare the output
Platform: | Size: 2048 | Author: 南京东方世纪 | Hits:

[Windows Developmigong

Description: vc下做的迷宫游戏,比较经典的小游戏 方向键为a s d w-to do the maze under the vc games, compare the classic game for the arrow keys asdw
Platform: | Size: 296960 | Author: 吴桂波 | Hits:

[Windows DevelopWordSimilarity

Description: 词汇比较程序。 能够比较两个词汇的相似度程序,基于wordnet。-Vocabulary comparison procedures. Able to compare two lexical similarity procedures, based on wordnet.
Platform: | Size: 983040 | Author: 刘翔 | Hits:

[Windows Developdwg-compare

Description: 比较两个DWG文件,找出之间的差异,不同的内容将一不同颜色显示-Comparing the two DWG files, find the difference between the different content will show a different color
Platform: | Size: 608256 | Author: wdbw | Hits:

[Speech/Voice recognition/combine19_M-W-K-D-D_SPA2010_final

Description: This paper presents results of speaker recognition experiments using short Polish sentences. We developed and analyzed various vector quantization representations in order to first maximize identification effectiveness and second to compare VQ (vector quantization) and GMM (Gaussian mixture model) approaches. For the research and experiments we created and exploited database, containing specially prepared short speech sequences.
Platform: | Size: 258048 | Author: Tomasz | Hits:

[AlgorithmCompare-two-dates-are-the-same

Description: 2. 自定义一个简单的日期类DateType,它具有数据成员y、m、d,用来表示当前日期的年、月、日。而后设计该类欲实现(完成)的功能,进而设计出相应的类成员函数-2. Customize a date DateType, it has a data member y, m, d, used to represent the year, month, day of the current date. Then design class (completed) function, then design a class member function
Platform: | Size: 1024 | Author: 丁文文 | Hits:

[Software Engineeringd

Description: 该文件包括了单链表的基本操作,比较 ,排序等-The document includes the basic operation of a single list, compare, sort, etc.
Platform: | Size: 451584 | Author: 王娅 | Hits:

[Othercompare

Description: 几种DQ变换的不同形式的比较,DQ变换可以看到很多不同的形式,这主要是变换常数的选择和D-it is a paper is presented about dq
Platform: | Size: 37888 | Author: 袁先生 | Hits:

[OtherThe-Fresnel-diffraction--D---FFT

Description: 菲涅尔衍射积分的D FFT算法。分别改变抽样数、衍射距离,观察计算结果,同时与S FFT算法和T FFT的结果比较。-The Fresnel diffraction integral D- FFT algorithm.Change sampling number, the diffraction distance respectively, observe the calculation results, at the same time with S- FFT algorithm and compare the results of T- FFT.
Platform: | Size: 12288 | Author: huyidu | Hits:
« 12 3 »

CodeBus www.codebus.net