Skip to content

Commit

Permalink
Merge pull request #128 from tclune/feature/tclune/#126-state-intent-…
Browse files Browse the repository at this point in the history
…internal

Fixes #126 - STATEINTENT_INTERNAL
Co-authored by https://github.com/tclune
  • Loading branch information
theurich authored May 15, 2023
2 parents 013f236 + b0b7e62 commit 107dc0b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/Superstructure/State/doc/State_options.tex
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ \subsubsection{ESMF\_STATEINTENT}
Contains data to be imported into a component.
\item [ESMF\_STATEINTENT\_EXPORT]
Contains data to be exported out of a component.
\item [ESMF\_STATEINTENT\_INTERNAL]
Contains data that is not exposed outside of a component.
\item [ESMF\_STATEINTENT\_UNSPECIFIED]
The intent has not been specified.
\end{description}
Expand Down
7 changes: 5 additions & 2 deletions src/Superstructure/State/src/ESMF_StateAPI.cppF90
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,8 @@ StateAddRepListMacro(ESMF_State,State,nestedStateList,state,nestedStateList(i)%s
! \item[{[stateintent]}]
! Import or Export {\tt ESMF\_State}. Valid values are
! {\tt ESMF\_STATEINTENT\_IMPORT}, {\tt ESMF\_STATEINTENT\_EXPORT},
! or {\tt ESMF\_STATEINTENT\_UNSPECIFIED} The default
! {\tt ESMF\_STATEINTENT\_INTERNAL},
! or {\tt ESMF\_STATEINTENT\_UNSPECIFIED}. The default
! is {\tt ESMF\_STATEINTENT\_UNSPECIFIED}.
! \item[{[arrayList]}]
! A list (Fortran array) of {\tt ESMF\_Array}s.
Expand Down Expand Up @@ -1180,7 +1181,7 @@ ESMF_INIT_CHECK_DEEP(ESMF_RouteHandleGetInit,routehandleList(i),rc)
! When set to {\tt .true.}, additionally returns information from
! nested States
! \item[{[stateintent]}]
! Returns the type, e.g., Import or Export, of this {\tt ESMF\_State}.
! Returns the type, e.g., Import, Export, or Internal, of this {\tt ESMF\_State}.
! Possible values are listed in Section~\ref{const:stateintent}.
! \item[{[itemCount]}]
! Count of items in this {\tt ESMF\_State}.
Expand Down Expand Up @@ -1970,6 +1971,8 @@ type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
msgbuf = "Import State"
case (ESMF_STATEINTENT_EXPORT%state)
msgbuf = "Export State"
case (ESMF_STATEINTENT_INTERNAL%state)
msgbuf = "Internal State"
case (ESMF_STATEINTENT_UNSPECIFIED%state)
msgbuf = "Unspecified intent direction"
case (ESMF_STATEINTENT_INVALID%state)
Expand Down
6 changes: 4 additions & 2 deletions src/Superstructure/State/src/ESMF_StateItem.F90
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,9 @@ module ESMF_StateItemMod
type(ESMF_StateIntent_Flag), parameter :: &
ESMF_STATEINTENT_IMPORT = ESMF_StateIntent_Flag(1), &
ESMF_STATEINTENT_EXPORT = ESMF_StateIntent_Flag(2), &
ESMF_STATEINTENT_UNSPECIFIED = ESMF_StateIntent_Flag(3), &
ESMF_STATEINTENT_INVALID = ESMF_StateIntent_Flag(4)
ESMF_STATEINTENT_INTERNAL = ESMF_StateIntent_Flag(3), &
ESMF_STATEINTENT_UNSPECIFIED = ESMF_StateIntent_Flag(4), &
ESMF_STATEINTENT_INVALID = ESMF_StateIntent_Flag(5)

!------------------------------------------------------------------------------
! ! ESMF_StateClass
Expand Down Expand Up @@ -276,6 +277,7 @@ module ESMF_StateItemMod
ESMF_STATEITEM_NOTFOUND
public ESMF_StateItemConstruct
public ESMF_StateIntent_Flag, ESMF_STATEINTENT_IMPORT, ESMF_STATEINTENT_EXPORT, &
ESMF_STATEINTENT_INTERNAL, &
ESMF_STATEINTENT_UNSPECIFIED
#if 0
public ESMF_NeededFlag, ESMF_NEEDED, &
Expand Down
1 change: 1 addition & 0 deletions src/Superstructure/State/src/ESMF_StateTypes.F90
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ module ESMF_StateTypesMod
public ESMF_StateItemWrap
public ESMF_StateItemConstruct
public ESMF_StateIntent_Flag, ESMF_STATEINTENT_IMPORT, ESMF_STATEINTENT_EXPORT, &
ESMF_STATEINTENT_INTERNAL, &
ESMF_STATEINTENT_UNSPECIFIED
#if ESMF_ENABLE_NEEDED
public ESMF_NeededFlag, ESMF_NEEDED, &
Expand Down
2 changes: 2 additions & 0 deletions src/epilogue/src/ESMF_ComplianceIC.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,8 @@ recursive subroutine checkState(prefix, referenceName, state, rc)
tempString = "ESMF_STATEINTENT_IMPORT"
else if (stateintent==ESMF_STATEINTENT_EXPORT) then
tempString = "ESMF_STATEINTENT_EXPORT"
else if (stateintent==ESMF_STATEINTENT_INTERNAL) then
tempString = "ESMF_STATEINTENT_INTERNAL"
else if (stateintent==ESMF_STATEINTENT_UNSPECIFIED) then
tempString = "ESMF_STATEINTENT_UNSPECIFIED"
else
Expand Down

0 comments on commit 107dc0b

Please sign in to comment.