Skip to content

Commit

Permalink
Changes to address latest review
Browse files Browse the repository at this point in the history
  • Loading branch information
Cmath2 committed Dec 9, 2020
1 parent f4cc75d commit 16962cc
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 251 deletions.
16 changes: 8 additions & 8 deletions assemble/Adapt_State.F90
Original file line number Diff line number Diff line change
Expand Up @@ -990,25 +990,25 @@ subroutine adapt_state_first_timestep(states)
call copy_to_stored_values(states,"Iterated")
call relax_to_nonlinear(states)

call enforce_discrete_properties(states)
if(have_option("/timestepping/adaptive_timestep/at_first_timestep")) then
! doing this here helps metric advection get the right amount of advection
call get_option("/timestepping/timestep", dt)
call calc_cflnumber_field_based_dt(states, dt, force_calculation = .true.)
call set_option("/timestepping/timestep", dt)
end if

!Set constant particle attributes and MVF fields based on particles
call initialise_constant_particle_diagnostics(states)

call calculate_diagnostic_variables(states)
call calculate_diagnostic_variables_new(states)

!Set particle attributes and dependent fields
call get_option("/timestepping/timestep", dt)
call get_option("/timestepping/current_time", current_time)
call update_particle_attributes_and_fields(states, current_time, dt)
call calculate_diagnostic_fields_from_particles(states)

call enforce_discrete_properties(states)
if(have_option("/timestepping/adaptive_timestep/at_first_timestep")) then
! doing this here helps metric advection get the right amount of advection
call calc_cflnumber_field_based_dt(states, dt, force_calculation = .true.)
call set_option("/timestepping/timestep", dt)
end if

! Form the new metric
old_mesh => extract_mesh(states(1), topology_mesh_name)
call allocate(metric, old_mesh, "ErrorMetric")
Expand Down
357 changes: 131 additions & 226 deletions assemble/Particle_Diagnostics.F90

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions examples/particle_rayleigh_taylor_mu10/RTplot.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python3

# This sript plots up the RMS velocity:
import matplotlib.pyplot as pylab
import numpy
Expand Down
18 changes: 9 additions & 9 deletions femtools/Detector_Data_Types.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
! Copyright (C) 2006 Imperial College London and others.
!
!
! Please see the AUTHORS file in the main source directory for a full list
! of copyright holders.
!
Expand All @@ -9,7 +9,7 @@
! Imperial College London
!
! [email protected]
!
!
! This library is free software; you can redistribute it and/or
! modify it under the terms of the GNU Lesser General Public
! License as published by the Free Software Foundation,
Expand All @@ -31,11 +31,11 @@ module detector_data_types

use fldebug
use global_parameters, only : FIELD_NAME_LEN

implicit none

private

public :: detector_type, rk_gs_parameters, detector_linked_list, &
detector_list_ptr, stringlist, attr_names_type, attr_write_type, field_phase_type, &
allocate, deallocate
Expand Down Expand Up @@ -103,14 +103,14 @@ module detector_data_types
!! Have we completed the search?
logical :: search_complete
!! Pointers for detector linked lists
TYPE (detector_type), POINTER :: next=> null()
TYPE (detector_type), POINTER :: previous=> null()
type (detector_type), pointer :: next=> null()
type (detector_type), pointer :: previous=> null()
!! Pointers to temporary linked lists used during spawning and deleting.
!! These lists are used to form temporary linked lists within Particle_Diagnostics.F90
!! Temporary linked lists are created per control volume to allow for easy looping
!! over particle within that control volume during spawning and deleting.
TYPE (detector_type), POINTER :: temp_next => null()
TYPE (detector_type), POINTER :: temp_previous => null()
type (detector_type), pointer :: temp_next => null()
type (detector_type), pointer :: temp_previous => null()
end type detector_type

! Parameters for lagrangian detector movement
Expand Down
2 changes: 1 addition & 1 deletion schemas/diagnostic_algorithms.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ internal_algorithm =
element particle_attribute_array {
attribute name { xsd:string },
## Integer value corresponding to attribute position in array (starts from 1).
element integer_val {
element integer_value {
integer
}
}
Expand Down
2 changes: 1 addition & 1 deletion schemas/diagnostic_algorithms.rng
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ within the Particle_Diagnostics.F90 routine, and set via the ratio method.</a:do
<attribute name="name">
<data type="string"/>
</attribute>
<element name="integer_val">
<element name="integer_value">
<a:documentation>Integer value corresponding to attribute position in array (starts from 1).</a:documentation>
<ref name="integer"/>
</element>
Expand Down
2 changes: 0 additions & 2 deletions tests/particle_entrainment_of_dense_layer/setup_vals.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

from math import log, sqrt, pi

# List of constant values for simulations:
Expand Down
2 changes: 0 additions & 2 deletions tests/particle_stratified_stable_layer/setup_vals.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

from math import log, sqrt, pi

# List of constant values for simulations:
Expand Down
2 changes: 0 additions & 2 deletions tests/particle_stratified_unstable_layer/setup_vals.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

from math import log, sqrt, pi

# List of constant values for simulations:
Expand Down

0 comments on commit 16962cc

Please sign in to comment.