1

(58 replies, posted in General Help)

Nice to hear that you progressed.

In MPI parallel mode the OOFEM relies on external libraries like PETSc to solve the distributed sparse linear system in parallel. It will not work with non-MPI linear solvers, as the governing equation contributions (LHS, RHS, etc) are assembled and stored on individual processing nodes.

The shared memory model will work also without OpenMP aware solver, but only the system assembly will run in parallel. If combined with OpenMP  enabled solver, such as Pardiso or Super-LU, one will get also the solution of linear system in parallel.

The hybrid approach is also possible, combining MPI based approach (coarse grain decomposition) with OpenMP  processing on individual nodes, but efficient utilization of resources need to be supported by the linear equation solver.

The actual approach depends on use case, particularly on the problem size. OpenMP can scale reasonably to 16-20 CPUs, then due to the limitations of the HW architecture the scaling is lost. MPI offers much better scalability in general and is suitable for large problems.

Hi, can you attach the files you mention?

3

(58 replies, posted in General Help)

When OOFEM is started with the -p option, it initializes MPI. This option must always be used when running a parallel MPI job. In that mode, each MPI rank reads and processes its own partition file. For an input file input.in, the corresponding partition files are input.in.0, input.in.1, etc., one for each rank. Note that input.in is not needed, it is rather generic name from which individual partition input file names are determined.

If OOFEM is launched simply as oofem -f input.in without -p using mpirun, MPI is not initialized and every process will read the same input.in file (if it exists), meaning all ranks would eventually  run the full problem independently rather than in parallel.

Note that in my previous reply I unfortunately forget to add -p option. Because there was also an input file for serial problem (dyn_bar01.oofem.in) there was no warning and I did not realize my mistake.  So the right command to run the example should be

mpiexec -n 2 "c:\Users\borek\Documents\Visual Studio 2026\Projects\bpatzak-oofem\Debug\oofem.exe" -f dyn_bar01.oofem.in -p

We are happy to announce the next OOFEM training course. The course is targeting to Ph.D. students, engineers, and researchers to allow them to quickly acquire the knowledge and practical skills necessary to employ OOFEM.

Course date: 7.-9. September, 2026
Venue: Czech Technical University in Prague, Prague, Czech Republic
See http://www.oofem.org/en/courses for more information and registration

5

(58 replies, posted in General Help)

I managed to compile oofem using Visual Studio 2026 and with Microsoft MPI (MS-MPI). I was able to successfully run explicit dynamic parallel test dyn_bar01 (tests\regression\partests\dyn_bar01) using following command:

mpiexec -n 2 "c:\Users\borek\Documents\Visual Studio 2026\Projects\bpatzak-oofem\Debug\oofem.exe" -f dyn_bar01.oofem.in

the solution target partests fails as the MS-MPI does not come with mpirun but with mpiexec (can be fixed).

