MeshChanged undefined in solver_t

Clearly defined bug reports and their fixes
Post Reply
spacedout
Posts: 33
Joined: 30 Mar 2020, 23:27
Antispam: Yes

MeshChanged undefined in solver_t

Post by spacedout »

Hi everybody

When I try to compile FlowSolve.F90 with elmerf90 under either Linux or Windows 7, I get an error about
a variable MeshChanged undefined in structure solver_t.

A look at http://www.elmerfem.org/doxygen/structt ... er__t.html
indeed confirms that it is not part of this structure.

This problem was resolved by replacing line 286 of FlowSolve.F90:

IF ( .NOT.AllocationsDone .OR. Solver % MeshChanged ) THEN

by

IF ( .NOT.AllocationsDone ) THEN


I hope this was the right thing to do.
raback
Site Admin
Posts: 3746
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: MeshChanged undefined in solver_t

Post by raback »

Hi

Are you sure that your ElmerSolver library and the FlowSolve.F90 are from the same version of the code? Usually there is no need to compile FlowSolve.F90 by hand as it is compiled with the system. There indeed is a new flag that is part of active code. The doxygen documentation unfortunately is not that fresh. Look at $SRC/fem/src/Types.F90 for the Solver_t stucture.

-Peter
spacedout
Posts: 33
Joined: 30 Mar 2020, 23:27
Antispam: Yes

Re: MeshChanged undefined in solver_t

Post by spacedout »

No, I am not sure. Under Windows 7, the .dll library files have a date modified of April 8 2020 whereas the .F90 source files have a date modified of April 17 2020 . The only reason I want to compile FlowSolve.F90 is that I need to change the continuity equation to

drho/dt +div(V*rho) = S

where S is not equal to 0 because I am dealing with plasma ions and electrons in the air. And so, apart from extra declarations, allocations , string definitions and MATC code for the .sif file, I added a line

Residual(DIM+1) = Residual(DIM+1) + SUM( NodalPlasmaDensity(1:n) * Basis(1:n) )

at the end of function FlowInsideResidual.

This might not be the right place to insert such code because I see pointers to 3 residual functions in a call to refineMesh and this call is after DefaultSolve(). And I had no intention to refine the mesh. Maybe you would care to elaborate on the proper code placement.

Thanks anyhow
spacedout
Posts: 33
Joined: 30 Mar 2020, 23:27
Antispam: Yes

Re: MeshChanged undefined in solver_t

Post by spacedout »

It is kind of incredible but the file FlowSolver.F90 I downloaded onto my Win7 laptop was corrupted !

IF ( .NOT.AllocationsDone .OR. Solver % MeshChanged ) THEN

was actually supposed to be

IF ( .NOT.AllocationsDone .OR. Solver % Mesh % Changed ) THEN

as I found out from another file FlowSolver.F90 in a Linux account at another institution.

Now it compiles right.

Deeply sorry for the false alarm.
Post Reply