diff --git a/src/fortran/burgers_static.F90 b/src/fortran/burgers_static.F90 index 44d1d8e..d2254d8 100644 --- a/src/fortran/burgers_static.F90 +++ b/src/fortran/burgers_static.F90 @@ -29,7 +29,6 @@ PROGRAM burgers_static INTEGER(CMISSIntg), PARAMETER :: EquationsSetUserNumber=11 INTEGER(CMISSIntg), PARAMETER :: ProblemUserNumber=12 INTEGER(CMISSIntg), PARAMETER :: ControlLoopNode=0 - INTEGER(CMISSIntg), PARAMETER :: AnalyticFieldUserNumber=13 INTEGER(CMISSIntg), PARAMETER :: SolverUserNumber=1 !Program variables @@ -62,7 +61,7 @@ PROGRAM burgers_static TYPE(cmfe_DecompositionType) :: Decomposition TYPE(cmfe_EquationsType) :: Equations TYPE(cmfe_EquationsSetType) :: EquationsSet - TYPE(cmfe_FieldType) :: GeometricField,EquationsSetField,DependentField,MaterialsField,AnalyticField + TYPE(cmfe_FieldType) :: GeometricField,EquationsSetField,DependentField,MaterialsField TYPE(cmfe_FieldsType) :: Fields TYPE(cmfe_GeneratedMeshType) :: GeneratedMesh TYPE(cmfe_MeshType) :: Mesh @@ -70,14 +69,13 @@ PROGRAM burgers_static TYPE(cmfe_ProblemType) :: Problem TYPE(cmfe_ControlLoopType) :: ControlLoop TYPE(cmfe_RegionType) :: Region,WorldRegion - TYPE(cmfe_SolverType) :: Solver, LinearSolver, NonlinearSolver + TYPE(cmfe_SolverType) :: Solver,LinearSolver,NonlinearSolver TYPE(cmfe_SolverEquationsType) :: SolverEquations LOGICAL :: EXPORT_FIELD !Generic CMISS variables INTEGER(CMISSIntg) :: NumberOfComputationalNodes,ComputationalNodeNumber,BoundaryNodeDomain - INTEGER(CMISSIntg) :: EquationsSetIndex - INTEGER(CMISSIntg) :: Err + INTEGER(CMISSIntg) :: EquationsSetIndex,Err !Intialise OpenCMISS CALL cmfe_Initialise(WorldCoordinateSystem,WorldRegion,Err) @@ -246,19 +244,7 @@ PROGRAM burgers_static !Finish the equations set material field variables CALL cmfe_EquationsSet_MaterialsCreateFinish(EquationsSet,Err) !Initialise materials field - CALL cmfe_Field_ComponentValuesInitialise(MaterialsField,CMFE_FIELD_U_VARIABLE_TYPE,CMFE_FIELD_VALUES_SET_TYPE, & - & 1,NU_PARAM,Err) - - !----------------------------------------------------------------------------------------------------------- - ! ANALYTIC FIELD - !----------------------------------------------------------------------------------------------------------- - - !Create the equations set analytic field variables - !CALL cmfe_Field_Initialise(AnalyticField,Err) - !CALL cmfe_EquationsSet_AnalyticCreateStart(EquationsSet,CMFE_EQUATIONS_SET_BURGERS_EQUATION_ONE_DIM_1,AnalyticFieldUserNumber, & - ! & AnalyticField,Err) - !Finish the equations set analytic field variables - !CALL cmfe_EquationsSet_AnalyticCreateFinish(EquationsSet,Err) + CALL cmfe_Field_ComponentValuesInitialise(MaterialsField,CMFE_FIELD_U_VARIABLE_TYPE,CMFE_FIELD_VALUES_SET_TYPE,1,NU_PARAM,Err) !----------------------------------------------------------------------------------------------------------- ! EQUATIONS @@ -273,9 +259,6 @@ PROGRAM burgers_static !Finish the equations set equations CALL cmfe_EquationsSet_EquationsCreateFinish(EquationsSet,Err) - !Create the equations set boundary conditions - !CALL cmfe_EquationsSetBoundaryConditionsAnalytic(EquationsSet,Err) - !----------------------------------------------------------------------------------------------------------- !PROBLEM !----------------------------------------------------------------------------------------------------------- @@ -292,7 +275,7 @@ PROGRAM burgers_static CALL cmfe_Problem_ControlLoopCreateStart(Problem,Err) !Get the control loop CALL cmfe_Problem_ControlLoopGet(Problem,CMFE_CONTROL_LOOP_NODE,ControlLoop,Err) - CALL cmfe_ControlLoop_OutputTypeSet(ControlLoop,CMFE_CONTROL_LOOP_PROGRESS_OUTPUT,Err) + CALL cmfe_ControlLoop_OutputTypeSet(ControlLoop,CMFE_CONTROL_LOOP_NO_OUTPUT,Err) !Finish creating the problem control loop CALL cmfe_Problem_ControlLoopCreateFinish(Problem,Err) @@ -387,17 +370,16 @@ PROGRAM burgers_static !----------------------------------------------------------------------------------------------------------- !Solve the problem + WRITE(*,'(A)') "Solving problem..." CALL cmfe_Problem_Solve(Problem,Err) + WRITE(*,'(A)') "Problem solved!" !----------------------------------------------------------------------------------------------------------- !OUTPUT !----------------------------------------------------------------------------------------------------------- - !Output Analytic analysis - !Call cmfe_AnalyticAnalysis_Output(DependentField,"BurgersAnalytics_1D",Err) - !export fields - EXPORT_FIELD=.TRUE. + EXPORT_FIELD=.FALSE. IF(EXPORT_FIELD) THEN CALL cmfe_Fields_Initialise(Fields,Err) CALL cmfe_Fields_Create(Region,Fields,Err) diff --git a/src/fortran/expected_results/burgers_static.part0.exelem b/src/fortran/expected_results/output/STATIC_SOLUTION.part0.exelem similarity index 100% rename from src/fortran/expected_results/burgers_static.part0.exelem rename to src/fortran/expected_results/output/STATIC_SOLUTION.part0.exelem diff --git a/src/fortran/expected_results/burgers_static.part0.exnode b/src/fortran/expected_results/output/STATIC_SOLUTION.part0.exnode similarity index 100% rename from src/fortran/expected_results/burgers_static.part0.exnode rename to src/fortran/expected_results/output/STATIC_SOLUTION.part0.exnode diff --git a/src/fortran/visualiseBurgersStatic.cmgui b/src/fortran/visualiseBurgersStatic.cmgui index 39b78c3..4fd6c37 100644 --- a/src/fortran/visualiseBurgersStatic.cmgui +++ b/src/fortran/visualiseBurgersStatic.cmgui @@ -1,33 +1,5 @@ -#gfx read node burgers_static.part0.exnode; -#gfx read elem burgers_static.part0.exelem; - -$dt=1; # frequency -$steps=100; # number of time steps -$cores=1; # number of processors - -$w=500; # width of the graphical window -$h=1000; # height of the graphical window - -#Read in the sequence of nodal positions. -for($i=0; $i < $steps; $i=$i+$dt) - { - $time = $i/$dt - for ($j=0; $j < $cores; $j=$j+1) - { - $filename = sprintf("./output/MainTime_%01d.part%01d.exnode", $i, $j); - print "Reading $filename time $time\n"; - gfx read node "$filename" time $i; - #$filename = sprintf("./Burgers_%d.jpg", $i); - #gfx print window 1 jpg file "$filename" height 1000 width 1000 - } - } - -#Read in the element description -for ($k=0;$k<$cores;$k=$k+1) - { - $filename = sprintf("./output/MainTime_0.part%01d.exelem", $k); - gfx read element "$filename"; - } +gfx read node "./output/STATIC_SOLUTION.part0.exnode"; +gfx read element "./output/STATIC_SOLUTION.part0.exelem"; gfx define faces egroup BurgersRegion