I need to adjust some files for MSVC to compile (linux was ok) . If you can check it on your side, I would be grateful (please use devel branch from my oofem fork: https://github.com/bpatzak/oofem)

6

(58 replies, posted in General Help)

Hi, is this related to Github issue https://github.com/oofem/oofem/issues/170 (which has been resolved) or not?

OOFEM 3.0 is officially out!

A major release packed with new capabilities: XML input reader, symbolic multi‑physics module, Pyodide/WASM support, additive manufacturing tools, vtkhdf5 export, new advection models, mechanical contacts, and more.

For detailed information see the ChangeLog

The problem is that you are trying to apply surface load. The 2D elements, like quad1planestrain, have boundary edges and only one surface, corresponding to element itself. In general surfaces are entities of dimension 2, while edges are entities of dimension 1. So what you actually want is to apply edge load (ConstantEdgeLoad) on element edges.
I thus suggest the following modification:

load1 = oofempy.constantEdgeLoad(3, domain, loadTimeFunction=1, components=(1e6,0.), set=2, loadtype=3) # 1 MPa in x Direction
load2 = oofempy.constantEdgeLoad(4, domain, loadTimeFunction=1, components=(0.,1e6), set=3, loadtype=3) # 1 MPa in y Direction

...

set1 = oofempy.createSet(1, domain, elements=(1,))
set2 = oofempy.createSet(2, domain, elementedges=(1,2)) #x_pos
set3 = oofempy.createSet(3, domain, elementedges=(1,3)) #y_pos
set4 = oofempy.createSet(4, domain, elementedges=(1,4)) #x_neg
set5 = oofempy.createSet(5, domain, elementedges=(1,1)) #y_neg

This should fix the problem.

Hi,
thank you for reporting this. I have just committed a fix, that should resolve the issue. Please do git pull, cmake & build.
Borek

10

(2 replies, posted in General Help)

Hi Gereon,
thank you for sharing your repository link. I was able to trace the problem, which was in initialization of Domain object.
I believe I have fixed the problem in the official devel branch.

Unfortunately, you have forked your repo from Vit oofem repository, so I think  you have to ask Vit to merge the official devel branch into his repository, and then you can do the merge as well.


Borek.

11

(2 replies, posted in General Help)

Hi Gereon,
difficult to say at first sight. I can have a look, but ideally I would need access to your set-up. Do you have your version in a forked Github repository which I can access or can you share the source somehow? Other option would be to have a look at problem by yourself by running python script in debugger and put a breakpoint at intelpoint.C:299 to see what is the actual problem.

Borek

Hi Gereon,
the elementboundaries is a list containing a sequence of pairs specifying the element number and boundary number.
So you can append additional pairs to the list. For example, to apply load also on boundary with id = 5 of element 2, you can use

set3 = oofempy.createSet(3, domain,elementboundaries=(1,2,2,5) )

13

(3 replies, posted in General Help)

Hi Gereon,
the problem.checkProblemConsistency() should be called after problem.init() and problem.postInitialize(), where the master elements are localized, if not provided.
I will add check for this.

Borek

14

(3 replies, posted in General Help)

Hi Gereon,
I have just pushed the commit to devel branch that solves your problem.

The prototype python code for demonstration:

import oofempy
import util

problem = oofempy.staticStructural(nSteps=1, outFile="test_5.out")

# domain (if no engngModel specified to domain, it is asigned to the last one created)
domain = oofempy.domain(1, 1, problem, oofempy.domainType._2dPlaneStressMode, tstep_all=True, dofman_all=True, element_all=True)
problem.setDomain(1, domain, True)

ltf1 = oofempy.constantFunction(1, domain, f_t=1.)
ltfs = (ltf1,)

# boundary conditions
bc1 = oofempy.boundaryCondition(1, domain, loadTimeFunction=1, prescribedValue=0.0)
n2 = oofempy.nodalLoad(2, domain, loadTimeFunction=1, components=(1.,0.), dofs=(1,2))
bcs = (bc1, n2)

# nodes
n1 = oofempy.node(1, domain, coords=(0.,  0., 0. ), bc=(bc1,bc1))
n2 = oofempy.node(2, domain, coords=(2.4, 0., 0. ), bc=(0,bc1))
n3 = oofempy.node(3, domain, coords=(2.4, 0.8, 0.), load=(n2,) )
n4 = oofempy.hangingnode(4, domain, coords=(1.2,  0.0, 0.), doftype=(2,2), dofidmask=(1,2))
nodes = (n1,n2,n3, n4)

# material and cross section
mat = oofempy.isoLE(1, domain, d=1., E=30.e3, n=0.2, tAlpha=1.2e-5)
cs  = oofempy.simpleCS(1, domain, thick=0.5, material=1, set=1)

# elements - assign through sets
e1 = oofempy.trPlaneStress2d(1, domain, nodes=(1,2,3))
elems = (e1,)

set1 = oofempy.createSet(1, domain, elements=(1,)) #Ettringite

# setup domain
util.setupDomain(domain, nodes, elems, (cs,), (mat,), bcs, (), ltfs, (set1,))

problem.init()
problem.postInitialize()
problem.checkProblemConsistency()
problem.solveYourself()

step = problem.giveCurrentStep(False)
problem.updateYourself(step)

#check solution
print (domain.giveDofManager(1).giveDofWithID(oofempy.DofIDItem.D_u).giveUnknown(oofempy.ValueModeType.VM_Total, step))
print (domain.giveDofManager(2).giveDofWithID(oofempy.DofIDItem.D_u).giveUnknown(oofempy.ValueModeType.VM_Total, step))
print (domain.giveDofManager(4).giveDofWithID(oofempy.DofIDItem.D_u).giveUnknown(oofempy.ValueModeType.VM_Total, step))

Hello,
can you attach your input file(s)? If the files are big, I think just the top part is ok (till component size record). This would allow us to go quickly to the point.
Borek

Hard question for linux guy ;-)
I found useful this link: https://learn.microsoft.com/en-us/visua … ew=vs-2022

