38 use json_module,
only : json_file
68 procedure, pass(this) :: init_from_attributes => &
81 type(json_file),
intent(inout) :: json
82 class(
case_t),
intent(inout),
target :: case
83 character(len=:),
allocatable :: fieldname
84 character(len=20) :: fields(3)
88 call json_get(json,
"field", fieldname)
90 fields(1) =
"weak_grad_" // trim(fieldname) //
"_x"
91 fields(2) =
"weak_grad_" // trim(fieldname) //
"_y"
92 fields(3) =
"weak_grad_" // trim(fieldname) //
"_z"
94 call json%add(
"fields", fields)
96 call this%init_base(json,
case)
97 call this%writer%init(json,
case)
105 character(len=*) :: fieldname
110 "weak_grad_" // fieldname //
"_x")
112 "weak_grad_" // fieldname //
"_y")
114 "weak_grad_" // fieldname //
"_z")
122 call this%free_base()
123 call this%writer%free()
135 real(kind=
rp),
intent(in) :: t
136 integer,
intent(in) :: tstep
138 call opgrad(this%grad_x%x, this%grad_y%x, this%grad_z%x, this%u%x,&
139 this%case%fluid%c_Xh)
Retrieves a parameter by name or assigns a provided default value. In the latter case also adds the m...
Retrieves a parameter by name or throws an error.
Defines a simulation case.
Defines a registry for storing solution fields.
type(field_registry_t), target, public neko_field_registry
Global field registry.
Implements the field_writer_t type.
Implements fld_file_output_t.
Utilities for retrieving parameters from the case files.
integer, parameter, public dp
integer, parameter, public sp
integer, parameter, public rp
Global precision used in computations.
subroutine, public opgrad(ux, uy, uz, u, coef, es, ee)
Compute the weak gradient of a scalar field, i.e. the gradient multiplied by the mass matrix.
Simulation components are objects that encapsulate functionality that can be fit to a particular comp...
Implements the weak_grad_t type.
subroutine weak_grad_init_from_json(this, json, case)
Constructor from json.
subroutine weak_grad_init_from_attributes(this, fieldname)
Actual constructor.
subroutine weak_grad_compute(this, t, tstep)
Compute the weak_grad field.
subroutine weak_grad_free(this)
Destructor.
A simulation component that writes a 3d field to a file.
A simple output saving a list of fields to a .fld file.
Base abstract class for simulation components.
A simulation component that computes the weak gradient of a field. Wraps the opgrad operator.