Commit 0bc75014 authored by Theresa Schollenberger's avatar Theresa Schollenberger
Browse files

[cleanup] rename VtkOutputFields to IOFields

parent 7a8b10d7
......@@ -124,16 +124,11 @@ int main(int argc, char** argv) try
auto dt = getParam<Scalar>("TimeLoop.DtInitial");
// intialize the vtk output module
// using VtkOutputFields = GetPropType<TypeTag, Properties::VtkOutputFields>;
// VtkOutputModule<TypeTag> vtkWriter(*problem, *fvGridGeometry, *gridVariables, x, problem->name());
// VtkOutputFields::init(vtkWriter); //! Add model specific output fields
// intialize the vtk output module
using VtkOutputFields = GetPropType<TypeTag, Properties::VtkOutputFields>;
using IOFields = GetPropType<TypeTag, Properties::IOFields>;
VtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
using VelocityOutput = GetPropType<TypeTag, Properties::VelocityOutput>;
vtkWriter.addVelocityOutput(std::make_shared<VelocityOutput>(*gridVariables));
VtkOutputFields::initOutputModule(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
vtkWriter.write(restartTime);
// instantiate time loop
......
......@@ -104,7 +104,7 @@ int main(int argc, char** argv) try
// the grid variables
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
auto gridVariables = std::make_shared<GridVariables>(problem, fvGridGeometry);
gridVariables->init(x, xOld);
gridVariables->init(x);
// get some time loop parameters
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
......@@ -113,9 +113,9 @@ int main(int argc, char** argv) try
auto dt = getParam<Scalar>("TimeLoop.DtInitial");
// initialize the vtk output module
using VtkOutputFields = GetPropType<TypeTag, Properties::VtkOutputFields>;
using IOFields = GetPropType<TypeTag, Properties::IOFields>;
VtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
VtkOutputFields::init(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
//add specific output
vtkWriter.addField(problem->getKxx(), "Kxx");
vtkWriter.addField(problem->getKyy(), "Kyy");
......
......@@ -202,7 +202,7 @@ int main(int argc, char** argv) try
const auto darcyName = getParam<std::string>("Problem.Name") + "_" + darcyProblem->name();
StaggeredVtkOutputModule<StokesGridVariables, decltype(stokesSol)> stokesVtkWriter(*stokesGridVariables, stokesSol, stokesName);
GetPropType<StokesTypeTag, Properties::VtkOutputFields>::initOutputModule(stokesVtkWriter);
GetPropType<StokesTypeTag, Properties::IOFields>::initOutputModule(stokesVtkWriter);
//****** uncomment the add analytical solution of v_x *****//
// stokesVtkWriter.addField(stokesProblem->getAnalyticalVelocityX(), "analyticalV_x");
......
......@@ -172,7 +172,7 @@ int main(int argc, char** argv) try
const auto darcyName = getParam<std::string>("Problem.Name") + "_" + darcyProblem->name();
StaggeredVtkOutputModule<StokesGridVariables, decltype(stokesSol)> stokesVtkWriter(*stokesGridVariables, stokesSol, stokesName);
GetPropType<StokesTypeTag, Properties::VtkOutputFields>::initOutputModule(stokesVtkWriter);
GetPropType<StokesTypeTag, Properties::IOFields>::initOutputModule(stokesVtkWriter);
stokesVtkWriter.write(0.0);
VtkOutputModule<DarcyGridVariables, GetPropType<DarcyTypeTag, Properties::SolutionVector>> darcyVtkWriter(*darcyGridVariables, sol[darcyIdx], darcyName);
......
......@@ -177,7 +177,7 @@ int main(int argc, char** argv) try
const auto darcyName = getParam<std::string>("Problem.Name") + "_" + darcyProblem->name();
StaggeredVtkOutputModule<StokesGridVariables, decltype(stokesSol)> stokesVtkWriter(*stokesGridVariables, stokesSol, stokesName);
GetPropType<StokesTypeTag, Properties::VtkOutputFields>::initOutputModule(stokesVtkWriter);
GetPropType<StokesTypeTag, Properties::IOFields>::initOutputModule(stokesVtkWriter);
stokesVtkWriter.write(0.0);
VtkOutputModule<DarcyGridVariables, GetPropType<DarcyTypeTag, Properties::SolutionVector>> darcyVtkWriter(*darcyGridVariables, sol[darcyIdx], darcyName);
......
......@@ -116,11 +116,11 @@ int main(int argc, char** argv) try
auto dt = getParam<Scalar>("TimeLoop.DtInitial");
// intialize the vtk output module
using VtkOutputFields = GetPropType<TypeTag, Properties::VtkOutputFields>;
using IOFields = GetPropType<TypeTag, Properties::IOFields>;
VtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
using VelocityOutput = GetPropType<TypeTag, Properties::VelocityOutput>;
vtkWriter.addVelocityOutput(std::make_shared<VelocityOutput>(*gridVariables));
VtkOutputFields::initOutputModule(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
// instantiate time loop
auto timeLoop = std::make_shared<TimeLoop<Scalar>>(/*start time*/0.0, dt, tEnd);
......
......@@ -187,10 +187,10 @@ int main(int argc, char** argv) try
FractureVtkOutputModule fractureVtkWriter(*fractureGridVariables, x[fractureDomainId], fractureProblem->name());
// Add model specific output fields
using MatrixVtkOutputFields = GetPropType<MatrixTypeTag, Properties::VtkOutputFields>;
using FractureVtkOutputFields = GetPropType<FractureTypeTag, Properties::VtkOutputFields>;
MatrixVtkOutputFields::initOutputModule(matrixVtkWriter);
FractureVtkOutputFields::initOutputModule(fractureVtkWriter);
using MatrixIOFields = GetPropType<MatrixTypeTag, Properties::IOFields>;
using FractureIOFields = GetPropType<FractureTypeTag, Properties::IOFields>;
MatrixIOFields::initOutputModule(matrixVtkWriter);
FractureIOFields::initOutputModule(fractureVtkWriter);
// add domain markers to output
std::vector<int> matrixDomainMarkers(matrixFvGridGeometry->gridView().size(0));
......
......@@ -125,11 +125,11 @@ int main(int argc, char** argv) try
auto dt = getParam<Scalar>("TimeLoop.DtInitial");
// intialize the vtk output module
using VtkOutputFields = GetPropType<TypeTag, Properties::VtkOutputFields>;
using IOFields = GetPropType<TypeTag, Properties::IOFields>;
VtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
using VelocityOutput = GetPropType<TypeTag, Properties::VelocityOutput>;
vtkWriter.addVelocityOutput(std::make_shared<VelocityOutput>(*gridVariables));
VtkOutputFields::initOutputModule(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
vtkWriter.write(restartTime);
// instantiate time loop
......
......@@ -99,7 +99,7 @@ int main(int argc, char** argv) try
// the grid variables
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
auto gridVariables = std::make_shared<GridVariables>(problem, fvGridGeometry);
gridVariables->init(x, xOld);
gridVariables->init(x);
// intialize the vtk output module
VtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
......
......@@ -155,14 +155,11 @@ int main(int argc, char** argv) try
auto dt = getParam<Scalar>("TimeLoop.DtInitial");
// intialize the vtk output module
using VtkOutputFields = GetPropType<TypeTag, Properties::VtkOutputFields>;
// intialize the vtk output module
using VtkOutputFields = GetPropType<TypeTag, Properties::VtkOutputFields>;
using IOFields = GetPropType<TypeTag, Properties::IOFields>;
VtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
using VelocityOutput = GetPropType<TypeTag, Properties::VelocityOutput>;
vtkWriter.addVelocityOutput(std::make_shared<VelocityOutput>(*gridVariables));
VtkOutputFields::initOutputModule(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
vtkWriter.write(restartTime);
// instantiate time loop
......
......@@ -125,11 +125,11 @@ int main(int argc, char** argv) try
auto dt = getParam<Scalar>("TimeLoop.DtInitial");
// intialize the vtk output module
using VtkOutputFields = GetPropType<TypeTag, Properties::VtkOutputFields>;
using IOFields = GetPropType<TypeTag, Properties::IOFields>;
VtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
using VelocityOutput = GetPropType<TypeTag, Properties::VelocityOutput>;
vtkWriter.addVelocityOutput(std::make_shared<VelocityOutput>(*gridVariables));
VtkOutputFields::initOutputModule(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
vtkWriter.write(restartTime);
// instantiate time loop
......
......@@ -123,11 +123,11 @@ int main(int argc, char** argv) try
auto dt = getParam<Scalar>("TimeLoop.DtInitial");
// intialize the vtk output module
using VtkOutputFields = GetPropType<TypeTag, Properties::VtkOutputFields>;
using IOFields = GetPropType<TypeTag, Properties::IOFields>;
VtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
using VelocityOutput = GetPropType<TypeTag, Properties::VelocityOutput>;
vtkWriter.addVelocityOutput(std::make_shared<VelocityOutput>(*gridVariables));
VtkOutputFields::initOutputModule(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
vtkWriter.write(restartTime);
// instantiate time loop
......
......@@ -104,7 +104,7 @@ int main(int argc, char** argv) try
// the grid variables
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
auto gridVariables = std::make_shared<GridVariables>(problem, fvGridGeometry);
gridVariables->init(x, xOld);
gridVariables->init(x);
// get some time loop parameters
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
......@@ -113,9 +113,9 @@ int main(int argc, char** argv) try
auto dt = getParam<Scalar>("TimeLoop.DtInitial");
// initialize the vtk output module
using VtkOutputFields = GetPropType<TypeTag, Properties::VtkOutputFields>;
using IOFields = GetPropType<TypeTag, Properties::IOFields>;
VtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
VtkOutputFields::init(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
//add specific output
vtkWriter.addField(problem->getKxx(), "Kxx");
vtkWriter.addField(problem->getKyy(), "Kyy");
......
......@@ -192,7 +192,7 @@ int main(int argc, char** argv) try
const auto darcyName = getParam<std::string>("Problem.Name") + "_" + darcyProblem->name();
StaggeredVtkOutputModule<StokesGridVariables, decltype(stokesSol)> stokesVtkWriter(*stokesGridVariables, stokesSol, stokesName);
GetPropType<StokesTypeTag, Properties::VtkOutputFields>::initOutputModule(stokesVtkWriter);
GetPropType<StokesTypeTag, Properties::IOFields>::initOutputModule(stokesVtkWriter);
#if EXNUMBER >= 2
stokesVtkWriter.addField(stokesProblem->getAnalyticalVelocityX(), "analyticalV_x");
......
......@@ -178,7 +178,7 @@ int main(int argc, char** argv) try
#endif
StaggeredVtkOutputModule<StokesGridVariables, decltype(stokesSol)> stokesVtkWriter(*stokesGridVariables, stokesSol, stokesName);
GetPropType<StokesTypeTag, Properties::VtkOutputFields>::initOutputModule(stokesVtkWriter);
GetPropType<StokesTypeTag, Properties::IOFields>::initOutputModule(stokesVtkWriter);
stokesVtkWriter.write(0);
VtkOutputModule<DarcyGridVariables, GetPropType<DarcyTypeTag, Properties::SolutionVector>> darcyVtkWriter(*darcyGridVariables, sol[darcyIdx], darcyName);
......
......@@ -180,7 +180,7 @@ int main(int argc, char** argv) try
const auto darcyName = getParam<std::string>("Problem.Name") + "_" + darcyProblem->name();
StaggeredVtkOutputModule<StokesGridVariables, decltype(stokesSol)> stokesVtkWriter(*stokesGridVariables, stokesSol, stokesName);
GetPropType<StokesTypeTag, Properties::VtkOutputFields>::initOutputModule(stokesVtkWriter);
GetPropType<StokesTypeTag, Properties::IOFields>::initOutputModule(stokesVtkWriter);
stokesVtkWriter.write(0.0);
VtkOutputModule<DarcyGridVariables, GetPropType<DarcyTypeTag, Properties::SolutionVector>> darcyVtkWriter(*darcyGridVariables, sol[darcyIdx], darcyName);
......
......@@ -105,7 +105,7 @@ int main(int argc, char** argv) try
// the grid variables
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
auto gridVariables = std::make_shared<GridVariables>(problem, fvGridGeometry);
gridVariables->init(x, xOld);
gridVariables->init(x);
// get some time loop parameters
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
......@@ -113,11 +113,11 @@ int main(int argc, char** argv) try
const auto maxDt = getParam<Scalar>("TimeLoop.MaxTimeStepSize");
auto dt = getParam<Scalar>("TimeLoop.DtInitial");
// intialize the vtk output module
using VtkOutputFields = GetPropType<TypeTag, Properties::VtkOutputFields>;
using IOFields = GetPropType<TypeTag, Properties::IOFields>;
VtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
using VelocityOutput = GetPropType<TypeTag, Properties::VelocityOutput>;
vtkWriter.addVelocityOutput(std::make_shared<VelocityOutput>(*gridVariables));
VtkOutputFields::initOutputModule(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
// instantiate time loop
auto timeLoop = std::make_shared<TimeLoop<Scalar>>(/*start time*/0.0, dt, tEnd);
......
......@@ -122,6 +122,12 @@ public:
return true;
}
static constexpr bool isGas(int phaseIdx)
{
assert(0 <= phaseIdx && phaseIdx < numPhases);
return phaseIdx == phase1Idx;
}
static constexpr bool isIdealGas(int phaseIdx)
{ return H2O::gasIsIdeal() && MyCompressibleComponent::gasIsIdeal(); }
......
......@@ -180,10 +180,10 @@ int main(int argc, char** argv) try
VtkOutputModule<FractureTypeTag> fractureVtkWriter(*fractureProblem, *fractureFvGridGeometry, *fractureGridVariables, x[fractureDomainId], fractureProblem->name());
// Add model specific output fields
using MatrixVtkOutputFields = typename GET_PROP_TYPE(MatrixTypeTag, VtkOutputFields);
using FractureVtkOutputFields = typename GET_PROP_TYPE(FractureTypeTag, VtkOutputFields);
MatrixVtkOutputFields::init(matrixVtkWriter);
FractureVtkOutputFields::init(fractureVtkWriter);
using MatrixIOFields = typename GET_PROP_TYPE(MatrixTypeTag, IOFields);
using FractureIOFields = typename GET_PROP_TYPE(FractureTypeTag, IOFields);
MatrixIOFields::initOutputModule(matrixVtkWriter);
FractureIOFields::initOutputModule(fractureVtkWriter);
// add domain markers to output
std::vector<int> matrixDomainMarkers(matrixFvGridGeometry->gridView().size(0));
......
......@@ -125,11 +125,11 @@ int main(int argc, char** argv) try
auto dt = getParam<Scalar>("TimeLoop.DtInitial");
// intialize the vtk output module
using VtkOutputFields = GetPropType<TypeTag, Properties::VtkOutputFields>;
using IOFields = GetPropType<TypeTag, Properties::IOFields>;
VtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
using VelocityOutput = GetPropType<TypeTag, Properties::VelocityOutput>;
vtkWriter.addVelocityOutput(std::make_shared<VelocityOutput>(*gridVariables));
VtkOutputFields::initOutputModule(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
vtkWriter.write(restartTime);
// instantiate time loop
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment