On Mon, Aug 20, 2012 at 7:17 AM, Colin McAuliffe <span dir="ltr"><<a href="mailto:cjm2176@columbia.edu" target="_blank">cjm2176@columbia.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Yes, just call DMSetDefaultSection(). However, note that you will have<br>
everything sized<br>
correctly, but handling topology and iteration for the residual calculation<br>
would be completely<br>
up to you.<br>
<br>
Matt<br>
</blockquote>
<br>
It would be really great to define the initial data layout using IS to define the equation numbers of the splits, while letting the new DM stuff handle creating all the nested splits given command line options. Is something like this possible?<br>
</blockquote><div><br></div><div>This is just what I say above. Is something not working?</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Colin<br>
<br>
Quoting Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, Aug 13, 2012 at 4:06 PM, Colin McAuliffe <<a href="mailto:cjm2176@columbia.edu" target="_blank">cjm2176@columbia.edu</a>>wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
No, No, No. You do not have to write a DM implementation.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
You just have to define the data layout in a PetscSection and attach it to<br>
the DM with DMSetDefaultSection.<br>
<br>
Matt<br>
<br>
</blockquote>
<br>
Does use of the PetscSection mean that it is neccesary to define a DMMesh?<br>
In other<br>
words is there a way to create the data layout for the physics without<br>
having to specify<br>
any information about the mesh?<br>
<br>
</blockquote>
<br>
Yes, just call DMSetDefaultSection(). However, note that you will have<br>
everything sized<br>
correctly, but handling topology and iteration for the residual calculation<br>
would be completely<br>
up to you.<br>
<br>
Matt<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks<br>
Colin<br>
<br>
<br>
<br>
Quoting Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>>:<br>
<br>
On Thu, Aug 9, 2012 at 10:22 AM, Dmitry Karpeev <<a href="mailto:karpeev@mcs.anl.gov" target="_blank">karpeev@mcs.anl.gov</a>><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
wrote:<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Thu, Aug 9, 2012 at 10:02 AM, Colin McAuliffe <<a href="mailto:cjm2176@columbia.edu" target="_blank">cjm2176@columbia.edu</a><br>
>wrote:<br>
<br>
Sanjay, thanks for the reply but I am avoiding using blocked format<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
since<br>
my problem has 10 dofs per node but only has either dofs 1-3 or 4-10<br>
active<br>
on a particular node. If I use block the equations I run out of memory<br>
pretty quickly on my machine but can get to reasonable sized problems<br>
with<br>
the unblocked format.<br>
<br>
Matt, sorry I am not getting this, but I am still not sure how the DM<br>
interface works. I can see in the function PCFieldSplitSetDefaults that<br>
there is an initial call to DMCreateFieldDecomposition and subsequent<br>
calls<br>
to DMCreateSubDM based on the command line options. What I am missing is<br>
how the first call to DMCreateFieldDecomposition is able to figure out<br>
which equations belong to which field just from command line info such<br>
as<br>
-pc_fieldsplit_0_fields 2,0. Where/how are the fields 2 and 0 defined?<br>
<br>
This might change slightly in the near future in petsc-dev to allow<br>
</blockquote>
one to<br>
define splits using named fields.<br>
In any event, there has to be DM support to implement the decompositions<br>
over a particular mesh/problem over that mesh.<br>
With DMDA you can essentially get combinations of strided fields in each<br>
split. DMCOMPOSITE allows you<br>
to pull out combinations of the subproblems that were put in there to<br>
begin with. If you have your own mesh, you have to write<br>
a DM implementation around it to expose the available fields.<br>
<br>
<br>
</blockquote>
No, No, No. You do not have to write a DM implementation.<br>
<br>
You just have to define the data layout in a PetscSection and attach it to<br>
the DM with DMSetDefaultSection.<br>
<br>
Matt<br>
<br>
<br>
Dmitry.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks<br>
<br>
Colin<br>
<br>
<br>
Quoting Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>>:<br>
<br>
On Thu, Aug 9, 2012 at 9:21 AM, Sanjay Govindjee <<a href="mailto:s_g@berkeley.edu" target="_blank">s_g@berkeley.edu</a>><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
wrote:<br>
<br>
Colin,<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I you block the equations in FEAP, then the restrained BCs are<br>
'included' in assembled PETSc matrix (these dofs have rows that are<br>
zero<br>
modulo a value of unity on the diagonal and the restrained value on<br>
the<br>
right-hand side).<br>
<br>
<br>
However, this is not necessary with the DM interface.<br>
</blockquote>
<br>
Matt<br>
<br>
<br>
-sg<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On 8/9/12 8:41 AM, Colin McAuliffe wrote:<br>
<br>
From what I can gather from the petsc-dev source it looks like the<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
commands in 4) will then generate the splits using strided blocks.<br>
The<br>
problem with that is the fortran code I am using (FEAP) uses petsc to<br>
assemble and solve the linear problem within its own nonlinear and<br>
time<br>
stepping schemes. The linear problem that petsc solves already has<br>
boundary<br>
conditions applied to it so petsc only sees the active (unrestrained)<br>
equations. So then in general fields can't be extracted from the<br>
active<br>
equations using strided blocks and I am stuck with generating the<br>
index<br>
sets defining the splits on my own. Will it still be possible to make<br>
use<br>
of the new DM functions in this case?<br>
<br>
FEAP website:<br>
<a href="http://www.ce.berkeley.edu/******projects/feap/" target="_blank">http://www.ce.berkeley.edu/***<u></u>***projects/feap/</a><<a href="http://www.ce.berkeley.edu/****projects/feap/" target="_blank">http://www.<u></u>ce.berkeley.edu/****projects/<u></u>feap/</a>><br>
<<a href="http://www.ce." target="_blank">http://www.ce.</a>**<a href="http://berkeley.edu/**projects/feap/" target="_blank">berkeley.edu/<u></u>**projects/feap/</a><<a href="http://www.ce.berkeley.edu/**projects/feap/" target="_blank">http://www.<u></u>ce.berkeley.edu/**projects/<u></u>feap/</a>><br>
><br>
<<a href="http://www.ce." target="_blank">http://www.ce.</a>**<a href="http://berkeley.edu/**projects/feap/" target="_blank">berkeley.edu/<u></u>**projects/feap/</a><<a href="http://berkeley.edu/projects/feap/" target="_blank">http://<u></u>berkeley.edu/projects/feap/</a>><br>
<<a href="http://www.ce." target="_blank">http://www.ce.</a>**<a href="http://berkeley.edu/projects/feap/" target="_blank">berkeley.edu/<u></u>projects/feap/</a><<a href="http://www.ce.berkeley.edu/projects/feap/" target="_blank">http://www.ce.<u></u>berkeley.edu/projects/feap/</a>><br>
><br>
><br>
<br>
<br>
Colin<br>
<br>
<br>
Quoting Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>>:<br>
<br>
On Wed, Aug 8, 2012 at 10:51 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a><br>
><br>
<br>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Wed, Aug 8, 2012 at 10:23 PM, Colin McAuliffe <<br>
<a href="mailto:cjm2176@columbia.edu" target="_blank">cjm2176@columbia.edu</a><br>
<br>
>wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks all, regarding use of DM in 3.3, is the procedure now to<br>
create<br>
<br>
the fields with PCFieldSplitSetIS and then use<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
DMCreateFieldDecompositionDM<br>
to create a new DM based from the new fields and the DM for the<br>
original<br>
problem?<br>
<br>
<br>
1) Use petsc-dev<br>
<br>
</blockquote>
<br>
2) PCFieldSplitSetIS() is independent. This allows you to define<br>
splits<br>
however you want, but then recursive gets harder<br>
<br>
3) In 3.3., it uses DMCreateFieldDecompositionDM() to split all<br>
fields<br>
apart at once<br>
<br>
4) In petsc-dev, it uses DMCreateSubDM() which can split off any<br>
combination of fields, which from the command line is something<br>
like<br>
<br>
-pc_fieldsplit_0_fields 2,0 -pc_fieldsplit_1_fields 1,3<br>
<br>
<br>
I should have shown recursive:<br>
<br>
</blockquote>
<br>
-fieldsplit_0_pc_type fieldsplit<br>
<br>
will split 2,0 into two blocks.<br>
<br>
Matt<br>
<br>
<br>
Matt<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Colin<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
--<br>
Colin McAuliffe<br>
PhD Candidate<br>
Columbia University<br>
Department of Civil Engineering and Engineering Mechanics<br>
<br>
<br>
<br>
<br>
</blockquote>
--<br>
What most experimenters take for granted before they begin their<br>
experiments is infinitely more interesting than any results to<br>
which<br>
their<br>
experiments lead.<br>
-- Norbert Wiener<br>
<br>
<br>
<br>
<br>
</blockquote>
--<br>
What most experimenters take for granted before they begin their<br>
experiments is infinitely more interesting than any results to which<br>
their<br>
experiments lead.<br>
-- Norbert Wiener<br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
--<br>
<br>
</blockquote>
------------------------------<u></u>******-----------------<br>
<br>
Sanjay Govindjee, PhD, PE<br>
Professor of Civil Engineering<br>
Vice Chair for Academic Affairs<br>
<br>
779 Davis Hall<br>
Structural Engineering, Mechanics and Materials<br>
Department of Civil Engineering<br>
University of California<br>
Berkeley, CA 94720-1710<br>
<br>
Voice: <a href="tel:%2B1%20510%20642%206060" value="+15106426060" target="_blank">+1 510 642 6060</a><br>
FAX: <a href="tel:%2B1%20510%20643%205264" value="+15106435264" target="_blank">+1 510 643 5264</a><br>
<a href="mailto:s_g@berkeley.edu" target="_blank">s_g@berkeley.edu</a><br>
<a href="http://www.ce.berkeley.edu/~******sanjay" target="_blank">http://www.ce.berkeley.edu/~**<u></u>****sanjay</a><<a href="http://www.ce.berkeley.edu/~****sanjay" target="_blank">http://www.ce.<u></u>berkeley.edu/~****sanjay</a>><br>
<<a href="http://www.ce." target="_blank">http://www.ce.</a>**<a href="http://berkeley.edu/~**sanjay" target="_blank">berkeley.edu/<u></u>~**sanjay</a><<a href="http://www.ce.berkeley.edu/~**sanjay" target="_blank">http://www.ce.<u></u>berkeley.edu/~**sanjay</a>><br>
><<br>
<a href="http://www.ce.berkeley.edu/~****sanjay" target="_blank">http://www.ce.berkeley.edu/~**<u></u>**sanjay</a><<a href="http://www.ce.berkeley.edu/~**sanjay" target="_blank">http://www.ce.<u></u>berkeley.edu/~**sanjay</a>><br>
<<a href="http://www.ce.berkeley." target="_blank">http://www.ce.berkeley.</a>**edu/<u></u>~sanjay<<a href="http://www.ce.berkeley.edu/~sanjay" target="_blank">http://www.ce.<u></u>berkeley.edu/~sanjay</a>><br>
><br>
><br>
------------------------------<u></u>******-----------------<br>
<br>
<br>
<br>
<br>
</blockquote>
--<br>
What most experimenters take for granted before they begin their<br>
experiments is infinitely more interesting than any results to which<br>
their<br>
experiments lead.<br>
-- Norbert Wiener<br>
<br>
<br>
<br>
</blockquote>
<br>
--<br>
Colin McAuliffe<br>
PhD Candidate<br>
Columbia University<br>
Department of Civil Engineering and Engineering Mechanics<br>
<br>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
--<br>
What most experimenters take for granted before they begin their<br>
experiments is infinitely more interesting than any results to which their<br>
experiments lead.<br>
-- Norbert Wiener<br>
<br>
<br>
</blockquote>
<br>
<br>
--<br>
Colin McAuliffe<br>
PhD Candidate<br>
Columbia University<br>
Department of Civil Engineering and Engineering Mechanics<br>
<br>
</blockquote>
<br>
<br><span class="HOEnZb"><font color="#888888">
<br>
--<br>
What most experimenters take for granted before they begin their<br>
experiments is infinitely more interesting than any results to which their<br>
experiments lead.<br>
-- Norbert Wiener<br>
<br>
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
<br>
-- <br>
Colin McAuliffe<br>
PhD Candidate<br>
Columbia University<br>
Department of Civil Engineering and Engineering Mechanics<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>