📄 getdp.texi
字号:
more and more complex problems, as well as various methods for the solvingof the same problem.@c -------------------------------------------------------------------------@c Industrial studies@c -------------------------------------------------------------------------@node Industry, How to Read this Manual, Education, Introduction@heading Industrial studiesThe treatment of industrial problems can also be facilitated becauseGetDP is adapted to the study of a wide range of physical problems usingvarious numerical methods. In particular, adapted made to measure andready-to-use software could be rapidly developed for given problems.@c -------------------------------------------------------------------------@c How to Read this Manual@c -------------------------------------------------------------------------@node How to Read this Manual, , Industry, Introduction@heading How to read this manual@cindex Reading, guidelinesAfter reading @ref{Overview}, which depicts the general philosophy ofGetDP, you might want to skip @ref{Expressions}, @ref{Objects} and@ref{Types for objects} and directly run the demo files bundled in thedistribution on your computer (@pxref{Running GetDP}). You should thenopen these examples with a text editor and compare their structure withthe examples given in @ref{Short examples} and @ref{Completeexamples}. For each new syntax element that you fall onto, you can thengo back to @ref{Expressions}, @ref{Objects}, and @ref{Types forobjects}, and find in these chapters the detailed description of thesyntactic rules as well as all the available options.Indexes for many concepts (@pxref{Concept index}) and for all the syntaxelements (@pxref{Syntax index}) are available at the end of thismanual. @c =========================================================================@c Overview@c =========================================================================@node Overview, Expressions, Introduction, Top@chapter Overview@cindex Overview@cindex Objects, overview@cindex Tools, overview@cindex Numerical tools, overview@menu* Numerical tools as objects:: * Syntactic rules:: * Comments:: * Includes:: * Which problems can GetDP actually solve?:: @end menu@c -------------------------------------------------------------------------@c Numerical Tools as Objects@c -------------------------------------------------------------------------@node Numerical tools as objects, Syntactic rules, Overview, Overview@section Numerical tools as objects@cindex Objects, dependences@cindex Dependences, objects@cindex Linking, objects@cindex Tools, order of definition@cindex Philosophy, general@cindex Processing cycleAn assembly of computational tools (or objects) in GetDP leads to a problemdefinition structure, which is a transcription of the mathematicalexpression of the problem, and forms a text data file: the equationsdescribing a phenomenon, written in a mathematical form adapted to a chosennumerical method, directly constitute data for GetDP.The resolution of a discrete problem with GetDP requires the definition, ina text data file, of the GetDP objects listed (together with theirdependencies) in the following figure and table.@image{objects-wrap,13.5cm,}@sp 1@exampleGroup @var{---}Function GroupConstraint Group, Function, (Resolution)FunctionSpace Group, Constraint, (Formulation), (Resolution)Jacobian GroupIntegration @var{---}Formulation Group, Function, (Constraint), FunctionSpace, Jacobian, IntegrationResolution Function, FormulationPostProcessing Group, Function, Jacobian, Integration, Formulation, ResolutionPostOperation Group, PostProcessing@end example@sp 1The gathering of all these objects constitutes the problem definitionstructure, which is a copy of the formal mathematical formulation of theproblem. Reading the first column of the table from top to bottom picturesthe working philosophy and the linking of operations peculiar to GetDP, fromgroup definition to results visualization. The decomposition highlighted inthe figure points out the separation between the objects defining the methodof resolution, which may be isolated in a ``black box'' (bottom) and thosedefining the data peculiar to a given problem (top). The computational tools which are in the center of a problem definitionstructure are formulations (@code{Formulation}) and function spaces(@code{FunctionSpace}). Formulations define systems of equations that haveto be built and solved, while function spaces contain all the quantities,i.e., functions, fields of vectors or covectors, known or not, involved informulations.Each object of a problem definition structure must be defined beforebeing referred to by others. A linking which always respects thisproperty is the following: it first contains the objects definingparticular data of a problem, such as geometry, physical characteristicsand boundary conditions (i.e., @code{Group}, @code{Function} and@code{Constraint}) followed by those defining a resolution method, suchas unknowns, equations and related objects (i.e., @code{Jacobian},@code{Integration}, @code{FunctionSpace}, @code{Formulation},@code{Resolution} and @code{PostProcessing}). The processing cycle endswith the presentation of the results (i.e., lists of numbers in variousformats), defined in @code{PostOperation} fields. This decompositionpoints out the possibility of building black boxes, containing objectsof the second group, adapted to treatment of general classes of problemsthat share the same resolution methods.@c -------------------------------------------------------------------------@c Syntactic Rules Used in this Document@c -------------------------------------------------------------------------@node Syntactic rules, Comments, Numerical tools as objects, Overview@section Syntactic rules used in this document@cindex Syntax, rules@cindex Rules, syntactic@cindex Document syntax@vindex @dots{}@vindex <, >@vindex |@vindex :@vindex @var{etc}Here are the rules we tried to follow when writing this user's guide. Notethat metasyntactic variable definitions stay valid throughout all the manual(and not only in the sections where the definitionsappear). See @ref{Metasyntactic variable index}, for an index of allmetasyntactic variables.@enumerate@item Keywords and literal symbols are printed like @code{this}.@item Metasyntactic variables (i.e., text bits that are not part of the syntax,but stand for other text bits) are printed like @var{this}.@item A colon (@code{:}) after a metasyntactic variable separates the variablefrom its definition.@item Optional rules are enclosed in @code{<} @code{>} pairs.@item Multiple choices are separated by @code{|}.@item Three dots (@dots{}) indicate a possible repetition of the preceding rule.@item For conciseness, the notation @code{@var{rule} <, @var{rule} > @dots{}}is replaced by @code{@var{rule} <,@dots{}>}.@item The @var{etc} symbol replaces nonlisted rules.@end enumerate@c -------------------------------------------------------------------------@c Comments@c -------------------------------------------------------------------------@node Comments, Includes, Syntactic rules, Overview@section Comments@cindex Comments@cindex File, comment@tindex /*, */@tindex //Both C and C++ style comments are supported and can be used in the inputdata files to comment selected text regions:@enumerate@itemthe text region comprised between @code{/*} and @code{*/} pairs is ignored;@itemthe rest of a line after a double slash @code{//} is ignored.@end enumerateComments cannot be used inside double quotes or inside GetDP keywords.@c -------------------------------------------------------------------------@c Includes@c -------------------------------------------------------------------------@node Includes, Which problems can GetDP actually solve?, Comments, Overview@section Includes@cindex Includes@cindex File, include@tindex Include@tindex #includeAn input data file can be included in another input data file by placingone of the following commands (@var{expression-char} represents a filename) on a separate line, outside the GetDP objects. Any text placedafter an include command on the same line is ignored.@example@code{Include @var{expression-char}} @code{#include @var{expression-char}} @end exampleSee @ref{Constants}, for the definition of the character expression@var{expression-char}.@c -------------------------------------------------------------------------@c Which Problems can GetDP actually solve?@c -------------------------------------------------------------------------@node Which problems can GetDP actually solve?, , Includes, Overview@section Which problems can GetDP actually solve?@cindex Scope of GetDP@cindex Future developments@cindex Developments, future@cindex Physical problems@cindex Method of Moments@cindex Finite Element Method@cindex Integral Equation Method@cindex Boundary Element Method@cindex Finite Difference Method@cindex Finite Volume Method@cindex Electromagnetism@cindex Mechanics@cindex ThermicsThe preceding explanations may seem very (too) general. Which are theproblems that GetDP can actually solve? To answer this question, here is alist of methods that we have considered and coupled until now:@table @asis@item Numerical methodsfinite element method@*boundary element method (experimental, undocumented)@*volume integral methods (experimental, undocumented)@item Geometrical modelsone-dimensional models (1D)@*two-dimensional models (2D), plane and axisymmetric@*three-dimensional models (3D)@item Time statesstatic states@*sinusoidal and harmonic states@*transient states@*eigenvalue problems@end tableThese methods have been successfully applied to build coupled physicalmodels involving electromagnetic phenomena (magnetostatics, magnetodynamics,electrostatics, electrokinetics, electrodynamics, wave propagation, lumpedelectric circuits), acoustic phenomena, thermal phenomena and mechanicalphenomena (elasticity, rigid body movement).As can be guessed from the preceding list, GetDP has been initiallydeveloped in the field of computational electromagnetics, which fully usesall the offered coupling features. We believe that this does not interferewith the expected generality of the software because a particular modelingforms a problem definition structure which is totally external to thesoftware: GetDP offers computational tools; the user freely applies them todefine and solve his problem.Nevertheless, specific numerical tools will @emph{always} need to beimplemented to solve specific problems in areas other than thosementionned above. If you think the general phisosophy of GetDP is rightfor you and your problem, but you discover that GetDP lacks the toolsnecessary to handle it, let us know: we would love to discuss it withyou. For example, at the time of this writing, many areas of GetDP wouldneed to be improved to make GetDP as useful for computational mechanicsor computational fluid dynamics as it is for computationalelectromagnetics... So if you have the skills and some free time, feelfree to join the project: we gladly accept all code contributions!@c =========================================================================@c Expressions@c =========================================================================@node Expressions, Objects, Overview, Top@chapter Expressions This chapter and the next two describe in a rather formal way all thecommands that can be used in the ASCII text input files. If you arejust beginning to use GetDP, or just want to see what GetDP is allabout, you should skip this chapter and the next two for now, have aquick look at @ref{Running GetDP}, and run the demo problems bundled inthe distribution on your computer. You should then open the @file{.pro}files in a text editor and compare their structure with the examplesgiven in @ref{Short examples} and @ref{Complete examples}. Once you havea general idea of how the files are organized, you might want to comeback here to learn more about the specific syntax of all the objects,and all the available options.@menu* Expression definition::* Constants:: * Operators:: * Functions:: * Current values:: * Arguments:: * Registers:: * Fields:: * Loops and conditionals:: @end menu@c -------------------------------------------------------------------------@c Definition@c -------------------------------------------------------------------------@node Expression definition, Constants, Expressions, Expressions@section Definition@cindex Expression, definition@vindex @var{expression}@vindex @var{expression-list}Expressions are the basic tool of GetDP. They cover a wide range offunctional expressions, from constants to formal expressions containingfunctions (built-in or user-defined, depending on space and time, etc.),arguments, discrete quantities and their associated differential operators,etc. Note that `white space' (spaces, tabs, new line characters) is ignoredinside expressions (as well as inside all GetDP objects).Expressions are denoted by the metasyntactic variable @var{expression}(remember the definition of the syntactic rules in @ref{Syntactic rules}):@example@var{expression}: ( @var{expression} ) | @var{integer} | @var{real} | @var{constant-id} | @var{quantity} | @var{argument} | @var{current-value} | @var{register-value-set} | @var{register-value-get} | @var{operator-unary} @var{expression} | @var{expression} @var{operator-binary} @var{expression} | @var{expression} @var{operator-ternary-left} @var{expression} @var{operator-ternary-right} @var{expression} | @var{built-in-function-id} [ < @var{expression-list} > ] < @{ @var{expression-cst-list} @} > | @var{function-id} [ < @var{expression-list} > ] | < Real | Complex > [ @var{expression} ] | Dt [ @var{expression} ] | AtAnteriorTimeStep [ @var{expression}, @var{integer} ] | Order [ @var{quantity} ] | Trace [ @var{expression}, @var{group-id} ] | @var{expression} ##@var{integer}@end example@noindent The following sections introduce the quantities that can appear inexpressions, i.e., constant terminals (@var{integer}, @var{real}) andconstant expression identifiers (@var{constant-id},@var{expression-cst-list}), discretized fields (@var{quantity}), arguments(@var{argument}), current values (@var{current-value}), register values(@var{register-value-set}, @var{register-value-get}), operators(@var{operator-unary}, @var{operator-binary}, @var{operator-ternary-left},@var{operator-ternary-right}) and built-in or user-defined functions(@var{built-in-function-id}, @var{function-id}). The last seven cases inthis definition permit to cast an expression as real or complex, get thetime derivative or evaluate an expression at an anterior time step, retrievethe interpolation order of a discretized quantity, evaluate the trace of anexpression, and print the value of an expression for debugging purposes.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -