adaptivity for 3D
When extending a working problem with adaptivity from 2D to 3D, problem.solve(...) fails after the first iteration with:
Unable to create Function Space missing entities of dimension 1
I suppose the mesh.init function is not called within the solve function. Any suggestions?
Have you tested adaptivity in 3D? Do you have any examples available?
Best wishes,
Susanne Støle-Hentschel
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
On 06/21/11 13:06, Susanne Støle-Hentschel wrote:
> New question #162201 on DOLFIN:
> https:/
>
> When extending a working problem with adaptivity from 2D to 3D, problem.solve(...) fails after the first iteration with:
>
> Unable to create Function Space missing entities of dimension 1
>
> I suppose the mesh.init function is not called within the solve function. Any suggestions?
>
> Have you tested adaptivity in 3D? Do you have any examples available?
>
We have tested adaptivity in 3D, but not as extensively. Please file a
bug report, include a minimal running example and the DOLFIN version.
--
Marie
Revision history for this message
|
#2 |
I attached the 3D problem case and the output log.
Susanne
-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Marie Rognes
Sent: 21. juni 2011 14:02
To: Støle-Hentschel, Susanne
Subject: Re: [Question #162201]: adaptivity for 3D
Your question #162201 on DOLFIN changed:
https:/
Status: Open => Answered
Marie Rognes proposed the following answer:
On 06/21/11 13:06, Susanne Støle-Hentschel wrote:
> New question #162201 on DOLFIN:
> https:/
>
> When extending a working problem with adaptivity from 2D to 3D, problem.solve(...) fails after the first iteration with:
>
> Unable to create Function Space missing entities of dimension 1
>
> I suppose the mesh.init function is not called within the solve function. Any suggestions?
>
> Have you tested adaptivity in 3D? Do you have any examples available?
>
We have tested adaptivity in 3D, but not as extensively. Please file a bug report, include a minimal running example and the DOLFIN version.
--
Marie
--
If this answers your question, please go to the following page to let us know that it is solved:
https:/
If you still need help, you can reply to this email or go to the following page to enter your feedback:
https:/
You received this question notification because you asked the question.
*******
The contents of this e-mail message and any attachments are confidential and are intended solely for the addressee. If you have received this transmission in error, please immediately notify the sender by return e-mail and delete this message and its attachments. Any unauthorized use, copying or dissemination of this transmission is prohibited. Neither the confidentiality nor the integrity of this message can be vouched for following transmission on the Internet.
*******
Revision history for this message
|
#3 |
On 06/21/11 14:15, Susanne Støle-Hentschel wrote:
> Question #162201 on DOLFIN changed:
> https:/
>
> Status: Answered => Open
>
> Susanne Støle-Hentschel is still having a problem:
> I attached the 3D problem case and the output log.
>
Attached where?
--
Marie
> Susanne
>
> -----Original Message-----
> From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Marie Rognes
> Sent: 21. juni 2011 14:02
> To: Støle-Hentschel, Susanne
> Subject: Re: [Question #162201]: adaptivity for 3D
>
> Your question #162201 on DOLFIN changed:
> https:/
>
> Status: Open => Answered
>
> Marie Rognes proposed the following answer:
> On 06/21/11 13:06, Susanne Støle-Hentschel wrote:
>> New question #162201 on DOLFIN:
>> https:/
>>
>> When extending a working problem with adaptivity from 2D to 3D, problem.solve(...) fails after the first iteration with:
>>
>> Unable to create Function Space missing entities of dimension 1
>>
>> I suppose the mesh.init function is not called within the solve function. Any suggestions?
>>
>> Have you tested adaptivity in 3D? Do you have any examples available?
>>
>
> We have tested adaptivity in 3D, but not as extensively. Please file a bug report, include a minimal running example and the DOLFIN version.
>
> --
> Marie
>
> --
> If this answers your question, please go to the following page to let us know that it is solved:
> https:/
>
> If you still need help, you can reply to this email or go to the following page to enter your feedback:
> https:/
>
> You received this question notification because you asked the question.
>
>
> *******
> The contents of this e-mail message and any attachments are confidential and are intended solely for the addressee. If you have received this transmission in error, please immediately notify the sender by return e-mail and delete this message and its attachments. Any unauthorized use, copying or dissemination of this transmission is prohibited. Neither the confidentiality nor the integrity of this message can be vouched for following transmission on the Internet.
> *******
>
Revision history for this message
|
#4 |
On 06/23/2011 12:41 PM, Marie Rognes wrote:
> Question #162201 on DOLFIN changed:
> https:/
>
> Status: Open => Answered
>
> Marie Rognes proposed the following answer:
> On 06/21/11 14:15, Susanne Støle-Hentschel wrote:
>> Question #162201 on DOLFIN changed:
>> https:/
>>
>> Status: Answered => Open
>>
>> Susanne Støle-Hentschel is still having a problem:
>> I attached the 3D problem case and the output log.
>>
>
> Attached where?
That might the usual problem with launchpad questions. IIRC attachments
are filtered out when you attach them to a reply to a launchpad question.
Andre
>
> --
> Marie
>
>
>> Susanne
>>
>> -----Original Message-----
>> From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Marie Rognes
>> Sent: 21. juni 2011 14:02
>> To: Støle-Hentschel, Susanne
>> Subject: Re: [Question #162201]: adaptivity for 3D
>>
>> Your question #162201 on DOLFIN changed:
>> https:/
>>
>> Status: Open => Answered
>>
>> Marie Rognes proposed the following answer:
>> On 06/21/11 13:06, Susanne Støle-Hentschel wrote:
>>> New question #162201 on DOLFIN:
>>> https:/
>>>
>>> When extending a working problem with adaptivity from 2D to 3D, problem.solve(...) fails after the first iteration with:
>>>
>>> Unable to create Function Space missing entities of dimension 1
>>>
>>> I suppose the mesh.init function is not called within the solve function. Any suggestions?
>>>
>>> Have you tested adaptivity in 3D? Do you have any examples available?
>>>
>>
>> We have tested adaptivity in 3D, but not as extensively. Please file a bug report, include a minimal running example and the DOLFIN version.
>>
>> --
>> Marie
>>
>> --
>> If this answers your question, please go to the following page to let us know that it is solved:
>> https:/
>>
>> If you still need help, you can reply to this email or go to the following page to enter your feedback:
>> https:/
>>
>> You received this question notification because you asked the question.
>>
>>
>> *******
>> The contents of this e-mail message and any attachments are confidential and are intended solely for the addressee. If you have received this transmission in error, please immediately notify the sender by return e-mail and delete this message and its attachments. Any unauthorized use, copying or dissemination of this transmission is prohibited. Neither the confidentiality nor the integrity of this message can be vouched for following transmission on the Internet.
>> *******
>>
>
Revision history for this message
|
#5 |
Yes, I replied with attachments. I will paste the examples here:
the working 2D example:
_______
from dolfin import *
# Form compiler options
parameters[
parameters[
parameters[
set_log_level(0)
# PETSc
K = PETScMatrix()
M = PETScMatrix()
R = PETScVector()
# Load mesh and define function space
ou = 2
mesh = Rectangle(
mesh.order()
V = VectorFunctionS
# Sub domain for clamp at left end
def left(x, on_boundary):
tol = 1.0e-14
return abs(x[0]) < tol and on_boundary
# Sub domain for shear at right end
class RightBoundary(
def inside(self, x, on_boundary):
tol = 1.0e-14
return abs(x[0]-48) < tol and on_boundary
# Mark boundary parts
domain_parts = MeshFunction(
boundary_parts = MeshFunction(
dOmega_t = RightBoundary()
dOmega_
# Define variational problem
v = TestFunction(V)
u = TrialFunction(V)
f = Constant((0.0, 0.0))
tg = Expression(
E = 30000.0
nu = 0.25
rho = 1
mu = E / (2.0*(1.0 + nu))
lmbda = E*nu / ((1.0 - nu*nu))
def sigma(v):
return 2.0*mu*sym(grad(v)) + lmbda*tr(
a = inner(grad(v), sigma(u))*dx
b = inner(rho*v,u)*dx
L = inner(v,
# Define goal
u = Function(V)
#g = u[1]*dx
g = u[1]*ds(0)
g.exterior_
u.name = "Displacements"
# Set up boundary condition at left end
c = Constant((0.0, 0.0))
bcl = DirichletBC(V, c, left)
# Set up PDE and solve
eps = 1.e-2
problem = VariationalProb
problem.
#u = problem.solve()
#assemble(a, tensor=K, exterior_
#assemble(L, tensor=R, exterior_
#bcl.apply(K,R)
#u = Function(V)
#solve(
print "Max displacement ::", u.fine(
# Solve for the gradients
gradu = project(
# Save solution to VTK format
ufile = File("elasticit
ufile << u.fine()
ufile << gradu.fine()
# Plot solution
plot(u, mode="displacem
plot(mesh, interactive=True)
_______
the extended 3D example:
_______
from dolfin import *
# Form compiler options
parameters[
parameters[
parameters[
set_log_level(1)
# Load mesh and define function space
ou = 1
mesh = Box(0,-
mesh.order()
mesh.init(2)
V = VectorFunctionS
# Sub domain for clamp at left end
def left(x, on_boundary):
tol = 1.0e-14
return abs(x[0]) < tol and on_boundary
# Sub domain for shear at right end
class RightBoundary(
def inside(self, x, on_boundary):
tol = 1.0e-14
return abs(x[0]-48) < tol and on_boundary
# Mark boundary parts
domain_parts = MeshFunction(
boundary_parts = MeshFunction(
dOmega_t = RightBoundary()
dOmega_
# Define variational problem
v = TestFunction(V)
u = TrialFunction(V)
f = Constant((0.0, 0.0, 0.0))
tg = Expression(
E = 30000.0
nu = 0.25
rho = 1
mu = E / (2.0*(1.0 + nu))
lmbda = E*nu / ((1+nu)*(1.0 - 2*nu))
def sigma(v):
return 2.0*mu*sym(grad(v)) + lmbda*tr(
a = inner(grad(v), sigma(u))*dx
b = inner(rho*v,u)*dx
L = inner(v,
L.exterior_
# Define goal
u = Function(V)
g = u[1]*ds(0)
g.exterior_
u.name = "Displacements"
# Set up boundary condition at left end
c = Constant((0.0, 0.0, 0.0))
bcl = DirichletBC(V, c, left)
# Set up PDE and solve
eps = 1.e-2
problem = VariationalProb
problem.
#u=problem.solve()
#K = PETScMatrix();
#R = PETScVector();
#assemble(a, tensor=K, exterior_
#assemble(L, tensor=R, exterior_
#bcl.apply(K,R)
#u = Function(V)
#solve(
print "Max displacement ::", u.vector().max()
# Solve for the gradients
gradu = project(
# Save solution to VTK format
ufile = File("elasticit
ufile << u.fine()
ufile << gradu
# Plot solution
#plot(u, mode="displacem
#plot(mesh, interactive=True)
_______
the output when running the 3D case:
_______
Ordering mesh.
Ordering mesh.
Requesting connectivity 3 - 3.
Requesting connectivity 3 - 0.
Requesting connectivity 0 - 3.
Requesting connectivity 3 - 0.
Computing mesh connectivity 0 - 3 from transpose.
Elapsed time: 2.5034e-05 (compute connectivity 0 - 3)
Computing mesh connectivity 3 - 3 from intersection 3 - 0 - 3.
Elapsed time: 0.000360012 (compute connectivity 3 - 3)
Elapsed time: 0.001194 (compute entities dim = 2)
Elapsed time: 7.00951e-05 (Init dofmap)
Elapsed time: 3.38554e-05 (Init dofmap)
Computing sub domain markers for sub domain 0.
Requesting connectivity 2 - 3.
Requesting connectivity 3 - 2.
Computing mesh connectivity 2 - 3 from transpose.
Elapsed time: 4.81606e-05 (compute connectivity 2 - 3)
Debug: Automatic selection of expression element: <Lagrange vector element of degree ? on a <? cell in ?>: 3 x <CG? on a <? cell in ?>>> [at /usr/lib/
Initializing PETSc (ignoring command-line arguments).
Computing sub domain markers for sub domain 0.
Generating forms required for error control.
Extracted finite element for sub system: FiniteElement(
Requesting connectivity 3 - 3.
Elapsed time: 0.00130296 (compute entities dim = 1)
Elapsed time: 3.60012e-05 (Init dofmap)
Extracted finite element for sub system: FiniteElement(
Elapsed time: 3.50475e-05 (Init dofmap)
Extracted finite element for sub system: FiniteElement(
Elapsed time: 3.50475e-05 (Init dofmap)
Elapsed time: 5.00679e-05 (Init dofmap)
Elapsed time: 3.69549e-05 (Init dofmap)
Elapsed time: 3.29018e-05 (Init dofmap)
Elapsed time: 3.00407e-05 (Init dofmap)
Elapsed time: 3.91006e-05 (Init dofmap)
Elapsed time: 3.8147e-05 (Init dofmap)
Elapsed time: 4.3869e-05 (Init dofmap)
Elapsed time: 3.60012e-05 (Init dofmap)
Stage 0.0: Solving primal problem...
Solving linear variational problem.
Matrix of size 243 x 243 has 6921 nonzero entries.
Elapsed time: 0.00113201 (Build sparsity)
Elapsed time: 0.015172 (Init tensor)
Elapsed time: 9.53674e-07 (Delete sparsity)
Elapsed time: 0.000921011 (Assemble cells)
Elapsed time: 4.05312e-06 (Build sparsity)
Elapsed time: 0.000138998 (Init tensor)
Elapsed time: 2.14577e-06 (Delete sparsity)
Elapsed time: 0.000333071 (Assemble cells)
Elapsed time: 0.000164032 (Assemble exterior facets)
Applying boundary conditions to linear system.
Solving linear system of size 243 x 243 (PETSc LU solver, umfpack).
Elapsed time: 0.00184608 (LU solver)
Stage 0.1: Computing error estimate...
Solving linear variational problem.
Matrix of size 243 x 243 has 6921 nonzero entries.
Elapsed time: 0.000922918 (Build sparsity)
Elapsed time: 2.90871e-05 (Init tensor)
Elapsed time: 9.53674e-07 (Delete sparsity)
Elapsed time: 0.000906944 (Assemble cells)
Elapsed time: 3.09944e-06 (Build sparsity)
Elapsed time: 0.000120163 (Init tensor)
Elapsed time: 1.19209e-06 (Delete sparsity)
Elapsed time: 3.00407e-05 (Assemble exterior facets)
Applying boundary conditions to linear system.
Solving linear system of size 243 x 243 (PETSc LU solver, umfpack).
Elapsed time: 0.00142384 (LU solver)
Extracted finite element for sub system: FiniteElement(
Extracted finite element for sub system: FiniteElement(
Extracted finite element for sub system: FiniteElement(
Extracted finite element for sub system: FiniteElement(
Extracted finite element for sub system: FiniteElement(
Extracted finite element for sub system: FiniteElement(
Applying boundary conditions to linear system.
Elapsed time: 6.91414e-06 (Build sparsity)
Elapsed time: 0 (Init tensor)
Elapsed time: 9.53674e-07 (Delete sparsity)
Elapsed time: 0.000838995 (Assemble cells)
Elapsed time: 0.000334024 (Assemble exterior facets)
Elapsed time: 1.90735e-06 (Build sparsity)
Elapsed time: 0 (Init tensor)
Elapsed time: 9.53674e-07 (Delete sparsity)
Elapsed time: 2.90871e-05 (Assemble exterior facets)
Estimated error (16.077) does not satisfy tolerance (0.01).
Current adaptive data
Level | M(u_h) M(u) TOL Error estimate #cells #dofs
-----
0 | 22.839 N/A 0.01 16.077 192 243
Stage 0.2: Computing error indicators...
Computing residual representation
Computing cell residual representation
Computing facet residual representation
Elapsed time: 0.0210009 (Computation of residual representation)
Elapsed time: 5.00679e-06 (Build sparsity)
Elapsed time: 1.21593e-05 (Init tensor)
Elapsed time: 1.19209e-06 (Delete sparsity)
Elapsed time: 0.000319958 (Assemble cells)
Elapsed time: 0.00295496 (Assemble exterior facets)
Elapsed time: 0.012701 (Assemble interior facets)
Stage 0.3: Marking mesh for refinement...
Marking 22 cells out of 192 (11.5%) for refinement
Stage 0.4: Refining mesh...
22 cells out of 192 marked for refinement (11.5%).
Refining simplicial mesh by recursive Rivara bisection.
Storing parent cell information
Storing parent facet information
Requesting connectivity 3 - 3.
Requesting connectivity 3 - 0.
Requesting connectivity 0 - 3.
Requesting connectivity 3 - 0.
Computing mesh connectivity 0 - 3 from transpose.
Elapsed time: 4.50611e-05 (compute connectivity 0 - 3)
Computing mesh connectivity 3 - 3 from intersection 3 - 0 - 3.
Elapsed time: 0.000455856 (compute connectivity 3 - 3)
Elapsed time: 0.00156212 (compute entities dim = 2)
Requesting connectivity 2 - 3.
Requesting connectivity 3 - 2.
Computing mesh connectivity 2 - 3 from transpose.
Elapsed time: 2.5034e-05 (compute connectivity 2 - 3)
Number of cells increased from 192 to 240 (25.0% increase).
Plotting mesh (DOLFIN mesh), press 'q' to continue...
Plot active, press 'q' to continue.
Stage 0.5: Updating forms...
Elapsed time: 6.8903e-05 (Init dofmap)
Debug: Function space has already been refined, returning child space. [at /build/
Debug: Function space has already been refined, returning child space. [at /build/
Debug: Function space has already been refined, returning child space. [at /build/
Debug: Function space has already been refined, returning child space. [at /build/
Debug: Function has already been refined, returning child function. [at /build/
Debug: MeshFunction has already been refined, returning child [at /build/
Debug: Function space has already been refined, returning child space. [at /build/
Debug: Function space has already been refined, returning child space. [at /build/
Elapsed time: 4.00543e-05 (Init dofmap)
Debug: MeshFunction has already been refined, returning child [at /build/
Debug: Function has already been refined, returning child function. [at /build/
Traceback (most recent call last):
File "cantilever3D_
problem.
File "/usr/lib/
self.
File "/usr/lib/
cpp.
RuntimeError: *** Error: Unable to create function space, missing entities of dimension 1. Try calling mesh.init(1).
_______
Thank you for your help!
Susanne
Revision history for this message
|
#6 |
Have you tried calling mesh.init(1) as suggested? As far as I can see,
you only call mesh.init(2).
Martin
2011/6/23 Susanne Støle-Hentschel <email address hidden>:
> Question #162201 on DOLFIN changed:
> https:/
>
> Status: Answered => Open
>
> Susanne Støle-Hentschel is still having a problem:
> Yes, I replied with attachments. I will paste the examples here:
>
> the working 2D example:
>
> _______
>
> from dolfin import *
>
> # Form compiler options
> parameters[
> parameters[
>
> parameters[
>
> set_log_level(0)
>
>
> # PETSc
> K = PETScMatrix()
> M = PETScMatrix()
> R = PETScVector()
>
> # Load mesh and define function space
> ou = 2
> mesh = Rectangle(
> mesh.order()
> V = VectorFunctionS
>
> # Sub domain for clamp at left end
> def left(x, on_boundary):
> tol = 1.0e-14
> return abs(x[0]) < tol and on_boundary
>
> # Sub domain for shear at right end
> class RightBoundary(
> def inside(self, x, on_boundary):
> tol = 1.0e-14
> return abs(x[0]-48) < tol and on_boundary
>
> # Mark boundary parts
> domain_parts = MeshFunction(
> boundary_parts = MeshFunction(
> dOmega_t = RightBoundary()
> dOmega_
>
> # Define variational problem
> v = TestFunction(V)
> u = TrialFunction(V)
> f = Constant((0.0, 0.0))
> tg = Expression(
>
>
> E = 30000.0
> nu = 0.25
> rho = 1
>
> mu = E / (2.0*(1.0 + nu))
> lmbda = E*nu / ((1.0 - nu*nu))
>
> def sigma(v):
> return 2.0*mu*sym(grad(v)) + lmbda*tr(
>
> a = inner(grad(v), sigma(u))*dx
> b = inner(rho*v,u)*dx
> L = inner(v,
>
> # Define goal
> u = Function(V)
> #g = u[1]*dx
> g = u[1]*ds(0)
> g.exterior_
>
> u.name = "Displacements"
> # Set up boundary condition at left end
> c = Constant((0.0, 0.0))
> bcl = DirichletBC(V, c, left)
>
> # Set up PDE and solve
> eps = 1.e-2
> problem = VariationalProb
> problem.
> #u = problem.solve()
> #assemble(a, tensor=K, exterior_
> #assemble(L, tensor=R, exterior_
> #bcl.apply(K,R)
> #u = Function(V)
> #solve(
>
>
> print "Max displacement ::", u.fine(
>
> # Solve for the gradients
> gradu = project(
>
> # Save solution to VTK format
> ufile = File("elasticit
> ufile << u.fine()
> ufile << gradu.fine()
>
> # Plot solution
> plot(u, mode="displacem
> plot(mesh, interactive=True)
>
>
> _______
>
> the extended 3D example:
> _______
>
> from dolfin import *
>
> # Form compiler options
> parameters[
> parameters[
>
> parameters[
>
> set_log_level(1)
>
>
> # Load mesh and define function space
> ou = 1
> mesh = Box(0,-
> mesh.order()
> mesh.init(2)
> V = VectorFunctionS
>
> # Sub domain for clamp at left end
> def left(x, on_boundary):
> tol = 1.0e-14
> return abs(x[0]) < tol and on_boundary
>
> # Sub domain for shear at right end
> class RightBoundary(
> def inside(self, x, on_boundary):
> tol = 1.0e-14
> return abs(x[0]-48) < tol and on_boundary
>
> # Mark boundary parts
> domain_parts = MeshFunction(
> boundary_parts = MeshFunction(
> dOmega_t = RightBoundary()
> dOmega_
>
> # Define variational problem
> v = TestFunction(V)
> u = TrialFunction(V)
> f = Constant((0.0, 0.0, 0.0))
> tg = Expression(
>
>
> E = 30000.0
> nu = 0.25
> rho = 1
>
> mu = E / (2.0*(1.0 + nu))
> lmbda = E*nu / ((1+nu)*(1.0 - 2*nu))
>
> def sigma(v):
> return 2.0*mu*sym(grad(v)) + lmbda*tr(
>
> a = inner(grad(v), sigma(u))*dx
> b = inner(rho*v,u)*dx
> L = inner(v,
> L.exterior_
>
> # Define goal
> u = Function(V)
> g = u[1]*ds(0)
> g.exterior_
>
> u.name = "Displacements"
> # Set up boundary condition at left end
> c = Constant((0.0, 0.0, 0.0))
> bcl = DirichletBC(V, c, left)
>
> # Set up PDE and solve
> eps = 1.e-2
> problem = VariationalProb
> problem.
> #u=problem.solve()
>
>
> #K = PETScMatrix();
> #R = PETScVector();
> #assemble(a, tensor=K, exterior_
> #assemble(L, tensor=R, exterior_
> #bcl.apply(K,R)
> #u = Function(V)
> #solve(
>
> print "Max displacement ::", u.vector().max()
>
> # Solve for the gradients
> gradu = project(
>
> # Save solution to VTK format
> ufile = File("elasticit
> ufile << u.fine()
> ufile << gradu
>
> # Plot solution
> #plot(u, mode="displacem
> #plot(mesh, interactive=True)
>
>
> _______
>
>
> the output when running the 3D case:
> _______
>
> Ordering mesh.
> Ordering mesh.
> Requesting connectivity 3 - 3.
> Requesting connectivity 3 - 0.
> Requesting connectivity 0 - 3.
> Requesting connectivity 3 - 0.
> Computing mesh connectivity 0 - 3 from transpose.
> Elapsed time: 2.5034e-05 (compute connectivity 0 - 3)
> Computing mesh connectivity 3 - 3 from intersection 3 - 0 - 3.
> Elapsed time: 0.000360012 (compute connectivity 3 - 3)
> Elapsed time: 0.001194 (compute entities dim = 2)
> Elapsed time: 7.00951e-05 (Init dofmap)
> Elapsed time: 3.38554e-05 (Init dofmap)
> Computing sub domain markers for sub domain 0.
> Requesting connectivity 2 - 3.
> Requesting connectivity 3 - 2.
> Computing mesh connectivity 2 - 3 from transpose.
> Elapsed time: 4.81606e-05 (compute connectivity 2 - 3)
> Debug: Automatic selection of expression element: <Lagrange vector element of degree ? on a <? cell in ?>: 3 x <CG? on a <? cell in ?>>> [at /usr/lib/
> Initializing PETSc (ignoring command-line arguments).
> Computing sub domain markers for sub domain 0.
> Generating forms required for error control.
> Extracted finite element for sub system: FiniteElement(
> Requesting connectivity 3 - 3.
> Elapsed time: 0.00130296 (compute entities dim = 1)
> Elapsed time: 3.60012e-05 (Init dofmap)
> Extracted finite element for sub system: FiniteElement(
> Elapsed time: 3.50475e-05 (Init dofmap)
> Extracted finite element for sub system: FiniteElement(
> Elapsed time: 3.50475e-05 (Init dofmap)
> Elapsed time: 5.00679e-05 (Init dofmap)
> Elapsed time: 3.69549e-05 (Init dofmap)
> Elapsed time: 3.29018e-05 (Init dofmap)
> Elapsed time: 3.00407e-05 (Init dofmap)
> Elapsed time: 3.91006e-05 (Init dofmap)
> Elapsed time: 3.8147e-05 (Init dofmap)
> Elapsed time: 4.3869e-05 (Init dofmap)
> Elapsed time: 3.60012e-05 (Init dofmap)
>
> Stage 0.0: Solving primal problem...
> Solving linear variational problem.
> Matrix of size 243 x 243 has 6921 nonzero entries.
> Elapsed time: 0.00113201 (Build sparsity)
> Elapsed time: 0.015172 (Init tensor)
> Elapsed time: 9.53674e-07 (Delete sparsity)
> Elapsed time: 0.000921011 (Assemble cells)
> Elapsed time: 4.05312e-06 (Build sparsity)
> Elapsed time: 0.000138998 (Init tensor)
> Elapsed time: 2.14577e-06 (Delete sparsity)
> Elapsed time: 0.000333071 (Assemble cells)
> Elapsed time: 0.000164032 (Assemble exterior facets)
> Applying boundary conditions to linear system.
> Solving linear system of size 243 x 243 (PETSc LU solver, umfpack).
> Elapsed time: 0.00184608 (LU solver)
> Stage 0.1: Computing error estimate...
> Solving linear variational problem.
> Matrix of size 243 x 243 has 6921 nonzero entries.
> Elapsed time: 0.000922918 (Build sparsity)
> Elapsed time: 2.90871e-05 (Init tensor)
> Elapsed time: 9.53674e-07 (Delete sparsity)
> Elapsed time: 0.000906944 (Assemble cells)
> Elapsed time: 3.09944e-06 (Build sparsity)
> Elapsed time: 0.000120163 (Init tensor)
> Elapsed time: 1.19209e-06 (Delete sparsity)
> Elapsed time: 3.00407e-05 (Assemble exterior facets)
> Applying boundary conditions to linear system.
> Solving linear system of size 243 x 243 (PETSc LU solver, umfpack).
> Elapsed time: 0.00142384 (LU solver)
> Extracted finite element for sub system: FiniteElement(
> Extracted finite element for sub system: FiniteElement(
> Extracted finite element for sub system: FiniteElement(
> Extracted finite element for sub system: FiniteElement(
> Extracted finite element for sub system: FiniteElement(
> Extracted finite element for sub system: FiniteElement(
> Applying boundary conditions to linear system.
> Elapsed time: 6.91414e-06 (Build sparsity)
> Elapsed time: 0 (Init tensor)
> Elapsed time: 9.53674e-07 (Delete sparsity)
> Elapsed time: 0.000838995 (Assemble cells)
> Elapsed time: 0.000334024 (Assemble exterior facets)
> Elapsed time: 1.90735e-06 (Build sparsity)
> Elapsed time: 0 (Init tensor)
> Elapsed time: 9.53674e-07 (Delete sparsity)
> Elapsed time: 2.90871e-05 (Assemble exterior facets)
> Estimated error (16.077) does not satisfy tolerance (0.01).
>
> Current adaptive data
>
> Level | M(u_h) M(u) TOL Error estimate #cells #dofs
> -------
> 0 | 22.839 N/A 0.01 16.077 192 243
>
> Stage 0.2: Computing error indicators...
> Computing residual representation
> Computing cell residual representation
> Computing facet residual representation
> Elapsed time: 0.0210009 (Computation of residual representation)
> Elapsed time: 5.00679e-06 (Build sparsity)
> Elapsed time: 1.21593e-05 (Init tensor)
> Elapsed time: 1.19209e-06 (Delete sparsity)
> Elapsed time: 0.000319958 (Assemble cells)
> Elapsed time: 0.00295496 (Assemble exterior facets)
> Elapsed time: 0.012701 (Assemble interior facets)
> Stage 0.3: Marking mesh for refinement...
> Marking 22 cells out of 192 (11.5%) for refinement
> Stage 0.4: Refining mesh...
> 22 cells out of 192 marked for refinement (11.5%).
> Refining simplicial mesh by recursive Rivara bisection.
> Storing parent cell information
> Storing parent facet information
> Requesting connectivity 3 - 3.
> Requesting connectivity 3 - 0.
> Requesting connectivity 0 - 3.
> Requesting connectivity 3 - 0.
> Computing mesh connectivity 0 - 3 from transpose.
> Elapsed time: 4.50611e-05 (compute connectivity 0 - 3)
> Computing mesh connectivity 3 - 3 from intersection 3 - 0 - 3.
> Elapsed time: 0.000455856 (compute connectivity 3 - 3)
> Elapsed time: 0.00156212 (compute entities dim = 2)
> Requesting connectivity 2 - 3.
> Requesting connectivity 3 - 2.
> Computing mesh connectivity 2 - 3 from transpose.
> Elapsed time: 2.5034e-05 (compute connectivity 2 - 3)
> Number of cells increased from 192 to 240 (25.0% increase).
> Plotting mesh (DOLFIN mesh), press 'q' to continue...
> Plot active, press 'q' to continue.
> Stage 0.5: Updating forms...
> Elapsed time: 6.8903e-05 (Init dofmap)
> Debug: Function space has already been refined, returning child space. [at /build/
> Debug: Function space has already been refined, returning child space. [at /build/
> Debug: Function space has already been refined, returning child space. [at /build/
> Debug: Function space has already been refined, returning child space. [at /build/
> Debug: Function has already been refined, returning child function. [at /build/
> Debug: MeshFunction has already been refined, returning child [at /build/
> Debug: Function space has already been refined, returning child space. [at /build/
> Debug: Function space has already been refined, returning child space. [at /build/
> Elapsed time: 4.00543e-05 (Init dofmap)
> Debug: MeshFunction has already been refined, returning child [at /build/
> Debug: Function has already been refined, returning child function. [at /build/
> Traceback (most recent call last):
> File "cantilever3D_
> problem.
> File "/usr/lib/
> self.adaptive_
> File "/usr/lib/
> cpp.Variational
> RuntimeError: *** Error: Unable to create function space, missing entities of dimension 1. Try calling mesh.init(1).
>
> _______
>
> Thank you for your help!
>
> Susanne
>
> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.
>
Revision history for this message
|
#7 |
I tried different numbers for init, also init(1), but it does not help. The output is always suggesting init(1) anyway. The first iteration works fine so I was wondering if the init should be recalled upon the new mesh.
Susanne
-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Martin Sandve Alnæs
Sent: 23. juni 2011 14:02
To: Støle-Hentschel, Susanne
Subject: Re: [Question #162201]: adaptivity for 3D
Your question #162201 on DOLFIN changed:
https:/
Status: Open => Answered
Martin Sandve Alnæs proposed the following answer:
Have you tried calling mesh.init(1) as suggested? As far as I can see, you only call mesh.init(2).
Martin
2011/6/23 Susanne Støle-Hentschel <email address hidden>:
> Question #162201 on DOLFIN changed:
> https:/
>
> Status: Answered => Open
>
> Susanne Støle-Hentschel is still having a problem:
> Yes, I replied with attachments. I will paste the examples here:
>
> the working 2D example:
>
> _______
> ________________
>
> from dolfin import *
>
> # Form compiler options
> parameters[
> parameters[
>
> parameters[
>
> set_log_level(0)
>
>
> # PETSc
> K = PETScMatrix()
> M = PETScMatrix()
> R = PETScVector()
>
> # Load mesh and define function space
> ou = 2
> mesh = Rectangle(
> mesh.order()
> V = VectorFunctionS
>
> # Sub domain for clamp at left end
> def left(x, on_boundary):
> tol = 1.0e-14
> return abs(x[0]) < tol and on_boundary
>
> # Sub domain for shear at right end
> class RightBoundary(
> def inside(self, x, on_boundary):
> tol = 1.0e-14
> return abs(x[0]-48) < tol and on_boundary
>
> # Mark boundary parts
> domain_parts = MeshFunction(
> boundary_parts = MeshFunction(
> dOmega_t = RightBoundary()
> dOmega_
>
> # Define variational problem
> v = TestFunction(V)
> u = TrialFunction(V)
> f = Constant((0.0, 0.0))
> tg = Expression(
>
>
> E = 30000.0
> nu = 0.25
> rho = 1
>
> mu = E / (2.0*(1.0 + nu))
> lmbda = E*nu / ((1.0 - nu*nu))
>
> def sigma(v):
> return 2.0*mu*sym(grad(v)) +
> lmbda*tr(
>
> a = inner(grad(v), sigma(u))*dx
> b = inner(rho*v,u)*dx
> L = inner(v,
>
> # Define goal
> u = Function(V)
> #g = u[1]*dx
> g = u[1]*ds(0)
> g.exterior_
>
> u.name = "Displacements"
> # Set up boundary condition at left end c = Constant((0.0, 0.0)) bcl
> = DirichletBC(V, c, left)
>
> # Set up PDE and solve
> eps = 1.e-2
> problem = VariationalProb
> problem.
> #u = problem.solve()
> #assemble(a, tensor=K, exterior_
> #assemble(L, tensor=R, exterior_
> #bcl.apply(K,R)
> #u = Function(V)
> #solve(
>
>
> print "Max displacement ::", u.fine(
>
> # Solve for the gradients
> gradu = project(
>
> # Save solution to VTK format
> ufile = File("elasticit
> ufile << u.fine()
> ufile << gradu.fine()
>
> # Plot solution
> plot(u, mode="displacem
> interactive=True)
>
>
> _______
> ________________
>
> the extended 3D example:
> _______
> ________________
>
> from dolfin import *
>
> # Form compiler options
> parameters[
> parameters[
>
> parameters[
>
> set_log_level(1)
>
>
> # Load mesh and define function space
> ou = 1
> mesh = Box(0,-
> mesh.order()
> mesh.init(2)
> V = VectorFunctionS
>
> # Sub domain for clamp at left end
> def left(x, on_boundary):
> tol = 1.0e-14
> return abs(x[0]) < tol and on_boundary
>
> # Sub domain for shear at right end
> class RightBoundary(
> def inside(self, x, on_boundary):
> tol = 1.0e-14
> return abs(x[0]-48) < tol and on_boundary
>
> # Mark boundary parts
> domain_parts = MeshFunction(
> boundary_parts = MeshFunction(
> dOmega_t = RightBoundary()
> dOmega_
>
> # Define variational problem
> v = TestFunction(V)
> u = TrialFunction(V)
> f = Constant((0.0, 0.0, 0.0))
> tg =
> Expression(
>
>
> E = 30000.0
> nu = 0.25
> rho = 1
>
> mu = E / (2.0*(1.0 + nu))
> lmbda = E*nu / ((1+nu)*(1.0 - 2*nu))
>
> def sigma(v):
> return 2.0*mu*sym(grad(v)) +
> lmbda*tr(
>
> a = inner(grad(v), sigma(u))*dx
> b = inner(rho*v,u)*dx
> L = inner(v,
> L.exterior_
>
> # Define goal
> u = Function(V)
> g = u[1]*ds(0)
> g.exterior_
>
> u.name = "Displacements"
> # Set up boundary condition at left end c = Constant((0.0, 0.0,
> 0.0)) bcl = DirichletBC(V, c, left)
>
> # Set up PDE and solve
> eps = 1.e-2
> problem = VariationalProb
> problem.
> #u=problem.solve()
>
>
> #K = PETScMatrix();
> #R = PETScVector();
> #assemble(a, tensor=K, exterior_
> #assemble(L, tensor=R, exterior_
> #bcl.apply(K,R)
> #u = Function(V)
> #solve(
>
> print "Max displacement ::", u.vector().max()
>
> # Solve for the gradients
> gradu = project(
>
> # Save solution to VTK format
> ufile = File("elasticit
> ufile << u.fine()
> ufile << gradu
>
> # Plot solution
> #plot(u, mode="displacem
> interactive=True)
>
>
> _______
> ________________
>
>
> the output when running the 3D case:
> _______
> ________________
>
> Ordering mesh.
> Ordering mesh.
> Requesting connectivity 3 - 3.
> Requesting connectivity 3 - 0.
> Requesting connectivity 0 - 3.
> Requesting connectivity 3 - 0.
> Computing mesh connectivity 0 - 3 from transpose.
> Elapsed time: 2.5034e-05 (compute connectivity 0 - 3) Computing mesh
> connectivity 3 - 3 from intersection 3 - 0 - 3.
> Elapsed time: 0.000360012 (compute connectivity 3 - 3) Elapsed time:
> 0.001194 (compute entities dim = 2) Elapsed time: 7.00951e-05 (Init
> dofmap) Elapsed time: 3.38554e-05 (Init dofmap) Computing sub domain
> markers for sub domain 0.
> Requesting connectivity 2 - 3.
> Requesting connectivity 3 - 2.
> Computing mesh connectivity 2 - 3 from transpose.
> Elapsed time: 4.81606e-05 (compute connectivity 2 - 3)
> Debug: Automatic selection of expression element: <Lagrange vector
> element of degree ? on a <? cell in ?>: 3 x <CG? on a <? cell in ?>>>
> [at
> /usr/lib/
> _auto_select_
> Initializing PETSc (ignoring command-line arguments).
> Computing sub domain markers for sub domain 0.
> Generating forms required for error control.
> Extracted finite element for sub system: FiniteElement(
> Cell('tetrahedron', Space(3)), 1, None) Requesting connectivity 3 - 3.
> Elapsed time: 0.00130296 (compute entities dim = 1) Elapsed time:
> 3.60012e-05 (Init dofmap) Extracted finite element for sub system:
> FiniteElement(
> Elapsed time: 3.50475e-05 (Init dofmap) Extracted finite element for
> sub system: FiniteElement(
> 1, None) Elapsed time: 3.50475e-05 (Init dofmap) Elapsed time:
> 5.00679e-05 (Init dofmap) Elapsed time: 3.69549e-05 (Init dofmap)
> Elapsed time: 3.29018e-05 (Init dofmap) Elapsed time: 3.00407e-05
> (Init dofmap) Elapsed time: 3.91006e-05 (Init dofmap) Elapsed time:
> 3.8147e-05 (Init dofmap) Elapsed time: 4.3869e-05 (Init dofmap)
> Elapsed time: 3.60012e-05 (Init dofmap)
>
> Stage 0.0: Solving primal problem...
> Solving linear variational problem.
> Matrix of size 243 x 243 has 6921 nonzero entries.
> Elapsed time: 0.00113201 (Build sparsity)
> Elapsed time: 0.015172 (Init tensor)
> Elapsed time: 9.53674e-07 (Delete sparsity)
> Elapsed time: 0.000921011 (Assemble cells)
> Elapsed time: 4.05312e-06 (Build sparsity)
> Elapsed time: 0.000138998 (Init tensor)
> Elapsed time: 2.14577e-06 (Delete sparsity)
> Elapsed time: 0.000333071 (Assemble cells)
> Elapsed time: 0.000164032 (Assemble exterior facets)
> Applying boundary conditions to linear system.
> Solving linear system of size 243 x 243 (PETSc LU solver, umfpack).
> Elapsed time: 0.00184608 (LU solver) Stage 0.1: Computing error
> estimate...
> Solving linear variational problem.
> Matrix of size 243 x 243 has 6921 nonzero entries.
> Elapsed time: 0.000922918 (Build sparsity)
> Elapsed time: 2.90871e-05 (Init tensor)
> Elapsed time: 9.53674e-07 (Delete sparsity)
> Elapsed time: 0.000906944 (Assemble cells)
> Elapsed time: 3.09944e-06 (Build sparsity)
> Elapsed time: 0.000120163 (Init tensor)
> Elapsed time: 1.19209e-06 (Delete sparsity)
> Elapsed time: 3.00407e-05 (Assemble exterior facets)
> Applying boundary conditions to linear system.
> Solving linear system of size 243 x 243 (PETSc LU solver, umfpack).
> Elapsed time: 0.00142384 (LU solver)
> Extracted finite element for sub system: FiniteElement(
> Cell('tetrahedron', Space(3)), 2, None)
> Extracted finite element for sub system: FiniteElement(
> Cell('tetrahedron', Space(3)), 1, None)
> Extracted finite element for sub system: FiniteElement(
> Cell('tetrahedron', Space(3)), 2, None)
> Extracted finite element for sub system: FiniteElement(
> Cell('tetrahedron', Space(3)), 1, None)
> Extracted finite element for sub system: FiniteElement(
> Cell('tetrahedron', Space(3)), 2, None)
> Extracted finite element for sub system: FiniteElement(
> Cell('tetrahedron', Space(3)), 1, None)
> Applying boundary conditions to linear system.
> Elapsed time: 6.91414e-06 (Build sparsity)
> Elapsed time: 0 (Init tensor)
> Elapsed time: 9.53674e-07 (Delete sparsity)
> Elapsed time: 0.000838995 (Assemble cells)
> Elapsed time: 0.000334024 (Assemble exterior facets)
> Elapsed time: 1.90735e-06 (Build sparsity)
> Elapsed time: 0 (Init tensor)
> Elapsed time: 9.53674e-07 (Delete sparsity)
> Elapsed time: 2.90871e-05 (Assemble exterior facets)
> Estimated error (16.077) does not satisfy tolerance (0.01).
>
> Current adaptive data
>
> Level | M(u_h) M(u) TOL Error estimate #cells #dofs
> -------
> 0 | 22.839 N/A 0.01 16.077 192 243
>
> Stage 0.2: Computing error indicators...
> Computing residual representation
> Computing cell residual representation
> Computing facet residual representation
> Elapsed time: 0.0210009 (Computation of residual representation)
> Elapsed time: 5.00679e-06 (Build sparsity)
> Elapsed time: 1.21593e-05 (Init tensor)
> Elapsed time: 1.19209e-06 (Delete sparsity)
> Elapsed time: 0.000319958 (Assemble cells)
> Elapsed time: 0.00295496 (Assemble exterior facets)
> Elapsed time: 0.012701 (Assemble interior facets) Stage 0.3: Marking
> mesh for refinement...
> Marking 22 cells out of 192 (11.5%) for refinement Stage 0.4:
> Refining mesh...
> 22 cells out of 192 marked for refinement (11.5%).
> Refining simplicial mesh by recursive Rivara bisection.
> Storing parent cell information
> Storing parent facet information
> Requesting connectivity 3 - 3.
> Requesting connectivity 3 - 0.
> Requesting connectivity 0 - 3.
> Requesting connectivity 3 - 0.
> Computing mesh connectivity 0 - 3 from transpose.
> Elapsed time: 4.50611e-05 (compute connectivity 0 - 3)
> Computing mesh connectivity 3 - 3 from intersection 3 - 0 - 3.
> Elapsed time: 0.000455856 (compute connectivity 3 - 3)
> Elapsed time: 0.00156212 (compute entities dim = 2)
> Requesting connectivity 2 - 3.
> Requesting connectivity 3 - 2.
> Computing mesh connectivity 2 - 3 from transpose.
> Elapsed time: 2.5034e-05 (compute connectivity 2 - 3)
> Number of cells increased from 192 to 240 (25.0% increase).
> Plotting mesh (DOLFIN mesh), press 'q' to continue...
> Plot active, press 'q' to continue.
> Stage 0.5: Updating forms...
> Elapsed time: 6.8903e-05 (Init dofmap)
> Debug: Function space has already been refined, returning child
> space. [at /build/
> in adapt()]
> Debug: Function space has already been refined, returning child
> space. [at /build/
> in adapt()]
> Debug: Function space has already been refined, returning child
> space. [at /build/
> in adapt()]
> Debug: Function space has already been refined, returning child
> space. [at /build/
> in adapt()]
> Debug: Function has already been refined, returning child function.
> [at /build/
> adapt()]
> Debug: MeshFunction has already been refined, returning child [at
> /build/
> adapt()]
> Debug: Function space has already been refined, returning child
> space. [at /build/
> in adapt()]
> Debug: Function space has already been refined, returning child
> space. [at /build/
> in adapt()]
> Elapsed time: 4.00543e-05 (Init dofmap)
> Debug: MeshFunction has already been refined, returning child [at
> /build/
> adapt()]
> Debug: Function has already been refined, returning child function.
> [at /build/
> File "cantilever3D_
> problem.
> File
> "/usr/lib/
> line 99, in solve
> self.adaptive_
> File
> "/usr/lib/
> line 122, in adaptive_solve
> cpp.Variational
> RuntimeError: *** Error: Unable to create function space, missing entities of dimension 1. Try calling mesh.init(1).
>
> _______
> ________________
>
> Thank you for your help!
>
> Susanne
>
> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.
>
--
If this answers your question, please go to the following page to let us know that it is solved:
https:/
If you still need help, you can reply to this email or go to the following page to enter your feedback:
https:/
You received this question notification because you asked the question.
*******
The contents of this e-mail message and any attachments are confidential and are intended solely for the addressee. If you have received this transmission in error, please immediately notify the sender by return e-mail and delete this message and its attachments. Any unauthorized use, copying or dissemination of this transmission is prohibited. Neither the confidentiality nor the integrity of this message can be vouched for following transmission on the Internet.
*******
Revision history for this message
|
#8 |
On 06/23/11 13:50, Susanne Støle-Hentschel wrote:
> Question #162201 on DOLFIN changed:
> https:/
>
> Status: Answered => Open
>
> Susanne Støle-Hentschel is still having a problem:
> Yes, I replied with attachments. I will paste the examples here:
>
Thanks.
I've filed this as a bug (https:/
and will look at it when I get a chance (not today.)
Two comments:
1) Please remove all commented out code and non-essential stuff when
posting code -- then it is easier for us to respond to.
> g = u[1]*ds(0)
> g.exterior_
2) This syntax (g.exterior_
development branch (and hence in the following releases)
--
Marie
Can you help with this problem?
Provide an answer of your own, or ask Susanne Støle-Hentschel for more information if necessary.