Commit da5f5e7f authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[iofields][test] Use new signature initOutputModule

parent 7ce92176
......@@ -150,7 +150,7 @@ int main(int argc, char** argv) try
// intialize the vtk output module
StaggeredVtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
using IOFields = typename GET_PROP_TYPE(TypeTag, IOFields);
IOFields::init(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
vtkWriter.addField(problem->getAnalyticalPressureSolution(), "pressureExact");
vtkWriter.addField(problem->getAnalyticalVelocitySolution(), "velocityExact");
vtkWriter.addFaceField(problem->getAnalyticalVelocitySolutionOnFace(), "faceVelocityExact");
......
......@@ -144,7 +144,7 @@ int main(int argc, char** argv) try
// intialize the vtk output module
using IOFields = typename GET_PROP_TYPE(TypeTag, IOFields);
StaggeredVtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
IOFields::init(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
vtkWriter.write(0.0);
// instantiate time loop
......
......@@ -136,7 +136,7 @@ int main(int argc, char** argv) try
// intialize the vtk output module
using IOFields = typename GET_PROP_TYPE(TypeTag, IOFields);
StaggeredVtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
IOFields::init(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
vtkWriter.addField(problem->getAnalyticalPressureSolution(), "pressureExact");
vtkWriter.addField(problem->getAnalyticalVelocitySolution(), "velocityExact");
vtkWriter.addFaceField(problem->getAnalyticalVelocitySolutionOnFace(), "faceVelocityExact");
......
......@@ -125,7 +125,7 @@ int main(int argc, char** argv) try
// intialize the vtk output module
using IOFields = typename GET_PROP_TYPE(TypeTag, IOFields);
StaggeredVtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
IOFields::init(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
vtkWriter.addField(problem->getAnalyticalPressureSolution(), "pressureExact");
vtkWriter.addField(problem->getAnalyticalVelocitySolution(), "velocityExact");
vtkWriter.addFaceField(problem->getAnalyticalVelocitySolutionOnFace(), "faceVelocityExact");
......
......@@ -133,7 +133,7 @@ int main(int argc, char** argv) try
// intialize the vtk output module
using IOFields = typename GET_PROP_TYPE(TypeTag, IOFields);
StaggeredVtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
IOFields::init(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
vtkWriter.write(0.0);
// the assembler with time loop for instationary problem
......
......@@ -148,7 +148,7 @@ int main(int argc, char** argv) try
// intialize the vtk output module
using IOFields = typename GET_PROP_TYPE(TypeTag, IOFields);
StaggeredVtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
IOFields::init(vtkWriter); //!< Add model specific output fields
IOFields::initOutputModule(vtkWriter); //!< Add model specific output fields
vtkWriter.addField(problem->getDeltaRho(), "deltaRho");
vtkWriter.write(0.0);
......
......@@ -148,7 +148,7 @@ int main(int argc, char** argv) try
// intialize the vtk output module
using IOFields = typename GET_PROP_TYPE(TypeTag, IOFields);
StaggeredVtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
IOFields::init(vtkWriter); //! Add model specific output fields
IOFields::initOutputModule(vtkWriter); //! Add model specific output fields
vtkWriter.write(0.0);
// the assembler with time loop for instationary problem
......
......@@ -225,12 +225,12 @@ int main(int argc, char** argv) try
// intialize the vtk output module
using SolutionVector0 = std::decay_t<decltype(sol[domain0Idx])>;
VtkOutputModule<GridVariables0, SolutionVector0> vtkWriter0(*gridVariables0, sol[domain0Idx], problem0->name());
GET_PROP_TYPE(SubTypeTag0, IOFields)::init(vtkWriter0);
GET_PROP_TYPE(SubTypeTag0, IOFields)::initOutputModule(vtkWriter0);
vtkWriter0.write(0.0);
using SolutionVector1 = std::decay_t<decltype(sol[domain1Idx])>;
VtkOutputModule<GridVariables1, SolutionVector1> vtkWriter1(*gridVariables1, sol[domain1Idx], problem1->name());
GET_PROP_TYPE(SubTypeTag1, IOFields)::init(vtkWriter1);
GET_PROP_TYPE(SubTypeTag1, IOFields)::initOutputModule(vtkWriter1);
vtkWriter1.write(0.0);
// instantiate time loop
......
......@@ -210,12 +210,12 @@ int main(int argc, char** argv) try
// intialize the vtk output module
using SolutionVector0 = std::decay_t<decltype(sol[domain0Idx])>;
VtkOutputModule<GridVariables0, SolutionVector0> vtkWriter0(*gridVariables0, sol[domain0Idx], problem0->name());
GET_PROP_TYPE(SubTypeTag0, IOFields)::init(vtkWriter0);
GET_PROP_TYPE(SubTypeTag0, IOFields)::initOutputModule(vtkWriter0);
vtkWriter0.write(0.0);
using SolutionVector1 = std::decay_t<decltype(sol[domain1Idx])>;
VtkOutputModule<GridVariables1, SolutionVector1> vtkWriter1(*gridVariables1, sol[domain1Idx], problem1->name());
GET_PROP_TYPE(SubTypeTag1, IOFields)::init(vtkWriter1);
GET_PROP_TYPE(SubTypeTag1, IOFields)::initOutputModule(vtkWriter1);
vtkWriter1.write(0.0);
// instantiate time loop
......
......@@ -187,13 +187,13 @@ int main(int argc, char** argv) try
const auto darcyName = getParam<std::string>("Problem.Name") + "_" + darcyProblem->name();
StaggeredVtkOutputModule<StokesGridVariables, typename GET_PROP_TYPE(StokesTypeTag, SolutionVector)> stokesVtkWriter(*stokesGridVariables, stokesSol, stokesName);
GET_PROP_TYPE(StokesTypeTag, IOFields)::init(stokesVtkWriter);
GET_PROP_TYPE(StokesTypeTag, IOFields)::initOutputModule(stokesVtkWriter);
stokesVtkWriter.write(0.0);
VtkOutputModule<DarcyGridVariables, typename GET_PROP_TYPE(DarcyTypeTag, SolutionVector)> darcyVtkWriter(*darcyGridVariables, sol[darcyIdx], darcyName);
using DarcyVelocityOutput = typename GET_PROP_TYPE(DarcyTypeTag, VelocityOutput);
darcyVtkWriter.addVelocityOutput(std::make_shared<DarcyVelocityOutput>(*darcyGridVariables));
GET_PROP_TYPE(DarcyTypeTag, IOFields)::init(darcyVtkWriter);
GET_PROP_TYPE(DarcyTypeTag, IOFields)::initOutputModule(darcyVtkWriter);
darcyVtkWriter.write(0.0);
// the assembler with time loop for instationary problem
......
......@@ -188,13 +188,13 @@ int main(int argc, char** argv) try
const auto darcyName = getParam<std::string>("Problem.Name") + "_" + darcyProblem->name();
StaggeredVtkOutputModule<StokesGridVariables, typename GET_PROP_TYPE(StokesTypeTag, SolutionVector)> stokesVtkWriter(*stokesGridVariables, stokesSol, stokesName);
GET_PROP_TYPE(StokesTypeTag, IOFields)::init(stokesVtkWriter);
GET_PROP_TYPE(StokesTypeTag, IOFields)::initOutputModule(stokesVtkWriter);
stokesVtkWriter.write(0.0);
VtkOutputModule<DarcyGridVariables, typename GET_PROP_TYPE(DarcyTypeTag, SolutionVector)> darcyVtkWriter(*darcyGridVariables, sol[darcyIdx], darcyName);
using DarcyVelocityOutput = typename GET_PROP_TYPE(DarcyTypeTag, VelocityOutput);
darcyVtkWriter.addVelocityOutput(std::make_shared<DarcyVelocityOutput>(*darcyGridVariables));
GET_PROP_TYPE(DarcyTypeTag, IOFields)::init(darcyVtkWriter);
GET_PROP_TYPE(DarcyTypeTag, IOFields)::initOutputModule(darcyVtkWriter);
darcyVtkWriter.write(0.0);
// the assembler with time loop for instationary problem
......
......@@ -180,13 +180,13 @@ int main(int argc, char** argv) try
const auto darcyName = getParam<std::string>("Problem.Name") + "_" + darcyProblem->name();
StaggeredVtkOutputModule<StokesGridVariables, typename GET_PROP_TYPE(StokesTypeTag, SolutionVector)> stokesVtkWriter(*stokesGridVariables, stokesSol, stokesName);
GET_PROP_TYPE(StokesTypeTag, IOFields)::init(stokesVtkWriter);
GET_PROP_TYPE(StokesTypeTag, IOFields)::initOutputModule(stokesVtkWriter);
stokesVtkWriter.write(0.0);
VtkOutputModule<DarcyGridVariables, typename GET_PROP_TYPE(DarcyTypeTag, SolutionVector)> darcyVtkWriter(*darcyGridVariables, sol[darcyIdx], darcyName);
using DarcyVelocityOutput = typename GET_PROP_TYPE(DarcyTypeTag, VelocityOutput);
darcyVtkWriter.addVelocityOutput(std::make_shared<DarcyVelocityOutput>(*darcyGridVariables));
GET_PROP_TYPE(DarcyTypeTag, IOFields)::init(darcyVtkWriter);
GET_PROP_TYPE(DarcyTypeTag, IOFields)::initOutputModule(darcyVtkWriter);
darcyVtkWriter.write(0.0);
// the assembler with time loop for instationary problem
......
......@@ -159,13 +159,13 @@ int main(int argc, char** argv) try
const auto darcyName = getParam<std::string>("Problem.Name") + "_" + darcyProblem->name();
StaggeredVtkOutputModule<StokesGridVariables, typename GET_PROP_TYPE(StokesTypeTag, SolutionVector)> stokesVtkWriter(*stokesGridVariables, stokesSol, stokesName);
GET_PROP_TYPE(StokesTypeTag, IOFields)::init(stokesVtkWriter);
GET_PROP_TYPE(StokesTypeTag, IOFields)::initOutputModule(stokesVtkWriter);
stokesVtkWriter.write(0.0);
VtkOutputModule<DarcyGridVariables, typename GET_PROP_TYPE(DarcyTypeTag, SolutionVector)> darcyVtkWriter(*darcyGridVariables, sol[darcyIdx], darcyName);
using DarcyVelocityOutput = typename GET_PROP_TYPE(DarcyTypeTag, VelocityOutput);
darcyVtkWriter.addVelocityOutput(std::make_shared<DarcyVelocityOutput>(*darcyGridVariables));
GET_PROP_TYPE(DarcyTypeTag, IOFields)::init(darcyVtkWriter);
GET_PROP_TYPE(DarcyTypeTag, IOFields)::initOutputModule(darcyVtkWriter);
darcyVtkWriter.write(0.0);
// the assembler for a stationary problem
......
......@@ -162,13 +162,13 @@ int main(int argc, char** argv) try
const auto darcyName = getParam<std::string>("Problem.Name") + "_" + darcyProblem->name();
StaggeredVtkOutputModule<StokesGridVariables, typename GET_PROP_TYPE(StokesTypeTag, SolutionVector)> stokesVtkWriter(*stokesGridVariables, stokesSol, stokesName);
GET_PROP_TYPE(StokesTypeTag, IOFields)::init(stokesVtkWriter);
GET_PROP_TYPE(StokesTypeTag, IOFields)::initOutputModule(stokesVtkWriter);
stokesVtkWriter.write(0.0);
VtkOutputModule<DarcyGridVariables, typename GET_PROP_TYPE(DarcyTypeTag, SolutionVector)> darcyVtkWriter(*darcyGridVariables, sol[darcyIdx], darcyName);
using DarcyVelocityOutput = typename GET_PROP_TYPE(DarcyTypeTag, VelocityOutput);
darcyVtkWriter.addVelocityOutput(std::make_shared<DarcyVelocityOutput>(*darcyGridVariables));
GET_PROP_TYPE(DarcyTypeTag, IOFields)::init(darcyVtkWriter);
GET_PROP_TYPE(DarcyTypeTag, IOFields)::initOutputModule(darcyVtkWriter);
darcyVtkWriter.write(0.0);
// the assembler for a stationary problem
......
......@@ -211,13 +211,13 @@ int main(int argc, char** argv) try
const auto darcyName = getParam<std::string>("Problem.Name") + "_" + darcyProblem->name();
StaggeredVtkOutputModule<StokesGridVariables, typename GET_PROP_TYPE(StokesTypeTag, SolutionVector)> stokesVtkWriter(*stokesGridVariables, stokesSol, stokesName);
GET_PROP_TYPE(StokesTypeTag, IOFields)::init(stokesVtkWriter);
GET_PROP_TYPE(StokesTypeTag, IOFields)::initOutputModule(stokesVtkWriter);
stokesVtkWriter.write(0.0);
VtkOutputModule<DarcyGridVariables, typename GET_PROP_TYPE(DarcyTypeTag, SolutionVector)> darcyVtkWriter(*darcyGridVariables, sol[darcyIdx], darcyName);
using DarcyVelocityOutput = typename GET_PROP_TYPE(DarcyTypeTag, VelocityOutput);
darcyVtkWriter.addVelocityOutput(std::make_shared<DarcyVelocityOutput>(*darcyGridVariables));
GET_PROP_TYPE(DarcyTypeTag, IOFields)::init(darcyVtkWriter);
GET_PROP_TYPE(DarcyTypeTag, IOFields)::initOutputModule(darcyVtkWriter);
darcyVtkWriter.write(0.0);
// instantiate time loop
......
......@@ -350,13 +350,13 @@ int main(int argc, char** argv) try
// intialize the vtk output module
using BulkSolutionVector = std::decay_t<decltype(sol[bulkIdx])>;
VtkOutputModule<BulkGridVariables, BulkSolutionVector> bulkVtkWriter(*bulkGridVariables, sol[bulkIdx], bulkProblem->name());
GET_PROP_TYPE(BulkTypeTag, IOFields)::init(bulkVtkWriter);
GET_PROP_TYPE(BulkTypeTag, IOFields)::initOutputModule(bulkVtkWriter);
bulkVtkWriter.write(0.0);
using LowDimSolutionVector = std::decay_t<decltype(sol[lowDimIdx])>;
VtkOutputModule<LowDimGridVariables, LowDimSolutionVector> lowDimVtkWriter(*lowDimGridVariables, sol[lowDimIdx], lowDimProblem->name());
GET_PROP_TYPE(LowDimTypeTag, IOFields)::init(lowDimVtkWriter);
lowDimProblem->addIOFields(lowDimVtkWriter);
GET_PROP_TYPE(LowDimTypeTag, IOFields)::initOutputModule(lowDimVtkWriter);
lowDimProblem->addVtkOutputFields(lowDimVtkWriter);
lowDimVtkWriter.write(0.0);
// instantiate time loop
......
......@@ -161,14 +161,14 @@ int main(int argc, char** argv) try
// intialize the vtk output module
using BulkSolutionVector = std::decay_t<decltype(sol[bulkIdx])>;
VtkOutputModule<BulkGridVariables, BulkSolutionVector> bulkVtkWriter(*bulkGridVariables, sol[bulkIdx], bulkProblem->name());
GET_PROP_TYPE(BulkTypeTag, IOFields)::init(bulkVtkWriter);
bulkProblem->addIOFields(bulkVtkWriter);
GET_PROP_TYPE(BulkTypeTag, IOFields)::initOutputModule(bulkVtkWriter);
bulkProblem->addVtkOutputFields(bulkVtkWriter);
bulkVtkWriter.write(0.0);
using LowDimSolutionVector = std::decay_t<decltype(sol[lowDimIdx])>;
VtkOutputModule<LowDimGridVariables, LowDimSolutionVector> lowDimVtkWriter(*lowDimGridVariables, sol[lowDimIdx], lowDimProblem->name());
GET_PROP_TYPE(LowDimTypeTag, IOFields)::init(lowDimVtkWriter);
lowDimProblem->addIOFields(lowDimVtkWriter);
GET_PROP_TYPE(LowDimTypeTag, IOFields)::initOutputModule(lowDimVtkWriter);
lowDimProblem->addVtkOutputFields(lowDimVtkWriter);
lowDimVtkWriter.write(0.0);
// an output file for the L2-norm
......
......@@ -167,13 +167,13 @@ int main(int argc, char** argv) try
// intialize the vtk output module
using BulkSolutionVector = std::decay_t<decltype(sol[bulkIdx])>;
VtkOutputModule<BulkGridVariables, BulkSolutionVector> bulkVtkWriter(*bulkGridVariables, sol[bulkIdx], bulkProblem->name());
GET_PROP_TYPE(BulkTypeTag, IOFields)::init(bulkVtkWriter);
GET_PROP_TYPE(BulkTypeTag, IOFields)::initOutputModule(bulkVtkWriter);
bulkVtkWriter.write(0.0);
using LowDimSolutionVector = std::decay_t<decltype(sol[lowDimIdx])>;
VtkOutputModule<LowDimGridVariables, LowDimSolutionVector> lowDimVtkWriter(*lowDimGridVariables, sol[lowDimIdx], lowDimProblem->name());
GET_PROP_TYPE(LowDimTypeTag, IOFields)::init(lowDimVtkWriter);
lowDimProblem->addIOFields(lowDimVtkWriter);
GET_PROP_TYPE(LowDimTypeTag, IOFields)::initOutputModule(lowDimVtkWriter);
lowDimProblem->addVtkOutputFields(lowDimVtkWriter);
lowDimVtkWriter.write(0.0);
// instantiate time loop
......
......@@ -211,12 +211,12 @@ int main(int argc, char** argv) try
// intialize the vtk output module
using BulkSolutionVector = std::decay_t<decltype(sol[bulkIdx])>;
VtkOutputModule<BulkGridVariables, BulkSolutionVector> bulkVtkWriter(*bulkGridVariables, sol[bulkIdx], bulkProblem->name());
GET_PROP_TYPE(BulkTypeTag, IOFields)::init(bulkVtkWriter);
GET_PROP_TYPE(BulkTypeTag, IOFields)::initOutputModule(bulkVtkWriter);
bulkVtkWriter.write(0.0);
using LowDimSolutionVector = std::decay_t<decltype(sol[lowDimIdx])>;
VtkOutputModule<LowDimGridVariables, LowDimSolutionVector> lowDimVtkWriter(*lowDimGridVariables, sol[lowDimIdx], lowDimProblem->name());
GET_PROP_TYPE(LowDimTypeTag, IOFields)::init(lowDimVtkWriter);
GET_PROP_TYPE(LowDimTypeTag, IOFields)::initOutputModule(lowDimVtkWriter);
lowDimVtkWriter.write(0.0);
// the assembler with time loop for instationary problem
......
......@@ -283,8 +283,8 @@ int main(int argc, char** argv) try
{
using BulkIOFields = typename GET_PROP_TYPE(BulkProblemTypeTag, IOFields);
using LowDimIOFields = typename GET_PROP_TYPE(LowDimProblemTypeTag, IOFields);
BulkIOFields::init(bulkVtkWriter);
LowDimIOFields::init(lowDimVtkWriter);
BulkIOFields::initOutputModule(bulkVtkWriter);
LowDimIOFields::initOutputModule(lowDimVtkWriter);
bulkExact.resize(bulkFvGridGeometry->numDofs());
lowDimExact.resize(lowDimFvGridGeometry->numDofs());
......
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