Commit cb930d5b authored by Michael Turner's avatar Michael Turner

Merge remote-tracking branch 'origin/master' into ticket/65-Userguide-IncNS-WrongSign

parents 0568f468 8c9438e2
......@@ -21,6 +21,9 @@ v5.0.0
- Remove unused files from BasicUtils (!841)
- Remove checks for old boost versions which are no longer supported (!841)
- Refactor ParseUtils to be more consistent (!843)
- Added support for using the distance to a specific region (e.g. outlet) in the
function definitions for the Absorption Forcing (!769)
- Improve performance of DisContField2D::v_ExtractTracePhys (!824)
**NekMesh**:
- Add feature to read basic 2D geo files as CAD (!731)
......@@ -32,18 +35,36 @@ v5.0.0
- Fix issue with reading CCM files due to definition of default arrays
rather than a vector (!797)
- Fix inverted triangles and small memory issue in surface meshing (!798)
- Update for the CAD system, more advance self-healing and analysis (!822)
- Additional curve types in GEO reader: BSpline, Circle, Ellipse (!800)
- Fix default command line argument value (!823)
**FieldConvert**:
- Add input module for Semtex field files (!777)
- Fixed interppoints module (!760)
- Move StreamFunction utility to a FieldConvert module (!809)
- Extend wss module to compressible flows (!810)
- Allow explicitly setting bool options of FieldConvert modules as false (!811)
- Enable output to multiple files (!844)
- Allow using xml file without expansion tag in FieldConvert (!849)
**CompressibleFlowSolver**
- Add 3D regression tests (!567)
**Documentation**:
- Added the developer-guide repository as a submodule (!751)
v4.4.2
------
**Library**
- Fix evaluation of points (e.g. HistoryPoints, Interpolation to pts) close to
the interface of two elements (!836)
- Fix deadlock in Hdf5 with homogeneous expansions (!858)
**NekMesh**
- Fix missing periodic boundary meshing and boundary layer mesh adjustment
configurations in 2D (!859)
v4.4.1
------
**Library**
......@@ -61,13 +82,19 @@ v4.4.1
- Fix deadlock with HDF5 input (!786)
- Fix missing entriess in LibUtilities::kPointsTypeStr (!792)
- Fix compiler warnings with CommDataType (!793)
- Fix ability to set default implementation in Collections and added an option
- Fix ability to set default implementation in Collections and added an option
to set eNoCollections in FieldConvert as default (!789)
- Fix performance issue in ProcessIsoContour in relation to memory consumption
(!821)
- Fix performance issue with ExtractPhysToBndElmt (!796)
- Fix available classes being listed multiple times (!817)
- Fix Intel compiler warnings (!837)
- Fix overwriting and backup of chk/fld files on slow file systes (!741)
- Fix DriverAdaptive with second order IMEX (!850)
- Fixed typo in eIMEXGear part (!854)
- Added regression tests for IMEXOrder1, IMEXOrder2, IMEXOrder3, MCNAB,
IMEXGear, CNAB, 2nd order IMEX-DIRK, 3rd order IMEX-DIRK (!854)
- Fix bug due to subtractive cancellation in polylib routines (!778)
**Documentation**:
- Fix sign of the viscous term in the velocity correction scheme equations in
......@@ -91,13 +118,21 @@ v4.4.1
**IncNavierStokesSolver**
- Fix an initialisation issue when using an additional advective field (!779)
- Fix MovingBody boundary condition (!852)
**Utilities**
- Fix vtkToFld missing dependency which prevented compiling with VTK 7.1 (!808)
**Documentation**
- Added missing details on artificial viscosity and dealising to compressible
flow solver user guide (!846)
**Packaging**
- Added missing package for FieldUtils library (!755)
**ADRSolver:**
- Fix UnsteadyAdvectionDiffusion with DG (!855)
v4.4.0
------
**Library**:
......
......@@ -24,19 +24,28 @@ if(NOT DEFINED OCE_DIR)
# Check for OSX needs to come first because UNIX evaluates to true on OSX
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(DEFINED MACPORTS_PREFIX)
find_package(OCE 0.15 QUIET HINTS ${MACPORTS_PREFIX}/Library/Frameworks)
find_package(OCE 0.17 QUIET HINTS ${MACPORTS_PREFIX}/Library/Frameworks)
elseif(DEFINED HOMEBREW_PREFIX)
find_package(OCE 0.15 QUIET HINTS ${HOMEBREW_PREFIX}/Cellar/oce/*)
find_package(OCE 0.17 QUIET HINTS ${HOMEBREW_PREFIX}/Cellar/oce/*)
endif()
elseif(UNIX)
set(OCE_DIR "/usr/local/share/cmake/")
endif()
endif()
find_package(OCE 0.15 QUIET)
find_package(OCE 0.17 QUIET)
if(OCE_FOUND)
message(STATUS "-- OpenCASCADE Community Edition has been found.")
set(OCC_INCLUDE_DIR ${OCE_INCLUDE_DIRS})
message(STATUS "OpenCASCADE Community Edition has been found.")
#check that the OCE package has CAF modules
FIND_LIBRARY(OCC_CAF_LIBRARY TKXCAF ${OCE_INCLUDE_DIRS}/../../lib )
if(OCC_CAF_LIBRARY)
set(OCC_INCLUDE_DIR ${OCE_INCLUDE_DIRS})
else()
message(STATUS "-- OCE does not have CAF libraries, will build from source.")
endif()
else(OCE_FOUND) #look for OpenCASCADE
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
......@@ -45,7 +54,6 @@ else(OCE_FOUND) #look for OpenCASCADE
/usr/local/opt/opencascade/include
/opt/opencascade/include
/opt/opencascade/inc
/opt/local/include/oce
)
FIND_LIBRARY(OCC_LIBRARY TKernel
/usr/lib
......@@ -56,6 +64,7 @@ else(OCE_FOUND) #look for OpenCASCADE
)
if(OCC_LIBRARY)
message(STATUS "OpenCASCADE has been found.")
GET_FILENAME_COMPONENT(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH)
IF(NOT OCC_INCLUDE_DIR)
FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
......@@ -112,9 +121,11 @@ if(OCC_FOUND)
TKSTEPAttr
TKHLR
TKFeat
TKXCAF
TKXDESTEP
)
if(OCC_VERSION_STRING VERSION_LESS 6.7)
if(OCC_VERSION_STRING VERSION_LESS 6.8)
MESSAGE(SEND_ERROR "OCC version too low")
endif(OCC_VERSION_STRING VERSION_LESS 6.7)
endif(OCC_VERSION_STRING VERSION_LESS 6.8)
message(STATUS "-- Found OCE/OpenCASCADE with OCC version: ${OCC_VERSION_STRING}")
endif(OCC_FOUND)
......@@ -22,9 +22,34 @@ IF(NEKTAR_USE_MESHGEN)
IF (THIRDPARTY_BUILD_OCE)
INCLUDE(ExternalProject)
SET(OCC_LIBRARIES_TMP PTKernel TKernel TKMath TKBRep TKIGES TKSTEP TKSTEPAttr
TKSTEP209 TKSTEPBase TKShapeSchema TKGeomBase TKGeomAlgo TKG3d TKG2d
TKXSBase TKPShape TKTopAlgo TKShHealing)
SET(OCC_LIBRARIES_TMP
TKFillet
TKMesh
TKernel
TKG2d
TKG3d
TKMath
TKIGES
TKSTL
TKShHealing
TKXSBase
TKBool
TKBO
TKBRep
TKTopAlgo
TKGeomAlgo
TKGeomBase
TKOffset
TKPrim
TKSTEP
TKSTEPBase
TKSTEPAttr
TKHLR
TKFeat
TKXCAF
TKXDESTEP
)
FOREACH(OCC_LIB ${OCC_LIBRARIES_TMP})
LIST(APPEND OCC_LIBRARIES ${TPDIST}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}${OCC_LIB}${CMAKE_SHARED_LIBRARY_SUFFIX})
ENDFOREACH()
......@@ -51,8 +76,6 @@ IF(NEKTAR_USE_MESHGEN)
-DOCE_INSTALL_PREFIX:PATH=${TPDIST}
-DOCE_TESTING=OFF
-DOCE_VISUALISATION=OFF
-DOCE_DISABLE_X11=ON
-DOCE_OCAF=OFF
${TPSRC}/oce-0.17
)
......
......@@ -221,7 +221,7 @@ to screen;
\item \inltt{TInf} farfield temperature (i.e. $T_{\infty}$). Default value = 288.15 $K$;
\item \inltt{Twall} temperature at the wall when isothermal boundary
conditions are employed (i.e. $T_{w}$). Default value = 300.15$K$;
\item \inltt{uInf} farfield $X$-component of the velocity (i.e. $u_{\infty}$). Default value = 0.1 $m/s$;
\item \inltt{uint} farfield $X$-component of the velocity (i.e. $u_{\infty}$). Default value = 0.1 $m/s$;
\item \inltt{vInf} farfield $Y$-component of the velocity (i.e. $v_{\infty}$). Default value = 0.0 $m/s$;
\item \inltt{wInf} farfield $Z$-component of the velocity (i.e. $w_{\infty}$). Default value = 0.0 $m/s$;
\item \inltt{mu} dynamic viscosity (i.e. $\mu_{\infty}$). Default value = 1.78e-05 $Pa s$;
......@@ -437,7 +437,6 @@ Compressible flow is characterised by abrupt changes in density within the flow
\begin{equation}\label{eq:sensor}
S_e=\frac{||\rho^p_e-\rho^{p-1}_e||_{L_2}}{||\rho_e^p||_{L_2}}
\end{equation}
by default the comparison is made with the $p-1$ solution, but this can be changed by setting the parameter \inltt{SensorOffset}.
An artificial diffusion term is introduced locally to the Euler equations to deal with flow discontinuity and the consequential numerical oscillations. Two models are implemented, a non-smooth and a smooth artificial viscosity model.
\subsubsection{Non-smooth artificial viscosity model}
For the non-smooth artificial viscosity model the added artificial viscosity is constant in each element and discontinuous between the elements. The Euler system is augmented by an added laplacian term on right hand side of equation \ref{eq:euler}. The diffusivity of the system is controlled by a variable viscosity coefficient $\epsilon$. The value of $\epsilon$ is dependent on $\epsilon_0$, which is the maximum viscosity that is dependent on the polynomial order ($p$), the mesh size ($h$) and the maximum wave speed and the local sensor value. Based on pre-defined sensor threshold values, the variable viscosity is set accordingly
......@@ -450,6 +449,24 @@ For the non-smooth artificial viscosity model the added artificial viscosity is
\end{array}
\right.
\end{equation}
To enable the non-smooth viscosity model, the following line has to be added to the \inltt{SOLVERINFO} section:
\begin{lstlisting}[style=XmlStyle]
<SOLVERINFO>
<I PROPERTY="ShockCaptureType" VALUE="NonSmooth" />
<SOLVERINFO>
\end{lstlisting}
The diffusivity is controlled by the following parameters:
\begin{lstlisting}[style=XmlStyle]
<PARAMETERS>
<P> Skappa = -1.3 </P>
<P> Kappa = 0.2 </P>
<P> mu0 = 1.0 </P>
</PARAMETERS>
\end{lstlisting}
where mu0 is the maximum values for the viscosity coefficient,
Kappa is half of the width of the transition interval and Skappa is
the value of the centre of the interval.
\begin{figure}[!htbp]
\begin{center}
\includegraphics[width = 0.47 \textwidth]{img/Mach_P4.pdf}
......@@ -458,6 +475,7 @@ For the non-smooth artificial viscosity model the added artificial viscosity is
\label{fig:}
\end{center}
\end{figure}
\subsubsection{Smooth artificial viscosity model}
For the smooth artificial viscosity model an extra PDE for the artificial viscosity is appended to the Euler system
\begin{equation}\label{eq:eulerplusvis}\begin{split}
......@@ -512,54 +530,52 @@ The polynomial order in each element can be adjusted based on the sensor value t
\right.
\end{equation}
For now, the threshold values $s_e$, $s_{ds}$, $s_{sm}$ and $s_{fl}$ are determined empirically by looking at the sensor distribution in the domain. Once these values are set, two .txt files are outputted, one that has the composites called VariablePComposites.txt and one with the expansions called VariablePExpansions.txt. These values have to copied into a new .xml file to create the adapted mesh.
\subsection{De-Aliasing Techniques}
Aliasing effects, arising as a consequence of the nonlinearity of the
underlying problem, need to be address to stabilise the simulations. Aliasing
appears when nonlinear quantities are calculated at an insufficient number of
quadrature points. We can identify two types of nonlinearities:
\begin{itemize}
\item PDE nonlinearities, related to the nonlinear and quasi-linear fluxes.
\item Geometrical nonlinearities, related to the deformed/curves meshes.
\end{itemize}
We consider two de-aliasing strategies based on the concept of consistent integration:
\subsection{Quasi-1D nozzle flow}
A quasi-1D inviscid flow (flow with area variation) can be obtained using the
\inltt{Quasi1D} forcing in a 1D solution of the Euler equations:
\begin{lstlisting}[style=XMLStyle]
<FORCING>
<FORCE TYPE="Quasi1D">
<AREAFCN> Area </AREAFCN>
</FORCE>
</FORCING>
\end{lstlisting}
in this case a function named \inltt{Area} must be specified in the \inltt{CONDITIONS} section of the session file.
\begin{itemize}
\item Local dealiasing: It only targets the PDE-aliasing sources, applying a consistent integration of them locally.
\item Global dealiasing: It targets both the PDE and the geometrical-aliasing sources. It requires a richer quadrature order to consistently integrate the nonlinear fluxes, the geometric factors, the mass matrix and the boundary term.
\end{itemize}
In this case, it is possible to prescribe the inflow conditions in terms of stagnation properties (density and pressure)
by using the following boundary condition
\begin{lstlisting}[style=XmlStyle]
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="rho" USERDEFINEDTYPE="StagnationInflow" VALUE="rhoStag" />
<D VAR="rhou" USERDEFINEDTYPE="StagnationInflow" VALUE="0" />
<D VAR="E" USERDEFINEDTYPE="StagnationInflow" VALUE="pStag/(Gamma-1)" />
</REGION>
</BOUNDARYCONDITIONS>
\end{lstlisting}
Since Nektar++ tackles separately the PDE and geometric aliasing during the
projection and solution of the equations, to consistently
integrate all the nonlinearities in the compressible
NavierStokes equations, the quadrature points should
be selected based on the maximum order of the nonlinearities:
\begin{equation}
Q_{min}= P_{exp}+\frac{max(2P_{exp},P_{geom})}{2} + \frac{3}{2}
\end{equation}
\subsection{Axi-symmetric flow}
An axi-symmetric inviscid flow (with symmetry axis on x=0) can be obtained using
the \inltt{AxiSymmetric} forcing in a 2D solution of the Euler equations:
\begin{lstlisting}[style=XMLStyle]
<FORCING>
<FORCE TYPE="AxiSymmetric">
</FORCE>
</FORCING>
\end{lstlisting}
The \inltt{StagnationInflow} boundary condition can also be used in this case.
where $Q_{min}$ is the minimum required number of quadrature
points to exactly integrate the highest-degree of nonlinearity,
$P_{exp}$ being the order of the polynomial expansion and $P_{geom}$
being the geometric order of the mesh. Bear in mind thatwe are
using a discontinuous discretisation, meaning that aliasing
effect are not fully controlled, since the boundary terms
introduce non-polynomial functions into the problem.
To enable the global de-aliasing technique, modify the number of quadrature
points by:
Also, by defining the geometry with \inltt{<GEOMETRY DIM="2" SPACE="3">} (i.e. a two-dimensional
mesh in three-dimensional space) and adding the \inltt{rhow} variable, we obtain an axi-symmetric
flow with swirl, in which case the \inltt{StagnationInflow} boundary condition allows prescribing \inltt{rhow}:
\begin{lstlisting}[style=XmlStyle]
<BOUNDARYCONDITIONS>
<REGION REF="0">
<D VAR="rho" USERDEFINEDTYPE="StagnationInflow" VALUE="rhoStag" />
<D VAR="rhou" USERDEFINEDTYPE="StagnationInflow" VALUE="0" />
<D VAR="rhov" USERDEFINEDTYPE="StagnationInflow" VALUE="0" />
<D VAR="rhow" USERDEFINEDTYPE="StagnationInflow" VALUE="x" />
<D VAR="E" USERDEFINEDTYPE="StagnationInflow" VALUE="pStag/(Gamma-1)" />
</REGION>
</BOUNDARYCONDITIONS>
<E COMPOSITE="[101]"
BASISTYPE="Modified_A,Modified_A"
NUMMODES="7,7"
POINTSTYPE="GaussLobattoLegendre,GaussLobattoLegendre"
NUMPOINTS="14,14"
FIELDS="rho,rhou,rhov,E"
/>
\end{lstlisting}
where \inltt{NUMMODES} corresponds to $P$+1, where $P$ is the order of the polynomial
used to approximate the solution. \inltt{NUMPOINTS} specifies the number of quadrature
points.
......@@ -24,9 +24,17 @@ This force type allows the user to apply an absorption layer (essentially a poro
<COEFF> [FUNCTION NAME] <COEFF/>
<REFFLOW> [FUNCTION NAME] <REFFLOW/>
<REFFLOWTIME> [FUNCTION NAME] <REFFLOWTIME/>
<BOUNDARYREGIONS> 1,4 <BOUNDARYREGIONS/>
</FORCE>
\end{lstlisting}
If a list of \inltt{BOUNDARYREGIONS} is specified, the distance to these regions is available as additional variable \inltt{r} in the definition of the \inltt{COEFF} function:
\begin{lstlisting}[style=XMLStyle]
<FUNCTION NAME="AbsorptionCoefficient">
<E VAR="p" EVARS="r" VALUE="-5000 * exp(-0.5 * (3*r / 0.4)^2)" />
<E VAR="u" EVARS="r" VALUE="-5000 * exp(-0.5 * (3*r / 0.4)^2)" />
<E VAR="v" EVARS="r" VALUE="-5000 * exp(-0.5 * (3*r / 0.4)^2)" />
</FUNCTION>
\end{lstlisting}
\subsection{Body}
This force type specifies the name of a body forcing function expressed in the \inltt{CONDITIONS} section.
......
......@@ -21,3 +21,11 @@ ADD_NEKTAR_TEST(NodalDemo_Prism_Interp_P7)
ADD_NEKTAR_TEST(NodalDemo_Tet_Deriv_P8)
ADD_NEKTAR_TEST(NodalDemo_Tet_Integral_P6)
ADD_NEKTAR_TEST(NodalDemo_Tet_Interp_P7)
ADD_NEKTAR_TEST(TimeIntegrationDemoIMEXGear)
ADD_NEKTAR_TEST(TimeIntegrationDemoIMEXOrder1)
ADD_NEKTAR_TEST(TimeIntegrationDemoIMEXOrder2)
ADD_NEKTAR_TEST(TimeIntegrationDemoIMEXOrder3)
ADD_NEKTAR_TEST(TimeIntegrationDemoDIRKIMEXOrder2)
ADD_NEKTAR_TEST(TimeIntegrationDemoDIRKIMEXOrder3)
ADD_NEKTAR_TEST(TimeIntegrationDemoCNAB)
ADD_NEKTAR_TEST(TimeIntegrationDemoMCNAB)
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --NTimeIntegrationMethod 7</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.10135</value>
</metric>
</metrics>
</test>
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --NTimeIntegrationMethod 4</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.0616905</value>
</metric>
</metrics>
</test>
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --NTimeIntegrationMethod 5</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.061634</value>
</metric>
</metrics>
</test>
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --NTimeIntegrationMethod 6</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.315262</value>
</metric>
</metrics>
</test>
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --NTimeIntegrationMethod 1</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.224678</value>
</metric>
</metrics>
</test>
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --NTimeIntegrationMethod 2</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.0798986</value>
</metric>
</metrics>
</test>
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --NTimeIntegrationMethod 3</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.0610636</value>
</metric>
</metrics>
</test>
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description>Test for time integration schemes</description>
<executable>TimeIntegrationDemo</executable>
<parameters>--Npoints 100 --Ntimesteps 100 --NTimeIntegrationMethod 8</parameters>
<metrics>
<metric type="L2" id="1">
<value tolerance="1e-12">0.134315</value>
</metric>
</metrics>
</test>
......@@ -350,7 +350,16 @@ void Interpolator::Interpolate(
// Obtain Element and LocalCoordinate to interpolate
int elmtid = m_expInField[0]->GetExpIndex(Scoords, Lcoords,
NekConstants::kNekZeroTol);
NekConstants::kGeomFactorsTol);
// we use kGeomFactorsTol as tolerance, while StdPhysEvaluate has
// kNekZeroTol hardcoded, so we need to limit Lcoords to not produce
// a ton of warnings
for(int j = 0; j < nInDim; ++j)
{
Lcoords[j] = std::max(Lcoords[j], -1.0);
Lcoords[j] = std::min(Lcoords[j], 1.0);
}
if (elmtid >= 0)
{
......@@ -431,7 +440,16 @@ void Interpolator::Interpolate(
// Obtain Element and LocalCoordinate to interpolate
int elmtid = m_expInField[0]->GetExpIndex(coords, Lcoords,
NekConstants::kNekZeroTol);
NekConstants::kGeomFactorsTol);
// we use kGeomFactorsTol as tolerance, while StdPhysEvaluate has
// kNekZeroTol hardcoded, so we need to limit Lcoords to not produce
// a ton of warnings
for(int j = 0; j < nInDim; ++j)
{
Lcoords[j] = std::max(Lcoords[j], -1.0);
Lcoords[j] = std::min(Lcoords[j], 1.0);
}
if (elmtid >= 0)
{
......
......@@ -109,7 +109,7 @@ void Module::RegisterConfig(string key, string val)
it->second.m_beenSet = true;
if (it->second.m_isBool)
if (it->second.m_isBool && val=="")
{
it->second.m_value = "1";
}
......
......@@ -196,7 +196,8 @@ public:
virtual ModulePriority GetModulePriority() = 0;
FIELD_UTILS_EXPORT void RegisterConfig(std::string key, std::string value);
FIELD_UTILS_EXPORT void RegisterConfig(std::string key,
std::string value = "");
FIELD_UTILS_EXPORT void PrintConfig();
FIELD_UTILS_EXPORT void SetDefaults();
......
......@@ -104,7 +104,7 @@ void OutputFileBase::Process(po::variables_map &vm)
}
if (m_f->m_writeBndFld)
{
int nfields = m_f->m_exp.size();
int nfields = m_f->m_variables.size();
int normdim = m_f->m_graph->GetMeshDimension();
// Prepare for normals output
......
......@@ -613,7 +613,7 @@ void OutputTecplotBinary::WriteDoubleOrFloat(std::ofstream &outfile,
Array<OneD, NekDouble> &data)
{
// Data format: either double or single depending on user options
bool useDoubles = m_config["double"].m_beenSet;
bool useDoubles = m_config["double"].as<bool>();
if (useDoubles)
{
......@@ -642,7 +642,7 @@ void OutputTecplotBinary::WriteTecplotZone(std::ofstream &outfile)
Array<OneD, NekDouble> fieldMax(m_fields.num_elements());
// Data format: either double or single depending on user options
bool useDoubles = m_config["double"].m_beenSet;
bool useDoubles = m_config["double"].as<bool>();
if ((m_oneOutputFile && m_f->m_comm->GetRank() == 0) || !m_oneOutputFile)
{
......
......@@ -59,7 +59,7 @@ ProcessBoundaryExtract::ProcessBoundaryExtract(FieldSharedPtr f)
// set up dafault values.
m_config["bnd"] = ConfigOption(false, "All", "Boundary to be processed");
m_config["addnormals"] =
ConfigOption(true, "NotSet", "Add normals to output");
ConfigOption(true, "0", "Add normals to output");
f->m_writeBndFld = true;
f->m_declareExpansionAsContField = true;
......@@ -72,7 +72,7 @@ ProcessBoundaryExtract::~ProcessBoundaryExtract()
void ProcessBoundaryExtract::Process(po::variables_map &vm)
{
m_f->m_addNormals = m_config["addnormals"].m_beenSet;
m_f->m_addNormals = m_config["addnormals"].as<bool>();
// Set up Field options to output boundary fld
string bvalues = m_config["bnd"].as<string>();
......
......@@ -193,13 +193,12 @@ void ProcessCreateExp::Process(po::variables_map &vm)
m_f->m_session->LoadParameter("Strip_Z", nstrips, 1);
vector<string> vars;
vector<string> vars = m_f->m_session->GetVariables();
if (vm.count("useSessionVariables"))
{
m_f->m_variables = m_f->m_session->GetVariables();
m_f->m_variables = vars;
}
nfields = m_f->m_variables.size();
vars = m_f->m_variables;
m_f->m_exp.resize(nfields * nstrips);
......
......@@ -108,7 +108,7 @@ ProcessDisplacement::ProcessDisplacement(FieldSharedPtr f)
ConfigOption(false, "", "Name of file containing high order boundary");
m_config["usevertexids"] = ConfigOption(
false, "0", "Use vertex IDs instead of face IDs for matching");
true, "0", "Use vertex IDs instead of face IDs for matching");
}
ProcessDisplacement::~ProcessDisplacement()
......@@ -129,7 +129,7 @@ void ProcessDisplacement::Process(po::variables_map &vm)
return;
}
bool useVertexIds = m_config["usevertexids"].m_beenSet;
bool useVertexIds = m_config["usevertexids"].as<bool>();
vector<string> files;
files.push_back(toFile);
......
......@@ -60,10 +60,10 @@ ProcessEquiSpacedOutput::ProcessEquiSpacedOutput(FieldSharedPtr f)
: ProcessModule(f)
{
m_config["tetonly"] =
ConfigOption(true, "NotSet", "Only process tetrahedral elements");
ConfigOption(true, "0", "Only process tetrahedral elements");
m_config["modalenergy"] =
ConfigOption(true, "NotSet", "Write output as modal energy");
ConfigOption(true, "0", "Write output as modal energy");
}
ProcessEquiSpacedOutput::~ProcessEquiSpacedOutput()
......@@ -199,7 +199,7 @@ void ProcessEquiSpacedOutput::Process(po::variables_map &vm)
for (int i = 0; i < nel; ++i)
{
e = m_f->m_exp[0]->GetExp(i);
if (m_config["tetonly"].m_beenSet)
if (m_config["tetonly"].as<bool>())
{
if (m_f->m_exp[0]->GetExp(i)->DetShapeType() !=
LibUtilities::eTetrahedron)
......@@ -365,7 +365,7 @@ void ProcessEquiSpacedOutput::Process(po::variables_map &vm)
cnt = 0;
int cnt1 = 0;
if (m_config["modalenergy"].m_beenSet)
if (m_config["modalenergy"].as<bool>())
{
Array<OneD, const NekDouble> phys = m_f->m_exp[n]->GetPhys();
for (int i = 0; i < nel; ++i)
......
......@@ -58,7 +58,7 @@ ProcessHomogeneousPlane::ProcessHomogeneousPlane(FieldSharedPtr f)
{
m_config["planeid"] = ConfigOption(false, "NotSet", "plane id to extract");
m_config["wavespace"] =
ConfigOption(true, "NotSet", "Extract plane in Fourier space");
ConfigOption(true, "0", "Extract plane in Fourier space");
}
ProcessHomogeneousPlane::~ProcessHomogeneousPlane()
......@@ -108,7 +108,7 @@ void ProcessHomogeneousPlane::Process(po::variables_map &vm)
int n = s * nfields + i;
m_f->m_exp[n] = m_f->m_exp[n]->GetPlane(plane);
if (m_config["wavespace"].m_beenSet)
if (m_config["wavespace"].as<bool>())
{
m_f->m_exp[n]->BwdTrans(m_f->m_exp[n]->GetCoeffs(),
m_f->m_exp[n]->UpdatePhys());
......