Let's suppose such a case, I added two variables, say, u & v to the
equation_system
with the same Fetype and order (LAGRANGE & SECOND, resp.). Then LIbmesh will
take
them into a single Variable Group automatically acoording to these two
properties.
I don't know how to deal with them separatelyby user yet.
Anyway, in this case if I'd like apply the Dirichlet BC for these components,
I have to apply them simultaneously, like
ParsedFunction("{4*y*(1-y)}{0.0}") for vector<uint> var_index[2] (which is
(0,1) here)
and set<uint> boundary_ids (which is 1 for my inlet).
When we check the system.print_info() we see as follows
EquationSystems
n_systems()=1
System #0, "Navier-Stokes"
Type "TransientNonlinearImplicit"
Variables={ "u" "v" } "p" //here is what I mean
Finite Element Types="LAGRANGE", "JACOBI_20_00" "LAGRANGE", "JACOBI_20_00"
Infinite Element Mapping="CARTESIAN" "CARTESIAN"
Approximation Orders="SECOND", "THIRD" "FIRST", "THIRD"
n_dofs()=4946
...
This is confirmed in my last test, although the code does work perfectly now.
By the way your remarks on the ConstFunction only available for multi-component
identical values was also
confirmed in my code now. So I think up to now, most problems I met are due to
my misunderstanding of the mechnism inside LibMesh, not the package itself.
Many thanks,
Zhenyu
------------------ Original ------------------
From: "Roy Stogner";<[email protected]>;
Date: Apr 1, 2015
To: "grandrabbit"<[email protected]>;
Cc: "libmesh-users"<[email protected]>;
Subject: Re: [Libmesh-users] How to properly call ParsedFunction
On Tue, 31 Mar 2015, grandrabbit wrote:
> As I can undertand now, the usage of ParsedFunction is conditional,
Yes.
> depending on if the boundary condition will be applied on a single variable or
> a variable group.
Not quite. It depends on what the index is of the variable you want
to apply it on. If your variables are ordered "u,v,p" then you can
set u equal to "sin(x)". If they're "p,u,v" then you'd need to set u
equal to "{0}{sin(x)}".
The variable groups can affect the efficiency of a given variable
ordering, but they shouldn't affect the component indexing.
(in current code, anyway - we may eventually add some optional
"System::reindex_variables()" command to sort variables into fewer
groups)
---
Roy
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users