55 std::string
const& name,
57 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler,
58 std::vector<ProcessVariable>
const& variables,
59 std::vector<std::unique_ptr<ParameterLib::ParameterBase>>
const& parameters,
60 unsigned const integration_order,
62 std::map<
int, std::shared_ptr<MaterialPropertyLib::Medium>>
const& media)
67 DBUG(
"Create StokesFlowProcess.");
69 auto const coupling_scheme =
73 const bool use_monolithic_scheme = (coupling_scheme !=
"staggered");
80 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
92 auto const variable_v = collected_process_variables[0];
93 if (variable_v.get().getNumberOfGlobalComponents() != GlobalDim)
96 "Number of components of the process variable '{:s}' is different "
97 "from the global dimension: got {:d}, expected {:d}",
98 variable_v.get().getName(),
99 variable_v.get().getNumberOfGlobalComponents(),
103 auto const variable_p = collected_process_variables[1];
104 if (variable_p.get().getNumberOfGlobalComponents() != 1)
107 "Pressure process variable '{:s}' is not a scalar variable but has "
109 variable_p.get().getName(),
110 variable_p.get().getNumberOfGlobalComponents());
115 if (use_monolithic_scheme)
117 process_variables.push_back(std::move(collected_process_variables));
122 "The staggered coupling scheme for StokesFlowProcess is not "
128 Eigen::VectorXd specific_body_force = Eigen::VectorXd::Zero(GlobalDim);
132 if (b.size() != GlobalDim)
135 "The size of the specific body force vector does not match the "
136 "global dimension. Vector size is {:d}, global "
138 b.size(), GlobalDim);
140 std::copy_n(b.data(), b.size(), specific_body_force.data());
142 bool const use_stokes_brinkman_form =
149 DBUG(
"Check the media properties of StokesFlow process ...");
150 checkMPLProperties(mesh, media_map, use_stokes_brinkman_form);
151 DBUG(
"Media properties verified.");
154 std::move(specific_body_force),
155 use_stokes_brinkman_form};
161 return std::make_unique<StokesFlowProcess<GlobalDim>>(
162 std::move(name), mesh, std::move(jacobian_assembler), parameters,
163 integration_order, std::move(process_variables),
164 std::move(process_data), std::move(secondary_variables),
165 use_monolithic_scheme);