/FluidMechanics/Burgers/GeneralisedBurgers/src/GeneralisedBurgersExample.f90

http://github.com/xyan075/examples · Fortran Modern · 409 lines · 182 code · 51 blank · 176 comment · 0 complexity · f7e5936a798e59da55b406e151902173 MD5 · raw file

  1. !> \file
  2. !> \author David Ladd
  3. !> \brief This is an example program to solve a generalised Burgers's equation using OpenCMISS calls.
  4. !>
  5. !> \section LICENSE
  6. !>
  7. !> Version: MPL 1.1/GPL 2.0/LGPL 2.1
  8. !>
  9. !> The contents of this file are subject to the Mozilla Public License
  10. !> Version 1.1 (the "License"); you may not use this file except in
  11. !> compliance with the License. You may obtain a copy of the License at
  12. !> http://www.mozilla.org/MPL/
  13. !>
  14. !> Software distributed under the License is distributed on an "AS IS"
  15. !> basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  16. !> License for the specific language governing rights and limitations
  17. !> under the License.
  18. !>
  19. !> The Original Code is OpenCMISS
  20. !>
  21. !> The Initial Developer of the Original Code is University of Auckland,
  22. !> Auckland, New Zealand and University of Oxford, Oxford, United
  23. !> Kingdom. Portions created by the University of Auckland and University
  24. !> of Oxford are Copyright (C) 2007 by the University of Auckland and
  25. !> the University of Oxford. All Rights Reserved.
  26. !>
  27. !> Contributor(s):
  28. !>
  29. !> Alternatively, the contents of this file may be used under the terms of
  30. !> either the GNU General Public License Version 2 or later (the "GPL"), or
  31. !> the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  32. !> in which case the provisions of the GPL or the LGPL are applicable instead
  33. !> of those above. If you wish to allow use of your version of this file only
  34. !> under the terms of either the GPL or the LGPL, and not to allow others to
  35. !> use your version of this file under the terms of the MPL, indicate your
  36. !> decision by deleting the provisions above and replace them with the notice
  37. !> and other provisions required by the GPL or the LGPL. If you do not delete
  38. !> the provisions above, a recipient may use your version of this file under
  39. !> the terms of any one of the MPL, the GPL or the LGPL.
  40. !>
  41. !> \example ClassicalField/Burgers/src/GeneralisedBurgersExample.f90
  42. !! Example program to solve a generalised Burgers equation using OpenCMISS calls.
  43. !! \htmlinclude ClassicalField/Burgers/history.html
  44. !<
  45. !> Main program
  46. PROGRAM GENERALISEDBURGERSEXAMPLE
  47. USE OPENCMISS
  48. USE MPI
  49. #ifdef WIN32
  50. USE IFQWIN
  51. #endif
  52. IMPLICIT NONE
  53. !-----------------------------------------------------------------------------------------------------------
  54. ! PROGRAM VARIABLES AND TYPES
  55. !-----------------------------------------------------------------------------------------------------------
  56. !Test program parameters
  57. REAL(CMISSDP), PARAMETER :: LENGTH=3.0_CMISSDP
  58. INTEGER(CMISSIntg), PARAMETER :: NUMBER_GLOBAL_X_ELEMENTS=6
  59. REAL(CMISSDP), PARAMETER :: START_TIME=0.0_CMISSDP
  60. REAL(CMISSDP), PARAMETER :: STOP_TIME=0.1_CMISSDP
  61. REAL(CMISSDP), PARAMETER :: TIME_INCREMENT=0.01_CMISSDP
  62. INTEGER(CMISSIntg), PARAMETER :: CoordinateSystemUserNumber=1
  63. INTEGER(CMISSIntg), PARAMETER :: RegionUserNumber=2
  64. INTEGER(CMISSIntg), PARAMETER :: BasisUserNumber=3
  65. INTEGER(CMISSIntg), PARAMETER :: GeneratedMeshUserNumber=4
  66. INTEGER(CMISSIntg), PARAMETER :: MeshUserNumber=5
  67. INTEGER(CMISSIntg), PARAMETER :: DecompositionUserNumber=6
  68. INTEGER(CMISSIntg), PARAMETER :: GeometricFieldUserNumber=7
  69. INTEGER(CMISSIntg), PARAMETER :: EquationsSetFieldUserNumber=8
  70. INTEGER(CMISSIntg), PARAMETER :: DependentFieldUserNumber=9
  71. INTEGER(CMISSIntg), PARAMETER :: MaterialsFieldUserNumber=10
  72. INTEGER(CMISSIntg), PARAMETER :: EquationsSetUserNumber=11
  73. INTEGER(CMISSIntg), PARAMETER :: ProblemUserNumber=12
  74. INTEGER(CMISSIntg), PARAMETER :: ControlLoopNode=0
  75. INTEGER(CMISSIntg), PARAMETER :: AnalyticFieldUserNumber=13
  76. INTEGER(CMISSIntg), PARAMETER :: SolverUserNumber=1
  77. !Program variables
  78. !Program types
  79. TYPE(CMISSBasisType) :: Basis
  80. TYPE(CMISSCoordinateSystemType) :: CoordinateSystem,WorldCoordinateSystem
  81. TYPE(CMISSDecompositionType) :: Decomposition
  82. TYPE(CMISSEquationsType) :: Equations
  83. TYPE(CMISSEquationsSetType) :: EquationsSet
  84. TYPE(CMISSFieldType) :: AnalyticField,DependentField,EquationsSetField,GeometricField,MaterialsField
  85. TYPE(CMISSFieldsType) :: Fields
  86. TYPE(CMISSGeneratedMeshType) :: GeneratedMesh
  87. TYPE(CMISSMeshType) :: Mesh
  88. TYPE(CMISSProblemType) :: Problem
  89. TYPE(CMISSControlLoopType) :: ControlLoop
  90. TYPE(CMISSRegionType) :: Region,WorldRegion
  91. TYPE(CMISSSolverType) :: DynamicSolver,NonlinearSolver,LinearSolver
  92. TYPE(CMISSSolverEquationsType) :: SolverEquations
  93. TYPE(CMISSBoundaryConditionsType) :: BoundaryConditions
  94. #ifdef WIN32
  95. !Quickwin type
  96. LOGICAL :: QUICKWIN_STATUS=.FALSE.
  97. TYPE(WINDOWCONFIG) :: QUICKWIN_WINDOW_CONFIG
  98. #endif
  99. !Generic CMISS variables
  100. INTEGER(CMISSIntg) :: NumberOfComputationalNodes,ComputationalNodeNumber
  101. INTEGER(CMISSIntg) :: EquationsSetIndex
  102. INTEGER(CMISSIntg) :: Err
  103. LOGICAL :: LINEAR_SOLVER_DIRECT_FLAG
  104. #ifdef WIN32
  105. !Initialise QuickWin
  106. QUICKWIN_WINDOW_CONFIG%TITLE="General Output" !Window title
  107. QUICKWIN_WINDOW_CONFIG%NUMTEXTROWS=-1 !Max possible number of rows
  108. QUICKWIN_WINDOW_CONFIG%MODE=QWIN$SCROLLDOWN
  109. !Set the window parameters
  110. QUICKWIN_STATUS=SETWINDOWCONFIG(QUICKWIN_WINDOW_CONFIG)
  111. !If attempt fails set with system estimated values
  112. IF(.NOT.QUICKWIN_STATUS) QUICKWIN_STATUS=SETWINDOWCONFIG(QUICKWIN_WINDOW_CONFIG)
  113. #endif
  114. !Intialise OpenCMISS
  115. CALL CMISSInitialise(WorldCoordinateSystem,WorldRegion,Err)
  116. CALL CMISSErrorHandlingModeSet(CMISS_ERRORS_TRAP_ERROR,Err)
  117. CALL CMISSOutputSetOn("Burgers1DAnalytic",Err)
  118. !Get the computational nodes information
  119. CALL CMISSComputationalNumberOfNodesGet(NumberOfComputationalNodes,Err)
  120. CALL CMISSComputationalNodeNumberGet(ComputationalNodeNumber,Err)
  121. !-----------------------------------------------------------------------------------------------------------
  122. !COORDINATE SYSTEM
  123. !-----------------------------------------------------------------------------------------------------------
  124. !Start the creation of a new RC coordinate system
  125. CALL CMISSCoordinateSystem_Initialise(CoordinateSystem,Err)
  126. CALL CMISSCoordinateSystem_CreateStart(CoordinateSystemUserNumber,CoordinateSystem,Err)
  127. !Set the coordinate system to be 1D
  128. CALL CMISSCoordinateSystem_DimensionSet(CoordinateSystem,1,Err)
  129. !Finish the creation of the coordinate system
  130. CALL CMISSCoordinateSystem_CreateFinish(CoordinateSystem,Err)
  131. !-----------------------------------------------------------------------------------------------------------
  132. !REGION
  133. !-----------------------------------------------------------------------------------------------------------
  134. !Start the creation of the region
  135. CALL CMISSRegion_Initialise(Region,Err)
  136. CALL CMISSRegion_CreateStart(RegionUserNumber,WorldRegion,Region,Err)
  137. CALL CMISSRegion_LabelSet(Region,"BurgersRegion",Err)
  138. !Set the regions coordinate system to the 1D RC coordinate system that we have created
  139. CALL CMISSRegion_CoordinateSystemSet(Region,CoordinateSystem,Err)
  140. !Finish the creation of the region
  141. CALL CMISSRegion_CreateFinish(Region,Err)
  142. !-----------------------------------------------------------------------------------------------------------
  143. !BASIS
  144. !-----------------------------------------------------------------------------------------------------------
  145. !Start the creation of a basis
  146. CALL CMISSBasis_Initialise(Basis,Err)
  147. CALL CMISSBasis_CreateStart(BasisUserNumber,Basis,Err)
  148. CALL CMISSBasis_TypeSet(Basis,CMISS_BASIS_LAGRANGE_HERMITE_TP_TYPE,Err)
  149. CALL CMISSBasis_NumberOfXiSet(Basis,1,Err)
  150. !Set the basis xi interpolation and number of Gauss points
  151. CALL CMISSBasis_InterpolationXiSet(Basis,[CMISS_BASIS_LINEAR_LAGRANGE_INTERPOLATION],Err)
  152. CALL CMISSBasis_QuadratureNumberOfGaussXiSet(Basis,[3],Err)
  153. !Finish the creation of the basis
  154. CALL CMISSBasis_CreateFinish(Basis,Err)
  155. !-----------------------------------------------------------------------------------------------------------
  156. !MESH
  157. !-----------------------------------------------------------------------------------------------------------
  158. !Start the creation of a generated mesh in the region
  159. CALL CMISSGeneratedMesh_Initialise(GeneratedMesh,Err)
  160. CALL CMISSGeneratedMesh_CreateStart(GeneratedMeshUserNumber,Region,GeneratedMesh,Err)
  161. !Set up a regular x mesh
  162. CALL CMISSGeneratedMesh_TypeSet(GeneratedMesh,CMISS_GENERATED_MESH_REGULAR_MESH_TYPE,Err)
  163. !Set the default basis
  164. CALL CMISSGeneratedMesh_BasisSet(GeneratedMesh,Basis,Err)
  165. !Define the mesh on the region
  166. CALL CMISSGeneratedMesh_ExtentSet(GeneratedMesh,[LENGTH],Err)
  167. CALL CMISSGeneratedMesh_NumberOfElementsSet(GeneratedMesh,[NUMBER_GLOBAL_X_ELEMENTS],Err)
  168. !Finish the creation of a generated mesh in the region
  169. CALL CMISSMesh_Initialise(Mesh,Err)
  170. CALL CMISSGeneratedMesh_CreateFinish(GeneratedMesh,MeshUserNumber,Mesh,Err)
  171. !-----------------------------------------------------------------------------------------------------------
  172. !GEOMETRIC FIELD
  173. !-----------------------------------------------------------------------------------------------------------
  174. !Create a decomposition
  175. CALL CMISSDecomposition_Initialise(Decomposition,Err)
  176. CALL CMISSDecomposition_CreateStart(DecompositionUserNumber,Mesh,Decomposition,Err)
  177. !Set the decomposition to be a general decomposition with the specified number of domains
  178. CALL CMISSDecomposition_TypeSet(Decomposition,CMISS_DECOMPOSITION_CALCULATED_TYPE,Err)
  179. CALL CMISSDecomposition_NumberOfDomainsSet(Decomposition,NumberOfComputationalNodes,Err)
  180. !Finish the decomposition
  181. CALL CMISSDecomposition_CreateFinish(Decomposition,Err)
  182. !Start to create a default (geometric) field on the region
  183. CALL CMISSField_Initialise(GeometricField,Err)
  184. CALL CMISSField_CreateStart(GeometricFieldUserNumber,Region,GeometricField,Err)
  185. !Set the decomposition to use
  186. CALL CMISSField_MeshDecompositionSet(GeometricField,Decomposition,Err)
  187. !Set the scaling to use
  188. CALL CMISSField_ScalingTypeSet(GeometricField,CMISS_FIELD_NO_SCALING,Err)
  189. !Set the domain to be used by the field components.
  190. CALL CMISSField_ComponentMeshComponentSet(GeometricField,CMISS_FIELD_U_VARIABLE_TYPE,1,1,Err)
  191. !Finish creating the field
  192. CALL CMISSField_CreateFinish(GeometricField,Err)
  193. !Update the geometric field parameters
  194. CALL CMISSGeneratedMesh_GeometricParametersCalculate(GeneratedMesh,GeometricField,Err)
  195. !-----------------------------------------------------------------------------------------------------------
  196. !EQUATIONS SETS
  197. !-----------------------------------------------------------------------------------------------------------
  198. !Create the equations_set for a Generalised Burgers's equation
  199. CALL CMISSEquationsSet_Initialise(EquationsSet,Err)
  200. CALL CMISSField_Initialise(EquationsSetField,Err)
  201. CALL CMISSEquationsSet_CreateStart(EquationsSetUserNumber,Region,GeometricField,CMISS_EQUATIONS_SET_FLUID_MECHANICS_CLASS, &
  202. & CMISS_EQUATIONS_SET_BURGERS_EQUATION_TYPE,CMISS_EQUATIONS_SET_GENERALISED_BURGERS_SUBTYPE,EquationsSetFieldUserNumber, &
  203. & EquationsSetField,EquationsSet,Err)
  204. !Finish creating the equations set
  205. CALL CMISSEquationsSet_CreateFinish(EquationsSet,Err)
  206. !-----------------------------------------------------------------------------------------------------------
  207. ! DEPENDENT FIELD
  208. !-----------------------------------------------------------------------------------------------------------
  209. !Create the equations set dependent field variables
  210. CALL CMISSField_Initialise(DependentField,Err)
  211. CALL CMISSEquationsSet_DependentCreateStart(EquationsSet,DependentFieldUserNumber,DependentField,Err)
  212. !Finish the equations set dependent field variables
  213. CALL CMISSEquationsSet_DependentCreateFinish(EquationsSet,Err)
  214. !-----------------------------------------------------------------------------------------------------------
  215. ! MATERIALS FIELD
  216. !-----------------------------------------------------------------------------------------------------------
  217. !Create the equations set material field variables
  218. CALL CMISSField_Initialise(MaterialsField,Err)
  219. CALL CMISSEquationsSet_MaterialsCreateStart(EquationsSet,MaterialsFieldUserNumber,MaterialsField,Err)
  220. !Finish the equations set material field variables
  221. CALL CMISSEquationsSet_MaterialsCreateFinish(EquationsSet,Err)
  222. !Initialise materials field
  223. !Set A
  224. CALL CMISSField_ComponentValuesInitialise(MaterialsField,CMISS_FIELD_U_VARIABLE_TYPE,CMISS_FIELD_VALUES_SET_TYPE, &
  225. & 1,1.0_CMISSDP,Err)
  226. !Set B
  227. CALL CMISSField_ComponentValuesInitialise(MaterialsField,CMISS_FIELD_U_VARIABLE_TYPE,CMISS_FIELD_VALUES_SET_TYPE, &
  228. & 2,-1.0_CMISSDP,Err)
  229. !Set C
  230. CALL CMISSField_ComponentValuesInitialise(MaterialsField,CMISS_FIELD_U_VARIABLE_TYPE,CMISS_FIELD_VALUES_SET_TYPE, &
  231. & 3,1.0_CMISSDP,Err)
  232. !-----------------------------------------------------------------------------------------------------------
  233. ! ANALYTIC FIELD
  234. !-----------------------------------------------------------------------------------------------------------
  235. !Create the equations set analytic field variables
  236. CALL CMISSField_Initialise(AnalyticField,Err)
  237. CALL CMISSEquationsSet_AnalyticCreateStart(EquationsSet,CMISS_EQUATIONS_SET_GENERALISED_BURGERS_EQUATION_ONE_DIM_2, &
  238. & AnalyticFieldUserNumber,AnalyticField,Err)
  239. !Finish the equations set analytic field variables
  240. CALL CMISSEquationsSet_AnalyticCreateFinish(EquationsSet,Err)
  241. !-----------------------------------------------------------------------------------------------------------
  242. ! EQUATIONS
  243. !-----------------------------------------------------------------------------------------------------------
  244. !Create the equations set equations
  245. CALL CMISSEquations_Initialise(Equations,Err)
  246. CALL CMISSEquationsSet_EquationsCreateStart(EquationsSet,Equations,Err)
  247. !Set the equations matrices sparsity type (Sparse/Full)
  248. CALL CMISSEquations_SparsityTypeSet(Equations,CMISS_EQUATIONS_FULL_MATRICES,Err)
  249. !Set the equations set output (NoOutput/TimingOutput/MatrixOutput/SolverMatrix/ElementMatrixOutput)
  250. CALL CMISSEquations_OutputTypeSet(Equations,CMISS_EQUATIONS_ELEMENT_MATRIX_OUTPUT,Err)
  251. !Finish the equations set equations
  252. CALL CMISSEquationsSet_EquationsCreateFinish(EquationsSet,Err)
  253. !-----------------------------------------------------------------------------------------------------------
  254. !PROBLEM
  255. !-----------------------------------------------------------------------------------------------------------
  256. !Create the problem
  257. CALL CMISSProblem_Initialise(Problem,Err)
  258. CALL CMISSProblem_CreateStart(ProblemUserNumber,Problem,Err)
  259. !Set the problem to be a static Burgers problem
  260. CALL CMISSProblem_SpecificationSet(Problem,CMISS_PROBLEM_FLUID_MECHANICS_CLASS,CMISS_PROBLEM_BURGERS_EQUATION_TYPE, &
  261. & CMISS_PROBLEM_DYNAMIC_BURGERS_SUBTYPE,Err)
  262. !Finish the creation of a problem.
  263. CALL CMISSProblem_CreateFinish(Problem,Err)
  264. !Create the problem control
  265. CALL CMISSControlLoop_Initialise(ControlLoop,Err)
  266. CALL CMISSProblem_ControlLoopCreateStart(Problem,Err)
  267. !Get the control loop
  268. CALL CMISSProblem_ControlLoopGet(Problem,CMISS_CONTROL_LOOP_NODE,ControlLoop,Err)
  269. !Set the times
  270. CALL CMISSControlLoop_TimesSet(ControlLoop,START_TIME,STOP_TIME,TIME_INCREMENT,Err)
  271. !Set the output timing
  272. CALL CMISSControlLoop_TimeOutputSet(ControlLoop,1,Err)
  273. !Finish creating the problem control loop
  274. CALL CMISSProblem_ControlLoopCreateFinish(Problem,Err)
  275. !-----------------------------------------------------------------------------------------------------------
  276. !SOLVER
  277. !-----------------------------------------------------------------------------------------------------------
  278. !Start the creation of the problem solvers
  279. CALL CMISSSolver_Initialise(DynamicSolver,Err)
  280. CALL CMISSSolver_Initialise(NonlinearSolver,Err)
  281. CALL CMISSSolver_Initialise(LinearSolver,Err)
  282. CALL CMISSProblem_SolversCreateStart(Problem,Err)
  283. !Get the dymamic solver
  284. CALL CMISSProblem_SolverGet(Problem,CMISS_CONTROL_LOOP_NODE,SolverUserNumber,DynamicSolver,Err)
  285. !Set the output type
  286. CALL CMISSSolver_OutputTypeSet(DynamicSolver,CMISS_SOLVER_MATRIX_OUTPUT,Err)
  287. !Set theta
  288. CALL CMISSSolver_DynamicThetaSet(DynamicSolver,0.5_CMISSDP,Err)
  289. !Get the dynamic nonlinear solver
  290. CALL CMISSSolver_DynamicNonlinearSolverGet(DynamicSolver,NonlinearSolver,Err)
  291. !Set the nonlinear Jacobian type
  292. !CALL CMISSSolver_NewtonJacobianCalculationTypeSet(NonlinearSolver,CMISS_SOLVER_NEWTON_JACOBIAN_FD_CALCULATED,Err)
  293. CALL CMISSSolver_NewtonJacobianCalculationTypeSet(NonlinearSolver,CMISS_SOLVER_NEWTON_JACOBIAN_EQUATIONS_CALCULATED,Err)
  294. !Set the line search
  295. CALL CMISSSolver_NewtonLineSearchTypeSet(NonlinearSolver,CMISS_SOLVER_NEWTON_LINESEARCH_NONE,Err)
  296. !Set the output type
  297. CALL CMISSSolver_OutputTypeSet(NonlinearSolver,CMISS_SOLVER_MATRIX_OUTPUT,Err)
  298. !Get the dynamic nonlinear linear solver
  299. CALL CMISSSolver_NewtonLinearSolverGet(NonlinearSolver,LinearSolver,Err)
  300. !Set the output type
  301. CALL CMISSSolver_OutputTypeSet(LinearSolver,CMISS_SOLVER_MATRIX_OUTPUT,Err)
  302. !Set the solver settings
  303. LINEAR_SOLVER_DIRECT_FLAG=.FALSE.
  304. IF(LINEAR_SOLVER_DIRECT_FLAG) THEN
  305. CALL CMISSSolver_LinearTypeSet(LinearSolver,CMISS_SOLVER_LINEAR_DIRECT_SOLVE_TYPE,Err)
  306. CALL CMISSSolver_LibraryTypeSet(LinearSolver,CMISS_SOLVER_MUMPS_LIBRARY,Err)
  307. ELSE
  308. CALL CMISSSolver_LinearTypeSet(LinearSolver,CMISS_SOLVER_LINEAR_ITERATIVE_SOLVE_TYPE,Err)
  309. CALL CMISSSolver_LinearIterativeMaximumIterationsSet(LinearSolver,10000,Err)
  310. CALL CMISSSolver_LinearIterativeGMRESRestartSet(LinearSolver,50,Err)
  311. ENDIF
  312. !Finish the creation of the problem solver
  313. CALL CMISSProblem_SolversCreateFinish(Problem,Err)
  314. !-----------------------------------------------------------------------------------------------------------
  315. !SOLVER EQUATIONS
  316. !-----------------------------------------------------------------------------------------------------------
  317. !Create the problem solver equations
  318. CALL CMISSSolver_Initialise(LinearSolver,Err)
  319. CALL CMISSSolverEquations_Initialise(SolverEquations,Err)
  320. CALL CMISSProblem_SolverEquationsCreateStart(Problem,Err)
  321. !Get the dynamic solver equations
  322. CALL CMISSSolver_Initialise(DynamicSolver,Err)
  323. CALL CMISSProblem_SolverGet(Problem,CMISS_CONTROL_LOOP_NODE,1,DynamicSolver,Err)
  324. CALL CMISSSolver_SolverEquationsGet(DynamicSolver,SolverEquations,Err)
  325. !Set the solver equations sparsity (Sparse/Full)
  326. CALL CMISSSolverEquations_SparsityTypeSet(SolverEquations,CMISS_SOLVER_FULL_MATRICES,Err)
  327. !Add in the equations set
  328. CALL CMISSSolverEquations_EquationsSetAdd(SolverEquations,EquationsSet,EquationsSetIndex,Err)
  329. !Finish the creation of the problem solver equations
  330. CALL CMISSProblem_SolverEquationsCreateFinish(Problem,Err)
  331. !-----------------------------------------------------------------------------------------------------------
  332. !BOUNDARY CONDITIONS
  333. !-----------------------------------------------------------------------------------------------------------
  334. !Set up the boundary conditions
  335. !Create the equations set boundary conditions
  336. CALL CMISSBoundaryConditions_Initialise(BoundaryConditions,Err)
  337. CALL CMISSSolverEquations_BoundaryConditionsCreateStart(SolverEquations,BoundaryConditions,Err)
  338. CALL CMISSSolverEquations_BoundaryConditionsAnalytic(SolverEquations,Err)
  339. CALL CMISSSolverEquations_BoundaryConditionsCreateFinish(SolverEquations,Err)
  340. !-----------------------------------------------------------------------------------------------------------
  341. !SOLVE
  342. !-----------------------------------------------------------------------------------------------------------
  343. !Solve the problem
  344. CALL CMISSProblem_Solve(Problem,Err)
  345. !-----------------------------------------------------------------------------------------------------------
  346. !OUTPUT
  347. !-----------------------------------------------------------------------------------------------------------
  348. !Output Analytic analysis
  349. Call CMISSAnalyticAnalysisOutput(DependentField,"BurgersAnalytic_1D",Err)
  350. !export fields
  351. CALL CMISSFields_Initialise(Fields,Err)
  352. CALL CMISSFields_Create(Region,Fields,Err)
  353. CALL CMISSFields_NodesExport(Fields,"Burgers_1D","FORTRAN",Err)
  354. CALL CMISSFields_ElementsExport(Fields,"Burgers_1D","FORTRAN",Err)
  355. CALL CMISSFields_Finalise(Fields,Err)
  356. WRITE(*,'(A)') "Program successfully completed."
  357. STOP
  358. END PROGRAM GENERALISEDBURGERSEXAMPLE