Comments (2)
def non_trace_force_stepping_fn(design, force_magnitues):
u_init=0.0
for i in range(n_steps):
force_magnitude = force_magnitudes[i]
# Update value function
problem_bcs = available_problem_bcs.ProblemBCsDatabase.get_problem('cantilever_2D', box_domain,
force_magnitude=force_magnitude)
fe_problem.neumann_bc_info = problem_bcs.neumann_bc_info
# Solve the forward problem
fwd_pred = ad_wrapper(problem=fe_problem, linear=True, use_petsc=False,
u_init=u_init)
u = fwd_pred(design)
u_init = u
return u, fwd_pred
def pipeline_fn(params, state_of_params={}):
design, state_of_params = parametrizer_fn_with_x(params=params,
state=state_of_params)
design = cone_filter_mapping(design)
u_final, fwd_pred = non_trace_force_stepping_fn(jax.lax.stop_gradient(design), force_magnitudes)
fe_solution = fwd_pred([design], u_init=u_final)
objective_val = objective_fn(fe_solution)
constraint_val = constraint_fn(design)
return {
"fe_solution": fe_solution,
"design": design,
"objective": objective_val,
"constraint": constraint_val,
"nn_state": state_of_params,
}
This seems like an easy solution.
Changes to be made:
- Adjust
ad_wrapper
to acceptu_init_guess
[Modify JAX-FEM] - Expose
force_magnitude
in problem_bcs [TO-JAX]
@acse-itk22
from jax-fem.
I think the jax-am example for plasticity would be a good starting point
from jax-fem.
Related Issues (20)
- Updated README file and basic documentation HOT 1
- Clean-up demos and applications
- Create a uniform approach/template for post processing
- Save output files at user specified intervals
- Problem in the readme file. HOT 1
- JAX-FEM Refactor
- "pip install -e ." Throws an error: subprocess-exited-with-error
- Question about the demo thermal_mechanical_full HOT 7
- Docs / Tutorial Notebook HOT 1
- Boundary conditions using mesh properties. HOT 3
- Remove from jax.config import config, from fe.py HOT 5
- issue with petsc4py HOT 6
- Question about stresses for Linear_Elasticity demo HOT 2
- How to do parallel solver HOT 4
- PETSc solver not working with JAX transforms
- Infinite while loop for non-linear case
- Rename Cauchy BC to Robin BC
- Allow analytical sensitivities for known objectives
- Need a direct solver
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jax-fem.