how to save memory on BCs

General discussion about Elmer
Post Reply
spacedout
Posts: 177
Joined: 30 Mar 2020, 23:27
Antispam: Yes

how to save memory on BCs

Post by spacedout »

Hi to all

I was looking at the surface normal code

Normal = NormalVector(BoundaryElement, ElementNodes, U, V, .TRUE.)

Now if I export it as a variable normal which can be used in the .sif file under

Boundary Condition i
Target Boundaries(1) = 1
Surface Charge Density = Variable Flux 1, Flux 2, Flux 3, normal 1, normal 2, normal 3
Real MATC "........."

I am inherently wasting memory since a variable is allotted to the bulk domain whereas the surface charge density is only needed on a specific boundary. Is there a way out ? Thanks
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: how to save memory on BCs

Post by raback »

Hi

There may be a "NormalSolver" that only solves the Normal field at the BCs.

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

Re: how to save memory on BCs

Post by spacedout »

Thanks but I modified NormalSolver.F90 in my my working account at the routine NormalSolver_init by adding an IF statement checking whether DIM =2 or 3 to allow for the creation in 3D of Normals[3] instead of Normals[2].
Post Reply