In solution explorer, right click on liboofem target, select Properties, then go to Linker->Debugging and set "Debuggable Assembly" to YES. Rebuild oofemlib target, rebuild oofem target, start debugging (make sure you have Debug mode active).

I tested on VS 2022 and it works.

17

(5 replies, posted in General Help)

Hi,
this is a bug in input file I forgot to mention, for lumpedmass you have to also provide the mapping of given masses to DOFS using dofs keyword. Just add "dofs 6 1 2 3 4 5 6" to lumpedmass input record.

18

(5 replies, posted in General Help)

Hi,
the problem was really with CRLF/LF encoding.
After converting
- linDyn.in worked for me with recent GitHub version
- running nldyn.in ended up with segmentation fault, this is fixed now in GitHub
- now, both input decks give same results (compared (visually) on time history of x-displacement of node 2) on Linux.
I am not able to run it on Win right now.

19

(5 replies, posted in General Help)

Hi,
I tried to run linDyn.in using the latest github repo version and got the following error:

OOFEM Error exception: Error initializing from user input: Missing keyword "f(t)" on input 18
Record: "piecewiselinfunction 2 npoints 8690 t 8690 0e0 4.9..."

In instanciateYourself (/home/bp/devel/oofem.git/src/oofemlib/engngm.C:252)

Hope it will help

HI Vit,
nice add on. Recently I have set up oofem blog, where announcements of new functionalities would fit nicely (https://oofem.github.io). You can try to make a new post on this.
Borek

21

(3 replies, posted in General Help)

Hi,
- I have no test failing (latest github master branch version)
- Can you attach the simple example illustrating the results?

Borek

Dear Gordan,
first of all, welcome.

I think your problems can be resolved, if you build only relevant targets from the solution. In your case, building "oofem" and "oofempy" targets is sufficient.

You don't need to set USE_HDF5=ON and install HDF5 libraries.
Additionally, the pybind11 is included as git submodule, so there is no need to install it separately.

Let me know,
Borek

23

(0 replies, posted in Announcements)

Topic: OOFEM 2024 autumn course
Topic: Save the date: Announcing OOFEM 2024 autumn course
We are happy to announce the next OOFEM training course. The course is targeting to Ph.D. students, engineers, and researchers to allow them to quickly acquire the knowledge and practical skills necessary to employ OOFEM.

Course date: 9.-11. September, 2024
Venue: Czech Technical University in Prague, Prague, Czech Republic
See http://www.oofem.org/en/courses for more information and registration

24

(2 replies, posted in General Help)

Hi Fernando,

there are at least two options:
1) You can define local coordinate system in node (lcs keyword). When defined, all boundary conditions are applied in this local coordinate system. Also all unknowns (displacements, rotations, reaction forces) are computed in this local coordinate system. Illustrated in many tests, see, for example, tests/sm/beam2d_4.in
2) You can model inclined supports using stiff truss elements aligned with the direction of restrained displacement. In this case the outputs are in global coordinate system, but be careful here, introducing stiff elements can have impact on your solution, so the option 1 should be preferred.
Borek

Hi,
check element #18, which is truss3d, but should be truss1d ;-))
Borek