Skip to content

Commit 5e5f639

Browse files
committed
Adjustments on generators
1 parent d23a521 commit 5e5f639

4 files changed

Lines changed: 11 additions & 40 deletions

File tree

.gitlab-ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,11 @@ pkg-of:
2222
stage: package
2323
parallel:
2424
matrix:
25-
- TAG: ["debian-12-qt6",
26-
"ubuntu-22.04-qt5", "ubuntu-24.04-qt6", "ubuntu-24.10-qt6", "ubuntu-25.04-qt6"]
25+
- TAG: ["ubuntu-22.04-qt5"]
2726
image: "registry.forge.inrae.fr/openfluid/incubateur/openfluid/ofbuild/$TAG"
2827
script:
2928
- mkdir ./_build
30-
- cd ./_build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
29+
- cd ./_build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DOFBUILD_ENABLE_GUI=OFF
3130
- make -j `nproc`
3231
- cpack -j `nproc`
3332
artifacts:

src/apps/openfluid-builder/model/AddGeneratorDialog.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ openfluid::ware::WareParams_t AddGeneratorDialog::getParams() const
479479
if (ui->VectorRadioButton->isChecked() || ui->MatrixRadioButton->isChecked())
480480
{
481481
Params["identicalcells"] = ui->IdenticalValueCheckbox->isChecked();
482+
Params["varsize"] = getDimensions().getSerializedVariableSize();
482483
}
483484
}
484485
else if (m_Method == openfluid::fluidx::GeneratorDescriptor::GeneratorMethod::INTERP)

src/openfluid/machine/FixedGenerator.cpp

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -262,43 +262,6 @@ void FixedGenerator<T>::initParams(const openfluid::ware::WareParams_t& Params)
262262
// =====================================================================
263263

264264

265-
template <>
266-
void FixedGenerator<double>::applyValue(openfluid::core::SpatialUnit* LU, bool init)
267-
{
268-
if (init)
269-
{
270-
OPENFLUID_InitializeVariable(LU,m_VarName,0.0);
271-
}
272-
else
273-
{
274-
OPENFLUID_AppendVariable(LU,m_VarName,m_VarValue);
275-
}
276-
}
277-
278-
279-
// =====================================================================
280-
// =====================================================================
281-
282-
283-
template <>
284-
void FixedGenerator<std::string>::applyValue(openfluid::core::SpatialUnit* LU, bool init)
285-
{
286-
if (init)
287-
{
288-
std::string InitVar = "";
289-
OPENFLUID_InitializeVariable(LU,m_VarName, InitVar);
290-
}
291-
else
292-
{
293-
OPENFLUID_AppendVariable(LU,m_VarName,m_VarValue);
294-
}
295-
}
296-
297-
298-
// =====================================================================
299-
// =====================================================================
300-
301-
302265
template <>
303266
void LinearFixedGenerator<openfluid::core::VectorValue>::applyValue(openfluid::core::SpatialUnit* LU, bool init)
304267
{

src/openfluid/utils/Binding.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
@author Jean-Christophe FABRE <jean-christophe.fabre@inra.fr>
3636
*/
3737

38+
// OpenFLUID:stylecheck:!brac
39+
3840

3941
#ifndef __OPENFLUID_UTILS_BINDING_HPP__
4042
#define __OPENFLUID_UTILS_BINDING_HPP__
@@ -865,6 +867,12 @@ class Binding
865867
mp_OutErr->printfOut("inject");
866868
}
867869

870+
if (pGenDesc->getGeneratorMethod() == \
871+
openfluid::fluidx::GeneratorDescriptor:: GeneratorMethod::INJECTMULTICOL)
872+
{
873+
mp_OutErr->printfOut("inject-multicol");
874+
}
875+
868876
mp_OutErr->printfOut(" generator for variable %s on units %s\n",
869877
pGenDesc->getVariableName().c_str(),pGenDesc->getUnitsClass().c_str());
870878
}

0 commit comments

Comments
 (0)